/*
  Grindhouse No. 9: coffee subscription website (Screenery template)
  Tactile industrial roastery countertop and live thermal till-roll machine.
  Brushed-slate workbench with cutting-mat hairlines, warm overhead spotlight,
  warm white thermal paper, crisp charcoal thermal ink, character rules,
  double-height totals, and cobalt rubber-stamp ink.

  Contents
   1. Tokens
   2. Base and browser surfaces
   3. The counter, clutter, top bar
   4. The printer and the paper (thermal streaks, torn edge)
   5. Receipt type: brand, headings, rules, meta rows, leaders
   6. Components: buttons, option boxes, steppers, chips, range, fields, select, alert, stamps
   7. Hero
   8. Origins and options
   9. The tab: lines, sums, double-height total
  10. Brew ratio
  11. Roast calendar and batch sheet
  12. Roastery, log, questions
  13. Checkout and the final receipt
  14. Foot: barcode, QR
  15. Dockets on the counter, tab bar
  16. Motion: the header prints line by line, sections print as they scroll in
  17. Narrow screens
*/

/* === 1. Tokens === */
:root {
  /* Palette */
  --counter: #16191d;          /* brushed-slate roastery workbench */
  --counter-lift: #1f242a;
  --counter-line: rgba(218, 228, 238, 0.055);
  --paper: #f7f4ec;            /* thermal paper, crisp warm white */
  --paper-shade: #e7e2d5;
  --ink: #1f2128;              /* thermal charcoal-black */
  --ink-soft: #464954;         /* secondary print, 8.3:1 on paper */
  --ink-fade: #595d68;         /* faded print, 6.0:1 on paper */
  --stamp: #2040b8;            /* cobalt rubber-stamp ink, 7.5:1 on paper */
  --stamp-deep: #173090;       /* deep cobalt, 10.2:1 on paper */
  --slip: #ebe0c2;             /* perforated manila docket */
  --slip-shade: #d5c59c;
  --slip-muted: #453f31;       /* 7.8:1 on slip */
  --kraft: #dfd1b0;            /* cupping note card */
  --tag-bg: #22272f;           /* dark slate dispatch tag */
  --brass: #e5b071;            /* warm brass label on dark slate, 8.2:1 */
  --chalk: #f0ece3;            /* text on the counter, 15.4:1 */
  --chalk-dim: #b8bcc2;        /* muted text on the counter, 9.4:1 */
  --ring: #a8743f;             /* coffee ring stain */
  --bean: #54321e;
  --bean-crease: #211209;
  --led: #5ce085;

  /* Type */
  --mono: "Anonymous Pro", "Courier New", monospace;
  --stampface: "Bowlby One SC", "Arial Black", sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-h3: 1.375rem;
  --fs-h2: clamp(1.65rem, 1.25rem + 1.1vw, 2.15rem);
  --fs-h1: clamp(1.95rem, 1.45rem + 1.55vw, 2.55rem);

  /* Space */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 72px;

  /* Shape and depth */
  --r-1: 2px;
  --r-2: 6px;
  --paper-w: 35.5rem;
  --pad: 32px;
  --tooth: 9px;
  --shadow-paper:
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 24px 52px -12px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(255, 250, 240, 0.08);
  --shadow-slip:
    0 2px 3px rgba(0, 0, 0, 0.35),
    0 16px 32px -10px rgba(0, 0, 0, 0.65);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* === 2. Base and browser surfaces === */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; scrollbar-color: #4f5661 var(--counter); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--mono);
  font-size: var(--fs-md);
  line-height: 1.45;
  color: var(--chalk);
  background-color: var(--counter);
  background-image:
    radial-gradient(ellipse 68% 42% at 50% 0%, rgba(255, 220, 172, 0.14), rgba(255, 206, 148, 0.04) 48%, transparent 74%),
    radial-gradient(ellipse 46% 32% at 15% 18%, rgba(86, 114, 152, 0.08), transparent 68%),
    radial-gradient(ellipse 46% 32% at 85% 22%, rgba(212, 154, 90, 0.07), transparent 68%),
    linear-gradient(var(--counter-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--counter-line) 1px, transparent 1px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .9 0 0 0 0 .93 0 0 0 0 .98 0 0 0 .055 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 100% 100%, 100% 100%, 100% 100%, 48px 48px, 48px 48px, 240px 240px;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
::selection { background: var(--stamp); color: var(--paper); }
input, select, textarea { caret-color: var(--stamp); accent-color: var(--stamp); }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--stamp); outline-offset: 3px; border-radius: var(--r-1); }
.bar :focus-visible, .side :focus-visible, .tabbar :focus-visible { outline-color: var(--chalk); }
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
p { margin: 0; }
button { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
.ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--paper); color: var(--ink); font-weight: 700; }
.skip:focus { top: 12px; }
[hidden] { display: none !important; }

/* === 3. The counter, clutter, top bar === */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: var(--s-5);
  height: 56px; padding: 0 clamp(16px, 3vw, 40px);
  background: rgba(20, 23, 28, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(226, 234, 244, 0.1);
}
.bar__brand { display: flex; align-items: center; gap: var(--s-3); text-decoration: none; min-height: 44px; }
.bar__mark {
  display: grid; place-items: center; width: 42px; height: 36px;
  font-family: var(--stampface); font-size: 0.8125rem; letter-spacing: 0.02em;
  color: var(--ink); background: var(--paper); border-radius: var(--r-1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.bar__name { font-family: var(--stampface); font-size: 1.0625rem; letter-spacing: 0.04em; color: var(--chalk); }
.bar__nav { display: flex; gap: var(--s-1); margin-inline: auto; }
.bar__nav a {
  display: grid; place-items: center; min-height: 44px; padding: 0 var(--s-3);
  font-size: var(--fs-sm); font-weight: 700; color: var(--chalk-dim);
  text-decoration: none; text-transform: uppercase; letter-spacing: 0.06em;
  transition: color 0.18s var(--ease);
}
.bar__nav a:hover { color: var(--chalk); text-decoration: underline; }
.bar__tab {
  display: flex; align-items: center; gap: var(--s-2); min-height: 40px; padding: 0 var(--s-4);
  border: 1.5px solid rgba(240, 236, 227, 0.42); border-radius: var(--r-1);
  background: rgba(255, 255, 255, 0.03);
  font-size: var(--fs-sm); font-weight: 700; text-decoration: none; text-transform: uppercase; letter-spacing: 0.04em;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}
.bar__tab:hover { border-color: var(--chalk); background: rgba(255, 255, 255, 0.08); }
.bar__tab b { font-variant-numeric: tabular-nums; }

.counter {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--paper-w)) minmax(0, 1fr);
  column-gap: clamp(24px, 3.6vw, 60px);
  padding: 20px clamp(16px, 3vw, 40px) var(--s-8);
  overflow-x: clip;
}
.clutter { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.coffee-ring { position: absolute; color: var(--ring); opacity: 0.55; }
.coffee-ring--a { width: 240px; left: 3%; top: 760px; }
.coffee-ring--b { width: 210px; right: 5%; top: 1680px; transform: rotate(40deg); }
.coffee-ring--c { width: 260px; left: 7%; top: 3250px; }
.beans { position: absolute; width: 160px; }
.beans--a { left: 10%; top: 1180px; }
.beans--b { right: 9%; top: 2600px; width: 145px; }
.bean-g { fill: var(--bean); stroke: var(--bean-crease); stroke-width: 2.4; stroke-linecap: round; }
.bean-g path { fill: none; }

/* === 4. The printer and the paper === */
.receipt { grid-column: 2; position: relative; z-index: 1; color: var(--ink); }
.printer { position: relative; z-index: 2; margin-inline: -22px; }
.printer__body {
  display: flex; align-items: center; gap: var(--s-3);
  height: 50px; padding: 0 var(--s-5);
  background:
    linear-gradient(180deg, #424852 0%, #2d3139 48%, #22262c 100%);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-bottom-color: rgba(0, 0, 0, 0.5);
  border-radius: 14px 14px 7px 7px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.14) inset,
    0 18px 34px -10px rgba(0, 0, 0, 0.78);
}
.printer__led {
  width: 8px; height: 8px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d6ffe0, var(--led) 62%);
  box-shadow: 0 0 10px rgba(92, 224, 133, 0.75);
}
.printer__model { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.16em; color: #d6dbe4; }
.printer__scale {
  margin-left: auto;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; color: #9ea6b4;
}
.printer__btn {
  padding: 5px 12px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em;
  color: #dce1ea; background: #181b20; border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}
.printer__slot {
  height: 11px; margin: -5px 12px 0;
  background: #0a0c0e; border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 7px rgba(0, 0, 0, 0.65) inset;
}

.paper {
  position: relative;
  margin-top: -5px;
  padding: 20px var(--pad) var(--s-6);
  background:
    linear-gradient(180deg, rgba(16, 18, 22, 0.15), transparent 22px),
    linear-gradient(90deg, rgba(60, 50, 30, 0.055), transparent 3.5%, transparent 96.5%, rgba(60, 50, 30, 0.055)),
    repeating-linear-gradient(90deg, transparent 0 53px, rgba(35, 42, 68, 0.022) 53px 55px, transparent 55px 131px, rgba(35, 42, 68, 0.016) 131px 132px),
    var(--paper);
  box-shadow: var(--shadow-paper);
}
/* Torn bottom edge */
.paper::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: var(--tooth);
  background: conic-gradient(from -45deg at 50% 100%, var(--paper) 90deg, transparent 0) 0 0 / calc(var(--tooth) * 2) 100% repeat-x;
  filter: drop-shadow(0 6px 5px rgba(0, 0, 0, 0.4));
}

/* === 5. Receipt type === */
.rc { position: relative; padding-block: var(--s-5); }
.rc + .rc { padding-top: var(--s-4); }
.rc > * + * { margin-top: var(--s-4); }
.center { text-align: center; }
.small { font-size: var(--fs-sm); }
.muted { color: var(--ink-fade); }
.lede { color: var(--ink-soft); max-width: 62ch; }

/* Compact store header so entire hero fits cleanly above the fold */
.rc--head { padding-block: 4px 0; }
.rc--head > * + * { margin-top: 8px; }
.brand {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px;
  text-align: center; font-family: var(--stampface); line-height: 0.95; letter-spacing: 0.01em;
}
.brand__a { font-size: clamp(1.75rem, 1.35rem + 1.2vw, 2.3rem); }
.brand__b {
  display: inline-block; padding: 3px 12px 5px;
  font-size: clamp(1.25rem, 1rem + 0.8vw, 1.6rem);
  color: var(--paper); background: var(--ink);
}
.brand--small { justify-content: center; }
.brand--small .brand__a { font-size: 1.65rem; }
.brand--small .brand__b { font-size: 1.15rem; }
.head__sub { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-soft); }

.h2 { font-family: var(--stampface); font-size: var(--fs-h2); line-height: 1.02; }
.h3 { font-family: var(--stampface); font-size: var(--fs-h3); line-height: 1.1; }
.rc > .h2 { margin-top: var(--s-5); }

/* Rules printed with characters, as a thermal printer would */
.rule { overflow: hidden; white-space: nowrap; line-height: 1; color: var(--ink-soft); user-select: none; margin-block: var(--s-3); }
.rule::before { display: block; letter-spacing: 0.08em; }
.rule--dash::before { content: "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -"; }
.rule--double::before { content: "============================================================================================================"; color: var(--ink); letter-spacing: 0.04em; }
.rule--dot::before { content: ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ."; }
.rule--scissor { display: flex; align-items: center; gap: var(--s-3); margin-inline: calc(var(--pad) * -1); padding-inline: var(--s-3); color: var(--ink-fade); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.rule--scissor::before, .rule--scissor::after { content: ""; flex: 1; border-top: 2px dashed currentColor; }

.rc-index { display: none; flex-wrap: wrap; justify-content: center; gap: 0 var(--s-4); }
.rc-index a { display: grid; place-items: center; min-height: 44px; font-weight: 700; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.06em; }
.meta-row { display: flex; justify-content: space-between; gap: var(--s-3); font-size: var(--fs-sm); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }

/* Leader rows: label ....... value */
.sums { margin-inline: 0; margin-bottom: 0; display: grid; gap: 6px; }
.sums > div { display: flex; align-items: baseline; gap: 0.5ch; }
.sums dt { flex: 1; display: flex; align-items: baseline; min-width: 0; text-transform: uppercase; letter-spacing: 0.03em; }
.sums dt::after { content: ""; flex: 1; min-width: 2ch; margin: 0 0 0.28em 0.75ch; border-bottom: 2px dotted var(--ink-fade); }
.sums dd { margin: 0; font-weight: 700; text-align: right; white-space: nowrap; }
.sums--small { font-size: var(--fs-sm); }

/* === 6. Components === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 46px; padding: 0 var(--s-5);
  font-family: var(--mono); font-size: var(--fs-md); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
  border: 2px solid var(--ink); border-radius: var(--r-1); cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--stamp); border-color: var(--stamp); text-decoration: none; }
.btn--line { background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--wide { width: 100%; }
.btn[disabled] { cursor: progress; }
.btn__busy { display: none; align-items: center; gap: var(--s-3); }
.btn.is-busy .btn__label { display: none; }
.btn.is-busy .btn__busy { display: inline-flex; }
.btn__busy .head { position: relative; width: 64px; height: 6px; border: 1.5px solid currentColor; }
.btn__busy .head::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 30%; background: currentColor; animation: head 0.9s var(--ease) infinite alternate; }
@keyframes head { to { left: 70%; } }

/* Drawn option boxes: [X] for checkboxes, ( o ) for radios */
.opt__box {
  flex: none; width: 1.2em; height: 1.2em; border: 2px solid var(--ink); border-radius: 1px; background: var(--paper);
  transition: background-color 0.15s var(--ease);
}
input[type="radio"] + .opt__box { border-radius: 50%; }
input:checked + .opt__box {
  background:
    linear-gradient(45deg, transparent 42%, var(--ink) 42% 58%, transparent 58%),
    linear-gradient(-45deg, transparent 42%, var(--ink) 42% 58%, transparent 58%);
}
input[type="radio"]:checked + .opt__box { background: radial-gradient(circle, var(--ink) 0 40%, var(--paper) 44%); }
label:has(> input:focus-visible) { outline: 3px solid var(--stamp); outline-offset: 2px; }
.origin__pick input, .opt input, .check input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.stepper { display: inline-flex; align-items: stretch; border: 2px solid var(--ink); border-radius: var(--r-1); background: var(--paper); }
.stepper__b { display: grid; place-items: center; width: 44px; min-height: 44px; border: 0; background: transparent; cursor: pointer; color: var(--ink); }
.stepper__b:hover { background: var(--ink); color: var(--paper); }
.stepper__b[disabled] { color: var(--ink-fade); background: transparent; cursor: not-allowed; }
.stepper__v { display: grid; place-items: center; min-width: 3.2ch; padding: 0 4px; font: 700 var(--fs-lg) var(--mono); text-align: center; color: var(--ink); background: transparent; border: 0; border-inline: 2px dashed var(--ink-fade); -moz-appearance: textfield; }
.stepper__v::-webkit-outer-spin-button, .stepper__v::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input.stepper__v { width: 5.5ch; }
.stepper--sm .stepper__b { width: 40px; min-height: 40px; }
.stepper--sm .stepper__v { font-size: var(--fs-md); }

.chip {
  min-height: 44px; padding: 0 var(--s-3);
  font-weight: 700; font-size: var(--fs-sm); letter-spacing: 0.04em; text-transform: uppercase;
  border: 2px solid var(--ink); border-radius: var(--r-1); background: transparent; color: var(--ink); cursor: pointer;
}
.chip:hover { border-style: dashed; }
.chip[aria-checked="true"] { background: var(--ink); color: var(--paper); }

.range { width: 100%; height: 44px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 6px; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 6px); border-top: 2px solid var(--ink); }
.range::-moz-range-track { height: 6px; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 6px); border-top: 2px solid var(--ink); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 28px; margin-top: -13px; background: var(--ink); border: 3px solid var(--paper); outline: 2px solid var(--ink); border-radius: 2px; }
.range::-moz-range-thumb { width: 18px; height: 24px; background: var(--ink); border: 3px solid var(--paper); outline: 2px solid var(--ink); border-radius: 2px; }

.field { display: grid; gap: 6px; }
.field label, .brew__field label { font-size: var(--fs-sm); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.field input, .select select {
  width: 100%; min-height: 48px; padding: 10px 6px;
  font: var(--fs-md) var(--mono); color: var(--ink);
  background: rgba(31, 33, 40, 0.035); border: 0; border-bottom: 2px dashed var(--ink-soft); border-radius: 0;
}
.field input::placeholder { color: var(--ink-fade); }
.field input:hover, .select select:hover { border-bottom-style: solid; }
.field input:focus-visible, .select select:focus-visible { outline: 3px solid var(--stamp); outline-offset: 2px; border-bottom-style: solid; border-bottom-color: var(--ink); }
.field.is-bad input, .field.is-bad select { border-bottom: 2px solid var(--stamp); background: rgba(32, 64, 184, 0.07); }
.field__err { font-size: var(--fs-sm); font-weight: 700; color: var(--stamp-deep); }
.field__err::before { content: "** "; }
.field-row { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: var(--s-4); }
.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer; }
.select .ic { position: absolute; right: 10px; top: 50%; translate: 0 -50%; pointer-events: none; color: var(--ink); }
.check { position: relative; display: flex; gap: var(--s-3); align-items: flex-start; cursor: pointer; font-size: var(--fs-sm); min-height: 44px; padding-top: 4px; }
.check .opt__box { margin-top: 1px; }
.warn { font-weight: 700; color: var(--stamp-deep); }

.alert { padding: var(--s-4); border: 2px dashed var(--ink); display: grid; gap: var(--s-3); justify-items: start; }
.alert__title { font-family: var(--stampface); font-size: var(--fs-lg); background: var(--ink); color: var(--paper); padding: 2px 10px; }

/* Rubber stamps: cobalt ink, rough edge, set at an angle */
.stamp {
  display: inline-grid; justify-items: center; gap: 2px;
  padding: 7px 13px 8px;
  color: var(--stamp); border: 3px solid currentColor; border-radius: 7px;
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px currentColor;
  font-family: var(--stampface); text-transform: uppercase; line-height: 1;
  rotate: -8deg; filter: url(#ink); mix-blend-mode: multiply; pointer-events: none;
}
.stamp__big { font-size: 1.25rem; letter-spacing: 0.02em; }
.stamp__small { font-family: var(--mono); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.1em; }

/* === 7. Hero === */
.rc--hero { padding-block: 14px 4px; }
.rc--hero > * + * { margin-top: 14px; }
.hero__title {
  font-family: var(--stampface);
  font-size: var(--fs-h1);
  line-height: 0.98;
  letter-spacing: -0.005em;
}
.hero__copy { color: var(--ink-soft); font-size: var(--fs-sm); line-height: 1.48; max-width: 58ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--s-3); padding-top: 2px; }
.hero__cta .btn { min-height: 44px; padding: 0 var(--s-4); font-size: var(--fs-sm); }
.hero__foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s-4);
  padding-top: 6px;
}
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: var(--fs-sm); }
.facts li { display: flex; align-items: baseline; gap: 0.5ch; }
.facts li span:first-child { flex: 1; display: flex; text-transform: uppercase; letter-spacing: 0.03em; }
.facts li span:first-child::after { content: ""; flex: 1; min-width: 2ch; margin: 0 0 0.28em 0.75ch; border-bottom: 2px dotted var(--ink-fade); }
.facts li span:last-child { font-weight: 700; white-space: nowrap; }
.stamp--hero { justify-self: end; margin: 0 4px 0 0; }

/* === 8. Origins and options === */
.colhead, .lines-head { display: flex; justify-content: space-between; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); border-bottom: 2px solid var(--ink); padding-bottom: 6px; }
.origins, .opts { border: 0; margin-inline: 0; margin-bottom: 0; padding: 0; min-width: 0; }
.origin { padding: var(--s-4) 0; border-bottom: 1.5px dashed var(--ink-fade); }
.origin__pick { position: relative; display: flex; align-items: center; gap: var(--s-3); min-height: 44px; cursor: pointer; }
.origin__name {
  font-weight: 700; font-size: var(--fs-lg); text-transform: uppercase; letter-spacing: 0.04em;
  background: linear-gradient(var(--ink), var(--ink)) no-repeat 0 0 / 0 100%;
  transition: background-size 0.35s var(--ease), color 0.2s var(--ease);
  padding: 0 0.3em; margin-left: -0.3em; justify-self: start; flex: 0 1 auto;
}
.origin__pick::after { content: ""; flex: 1; }
.origin__pick:has(input:checked) .origin__name { color: var(--paper); background-size: 100% 100%; }
.origin__price { order: 3; font-weight: 700; font-size: var(--fs-lg); }
.origin__where { margin-top: 2px; padding-left: calc(1.2em + var(--s-3)); color: var(--ink-soft); font-size: var(--fs-sm); }
.origin__notes { padding-left: calc(1.2em + var(--s-3)); font-style: italic; }
.origin__foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-2); padding-left: calc(1.2em + var(--s-3)); min-height: 44px; }
.roast { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.roast i { width: 11px; height: 11px; border: 1.5px solid var(--ink); }
.roast i.on { background: var(--ink); }
.roast b { margin-left: 8px; }
.origin:not(:has(input:checked)) [data-qty] { display: none; }

.opts { display: grid; gap: 2px; }
.opt { position: relative; display: flex; align-items: center; gap: var(--s-3); min-height: 44px; padding: 4px 6px; margin-inline: -6px; cursor: pointer; }
.opt:hover { background: rgba(31, 33, 40, 0.05); }
.opt__name { font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.opt__note { margin-left: auto; font-size: var(--fs-sm); color: var(--ink-soft); text-align: right; }
.opt:has(input:checked) .opt__name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.25em; }
.opts--row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
.opt--tile { flex-direction: column; align-items: flex-start; gap: 4px; margin: 0; padding: var(--s-3); border: 2px dashed var(--ink-fade); }
.opt--tile .opt__note { margin: 0; text-align: left; }
.opt--tile:has(input:checked) { border-style: solid; border-color: var(--ink); background: rgba(31, 33, 40, 0.03); }
.opt--tile .opt__name { font-size: var(--fs-lg); }

/* === 9. The tab === */
.lines-head span:nth-child(2) { flex: 1; padding-left: 2ch; }
.lines { list-style: none; margin-inline: 0; margin-bottom: 0; padding: 0; display: grid; gap: var(--s-2); }
.line { display: grid; grid-template-columns: 3ch minmax(0, 1fr) auto; gap: var(--s-2); align-items: baseline; }
.line__q { font-weight: 700; }
.line__i { font-weight: 700; letter-spacing: 0.03em; }
.line__i small { display: block; font-weight: 400; font-size: var(--fs-sm); color: var(--ink-soft); letter-spacing: 0; }
.line__p { font-weight: 700; text-align: right; }
.empty { padding: var(--s-4); border: 2px dashed var(--ink-fade); text-align: center; color: var(--ink-soft); }
.grand { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding-block: 10px; font-weight: 700; font-size: var(--fs-lg); text-transform: uppercase; letter-spacing: 0.04em; }
.grand > span:last-child { white-space: nowrap; }
.grand b { display: inline-block; font-size: 1.5rem; transform: scaleY(1.5); transform-origin: 50% 60%; }
.grand--small { font-size: var(--fs-md); padding-block: var(--s-3); border-block: 2px solid var(--ink); }
.grand--small b { font-size: var(--fs-lg); }
.hint { font-size: var(--fs-sm); color: var(--ink-soft); }
.hint.is-free { color: var(--ink); font-weight: 700; }
.tab__cta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-4); padding-top: var(--s-2); }
.stamp--tab { rotate: 7deg; }
.stamp--tab.is-off { visibility: hidden; }

/* === 10. Brew ratio === */
.methods { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.brew { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "dose eq water" "ratio ratio ratio"; align-items: end; gap: var(--s-3) var(--s-4); padding: var(--s-4); border: 2px solid var(--ink); }
.brew > :nth-child(1) { grid-area: dose; }
.brew > :nth-child(2) { display: none; }
.brew > :nth-child(3) { grid-area: ratio; }
.brew > :nth-child(4) { grid-area: eq; }
.brew > :nth-child(5) { grid-area: water; }
.brew .stepper { width: 100%; }
.brew .stepper__v { flex: 1 1 0; width: 0; min-width: 0; }
.brew__field { display: grid; gap: 6px; min-width: 0; }
.brew__field b { font-size: var(--fs-md); }
.brew__x { padding-bottom: 12px; font-weight: 700; font-size: var(--fs-lg); color: var(--ink-soft); }

/* === 11. Roast calendar and batch sheet === */
.cal { display: grid; gap: 6px; }
.cal__dow, .cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.cal__dow span { text-align: center; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.cal__d {
  position: relative; display: grid; place-items: center; align-content: center; gap: 2px;
  min-height: 54px; padding: 4px 2px; font-family: var(--mono); font-weight: 700; font-size: var(--fs-md); color: var(--ink);
  border: 1.5px dashed transparent; border-radius: var(--r-1); background: transparent;
}
.cal__d.is-past { color: var(--ink-fade); }
.cal__d.is-closed .cal__n { text-decoration: line-through 2px; }
.cal__d.is-closed::after { content: "shut"; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.cal__m { position: absolute; left: 3px; top: 2px; font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
button.cal__d { cursor: pointer; border: 2px solid var(--ink); }
button.cal__d.is-past { border-color: var(--ink-fade); }
button.cal__d:hover { background: rgba(31, 33, 40, 0.07); }
.cal__d .ic { width: 17px; height: 17px; --crease: var(--paper); }
.cal__d.is-sel .ic { --crease: var(--ink); }
.cal__d.is-past .ic { opacity: 0.6; }
.cal__d.is-sel { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.cal__d.is-sel:hover { background: var(--ink); }
.cal__d.is-sel .cal__m { color: var(--paper); }
.cal__d.is-today { outline: 2px dashed var(--stamp); outline-offset: 2px; }
.cal__d.is-cup::after { content: ""; position: absolute; right: 4px; top: 4px; width: 7px; height: 7px; background: var(--stamp); border-radius: 50%; box-shadow: 0 0 0 1.5px var(--paper); }
.cal__key { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); margin-top: var(--s-2); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.cal__key span { display: inline-flex; align-items: center; gap: 6px; }
.k { display: inline-block; width: 14px; height: 14px; }
.k--roast { border: 2px solid var(--ink); }
.k--today { border: 2px dashed var(--stamp); }
.k--cup { width: 9px; height: 9px; border-radius: 50%; background: var(--stamp); }
.batch { display: grid; gap: var(--s-2); padding: var(--s-4); border: 2px solid var(--ink); background: rgba(31, 33, 40, 0.025); }
.batch__head { font-family: var(--stampface); font-size: var(--fs-lg); }
.batch__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.batch__list li { display: grid; grid-template-columns: 6ch minmax(0, 1fr) auto; gap: var(--s-3); font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.batch__list li span:first-child { color: var(--ink-soft); }
.batch__list li.is-cup { color: var(--stamp-deep); }

/* === 12. Roastery, log, questions === */
.roaster { margin: var(--s-5) 0 0; }
.roaster__art { display: block; width: 100%; height: auto; color: var(--ink); }
.roaster figcaption { margin-top: var(--s-2); font-size: var(--fs-sm); font-style: italic; color: var(--ink-soft); }
.prose { display: grid; gap: var(--s-4); }
.prose p { max-width: 64ch; }
.log { padding: var(--s-4); border: 2px dashed var(--ink); display: grid; gap: var(--s-3); }
.log__head { font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; background: var(--ink); color: var(--paper); justify-self: start; padding: 2px 8px; }

.faq { border-top: 2px solid var(--ink); padding-top: var(--s-2); }
.faq details { border-bottom: 1.5px dashed var(--ink-fade); }
.faq summary { display: flex; align-items: center; gap: var(--s-3); min-height: 52px; padding-block: var(--s-2); cursor: pointer; list-style: none; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; margin-left: auto; width: 10px; height: 10px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); rotate: 45deg; translate: 0 -3px; transition: rotate 0.25s var(--ease); }
.faq details[open] summary::after { rotate: 225deg; translate: 0 3px; }
.faq summary:hover { text-decoration: underline; }
.faq details p { padding: 0 0 var(--s-4); color: var(--ink-soft); max-width: 64ch; }

/* === 13. Checkout and the final receipt === */
.form { display: grid; gap: var(--s-4); }
.form.is-busy { opacity: 0.72; }
.final { outline: none; }
.final__paper {
  position: relative; display: grid; gap: var(--s-3);
  margin: var(--s-4) -14px 0; padding: var(--s-6) var(--s-5);
  background: var(--paper); box-shadow: var(--shadow-slip); rotate: -0.8deg;
}
.final__paper::before, .final__paper::after {
  content: ""; position: absolute; left: 0; right: 0; height: var(--tooth);
  background: conic-gradient(from -45deg at 50% 100%, var(--paper) 90deg, transparent 0) 0 0 / calc(var(--tooth) * 2) 100% repeat-x;
}
.final__paper::after { top: 100%; }
.final__paper::before { bottom: 100%; rotate: 180deg; }
.final__paper .rule { margin-block: var(--s-1); }
.stamp--final { justify-self: center; margin-top: var(--s-3); rotate: -7deg; }
.stamp--final .stamp__big { font-size: 1.75rem; }
.final__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }

/* === 14. Foot: barcode, QR === */
.thanks { font-family: var(--stampface); font-size: var(--fs-h2); letter-spacing: 0.06em; }
.barcode { color: var(--ink); }
.barcode svg { display: block; width: 100%; height: 58px; }
.barcode--foot { width: 80%; margin-inline: auto; }
.qr-row { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: var(--s-5); align-items: center; padding: var(--s-4) 0; border-block: 1.5px dashed var(--ink-fade); }
.qr { width: 116px; height: 116px; color: var(--ink); }
.qr-row > div { display: grid; gap: 6px; }
.qr-row a { display: inline-flex; align-items: center; min-height: 36px; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 var(--s-4); }
.foot-links a { display: grid; place-items: center; min-height: 44px; font-weight: 700; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.06em; }

/* === 15. Dockets on the counter, tab bar === */
.side { position: relative; z-index: 1; }
.side--left { grid-column: 1; justify-self: end; width: min(100%, 284px); }
.side--right { grid-column: 3; justify-self: start; width: min(100%, 284px); }
.side__stick { position: sticky; top: 76px; margin-top: 22px; display: grid; gap: 22px; }
.side__stick--right { margin-top: 34px; }

.docket {
  position: relative; display: grid; gap: 10px;
  padding: 20px 18px 18px;
  color: var(--ink); background: var(--slip);
  background-image: repeating-linear-gradient(180deg, transparent 0 23px, rgba(72, 56, 24, 0.095) 23px 24px);
  box-shadow: var(--shadow-slip);
  font-size: var(--fs-sm);
}
.docket::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 8px;
  background: conic-gradient(from 135deg at 50% 0, var(--slip) 90deg, transparent 0) 0 0 / 16px 100% repeat-x;
}
.docket::after {
  content: ""; position: absolute; left: 50%; top: 8px; width: 10px; height: 10px;
  translate: -50% 0; border-radius: 50%;
  background: var(--counter);
  box-shadow: 0 1px 1px rgba(255, 255, 255, 0.45), 0 1px 2px rgba(0, 0, 0, 0.45) inset;
}
.docket--log { rotate: -1.6deg; }
.docket--tab { rotate: 1.4deg; }
.docket__top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-2); padding-top: 8px; }
.docket__head { font-family: var(--stampface); font-size: var(--fs-h3); line-height: 1; }
.docket__tag {
  padding: 2px 7px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--paper); background: var(--ink); border-radius: var(--r-1);
}
.docket__date { font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.docket__now { line-height: 1.4; }
.docket__rows { margin: 0; display: grid; gap: 5px; }
.docket__rows > div { display: flex; justify-content: space-between; gap: var(--s-2); }
.docket__rows dt { text-transform: uppercase; letter-spacing: 0.03em; }
.docket__rows dd { margin: 0; font-weight: 700; text-align: right; }
.docket__accent {
  padding: 4px 6px; margin-inline: -6px;
  background: rgba(32, 64, 184, 0.1);
  border-left: 3px solid var(--stamp);
}
.docket__accent dd { color: var(--stamp-deep); }
.docket__total { padding-top: 7px; margin-top: 4px; border-top: 2px solid var(--ink); font-size: var(--fs-md); }
.docket__foot { font-size: var(--fs-xs); color: var(--slip-muted); }
.docket .btn { min-height: 44px; font-size: var(--fs-sm); }
.mini { list-style: none; margin: 0; padding: 0 0 var(--s-2); display: grid; gap: 5px; border-bottom: 1.5px dashed rgba(31, 33, 40, 0.5); }
.mini li { display: flex; justify-content: space-between; gap: var(--s-2); }
.mini li span:last-child { font-weight: 700; }
.mini .is-none { color: var(--slip-muted); font-style: italic; }

/* Cupping / tasting note card on left counter */
.cupping-card {
  position: relative; display: grid; gap: 6px;
  padding: 14px 16px;
  color: var(--ink); background: var(--kraft);
  border: 1.5px solid rgba(31, 33, 40, 0.3);
  border-radius: 3px;
  box-shadow: var(--shadow-slip);
  rotate: 1.8deg;
  font-size: var(--fs-xs);
}
.cupping-card__head {
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  padding-bottom: 6px; border-bottom: 1.5px dashed rgba(31, 33, 40, 0.45);
}
.cupping-card__lot { font-weight: 700; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.04em; }
.cupping-card__notes { font-style: italic; color: var(--slip-muted); }
.cupping-card__meta {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding-top: 4px; color: var(--slip-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
}
.cupping-card__stamp {
  padding: 2px 6px; color: var(--stamp-deep); border: 2px solid var(--stamp);
  border-radius: 3px; rotate: -5deg; font-size: 0.7rem; letter-spacing: 0.1em;
}

.inkpad { display: block; width: 178px; margin: 4px 0 0 54px; rotate: 7deg; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.6)); }

/* Dispatch spec tag on right counter */
.dispatch-tag {
  display: grid; gap: 8px;
  padding: 14px 16px;
  color: var(--chalk); background: var(--tag-bg);
  border: 1px solid rgba(226, 234, 244, 0.14);
  border-radius: 4px;
  box-shadow: var(--shadow-slip);
  rotate: -1.4deg;
  font-size: var(--fs-xs);
}
.dispatch-tag__kicker {
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--brass);
  padding-bottom: 6px; border-bottom: 1px dashed rgba(226, 234, 244, 0.22);
}
.dispatch-tag__rows { margin: 0; display: grid; gap: 5px; }
.dispatch-tag__rows > div { display: flex; justify-content: space-between; gap: 8px; }
.dispatch-tag__rows dt { color: var(--chalk-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.dispatch-tag__rows dd { margin: 0; font-weight: 700; color: var(--chalk); text-align: right; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: none; align-items: center; gap: var(--s-3);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  color: var(--ink); background: var(--paper);
  box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.45);
}
.tabbar::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 8px;
  background: conic-gradient(from 135deg at 50% 0, var(--paper) 90deg, transparent 0) 0 0 / 16px 100% repeat-x;
}
.tabbar__sum { flex: 1; display: grid; min-height: 44px; align-content: center; text-decoration: none; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; font-size: var(--fs-sm); }
.tabbar__sum b { font-size: var(--fs-lg); }
.tabbar .btn { min-height: 46px; padding: 0 var(--s-4); }

/* === 16. Motion === */
@keyframes printline {
  from { clip-path: inset(0 0 100% 0); translate: 0 -4px; filter: contrast(0.3) brightness(1.5); }
  60% { filter: contrast(0.8) brightness(1.1); }
  to { clip-path: inset(0 0 0 0); translate: 0 0; filter: none; }
}
@keyframes feed { from { clip-path: inset(0 0 100% 0); translate: 0 -30px; } to { clip-path: inset(0 0 -40px 0); translate: 0 0; } }
@keyframes blink { 50% { opacity: 0.25; } }
@keyframes thump { 0% { scale: 1.45; opacity: 0; } 60% { scale: 0.96; opacity: 1; } 100% { scale: 1; } }

@media (prefers-reduced-motion: no-preference) {
  .printer__led { animation: blink 0.18s steps(1) 9; }
  .rc--head > *, .rc--hero > * { animation: printline 0.4s var(--ease) both; }
  .rc--head > :nth-child(1) { animation-delay: 0.04s; }
  .rc--head > :nth-child(2) { animation-delay: 0.12s; }
  .rc--head > :nth-child(3) { animation-delay: 0.18s; }
  .rc--head > :nth-child(4) { animation-delay: 0.24s; }
  .rc--head > :nth-child(5) { animation-delay: 0.3s; }
  .rc--head > :nth-child(6) { animation-delay: 0.35s; }
  .rc--hero > :nth-child(1) { animation-delay: 0.42s; }
  .rc--hero > :nth-child(2) { animation-delay: 0.52s; }
  .rc--hero > :nth-child(3) { animation-delay: 0.62s; }
  .rc--hero > :nth-child(4) { animation-delay: 0.72s; }
  .rc--hero > :nth-child(5) { animation-delay: 0.8s; }
  .stamp--hero { animation: thump 0.48s var(--ease) 0.96s both; }

  .line.is-new, .final__paper .line { animation: printline 0.5s var(--ease) both; }
  .final:not([hidden]) .final__paper { animation: feed 0.9s var(--ease) both; }
  .final:not([hidden]) .stamp--final { animation: thump 0.45s var(--ease) 0.8s both; }
  .stamp--tab.is-thump { animation: thump 0.45s var(--ease) both; }
  .grand b.is-tick { animation: printline 0.35s var(--ease); }
  .batch.is-new > * { animation: printline 0.4s var(--ease) both; }
  .batch.is-new > :nth-child(2) { animation-delay: 0.05s; }
  .batch.is-new > :nth-child(3) { animation-delay: 0.1s; }
  .batch.is-new > :nth-child(4) { animation-delay: 0.15s; }
}
:root[data-static] .rc--head > *,
:root[data-static] .rc--hero > *,
:root[data-static] .stamp--hero { animation: none !important; }

@media (prefers-reduced-motion: reduce) {
  .btn__busy .head::after { animation: none; }
}

/* Below the hero, the receipt develops as it scrolls into view */
@keyframes develop {
  from { filter: contrast(0.45) brightness(1.25); translate: 0 10px; }
  to { filter: none; translate: 0 0; }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .print:not(.rc--head):not(.rc--hero) > :not(fieldset):not(.faq):not(form):not(.lines):not(.final):not(.batch),
    .print .origin, .print .opt, .faq details, .form > .field, .form > .field-row {
      animation: develop linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 30%;
    }
  }
}

/* === 17. Narrow screens === */
@media (max-width: 1179px) {
  .counter { grid-template-columns: minmax(0, 1fr); justify-items: center; padding-bottom: 120px; }
  .receipt { grid-column: 1; width: min(100%, 36rem); }
  .side { display: none; }
  .tabbar { display: flex; }
  .tabbar.is-away { translate: 0 120%; }
  .tabbar { transition: translate 0.3s var(--ease); }
  .coffee-ring--a { left: -40px; }
  .coffee-ring--b { right: -50px; }
  .beans--a { left: -30px; }
  .beans--b { right: -40px; }
}
@media (max-width: 900px) {
  .bar { position: relative; }
  .bar__nav { display: none; }
  .rc-index { display: flex; }
  .bar__tab { margin-left: auto; }
}
@media (max-width: 640px) {
  :root { --pad: 18px; --fs-md: 1rem; }
  .counter { padding: var(--s-4) 12px 120px; }
  .printer { margin-inline: -8px; }
  .printer__body { height: 46px; padding: 0 var(--s-4); }
  .printer__scale { display: none; }
  .printer__btn { margin-left: auto; }
  .paper { padding: 18px var(--pad) var(--s-5); }
  .hero__foot { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
  .stamp--hero { justify-self: center; margin: var(--s-1) 0 0; }
  .brew { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "dose water" "ratio ratio"; gap: var(--s-3); padding: var(--s-3); }
  .brew > :nth-child(4) { display: none; }
  .brew .stepper__b { width: 40px; }
  .opt__note { font-size: var(--fs-xs); }
  .opts--row { gap: var(--s-2); }
  .opt--tile { padding: var(--s-2); }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .qr-row { grid-template-columns: 92px minmax(0, 1fr); gap: var(--s-4); }
  .qr { width: 92px; height: 92px; }
  .final__paper { margin-inline: -6px; padding: var(--s-5) var(--s-4); }
  .cal__dow, .cal__grid { gap: 3px; }
  .cal__d { min-height: 48px; font-size: var(--fs-sm); }
  .cal__m { font-size: 0.6875rem; left: 2px; top: 1px; }
  .bar__name { display: none; }
}
@media (max-width: 400px) {
  .grand { font-size: var(--fs-md); }
  .grand b { font-size: 1.375rem; }
  .meta-row { font-size: var(--fs-xs); }
  .sums { font-size: var(--fs-sm); }
}
