/* Bricolage Grotesque, served from this site (no Google Fonts request, so visitors' IP addresses don't go to Google).
   Variable font: weights 200-800 and optical size. SIL Open Font License: assets/fonts/OFL-Bricolage-Grotesque.txt */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(/assets/fonts/bricolage-latin.woff2) format('woff2-variations'), url(/assets/fonts/bricolage-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(/assets/fonts/bricolage-latin-ext.woff2) format('woff2-variations'), url(/assets/fonts/bricolage-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --red: #D81621;
  --red-deep: #A80F18;
  --ink: #1A1B1E;
  --rain: #E6ECF2;     /* page background: wet-pavement grey-blue */
  --mist: #C4D0DB;     /* rules and quiet borders */
  --paper: #FFFFFF;
  --green: #1E8E5A;
  --muted: #5B6570;
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--rain); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-size: 15px; line-height: 1.45; min-height: 100dvh; }
.wrap { max-width: 440px; margin: 0 auto; padding: 16px 18px calc(24px + env(safe-area-inset-bottom)); }

.brand { margin: 0 0 18px; text-align: center; }
.logo { display: inline-block; width: 190px; max-width: 62%; height: auto; }

h1 { font-size: 26px; line-height: 1.1; letter-spacing: -0.02em; font-weight: 800; margin: 0 0 8px; }
.lede { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
.hint { color: var(--muted); font-size: 13px; margin: 12px 0 0; }
.err { color: var(--red-deep); font-weight: 600; margin: 12px 0 0; }
.sr { position: absolute; left: -9999px; }

/* Four digit boxes — the one bold element on the page */
.entry { position: relative; }
.entry input { position: absolute; inset: 0; opacity: 0; font-size: 16px; }
.boxes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.boxes span {
  height: 68px; display: grid; place-items: center;
  background: var(--paper); border: 2px solid var(--mist); border-radius: 12px;
  font-size: 34px; font-weight: 800; color: var(--ink);
}
.boxes span.on { border-color: var(--red); box-shadow: 0 0 0 4px rgba(216,22,33,.12); }
.entry input:focus-visible ~ .boxes { outline: 3px solid var(--red); outline-offset: 6px; border-radius: 16px; }

.btn {
  display: block; width: 100%; margin-top: 14px; padding: 14px 18px;
  background: var(--red); color: #fff; border: 0; border-radius: 12px;
  font: inherit; font-size: 17px; font-weight: 700; cursor: pointer;
}
.btn:hover { background: var(--red-deep); }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.btn:disabled { background: #9AA5B1; cursor: not-allowed; }

.back { display: inline-block; color: var(--muted); text-decoration: none; margin-bottom: 14px; font-weight: 600; }
.photo { margin: 0 0 16px; border-radius: 16px; overflow: hidden; background: var(--mist); position: relative; aspect-ratio: 4/3; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo figcaption {
  position: absolute; left: 12px; bottom: 12px; background: var(--ink); color: #fff;
  padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 15px;
}
.addr { margin: 0 0 14px; color: var(--muted); font-size: 14px; }

.facts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin: 0 0 6px; }
.facts div { background: var(--paper); border-radius: 14px; padding: 12px 10px 14px; text-align: center; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 6px 0 0; font-weight: 800; font-size: 26px; line-height: 1.1; letter-spacing: -0.02em; }
.facts div:first-child dd { font-size: 17px; margin-top: 10px; }  /* status stays a word, not a number */
.facts dd.ok { color: var(--green); }
.facts dd.bad { color: var(--red-deep); }
.maplink { display: inline-block; margin-top: 16px; color: var(--ink); font-weight: 600; }

/* Collect page stepper */
.steps { list-style: none; padding: 0; margin: 24px 0; border-left: 3px solid var(--mist); }
.steps li { padding: 0 0 22px 20px; position: relative; color: var(--muted); }
.steps li::before {
  content: ''; position: absolute; left: -10px; top: 4px; width: 17px; height: 17px; border-radius: 50%;
  background: var(--rain); border: 3px solid var(--mist);
}
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--green); border-color: var(--green); }
.steps li.now { color: var(--ink); font-weight: 700; }
.steps li.now::before { background: var(--paper); border-color: var(--red); animation: pulse 1.2s ease-in-out infinite; }
.steps li.fail::before { background: var(--red); border-color: var(--red); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(216,22,33,.18); } }
@media (prefers-reduced-motion: reduce) { .steps li.now::before { animation: none; } }

.result { background: var(--paper); border-radius: 16px; padding: 22px; }
.result h2 { margin: 0 0 8px; font-size: 26px; letter-spacing: -0.02em; }
.result p { margin: 0; }
.result.good h2 { color: var(--green); }
.result.bad h2 { color: var(--red-deep); }

.foot { margin-top: 32px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--mist); padding-top: 12px; }
.foot p { margin: 0 0 6px; }
.foot a { color: inherit; }

/* In-page payment panel (SumUp widget) */
.pay { background: var(--paper); border-radius: 16px; padding: 18px; margin-top: 16px; }
.pay h2 { margin: 0 0 12px; font-size: 22px; letter-spacing: -0.02em; }
.pay .hint { margin-top: 12px; font-size: 14px; }
.pay .hint a { color: inherit; }
button.link { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 600; padding: 10px 0 0; cursor: pointer; }

/* Offers and discount codes */
.offer { background: #FBE0E2; color: var(--red-deep); font-weight: 700; padding: 10px 14px; border-radius: 12px; margin: 12px 0 0; }
.facts dd s { color: var(--muted); font-weight: 400; font-size: 18px; margin-right: 6px; }
.code { margin-top: 14px; }
.code summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.coderow { display: flex; gap: 8px; margin-top: 10px; }
.coderow input { flex: 1; font: inherit; font-size: 18px; text-transform: uppercase; padding: 12px; border: 2px solid var(--mist); border-radius: 12px; }
.coderow input:focus { outline: none; border-color: var(--red); }
.btn.small { width: auto; margin: 0; padding: 12px 18px; font-size: 16px; }
.code .hint { margin-top: 8px; }

/* payment marks under the Buy button */
.marks { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 12px 0 0; }
.marks img { height: 30px; width: auto; border-radius: 6px; }
.marks span { font-size: 12px; color: var(--muted); }

/* language picker (flags under the logo) */
.langs { display: flex; justify-content: center; gap: 10px; margin: 12px 0 0; }
.langs button { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 2px solid transparent;
  background: none; cursor: pointer; overflow: hidden; box-shadow: 0 0 0 1px var(--mist); line-height: 0; }
.langs button[aria-pressed="true"] { border-color: var(--red); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--red); }
.langs button:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
/* footer, centred */
.foot.center { text-align: center; }
.foot.center p { margin: 0 0 6px; }
.foot.center .small { margin-top: 10px; }
/* card / wallet marks strip */

/* the hidden attribute always wins over display rules */
[hidden] { display: none !important; }

/* home page: payment marks + how to pay */
.howto { background: var(--paper); border-radius: 16px; padding: 16px 16px 6px; margin-top: 22px; text-align: center; }
/* payment logos: Apple Pay + Google Pay side by side, card logos underneath (homepage and machine screen) */
.paylogos { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 2px 0 4px; }
.paylogos[hidden] { display: none; }
.marks.paylogos { margin-top: 14px; }
.paylogos .wallets { display: flex; justify-content: center; align-items: center; gap: 14px; }
.paylogos .wallets img { height: 46px; width: auto; display: block; border-radius: 0; }
.paylogos .cards { height: 30px; width: auto; max-width: 100%; display: block; border-radius: 0; }
.howto .only { background: #FBE0E2; border: 1.5px solid var(--red); color: #A80F18; font-weight: 700; font-size: 14px;
  line-height: 1.4; border-radius: 12px; padding: 10px 12px; margin: 14px 0 0; }
.howto h2 { font-size: 17px; margin: 16px 0 6px; text-align: left; }
.howto ol { text-align: left; margin: 0 0 10px; padding-left: 20px; font-size: 14px; color: var(--ink); }
.howto li { margin: 0 0 6px; }
