/*
  Glyphomat: pricing page for an icon and illustration library (Screenery template)
  1. Tokens: eight named vending machine colours, two faces (Lilita One for the painted cabinet, Kodchasan for everything read).
  2. The machine: cabinet, lit marquee, glass with coil rows and shelf tags, delivery bin, selection panel, change tray.
  3. Sections below are enamel panels on the arcade wall: labels, change counter, comparison, packs, licence, checkout, FAQ.
*/

:root {
  /* Palette: the paint, wrappers and metal of a snack machine */
  --red: #c42d24;        /* cabinet enamel; cream text on it is 5:1 */
  --red-deep: #9a2019;   /* cabinet shadow, pressed keys */
  --red-lit: #e2493c;    /* gloss and bulbs only, never behind text */
  --cream: #fff3d6;      /* enamel panels, labels */
  --yellow: #ffc533;     /* wrapper yellow, the arcade wall */
  --mint: #34c59a;       /* mint fizz wrapper */
  --blue: #2566c4;       /* blue raspberry wrapper; cream text on it is 5:1 */
  --grape: #6a3fb5;      /* grape wrapper; cream text on it is 6:1 */
  --ink: #1e1a2b;        /* liquorice: body text, keypad legends */
  --chrome: #c3cad3;     /* coils, shelf lips, bezels */

  /* Derived tones */
  --ink-soft: color-mix(in srgb, var(--ink) 80%, var(--cream));    /* secondary text on cream and yellow */
  --cream-soft: color-mix(in srgb, var(--cream) 95%, var(--blue)); /* secondary text on blue and grape */
  --cream-dim: color-mix(in srgb, var(--cream) 90%, var(--red));   /* secondary text on red */
  --rule: color-mix(in srgb, var(--ink) 22%, var(--cream));
  --cream-deep: color-mix(in srgb, var(--ink) 7%, var(--cream));
  --glass-back: #221d33;
  --glass-lit: #3a3256;
  --panel: #2b2638;
  --led: #8ff0c8;
  --chrome-dark: #7d8794;

  /* Type */
  --display: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --sans: "Kodchasan", "Trebuchet MS", system-ui, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.625rem;
  --fs-h2: clamp(2.1rem, 1.2rem + 2.8vw, 3.6rem);
  --fs-h1: clamp(2.6rem, 1rem + 4.6vw, 5.2rem);

  /* Space and shape */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 72px; --s-9: 104px;
  --r-sm: 6px; --r-md: 12px; --r-lg: 22px; --r-xl: 34px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --shadow: 0 2px 3px rgb(30 26 43 / .18), 0 14px 30px -12px rgb(30 26 43 / .45);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Base and browser surfaces ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; scrollbar-color: var(--red) var(--yellow); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--yellow);
  color: var(--ink);
  font: 500 var(--fs-md)/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  caret-color: var(--red);
  accent-color: var(--red);
}
::selection { background: var(--ink); color: var(--yellow); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.02; margin: 0; text-wrap: balance; letter-spacing: .005em; }
h2 { font-size: var(--fs-h2); }
p { margin: 0; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--cream); padding: 10px 16px; border-radius: var(--r-sm); }
.skip:focus { top: 12px; }
[tabindex="-1"]:focus { outline: none; }
[hidden] { display: none !important; }
.num, td, .tag, .ticket, .lines, .display { font-variant-numeric: tabular-nums; }

/* Icons: one 1.75px stroke everywhere */
svg use { stroke: currentColor; }
[id^="i-"] path, [id^="p-"] path, [id^="p-"] circle { fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 2.5px solid var(--ink);
  font: 600 var(--fs-sm)/1.1 var(--sans); text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s, box-shadow .2s;
}
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: translateY(2px); }
.btn--ink { background: var(--ink); color: var(--cream); }
.btn--ink:hover { background: #3a3350; }
.btn--line { background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--cream); }
.btn--red { background: var(--red); color: var(--cream); border-color: var(--ink); }
.btn--red:hover { background: var(--red-deep); }
.btn--big { min-height: 56px; font-size: var(--fs-md); padding: 12px 24px 12px 12px; }
.btn--wide { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.link { background: none; border: 0; padding: 6px 2px; min-height: 32px; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: var(--s-5);
  padding: 10px var(--gutter);
  background: var(--cream);
  border-bottom: 3px solid var(--ink);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 400 1.5rem/1 var(--display); }
.brand svg { width: 34px; height: 34px; }
.top nav { margin-left: auto; }
.top nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.top nav a { display: inline-block; padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: var(--fs-sm); text-decoration: none; }
.top nav a:hover { background: var(--yellow); }
@media (max-width: 1000px) { .top nav { display: none; } .top__cta { margin-left: auto; } }

/* ---------- 1. The machine ---------- */
.machine { padding: clamp(16px, 3vw, 40px) var(--gutter) var(--s-8); position: relative; }
/* the arcade wall behind the machine: wide painted stripes */
.machine::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: repeating-linear-gradient(90deg, transparent 0 120px, color-mix(in srgb, var(--yellow) 86%, var(--red)) 120px 124px);
}
.cab {
  max-width: var(--max); margin: 0 auto;
  background: var(--red);
  border: 3px solid var(--ink);
  border-radius: var(--r-xl) var(--r-xl) var(--r-lg) var(--r-lg);
  padding: clamp(10px, 1.6vw, 22px);
  box-shadow: inset 0 0 0 6px var(--red-deep), inset 10px 0 0 6px var(--red-lit), 0 30px 60px -30px rgb(30 26 43 / .6);
  color: var(--cream);
}
.marquee {
  position: relative; text-align: center;
  background: var(--cream); color: var(--ink);
  border: 3px solid var(--ink); border-radius: var(--r-lg) var(--r-lg) var(--r-md) var(--r-md);
  padding: clamp(16px, 1.6vw, 20px) var(--s-5) clamp(12px, 1.4vw, 18px);
  margin-bottom: clamp(10px, 1.6vw, 20px);
}
.marquee h1 { font-size: clamp(2.4rem, 1rem + 3.6vw, 4.4rem); color: var(--red); letter-spacing: .01em; line-height: .95; }
.marquee__line { margin-top: 8px; font-weight: 600; font-size: var(--fs-md); text-wrap: balance; }
.bulbs {
  position: absolute; left: 18px; right: 18px; top: 7px; height: 6px;
  background: radial-gradient(circle, var(--yellow) 2.4px, transparent 3px) 0 50% / 22px 6px repeat-x;
}

.cab__body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(10px, 1.6vw, 20px); }

/* Glass and rows */
.front { display: grid; gap: clamp(10px, 1.4vw, 16px); }
.glass {
  --itemh: 124px;
  position: relative; isolation: isolate;
  background:
    linear-gradient(var(--glass-lit), var(--glass-back) 120px);
  border: 3px solid var(--ink);
  border-radius: var(--r-md);
  padding: 14px 14px 4px;
  box-shadow: inset 0 0 0 5px var(--chrome-dark), inset 0 0 0 7px var(--ink);
  overflow: hidden;
}
/* the glass itself: one diagonal reflection over everything, not interactive */
.glass::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background: linear-gradient(115deg, transparent 0 18%, rgb(255 255 255 / .07) 18% 26%, transparent 26% 70%, rgb(255 255 255 / .05) 70% 73%, transparent 73%);
}
.row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); position: relative; padding-top: 8px; }
/* shelf lip: a chrome bar the tags clip onto */
.row::after {
  content: ""; position: absolute; left: -14px; right: -14px; bottom: 6px; height: 26px; z-index: 0;
  background: linear-gradient(var(--chrome) 0 30%, #e9edf1 30% 45%, var(--chrome-dark) 100%);
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
}
.slot { grid-column: span var(--span, 1); display: grid; grid-template-rows: var(--itemh) auto; justify-items: center; position: relative; padding: 0 4px 10px; }
.item {
  position: relative; z-index: 1;
  width: 76%; height: calc(var(--itemh) - 6px); margin-top: 4px;
  border: 0; padding: 0; background: none; color: var(--ink);
  display: grid; place-items: center;
  transform-origin: 50% 100%;
  transition: transform .25s var(--ease), filter .25s;
}
.slot--plan .item { width: 84%; }
.item:hover { transform: translateY(-3px); }
.item:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.item.is-on .packet use { stroke: var(--yellow); }
.item.is-on .packet { stroke-width: 4; }
.item.is-on::before { content: ""; position: absolute; top: -6px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--ink); z-index: 2; }
.packet { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--pc, var(--cream)); stroke: var(--ink); stroke-width: 2.5; vector-effect: non-scaling-stroke; overflow: visible; }
.packet use { stroke: var(--ink); }
#packet path { vector-effect: non-scaling-stroke; }
/* gloss stripe on each packet */
.item::after { content: ""; position: absolute; top: 10px; bottom: 12px; left: 14%; width: 9%; background: rgb(255 255 255 / .28); border-radius: 4px; pointer-events: none; }
.item__icon { position: relative; width: 52%; max-width: 40px; height: auto; aspect-ratio: 1; color: var(--ink); }
.item__icon use { stroke-width: 1.75; }
.slot--plan .item { align-items: start; }
.item__text { position: relative; display: grid; gap: 2px; text-align: center; padding: 14px 6px 0; }
.item__name { font: 400 clamp(1rem, .7rem + .9vw, 1.45rem)/1 var(--display); }
.item__sub { font-size: var(--fs-xs); font-weight: 600; line-height: 1.2; }
.item__price { margin-top: 4px; font: 400 clamp(1.05rem, .8rem + .8vw, 1.5rem)/1 var(--display); }
.item__price small { display: none; } /* the Pay by switch and the shelf tag carry the period */

/* wrapper colours */
.p-a1 { --pc: var(--mint); }
.p-b2 { --pc: var(--cream); }
.p-b4 { --pc: var(--yellow); }
.p-c1 { --pc: var(--grape); }
.p-c1.item, .item.p-c1 { color: var(--cream); }
.c-yellow { --pc: var(--yellow); }
.c-mint { --pc: var(--mint); }
.c-blue { --pc: #6fa4ee; }
.c-grape { --pc: #b79cf0; }
.c-cream { --pc: var(--cream); }

/* the spiral coil, seen from the front: chrome strands that turn on vend */
.coil {
  position: absolute; z-index: 2; left: 6%; right: 6%; bottom: 33px; height: 24px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 24'%3E%3Cpath d='M4 1 C 9 6, 15 14, 19 23' stroke='%238d97a3' stroke-width='1.6' fill='none' stroke-linecap='round' opacity='.55'/%3E%3Cpath d='M3 23 C 7 14, 13 6, 20 1' stroke='%231e1a2b' stroke-width='4.4' fill='none' stroke-linecap='round'/%3E%3Cpath d='M3 23 C 7 14, 13 6, 20 1' stroke='%23e6ebf0' stroke-width='2.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") 0 0 / 22px 24px repeat-x;
}
.slot--plan .coil { left: 4%; right: 4%; }
.tag {
  position: relative; z-index: 3; align-self: end;
  display: inline-flex; gap: 6px; align-items: baseline;
  margin-top: -2px; padding: 3px 8px; min-height: 22px;
  background: var(--cream); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 3px;
  font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.3;
}
.tag b { font-weight: 700; }

/* Delivery bin and sticker */
.bin { display: grid; grid-template-columns: minmax(150px, 34%) 1fr; gap: 14px; align-items: stretch; min-height: 108px; }
.bin__mouth {
  position: relative; overflow: hidden;
  background: #120f1c; border: 3px solid var(--ink); border-radius: var(--r-md);
  box-shadow: inset 0 0 0 5px var(--chrome-dark), inset 0 18px 24px rgb(0 0 0 / .6);
  display: grid; place-items: end center; padding-bottom: 8px;
}
.bin__push {
  position: absolute; left: 10px; right: 10px; top: 8px; height: 30px;
  display: grid; place-items: center;
  background: linear-gradient(var(--chrome), var(--chrome-dark)); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 6px;
  font: 400 .95rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase;
}
.bin__mouth .dropped { position: relative; width: 66px; height: 54px; display: grid; place-items: center; transform: rotate(-78deg); }
.bin__mouth .dropped .packet { stroke-width: 2; }
.bin__out { background: var(--cream); color: var(--ink); border: 3px solid var(--ink); border-radius: var(--r-md); padding: 14px 16px; display: grid; align-content: center; gap: 8px; }
.bin__empty { font-weight: 600; color: var(--ink-soft); }
.bin__out h3 { font-size: var(--fs-xl); }
.bin__out p { font-size: var(--fs-sm); }
.bin__acts { display: flex; flex-wrap: wrap; gap: 8px; }
.bin__acts .btn { min-height: 40px; padding: 8px 14px; }
.sticker {
  position: relative; z-index: 6; margin: 10px auto 10px; max-width: 46ch;
  background: var(--yellow); color: var(--ink); border: 2px solid var(--ink); border-radius: 4px;
  padding: 8px 12px; font-size: var(--fs-sm); font-weight: 600; line-height: 1.35; text-align: center;
  transform: rotate(-1.2deg);
  box-shadow: 0 3px 6px rgb(0 0 0 / .35);
}

/* Selection panel */
.panel {
  background: var(--panel); color: var(--cream);
  border: 3px solid var(--ink); border-radius: var(--r-md);
  box-shadow: inset 0 0 0 5px #3d3650;
  padding: 16px; display: grid; gap: 14px; align-content: start;
}
.display {
  display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; min-height: 74px;
  background: #0c0a12; border: 2px solid var(--ink); border-radius: 8px; padding: 10px 12px;
  box-shadow: inset 0 0 0 3px #3d3650;
  color: var(--led);
  background-image: repeating-linear-gradient(0deg, transparent 0 2px, rgb(143 240 200 / .05) 2px 3px);
}
.display__code { font: 400 2.4rem/1 var(--display); min-width: 2.2ch; letter-spacing: .04em; }
.display__text { font-size: var(--fs-sm); font-weight: 600; line-height: 1.25; text-transform: uppercase; letter-spacing: .04em; }
.display.is-err { color: #ffb39e; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; font-weight: 700; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.payby { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.payby legend { grid-column: 1 / -1; }
.payby label { position: relative; }
.payby input, .coins input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.payby span {
  display: grid; place-items: center; min-height: 48px; padding: 6px 8px; text-align: center; line-height: 1.1;
  background: #403957; border: 2px solid var(--ink); font-weight: 700; font-size: var(--fs-sm);
  transition: background-color .2s;
}
.payby small { display: block; font-size: 11px; font-weight: 600; color: var(--yellow); }
.payby label:first-of-type span { border-radius: 10px 0 0 10px; }
.payby label:last-of-type span { border-radius: 0 10px 10px 0; border-left: 0; }
.payby input:checked + span { background: var(--yellow); color: var(--ink); box-shadow: inset 0 -4px 0 rgb(0 0 0 / .18); }
.payby input:checked + span small { color: var(--ink); }
.payby input:focus-visible + span, .coins input:focus-visible + .coin { outline: 3px solid var(--yellow); outline-offset: 2px; }

.keypad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.keypad button {
  min-height: 48px; border: 2px solid var(--ink); border-radius: 10px;
  background: linear-gradient(var(--cream), #eadcbb); color: var(--ink);
  font: 400 1.45rem/1 var(--display);
  box-shadow: 0 4px 0 #8f8166, 0 5px 0 var(--ink);
  transition: transform .08s, box-shadow .08s;
}
.keypad button:active, .keypad button.is-press { transform: translateY(4px); box-shadow: 0 0 0 #8f8166, 0 1px 0 var(--ink); }
.keypad button[data-key="A"], .keypad button[data-key="B"], .keypad button[data-key="C"], .keypad button[data-key="D"] { background: linear-gradient(var(--yellow), #e9ad1f); }
.keypad .key--clr { grid-row: span 2; grid-column: 4; grid-row-start: 2; font: 700 var(--fs-sm)/1 var(--sans); background: linear-gradient(#ff8e7f, #e25d4e); }
.keypad button:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.coins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.coins legend { grid-column: 1 / -1; }
.slotline { grid-column: 1 / -1; height: 26px; border-radius: 6px; background: linear-gradient(var(--chrome), var(--chrome-dark)); border: 2px solid var(--ink); display: grid; place-items: center; }
.slotline span { width: 44%; height: 6px; background: #0c0a12; border-radius: 3px; }
.coins label { position: relative; display: grid; justify-items: center; gap: 4px; }
.coins small { font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.coin {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe08a, var(--yellow) 55%, #d99a12);
  border: 2px solid var(--ink); color: var(--ink); font: 400 1.35rem/1 var(--display);
  box-shadow: inset 0 0 0 4px rgb(255 255 255 / .25);
  transition: transform .3s var(--ease);
}
.coins input:checked + .coin { transform: translateY(-4px); box-shadow: inset 0 0 0 4px rgb(255 255 255 / .25), 0 0 0 3px var(--panel), 0 0 0 5px var(--yellow); }
.coin--sm { width: 34px; height: 34px; font-size: 1rem; flex: none; }

.tray { display: grid; grid-template-columns: 70px 1fr; gap: 12px; align-items: center; align-self: end; padding-top: 14px; border-top: 2px solid #3d3650; }
.tray__cup {
  position: relative; height: 54px; border-radius: 8px 8px 22px 22px;
  background: #0c0a12; border: 2px solid var(--ink); box-shadow: inset 0 0 0 4px var(--chrome-dark), inset 0 10px 12px rgb(0 0 0 / .7);
  overflow: hidden;
}
.tray__cup span { position: absolute; width: 20px; height: 8px; border-radius: 50%; background: var(--yellow); border: 1.5px solid var(--ink); bottom: 8px; transition: transform .5s var(--ease), opacity .3s; }
.tray__cup .c1 { left: 12px; transform: rotate(-8deg); }
.tray__cup .c2 { left: 26px; bottom: 13px; }
.tray__cup .c3 { left: 36px; transform: rotate(10deg); }
.tray.is-empty .tray__cup span, .ticket__tray.is-empty .tray__cup span { opacity: 0; transform: translateY(-14px); }
.tray__text { font-size: var(--fs-sm); line-height: 1.35; }
.tray__text b { color: var(--yellow); }

.howto { display: grid; gap: 6px; padding: 12px 14px; border: 2px solid var(--chrome-dark); border-radius: 8px; background: #352f47; font-size: var(--fs-xs); line-height: 1.35; }
.howto b { color: var(--yellow); }
.tray { margin-top: auto; }
.panel { display: flex; flex-direction: column; }
@media (max-width: 900px) { .panel { display: grid; } .howto { grid-column: 1 / -1; } .tray { margin-top: 0; } }
.cab__plate { margin-top: 14px; text-align: center; font-size: var(--fs-xs); font-weight: 600; color: var(--cream); text-wrap: balance; }

/* Vend motion: the item moves forward, then drops; the coil strand slides one pitch */
@media (prefers-reduced-motion: no-preference) {
  .coil.is-turning { animation: turn .7s linear 1; }
  @keyframes turn { to { background-position-x: 22px; } }
}

/* ---------- Shared section frame ---------- */
main > section:not(.machine) { padding: var(--s-9) var(--gutter); }
.wrapw { max-width: var(--max); margin: 0 auto var(--s-7); display: grid; gap: var(--s-4); }
.lede { max-width: 62ch; font-size: var(--fs-lg); line-height: 1.5; font-weight: 500; }

/* ---------- 2. Labels ---------- */
.contents { background: var(--cream); border-top: 3px solid var(--ink); }
.contents .lede { color: var(--ink-soft); }
.labels { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); align-items: stretch; }
.label {
  position: relative; background: #fff; border: 3px solid var(--ink); border-radius: var(--r-md);
  padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px;
}
.label header { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 8px solid var(--ink); }
.label__code { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--pc); border: 2.5px solid var(--ink); font: 400 1.05rem/1 var(--display); }
.label.p-c1 .label__code { color: var(--cream); }
.label h3 { font-size: var(--fs-xl); }
.label__price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; border-bottom: 3px solid var(--ink); padding-bottom: 8px; }
.label__price b { font: 400 2.6rem/1 var(--display); font-weight: 400; }
.label__price span { font-weight: 600; font-size: var(--fs-sm); }
.label__bill { font-size: var(--fs-sm); color: var(--ink-soft); min-height: 2.8em; }
.facts { margin: 0; display: grid; }
.facts div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1.5px solid var(--ink); font-size: var(--fs-sm); }
.facts div:last-child { border-bottom: 4px solid var(--ink); }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; text-align: right; }
.label__for { font-size: var(--fs-sm); font-style: italic; }
.label .btn { align-self: flex-start; margin-top: auto; }
.label.is-pick { background: color-mix(in srgb, var(--yellow) 22%, #fff); box-shadow: var(--shadow); }
.label__why { background: var(--yellow); border: 2px solid var(--ink); border-radius: 8px; padding: 8px 10px; font-size: var(--fs-sm); font-weight: 600; line-height: 1.35; }
.label.is-on { outline: 4px solid var(--red); outline-offset: 3px; }

/* ---------- 3. Change counter ---------- */
.counter { background: var(--blue); color: var(--cream); border-top: 3px solid var(--ink); }
.ticket { position: sticky; top: 88px; }
.counter__grid { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.inputs { display: grid; gap: var(--s-6); }
.field { display: grid; gap: 8px; align-content: start; }
.field > label, .field > legend { font-weight: 700; font-size: var(--fs-md); text-transform: none; letter-spacing: 0; }
.counter .field > legend { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.count { font-size: var(--fs-sm); font-weight: 600; color: var(--cream-soft); }
.help { font-size: var(--fs-sm); color: var(--cream-soft); max-width: 60ch; }
.err { display: flex; gap: 6px; align-items: flex-start; font-size: var(--fs-sm); font-weight: 700; }
.counter .err { color: var(--yellow); }
.stepper { display: inline-grid; grid-template-columns: 52px 96px 52px; width: max-content; border: 3px solid var(--ink); border-radius: 999px; overflow: hidden; background: var(--cream); color: var(--ink); }
.stepper button { border: 0; background: var(--yellow); display: grid; place-items: center; min-height: 52px; }
.stepper button svg { width: 18px; height: 18px; }
.stepper button:hover { background: #ffd66a; }
.stepper input { border: 0; border-inline: 3px solid var(--ink); background: var(--cream); text-align: center; font: 400 1.6rem/1 var(--display); width: 100%; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; }
.stepper input:focus-visible { outline: 3px solid var(--red); outline-offset: -5px; }
.stepper.is-bad input { background: #ffe1d6; }
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px; }
.chip { position: relative; display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; min-height: 44px; padding: 6px 12px; border-radius: 999px; background: var(--cream); color: var(--ink); border: 2px solid var(--ink); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; transition: background-color .15s, transform .15s var(--ease); }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip svg { width: 20px; height: 20px; }
.chip b { font-size: 11px; font-weight: 700; color: var(--ink-soft); }
.chip:has(input:checked) { background: var(--yellow); box-shadow: inset 0 0 0 2px var(--ink); }
.chip:has(input:focus-visible) { outline: 3px solid var(--cream); outline-offset: 2px; }
.chips__tools { display: flex; gap: 14px; }
.counter .link { color: var(--cream); }
.check { display: inline-flex; gap: 12px; align-items: flex-start; cursor: pointer; font-weight: 600; position: relative; min-height: 32px; }
.check input { position: absolute; opacity: 0; width: 28px; height: 28px; margin: 0; }
.check .box { flex: none; width: 28px; height: 28px; border: 2.5px solid var(--ink); border-radius: 7px; background: var(--cream); display: grid; place-items: center; color: var(--ink); }
.check .box svg { width: 18px; height: 18px; opacity: 0; transition: opacity .15s; }
.check .box svg use { stroke-width: 2.4; }
.check input:checked + .box { background: var(--yellow); }
.check input:checked + .box svg { opacity: 1; }
.check input:focus-visible + .box { outline: 3px solid var(--cream); outline-offset: 2px; }
.check > span:last-child { padding-top: 2px; }

/* the printed ticket */
.ticket {
  background: var(--cream); color: var(--ink); border: 3px solid var(--ink); border-radius: var(--r-md) var(--r-md) 0 0;
  padding: 18px 18px 30px; display: grid; gap: 14px;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat, conic-gradient(from 135deg at 50% 0, #000 90deg, #0000 0) bottom / 18px 10px repeat-x;
          mask: linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat, conic-gradient(from 135deg at 50% 0, #000 90deg, #0000 0) bottom / 18px 10px repeat-x;
}
.ticket__head { display: flex; justify-content: space-between; gap: 12px; font: 400 var(--fs-lg)/1.1 var(--display); padding-bottom: 10px; border-bottom: 2px dashed var(--ink); flex-wrap: wrap; }
.ticket__head span:last-child { font: 700 var(--fs-xs)/1.6 var(--sans); text-transform: uppercase; letter-spacing: .08em; }
.ticket__plans { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ticket__plans li { display: grid; grid-template-columns: 34px 1fr auto; grid-template-areas: "code name sum" "code math sum"; column-gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; }
.ticket__plans li.is-best { background: var(--yellow); border: 2px solid var(--ink); }
.ticket__plans li.is-out { color: var(--ink-soft); }
.ticket__plans li.is-out .tp__sum { font-family: var(--sans); font-size: var(--fs-xs); font-weight: 700; text-align: right; max-width: 15ch; line-height: 1.25; }
.tp__code { grid-area: code; font: 400 1.05rem/1 var(--display); width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center; background: #fff; }
.tp__name { grid-area: name; font-weight: 700; }
.tp__math { grid-area: math; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-soft); }
.tp__sum { grid-area: sum; font: 400 1.3rem/1 var(--display); }
.ticket__warn { display: flex; gap: 8px; background: #ffe1d6; border: 2px solid var(--red); border-radius: 8px; padding: 10px 12px; font-size: var(--fs-sm); font-weight: 600; color: #7a160f; }
.ticket__warn svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.ticket__best { font-size: var(--fs-md); border-top: 2px dashed var(--ink); padding-top: 12px; }
.ticket__tray { display: grid; grid-template-columns: 70px 1fr; gap: 12px; align-items: center; background: var(--panel); color: var(--cream); border-radius: 10px; padding: 10px 12px; border: 2px solid var(--ink); }
.ticket__tray p { font-size: var(--fs-sm); line-height: 1.35; }
.ticket__tray b { color: var(--yellow); }

/* ---------- 4. Compare ---------- */
.compare { background: var(--cream); border-top: 3px solid var(--ink); }
.compare .lede { color: var(--ink-soft); }
.switcher { display: none; }
.tablewrap { max-width: var(--max); margin: 0 auto; border: 3px solid var(--ink); border-radius: var(--r-md); background: #fff; overflow: clip; }
.cmp { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); table-layout: fixed; }
.cmp thead :is(th, td) { position: sticky; top: 64px; }
.cmp thead th { z-index: 2; background: var(--ink); color: var(--cream); text-align: left; padding: 14px 14px; font: 400 var(--fs-lg)/1.1 var(--display); vertical-align: bottom; }
.cmp thead td { background: var(--ink); }
.cmp thead th span { display: block; font: 700 11px/1.4 var(--sans); letter-spacing: .1em; color: var(--yellow); }
.cmp thead th.c-b4 { background: var(--red); }
.cmp thead th.c-b4 span { color: var(--cream); }
.cmp tbody th, .cmp td { padding: 11px 14px; border-bottom: 1.5px solid var(--rule); text-align: left; vertical-align: top; }
.cmp tbody th { font-weight: 600; width: 26%; }
.cmp td.c-b4 { background: color-mix(in srgb, var(--yellow) 22%, #fff); }
.cmp tr.grp th { background: var(--cream-deep); font: 400 var(--fs-lg)/1 var(--display); padding-top: 16px; border-bottom: 2px solid var(--ink); }
.cmp .yes, .cmp .no { width: 20px; height: 20px; }
.cmp .yes use { stroke: #11734f; stroke-width: 2.4; }
.cmp .no use { stroke: var(--chrome-dark); stroke-width: 2; }
.cmp .no { color: #5c6470; }

/* ---------- 5. Packs ---------- */
.packs { background: var(--grape); color: var(--cream); border-top: 3px solid var(--ink); }
.refills { list-style: none; margin: 0 auto; padding: 0; max-width: var(--max); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 24px; }
.refill { display: grid; grid-template-columns: 58px 1fr; grid-template-areas: "bag code" "bag name" "bag desc"; column-gap: 14px; align-content: start; }
.refill__bag { grid-area: bag; width: 58px; height: 74px; position: relative; display: grid; place-items: center; background: var(--pc); border: 2.5px solid var(--ink); border-radius: 4px; clip-path: polygon(0 6%, 10% 0, 20% 6%, 30% 0, 40% 6%, 50% 0, 60% 6%, 70% 0, 80% 6%, 90% 0, 100% 6%, 100% 94%, 90% 100%, 80% 94%, 70% 100%, 60% 94%, 50% 100%, 40% 94%, 30% 100%, 20% 94%, 10% 100%, 0 94%); color: var(--ink); }
.refill__bag svg { width: 28px; height: 28px; }
.refill__code { grid-area: code; font: 700 12px/1.4 var(--sans); letter-spacing: .1em; color: var(--cream); }
.refill b { grid-area: name; font: 400 var(--fs-lg)/1.1 var(--display); font-weight: 400; }
.refill > span:last-child { grid-area: desc; font-size: var(--fs-sm); color: var(--cream-soft); margin-top: 4px; }

/* ---------- 6. Licence ---------- */
.licence { background: var(--mint); border-top: 3px solid var(--ink); }
.rules { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; background: var(--cream); border: 3px solid var(--ink); border-radius: var(--r-lg); overflow: hidden; }
.rules__col { padding: clamp(20px, 3vw, 36px); }
.rules__col + .rules__col { border-left: 3px solid var(--ink); }
.rules__col h3 { font-size: var(--fs-xl); margin-bottom: 14px; }
.rules ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rules li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; max-width: 54ch; }
.rules li svg { width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; padding: 2px; border: 2px solid var(--ink); }
.rules__col--yes li svg { background: var(--mint); }
.rules__col--no li svg { background: #ffb39e; }
.rules li svg use { stroke-width: 2.2; }

/* ---------- 7. Checkout ---------- */
.checkout { background: var(--red); color: var(--cream); border-top: 3px solid var(--ink); }
.checkout .lede { color: var(--cream); }
.checkout__grid { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.receipt { background: var(--cream); color: var(--ink); border: 3px solid var(--ink); border-radius: var(--r-md); padding: 18px; display: grid; gap: 14px; }
.receipt__head { display: flex; justify-content: space-between; gap: 10px; font: 400 var(--fs-lg)/1.1 var(--display); border-bottom: 2px dashed var(--ink); padding-bottom: 10px; }
.receipt__head b { color: var(--red); font-weight: 400; }
.receipt__opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field--inline label { font-size: var(--fs-sm); font-weight: 700; }
select, .coform input, .coform textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 2.5px solid var(--ink); border-radius: 10px; background: #fff; color: var(--ink); font-weight: 500;
}
select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%231e1a2b' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 10px center / 16px no-repeat; padding-right: 34px; }
.coform input::placeholder, .coform textarea::placeholder { color: #6a6478; }
select:focus-visible, .coform input:focus-visible, .coform textarea:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-color: var(--ink); }
.lines { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.lines th, .lines td { padding: 7px 0; border-bottom: 1px solid var(--rule); text-align: left; font-weight: 500; vertical-align: top; }
.lines td { text-align: right; white-space: nowrap; padding-left: 12px; font-weight: 600; }
.lines tfoot th, .lines tfoot td { border-bottom: 0; }
.lines tfoot tr:first-child th, .lines tfoot tr:first-child td { border-top: 2px dashed var(--ink); }
.lines .total th, .lines .total td { font: 400 1.45rem/1.1 var(--display); padding-top: 10px; }
.receipt__note { font-size: var(--fs-sm); color: var(--ink-soft); }
.coform { background: var(--cream); color: var(--ink); border: 3px solid var(--ink); border-radius: var(--r-md); padding: clamp(18px, 2.4vw, 28px); display: grid; gap: 18px; }
.cogrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.field--full { grid-column: 1 / -1; }
.coform .field > label { font-size: var(--fs-sm); }
.opt { font-weight: 500; color: var(--ink-soft); }
.coform .help { color: var(--ink-soft); font-size: var(--fs-xs); }
.coform .err { color: #9a1a10; }
.coform [aria-invalid="true"] { border-color: #9a1a10; background: #fff1ec; }
.coform .check .box { background: #fff; }
.coform .check input:focus-visible + .box { outline-color: var(--red); }
.coform__go { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.coform__fine { font-size: var(--fs-xs); color: var(--ink-soft); }
.costatus:empty { display: none; }
.costatus { border: 2.5px solid var(--ink); border-radius: 10px; padding: 14px 16px; display: grid; gap: 8px; }
.costatus.is-err { background: #ffe1d6; color: #7a160f; border-color: #9a1a10; }
.costatus.is-ok { background: var(--mint); }
.costatus h3 { font-size: var(--fs-xl); }
.costatus .key { font: 400 1.4rem/1.2 var(--display); letter-spacing: .06em; background: #fff; border: 2px dashed var(--ink); border-radius: 8px; padding: 8px 12px; justify-self: start; overflow-wrap: anywhere; }
.costatus .bin__acts .btn--line { background: #fff; }
.checkout__grid[data-state="loading"] .coin--sm { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotateY(360deg); } }
@media (prefers-reduced-motion: reduce) { .checkout__grid[data-state="loading"] .coin--sm { animation: none; } }
.checkout__grid[data-state="success"] .coform > :not(.costatus) { display: none; }

/* ---------- 8. FAQ ---------- */
.faq { background: var(--yellow); border-top: 3px solid var(--ink); }
.qs { max-width: 900px; margin: 0 auto; display: grid; gap: 10px; }
.faq .wrapw { max-width: 900px; }
details { background: var(--cream); border: 3px solid var(--ink); border-radius: var(--r-md); }
summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 16px 18px; font-weight: 700; font-size: var(--fs-md); min-height: 44px; }
summary::-webkit-details-marker { display: none; }
summary svg { width: 22px; height: 22px; flex: none; transition: transform .25s var(--ease); }
details[open] summary svg { transform: rotate(180deg); }
details p { padding: 0 18px 18px; max-width: 68ch; }
summary:focus-visible { outline-offset: -4px; }

/* ---------- Footer ---------- */
.foot { background: var(--ink); color: var(--cream); padding: var(--s-8) var(--gutter) var(--s-7); border-top: 3px solid var(--ink); }
.foot__plate { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: auto 1fr; gap: 24px 48px; align-items: center; padding: 22px 26px; border-radius: var(--r-md); background: linear-gradient(160deg, #dfe4ea, var(--chrome) 50%, #a9b2bd); color: var(--ink); border: 3px solid #000; position: relative; }
.foot__plate::before, .foot__plate::after { content: ""; position: absolute; top: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--chrome-dark); border: 1.5px solid var(--ink); }
.foot__plate::before { left: 10px; } .foot__plate::after { right: 10px; }
.foot__brand { font: 400 2.2rem/1 var(--display); color: var(--red-deep); }
.foot dl { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 24px; }
.foot dt { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.foot dd { margin: 0; font-weight: 600; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.foot__fine { max-width: var(--max); margin: 18px auto 0; font-size: var(--fs-xs); color: color-mix(in srgb, var(--cream) 82%, var(--ink)); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .cab__body { grid-template-columns: minmax(0, 1fr) 260px; }
  .labels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .refills { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .cab__body { grid-template-columns: 1fr; }
  .panel { grid-template-columns: 1fr 1fr; align-items: start; }
  .display { grid-column: 1 / -1; }
  .keypad { grid-row: span 2; }
  .tray { grid-column: 1 / -1; }
  .counter__grid, .checkout__grid { grid-template-columns: 1fr; }
  .ticket { max-width: 560px; position: static; }
}
@media (max-width: 760px) {
  .glass { --itemh: 104px; padding: 10px 8px 2px; }
  .row::after { left: -8px; right: -8px; }
  .slot { padding: 0 2px 10px; }
  .item { width: 84%; }
  .slot--plan .item { width: 92%; }
  .item__text { padding: 12px 2px 0; }
  .item__sub { font-size: 11px; }
  .coil { height: 20px; }
  .tag { font-size: 11px; padding: 1px 4px; gap: 3px; }
  .bin { grid-template-columns: 110px 1fr; }
  .rules { grid-template-columns: 1fr; }
  .rules__col + .rules__col { border-left: 0; border-top: 3px solid var(--ink); }
  .refills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cogrid, .receipt__opts { grid-template-columns: 1fr; }
  main > section:not(.machine) { padding: var(--s-8) var(--gutter); }

  /* comparison: one plan at a time, chosen with the switcher */
  .switcher { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; max-width: var(--max); margin: 0 auto 12px; }
  .switcher button { min-height: 44px; border: 2.5px solid var(--ink); border-radius: 10px; background: #fff; font-weight: 700; font-size: var(--fs-sm); }
  .switcher button[aria-selected="true"] { background: var(--ink); color: var(--cream); }
  .cmp thead { display: none; }
  .cmp { table-layout: auto; }
  .cmp tbody th { width: 50%; }
  .cmp td { width: 50%; }
  .cmp[data-show="a1"] :is(.c-b2, .c-b4, .c-c1),
  .cmp[data-show="b2"] :is(.c-a1, .c-b4, .c-c1),
  .cmp[data-show="b4"] :is(.c-a1, .c-b2, .c-c1),
  .cmp[data-show="c1"] :is(.c-a1, .c-b2, .c-b4) { display: none; }
  .cmp tr.grp th { font-size: var(--fs-md); }
}
@media (max-width: 560px) {
  .tag span { display: none; }
  .item__sub, .item__price small { display: none; }
  .item__name { font-size: 1rem; }
  .item__price { font-size: 1.15rem; }
  .slot--plan .tag span { display: inline; }
  .panel { grid-template-columns: 1fr; }
  .keypad { grid-row: auto; }
  .labels { grid-template-columns: 1fr; }
  .label__bill { min-height: 0; }
  .refills { grid-template-columns: 1fr; }
  .bin { grid-template-columns: 1fr; }
  .bin__mouth { min-height: 96px; }
  .foot__plate { grid-template-columns: 1fr; }
  .foot dl { grid-template-columns: 1fr; }
  .chips { grid-template-columns: 1fr 1fr; }
  .chip { grid-template-columns: 20px 1fr; padding: 6px 10px; border-radius: 14px; }
  .chip b { display: none; }
  .btn--big { white-space: normal; text-align: left; }
}
