/* umelo QR. World: an indigo self-healing cutting mat; the code is a die-cut sticker on it.
   Signature: the mat's cm grid and ruler are true to the print size the visitor picks.
   Type: Geologica for headings and numbers (as on PDF Desk), Onest for everything else.
   Unbounded stays only for captions printed on the codes/layouts (draw.js, scene.js). Main action: craft-knife yellow. */

@font-face { font-family: 'Onest'; font-weight: 100 900; font-display: swap; src: url(/fonts/Onest-400-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Onest'; font-weight: 100 900; font-display: swap; src: url(/fonts/Onest-400-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-weight: 100 900; font-display: swap; src: url(/fonts/Onest-400-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Onest'; font-weight: 100 900; font-display: swap; src: url(/fonts/Onest-400-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: 'Geologica'; font-weight: 400 700; font-display: swap; src: url(/fonts/Geologica-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Geologica'; font-weight: 400 700; font-display: swap; src: url(/fonts/Geologica-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Geologica'; font-weight: 400 700; font-display: swap; src: url(/fonts/Geologica-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Geologica'; font-weight: 400 700; font-display: swap; src: url(/fonts/Geologica-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: 'Unbounded'; font-weight: 200 900; font-display: swap; src: url(/fonts/Unbounded-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Unbounded'; font-weight: 200 900; font-display: swap; src: url(/fonts/Unbounded-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-weight: 200 900; font-display: swap; src: url(/fonts/Unbounded-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Unbounded'; font-weight: 200 900; font-display: swap; src: url(/fonts/Unbounded-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; }

:root, :root[data-theme=light] {
  color-scheme: light;
  /* softened 05.12.2026: the mat stays indigo but deeper and calmer, sheets are not pure white */
  --bg: #eceef4; --paper: #f8f9fb; --ink: #161a29; --muted: #575d70;
  --line: #dfe2ea; --line-strong: #c9cdd9; --soft: #eceef3;
  --mat: #2e3888; --mat-deep: #272f75;
  --mat-line: rgba(255, 255, 255, .11); --mat-line-strong: rgba(255, 255, 255, .25);
  --mat-ink: #f2f3fa; --mat-muted: #c3c8e6;
  --knife: #ffd23f; --knife-hover: #ffdb63; --knife-ink: #1d1a0c;
  --accent: #2f3a96; --accent-soft: #e5e7f4;
  --warn: #9a5b00; --warn-soft: #fff3d6;
  --shadow-paper: 0 1px 1px rgba(10, 14, 40, .04), 0 3px 6px rgba(10, 14, 40, .05), 0 20px 40px -20px rgba(10, 14, 50, .30);
  --shadow-sticker: 0 1px 1px rgba(0, 0, 0, .12), 0 6px 10px -2px rgba(5, 10, 40, .24), 0 26px 40px -20px rgba(5, 8, 35, .6);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --display: 'Geologica', 'Onest', system-ui, sans-serif;
}
:root[data-theme=dark] {
  color-scheme: dark;
  --bg: #0f1118; --paper: #171a26; --ink: #e8eaf4; --muted: #a1a8c0; --line: #262b3d; --line-strong: #353b52; --soft: #1f2333;
  --mat: #1e2559; --mat-deep: #181e4a; --mat-line: rgba(210, 215, 255, .09); --mat-line-strong: rgba(210, 215, 255, .2);
  --mat-ink: #eceeff; --mat-muted: #b3baea; --accent: #9aa5ff; --accent-soft: #222852;
  --warn: #ffc76b; --warn-soft: #33290f;
  --shadow-paper: 0 1px 2px rgba(0, 0, 0, .4), 0 24px 50px -20px rgba(0, 0, 0, .75);
  --shadow-sticker: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 14px -4px rgba(0, 0, 0, .5), 0 28px 44px -20px rgba(0, 0, 0, .8);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    color-scheme: dark;
    --bg: #0f1118; --paper: #171a26; --ink: #e8eaf4; --muted: #a1a8c0; --line: #262b3d; --line-strong: #353b52; --soft: #1f2333;
    --mat: #1e2559; --mat-deep: #181e4a; --mat-line: rgba(210, 215, 255, .09); --mat-line-strong: rgba(210, 215, 255, .2);
    --mat-ink: #eceeff; --mat-muted: #b3baea; --accent: #9aa5ff; --accent-soft: #222852;
    --warn: #ffc76b; --warn-soft: #33290f;
    --shadow-paper: 0 1px 2px rgba(0, 0, 0, .4), 0 24px 50px -20px rgba(0, 0, 0, .75);
    --shadow-sticker: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 14px -4px rgba(0, 0, 0, .5), 0 28px 44px -20px rgba(0, 0, 0, .8);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; scrollbar-gutter: stable; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: .18em; }
h1, h2, h3 { margin: 0; line-height: 1.1; text-wrap: balance; }
p, li { text-wrap: pretty; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--knife); color: var(--knife-ink); }
:focus-visible { outline: 2px solid var(--knife); outline-offset: 2px; border-radius: 6px; }
.sheet :focus-visible { outline-color: var(--accent); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border: 3px solid var(--bg); border-radius: 99px; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
/* Big monitors (lesson 03.12.2026, see "ПЛАН новых сайтов umelo.md"): a 2K screen at Windows 125% is 2048 px wide.
   Scale everything up a little AND widen the container, so the site fills ~75% of the width. 1920 stays as is. */
@media (min-width: 2000px) { html { zoom: 1.15; } .wrap { width: min(1440px, 100% - 40px); } }
@media (min-width: 2200px) { html { zoom: 1.2; } }
@media (min-width: 2480px) { html { zoom: 1.3; } }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--knife); color: var(--knife-ink); border-radius: 10px; font-weight: 650; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- Header: on the mat colour, so the mat starts at the very top ---------- */
.top { background: var(--mat); color: var(--mat-ink); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 18px; font-weight: 500; letter-spacing: -.02em; }
.brand b { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; }
.logo rect { fill: var(--knife); }
.logo path { stroke: var(--knife-ink); }
.logo .logo-dots { fill: var(--knife-ink); stroke: none; }
.top-nav { display: flex; align-items: center; gap: 4px; font-size: 15px; }
.top-nav > a { color: var(--mat-muted); text-decoration: none; padding: 8px 12px; border-radius: 10px; transition: color .15s, background .15s; }
.top-nav > a:hover { color: var(--mat-ink); background: var(--mat-line); }
.theme-btn { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 10px; background: none; color: var(--mat-muted); cursor: pointer; }
.theme-btn:hover { color: var(--mat-ink); background: var(--mat-line); }
.theme-btn .i-moon { display: none; }
:root[data-theme=dark] .theme-btn .i-sun { display: none; }
:root[data-theme=dark] .theme-btn .i-moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .theme-btn .i-sun { display: none; } :root:not([data-theme=light]) .theme-btn .i-moon { display: block; } }
.lang { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 10px; color: var(--mat-muted); font-size: 13px; font-weight: 700; letter-spacing: .03em; }
details.lang { padding: 0; }
.lang summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 10px; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { color: var(--mat-ink); background: var(--mat-line); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; background: var(--paper); color: var(--ink); border-radius: 14px; box-shadow: var(--shadow-paper); padding: 6px; min-width: 170px; font-size: 15px; font-weight: 500; letter-spacing: 0; }
.lang-menu a { display: block; padding: 9px 12px; border-radius: 9px; text-decoration: none; }
.lang-menu a:hover { background: var(--soft); }
.lang-menu a[aria-current] { color: var(--accent); font-weight: 650; }

/* ---------- The mat band ---------- */
.mat {
  position: relative; color: var(--mat-ink); padding: 28px 0 64px; overflow: hidden;
  background:
    linear-gradient(45deg, transparent calc(50% - .5px), var(--mat-line) 50%, transparent calc(50% + .5px)) 0 0 / 100% 100% no-repeat,
    radial-gradient(120% 80% at 80% 0%, color-mix(in srgb, var(--mat) 70%, #fff 6%), transparent 60%),
    var(--mat);
}
.mat::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--mat-line) 1px, transparent 1px), linear-gradient(90deg, var(--mat-line) 1px, transparent 1px);
  background-size: 54px 54px; opacity: .5;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.mat > .wrap { position: relative; z-index: 1; }
.mat-short { padding: 48px 0 56px; }
.hero-copy { max-width: 900px; }
/* Desktop: the same hero height on every type page, so switching types never moves the workbench.
   Room for a two-line title and a two-line lead; shorter text is centred in it. */
@media (min-width: 921px) {
  /* one line of title + up to two of lead: the workbench (and the Download button) fits a 1080p screen */
  .hero-copy { min-height: calc(1.08 * clamp(30px, 3.4vw, 44px) + 10px + 2 * 1.5 * 17px); display: flex; flex-direction: column; justify-content: center; }
}
.mat h1 { overflow-wrap: break-word; hyphens: auto; font-family: var(--display); font-weight: 700; font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -.025em; line-height: 1.08; }
.mat .lead { margin-top: 10px; font-size: 17px; line-height: 1.5; color: var(--mat-muted); max-width: 72ch; }
.mat-short .btn { margin-top: 24px; }

.bench { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 40px; margin-top: 24px; align-items: start; }
.col { display: grid; gap: 16px; min-width: 0; }

/* ---------- Sheets of paper with the controls ---------- */
.sheet { background: var(--paper); color: var(--ink); border-radius: 20px; padding: 22px; box-shadow: var(--shadow-paper); min-width: 0; }
.types { display: flex; flex-wrap: wrap; gap: 4px; padding: 5px; background: var(--soft); border-radius: 14px; }
.type { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-size: 14.5px; font-weight: 500; white-space: nowrap; transition: color .15s, background .15s; }
.type:hover { color: var(--ink); background: color-mix(in srgb, var(--paper) 60%, transparent); }
.type[aria-current] { background: var(--paper); color: var(--ink); font-weight: 650; box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 2px 8px -2px rgba(0, 0, 0, .12); }
.type[aria-current] svg { color: var(--accent); }
.type-more { border: 0; background: none; cursor: pointer; font: inherit; font-size: 14.5px; font-weight: 500; }
.type-more svg { transition: transform .2s var(--ease); }
.type-more[aria-expanded=true] svg { transform: rotate(45deg); }
.types-more { display: contents; }
.types-more[hidden] { display: none; }
/* All 15 types visible at once in an even grid (columns line up), no "More" button, whenever the sheet is wide
   enough: 5+5+5 (1080p), 8+7 (2K). Measured: 5 columns need ~560px, 8 need ~840px. Narrow sheets keep the "More" fold. */
.sheet-content { container-type: inline-size; }
@container (min-width: 580px) {
  .types { display: grid; grid-template-columns: repeat(5, auto); justify-content: space-between; gap: 4px 2px; }
  .types .type-more { display: none; }
  .types .types-more[hidden] { display: contents !important; }
}
@container (min-width: 880px) {
  .types { grid-template-columns: repeat(8, auto); }
}

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 14px; margin-top: 20px; }
.field { display: grid; gap: 7px; grid-column: 1 / -1; align-content: start; }
.field.half { grid-column: auto; }
.field-label { font-size: 14px; font-weight: 650; }
.field input, .field textarea, .select select {
  width: 100%; min-height: 52px; padding: 0 16px; font-size: 17px; border: 1.5px solid var(--line-strong); border-radius: 12px;
  background: var(--paper); outline: none; transition: border-color .15s, box-shadow .15s;
}
.field textarea { padding: 13px 16px; resize: vertical; min-height: 96px; line-height: 1.45; }
.field input:focus, .field textarea:focus, .select select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--muted) 85%, transparent); }
.field-hint { font-size: 13px; color: var(--muted); }
.select { position: relative; display: block; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; }
.select svg { position: absolute; right: 14px; top: 50%; margin-top: -9px; pointer-events: none; color: var(--muted); }
.pass { position: relative; display: block; }
.pass input { padding-right: 52px; }
.pass-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; border-radius: 9px; color: var(--muted); cursor: pointer; }
.pass-eye:hover, .pass-eye.on { color: var(--accent); background: var(--accent-soft); }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; grid-column: 1 / -1; }
.check input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.msg { margin-top: 14px; padding: 12px 14px; border-radius: 12px; font-size: 14.5px; background: var(--soft); }
.msg-warn { background: var(--warn-soft); color: var(--warn); }

.group + .group { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line-strong); }
.group h3, .as-h3 { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.group h3 { margin-bottom: 4px; }
.group-hint { font-size: 13px; color: var(--muted); }
.row { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.row-label { width: 52px; flex: none; font-size: 14px; color: var(--muted); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.sw { position: relative; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); transition: transform .15s var(--ease); }
.sw:hover { transform: scale(1.08); }
.sw[aria-pressed=true], .sw.on { box-shadow: 0 0 0 2.5px var(--paper), 0 0 0 4.5px var(--ink); }
.sw-custom { background: conic-gradient(#ff5f5f, #ffd23f, #4fd18b, #3f8cff, #b35cff, #ff5f5f); overflow: hidden; }
.sw-custom input, .seg-custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.seg { display: inline-flex; flex-wrap: wrap; padding: 3px; background: var(--soft); border-radius: 10px; font-size: 14px; }
.seg button, .seg-custom { position: relative; padding: 6px 12px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.seg button:hover, .seg-custom:hover { color: var(--ink); }
.seg button[aria-pressed=true], .seg-custom.on { background: var(--paper); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.row-check { margin-top: 14px; font-size: 14px; color: var(--muted); }
.row-check input[type=color] { width: 30px; height: 30px; padding: 0; border: 1.5px solid var(--line-strong); border-radius: 8px; background: none; cursor: pointer; }
.row-check input[type=color]:disabled { opacity: .35; cursor: default; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 2px; }
input[type=color]::-webkit-color-swatch { border: 0; border-radius: 5px; }
.warn { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 13.5px; }
.warn svg { flex: none; margin-top: 2px; }
.shapes { display: flex; gap: 8px; }
.shape { display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border-radius: 12px; border: 1.5px solid var(--line); background: none; color: var(--muted); cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.shape svg { width: 28px; height: 28px; }
.shape:hover { color: var(--ink); border-color: var(--line-strong); }
.shape[aria-pressed=true] { border-color: var(--ink); color: var(--ink); background: var(--soft); }
.logo-empty { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.logo-empty .group-hint { max-width: 32ch; }
.logo-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 10px; border-radius: 12px; background: var(--soft); flex-wrap: wrap; }
.logo-thumb { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 10px; background: #fff; flex: none; overflow: hidden; }
.logo-thumb img { max-width: 40px; max-height: 40px; }
.logo-size { display: grid; gap: 2px; flex: 1; min-width: 120px; font-size: 12.5px; color: var(--muted); }
.logo-size input { accent-color: var(--accent); width: 100%; }
.field-tight { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { padding: 5px 11px; border-radius: 99px; border: 1px solid var(--line-strong); background: none; color: var(--muted); font-size: 13px; cursor: pointer; }
.chip:hover { color: var(--ink); border-color: var(--ink); }
.reset { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; padding: 6px 2px; border: 0; background: none; color: var(--muted); font-size: 13px; cursor: pointer; }
.reset:hover { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; border-radius: 12px; font-weight: 650; text-decoration: none; white-space: nowrap; transition: transform .15s var(--ease), box-shadow .15s, background .15s, opacity .15s; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13.5px; }
.btn-lg { height: 54px; padding: 0 20px; font-size: 16.5px; }
.btn-soft { height: 44px; padding: 0 16px; background: var(--accent-soft); color: var(--accent); font-size: 15px; flex: none; }
.btn-soft:hover { background: color-mix(in srgb, var(--accent-soft) 70%, var(--accent) 12%); }
.btn-ghost { background: none; color: var(--muted); }
.btn-ghost:hover { background: var(--paper); color: var(--ink); }
.btn-knife { background: var(--knife); color: var(--knife-ink); box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 -2px 0 rgba(0, 0, 0, .12) inset, 0 10px 24px -10px rgba(0, 0, 0, .5); }
.btn-knife:hover { transform: translateY(-1px); background: var(--knife-hover); }
.btn-knife:active { transform: translateY(1px); }
.btn-mat { background: color-mix(in srgb, var(--mat-ink) 14%, transparent); color: var(--mat-ink); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--mat-ink) 45%, transparent); }
.btn-mat:hover { background: color-mix(in srgb, var(--mat-ink) 20%, transparent); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn.done { animation: done .9s var(--ease); }
@keyframes done { 30% { transform: scale(.96); } 60% { transform: scale(1.02); } }

/* ---------- The stage: the mat with a true-scale grid and ruler ---------- */
.stage { position: sticky; top: 16px; min-width: 0; }
.mat-board {
  --cm: 54px; --x0: 54px; --sticker: 300px;
  position: relative; border-radius: 4px;
  /* a dot every centimetre, true to the print size; lined up with the sticker's left edge */
  background-image: radial-gradient(circle, var(--mat-line-strong) 1.2px, transparent 1.6px);
  background-size: var(--cm) var(--cm); background-position: calc(var(--x0) - var(--cm) / 2) calc(var(--y0, 64px) - var(--cm) / 2);
}
.dim { position: absolute; overflow: visible; pointer-events: none; }
.dim path { stroke: var(--mat-muted); stroke-width: 1.2; fill: none; }
.dim text { fill: var(--mat-ink); font: 650 12.5px 'Onest', sans-serif; font-variant-numeric: tabular-nums; }
.dim rect { fill: var(--mat); }
.sticker-zone { position: relative; min-height: calc(var(--sticker) + 48px); padding: 56px 0 52px var(--x0); }
.sticker {
  position: relative; margin: 0; width: var(--sticker); border-radius: 14px; box-shadow: var(--shadow-sticker);
  transform: rotate(-1.2deg); transform-origin: 20% 80%; background: #fff;
}
.sticker::before { /* die-cut line */
  content: ''; position: absolute; inset: -7px; border-radius: 21px; pointer-events: none;
  border: 1.5px dashed color-mix(in srgb, var(--mat-ink) 55%, transparent);
}
.sticker::after { /* peeling corner */
  content: ''; position: absolute; right: 0; bottom: 0; width: 24px; height: 24px; border-radius: 0 0 14px 0;
  background: linear-gradient(135deg, transparent 50%, #dfe2ec 50%, #ffffff 80%); box-shadow: -3px -3px 6px -3px rgba(0, 0, 0, .25);
}
.sticker.fresh { animation: stamp .32s var(--ease); }
@keyframes stamp { from { transform: rotate(-1.2deg) scale(.985); box-shadow: 0 1px 1px rgba(0, 0, 0, .1), 0 3px 6px -2px rgba(0, 0, 0, .2); } }
.sticker-art { border-radius: 14px; overflow: hidden; line-height: 0; transition: opacity .25s; }
.sticker.is-sample .sticker-art { opacity: .72; filter: saturate(.8); }
.sample-tag { position: absolute; left: var(--x0); top: 18px; width: var(--sticker); margin: 0; display: flex; gap: 8px; align-items: center; justify-content: center;
  padding: 8px 12px; border-radius: 10px; background: var(--knife); color: var(--knife-ink); font-weight: 650; font-size: 13.5px; line-height: 1.25; text-align: center;
  box-shadow: 0 6px 16px -6px rgba(5, 10, 40, .5); }
.sample-tag svg { flex: none; rotate: 90deg; }
.sample-tag[hidden] { display: none; }
.sticker-art svg { display: block; width: 100%; height: auto; }
.sticker-art.see-through { background: repeating-conic-gradient(#e4e6ee 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.placeholder { position: absolute; left: var(--x0); top: 22px; width: var(--sticker); aspect-ratio: 1; display: grid; place-items: center; padding: 30px; text-align: center;
  border: 2px dashed var(--mat-line-strong); border-radius: 14px; color: var(--mat-muted); font-size: 15px; }

.size { margin-top: 6px; padding: 14px 16px; border-radius: 16px; background: color-mix(in srgb, var(--mat-deep) 70%, #000 10%); box-shadow: inset 0 0 0 1px var(--mat-line); }
.size-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.size-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; font-size: 15px; }
.stepper { display: inline-flex; align-items: center; background: color-mix(in srgb, var(--mat-ink) 10%, transparent); border-radius: 10px; flex: none; }
.stepper button { width: 36px; height: 36px; border: 0; background: none; color: var(--mat-ink); font-size: 18px; cursor: pointer; border-radius: 10px; }
.stepper button:hover { background: var(--mat-line); }
.stepper output { min-width: 70px; text-align: center; font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.size-range { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 26px; margin: 8px 0 6px; background: none; cursor: pointer; }
.size-range::-webkit-slider-runnable-track { height: 6px; border-radius: 9px; background: var(--mat-line-strong); }
.size-range::-moz-range-track { height: 6px; border-radius: 9px; background: var(--mat-line-strong); }
.size-range::-moz-range-progress { height: 6px; border-radius: 9px; background: var(--knife); }
.size-range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: #fff; border: 3px solid var(--knife); box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.size-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--knife); }
.size-note { display: flex; gap: 8px; align-items: flex-start; font-size: 14.5px; line-height: 1.45; color: var(--mat-ink); min-height: 21px; }
.size-note svg { flex: none; margin-top: 2px; color: var(--knife); }
.size-note[data-level=small] { color: #ffe08a; }
.size-note[data-level=tiny] { color: #ffb3a6; }
.size-note[data-level=tiny] svg { color: #ffb3a6; }

.downloads { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; margin-top: 14px; }
.png-size { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--mat-muted); flex-wrap: wrap; }
.seg-mat { background: color-mix(in srgb, var(--mat-ink) 10%, transparent); }
.seg-mat button { color: var(--mat-muted); padding: 4px 10px; font-size: 13px; font-variant-numeric: tabular-nums; }
.seg-mat button:hover { color: var(--mat-ink); }
.seg-mat button[aria-pressed=true] { background: var(--mat-ink); color: var(--mat); box-shadow: none; }

/* Floating copy of the code on phones */
.dock { position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 40; display: flex; gap: 8px; align-items: center; padding: 8px; border-radius: 18px;
  background: color-mix(in srgb, var(--mat-deep) 92%, transparent); backdrop-filter: blur(10px); box-shadow: 0 14px 34px -10px rgba(5, 10, 40, .6); animation: pop .2s var(--ease); }
.dock-thumb { flex: none; width: 64px; height: 64px; padding: 4px; border: 0; border-radius: 11px; background: #fff; cursor: pointer; }
.dock-thumb span { display: block; line-height: 0; border-radius: 7px; overflow: hidden; }
.dock-thumb svg { width: 100%; height: auto; }
.dock .btn-knife { flex: 1; height: 52px; }
.dock-share { width: 52px; height: 52px; padding: 0; justify-content: center; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.actions .btn { flex: 1; justify-content: center; }
.trust { display: flex; gap: 7px; align-items: center; margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.trust svg { flex: none; color: var(--accent); }
.foot-copy { color: var(--muted); font-size: 13.5px; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.9); } }

/* ---------- Below the mat ---------- */
.promise { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 64px 0 24px; }
.promise-card { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 14px; padding: 24px; border-radius: 20px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.promise-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--knife); color: var(--knife-ink); transform: rotate(-4deg); }
.promise-ico svg { width: 24px; height: 24px; }
.promise h2 { font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: -.015em; }
.promise p { grid-column: 1 / -1; margin-top: 14px; font-size: 15.5px; color: var(--muted); }
.print { padding-top: 40px; }
.print-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; }
.print h3 { font-size: 16px; margin-bottom: 12px; }
.sizes { width: 100%; border-collapse: collapse; font-size: 15px; }
.sizes th { text-align: left; font-weight: 600; color: var(--muted); font-size: 13px; padding: 0 12px 8px 0; border-bottom: 1px solid var(--line); }
.sizes td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.sizes td:first-child { color: var(--ink); }
.sizes .num { font-family: var(--display); font-weight: 700; color: var(--ink); white-space: nowrap; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 32px; color: var(--muted); }
.checks li::before { content: ''; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 6px; border: 1.5px dashed var(--line-strong); }
.sec-title { font-family: var(--display); font-size: 25px; font-weight: 700; letter-spacing: -.015em; margin: 48px 0 18px; }
.type-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.type-list li { border-bottom: 1px solid var(--line); }
.type-list li:nth-child(odd) { border-right: 1px solid var(--line); }
.type-list a { display: flex; align-items: center; gap: 16px; padding: 18px 18px 18px 4px; text-decoration: none; }
.type-list li:nth-child(even) a { padding-left: 22px; }
.type-list a[aria-current] { background: var(--soft); border-radius: 12px; }
.tl-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); flex: none; transition: background .2s, color .2s, transform .2s var(--ease); }
.tl-txt { display: grid; flex: 1; }
.tl-txt strong { font-weight: 700; font-size: 16.5px; letter-spacing: -.01em; }
.tl-txt span { color: var(--muted); font-size: 14.5px; }
.tl-go { color: var(--muted); flex: none; transition: transform .2s var(--ease), color .2s; }
.type-list a:hover .tl-ico { background: var(--knife); color: var(--knife-ink); transform: rotate(-6deg); }
.type-list a:hover .tl-go { transform: translateX(3px); color: var(--ink); }

.info { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; padding: 64px 0; }
.info h2 { font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: -.015em; margin-bottom: 16px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 12px; color: var(--muted); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1.5px dashed var(--line-strong); color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 13px; }
.steps strong { color: var(--ink); }
.qa { border-bottom: 1px solid var(--line); }
.qa summary { cursor: pointer; padding: 14px 0; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.qa summary::after { content: '+'; color: var(--muted); font-size: 20px; line-height: 1; }
.qa[open] summary::after { content: '−'; }
.qa summary::-webkit-details-marker { display: none; }
.qa p { padding: 0 0 16px; color: var(--muted); }

.doc { max-width: 720px; padding: 40px 0 72px; display: grid; gap: 16px; font-size: 17px; color: var(--muted); }

.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14.5px; color: var(--muted); }
.foot-in { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; justify-content: space-between; }
.foot-brand { display: grid; gap: 6px; }
.foot .brand { color: var(--ink); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--ink); }

.ad-slot { margin-block: 24px; min-height: 90px; }

/* ---------- Tablet and phone ---------- */
@media (max-width: 920px) {
  .bench { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  /* phone order: what to encode -> the sticker -> how it looks */
  .col { display: contents; }
  .sheet-content { order: 1; }
  .stage { order: 2; position: static; width: 100%; max-width: 470px; margin-inline: auto; }
  .sheet-style { order: 3; }
  .info { grid-template-columns: 1fr; gap: 40px; }
  .promise { grid-template-columns: 1fr; gap: 12px; }
  .print-grid { grid-template-columns: 1fr; gap: 28px; }
  .type-list { grid-template-columns: 1fr; }
  .type-list li:nth-child(odd) { border-right: 0; }
  .type-list li:nth-child(even) a { padding-left: 4px; }
}
@media (max-width: 560px) {
  .mat { padding: 28px 0 48px; }
  .mat .lead { font-size: 16.5px; }
  .top-nav > a:not(.nav-faq) { display: none; }
  .sheet { padding: 16px; border-radius: 18px; }
  .type, .type-more { padding: 7px 10px; font-size: 14px; gap: 6px; }
  .fields { grid-template-columns: 1fr; }
  .field.half { grid-column: 1 / -1; }
  .row { flex-wrap: wrap; gap: 8px; }
  .row-label { width: 100%; }
  .logo-empty { flex-wrap: wrap; }
  .downloads { grid-template-columns: 1fr 1fr; }
  .downloads .btn-knife { grid-column: 1 / -1; }
  .promise { padding-top: 48px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.row-frame { margin-top: 14px; }
.frame-hint { margin: 6px 0 0; }
.group[hidden], [data-when][hidden] { display: none !important; }
.brand-btn { margin-top: 4px; width: 100%; justify-content: center; gap: 8px; }
.check-note { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0 0; font-size: 14px; line-height: 1.45; color: #9be3b4; }
.check-note svg { flex: none; margin-top: 2px; }
.check-note[data-level=thin] { color: #ffe08a; }
.check-note[data-level=bad] { color: #ffb3a6; }
.ecc-row[hidden] { display: none; }
.kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; }
.kind { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 8px; border-radius: 12px; border: 1.5px solid var(--line);
  background: none; color: var(--muted); font: inherit; font-size: 12.5px; line-height: 1.2; text-align: center; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.kind svg { width: 26px; height: 26px; }
.kind:hover { color: var(--ink); border-color: var(--line-strong); }
.kind[aria-pressed=true] { color: var(--ink); border-color: var(--ink); background: var(--soft); font-weight: 600; }
.kind[hidden] { display: none; }
.kind-hint { margin: 10px 0 0; }
.sticker[data-kind=sticker] { border-radius: 50%; }
.sticker[data-kind=sticker] .sticker-art { border-radius: 50%; }
.sticker[data-kind=card] .sticker-art, .sticker[data-kind=receipt] .sticker-art { border-radius: 0; }
.sticker[data-kind=card], .sticker[data-kind=receipt] { box-shadow: none; background: none; filter: drop-shadow(0 10px 18px rgba(5, 8, 35, .45)); }
.sticker:not([data-kind=plain])::after { display: none; }
.sticker[data-kind=sticker]::before { display: none; }

/* ---------- Polish (05.12.2026): small touches, all switched off by prefers-reduced-motion above ---------- */
/* Switching between type pages crossfades instead of flashing white (Chrome, Edge, Safari 18.2+; others just load) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
/* Theme button: colours fade instead of snapping */
html.theming, html.theming * { transition: background-color .3s, color .3s, border-color .3s, fill .3s !important; }

/* The sticker lifts a little under the cursor and its corner peels further */
.sticker { transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.sticker::after { transition: width .35s var(--ease), height .35s var(--ease); }
@media (hover: hover) {
  .sticker:hover { transform: rotate(-.5deg) translateY(-3px); box-shadow: 0 1px 1px rgba(0, 0, 0, .12), 0 10px 16px -4px rgba(5, 10, 40, .28), 0 36px 50px -22px rgba(5, 8, 35, .65); }
  .sticker:hover::after { width: 34px; height: 34px; }
}

/* Size slider: the track fills with knife yellow up to the thumb (Firefox already does it with ::-moz-range-progress) */
.size-range::-webkit-slider-runnable-track { background: linear-gradient(var(--knife), var(--knife)) 0 / var(--p, 0%) 100% no-repeat, var(--mat-line-strong); }
.size-range::-webkit-slider-thumb { transition: transform .15s var(--ease); }
.size-range:hover::-webkit-slider-thumb { transform: scale(1.12); }
.size-range:active::-webkit-slider-thumb { transform: scale(.95); }

/* FAQ answers slide open instead of popping (Chrome 131+; elsewhere they open instantly as before) */
.qa { interpolate-size: allow-keywords; }
.qa::details-content { block-size: 0; overflow: clip; transition: block-size .28s var(--ease), content-visibility .28s allow-discrete; }
.qa[open]::details-content { block-size: auto; }
.qa summary { transition: color .15s; }
.qa summary:hover { color: var(--accent); }

/* Layout and shape cards: a hair of lift on hover */
@media (hover: hover) {
  .kind:hover, .shape:hover { transform: translateY(-1px); }
}
.kind, .shape { transition: border-color .15s, color .15s, background .15s, transform .15s var(--ease); }

/* ---------- Fixes after the fresh-eyes test (05.12.2026) ---------- */
/* Narrow sheet (phones): all 15 types in one swipeable row instead of four rows + "More" */
@container (max-width: 579.98px) {
  .types { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; scroll-padding-inline: 8px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  .types::-webkit-scrollbar { display: none; }
  .types .type-more { display: none; }
  .types .types-more[hidden] { display: contents !important; }
  .type { flex: none; }
}
/* A branded card ignores the colour swatches: show them as off */
.swatches.locked { opacity: .4; pointer-events: none; }
/* Fixed-size layouts (A6, A4): the slider is off and should look off */
.size-range:disabled { cursor: not-allowed; opacity: .45; }
.size-range:disabled::-webkit-slider-thumb { border-color: var(--mat-muted); }
.size-range:disabled::-webkit-slider-runnable-track { background: var(--mat-line-strong); }
.stepper button:disabled { opacity: .4; cursor: not-allowed; }
/* "Copy the payment link" under the payment fields */
.pay-link { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 16px; }
