/* 3D-QR: "toy block" system.
   Chunky plum-ink outlines and hard offset shadows (things you can press),
   flat candy colours (each tool owns one), Lilita One + Nunito. */

@font-face { font-family: 'Lilita One'; font-style: normal; font-display: swap; font-weight: 400;
  src: url(/assets/fonts/lilita-one-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-display: swap; font-weight: 200 1000;
  src: url(/assets/fonts/nunito-latin-wght-normal.woff2) format('woff2-variations'); }

:root {
  --ink: #1c1433;
  --ink-2: #4a4363;
  --ink-3: #7a7393;
  --paper: #ffffff;
  --bg: #f6f3ff;
  --tomato: #ff5d3a;
  --tomato-deep: #e8431f;
  --sun: #ffc93c;
  --mint: #2bd4a0;
  --sky: #4d8dff;
  --gum: #ff77c8;
  --grape: #8f6bff;
  --alert: #d92d20; --alert-soft: #ffe3de;
  --caution: #8a5300; --caution-soft: #fff1c9;
  --safe: #067a4f; --safe-soft: #d8f7ea;
  --theme: var(--sun);
  --line: 2.5px solid var(--ink);
  --pop: 4px 4px 0 var(--ink);
  --pop-lg: 7px 7px 0 var(--ink);
  --display: 'Lilita One', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --body: 'Nunito', ui-rounded, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { --tint: color-mix(in srgb, var(--theme) 30%, white); margin: 0; font-family: var(--body); font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--bg); font-weight: 500; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: .2em; }
img, svg { max-width: 100%; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 400; line-height: 1.02; letter-spacing: .005em; text-wrap: balance; }
p { margin: 0; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
@media (max-width: 640px) { .wrap { padding: 0 18px; } }
.muted { color: var(--ink-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--sun); color: var(--ink); padding: 8px 12px; z-index: 99; border: var(--line); border-radius: 10px; }
.skip:focus { left: 8px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- header ---------- */
.site-header { background: var(--paper); border-bottom: var(--line); position: relative; z-index: 20; }
.header-inner { display: flex; align-items: center; gap: 24px; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); }
.brand-name { font-family: var(--display); font-size: 34px; line-height: 1; margin-top: 6px; letter-spacing: .01em; white-space: nowrap; }
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 800; font-size: 15px; padding: 8px 14px; border-radius: 999px; border: 2px solid transparent; white-space: nowrap; }
.nav a:hover { border-color: var(--ink); background: var(--bg); }
.nav a[aria-current] { background: var(--ink); color: var(--paper); }
.nav a[href="/animated-qr-code-generator/"]:not([aria-current]) { background: var(--sun); border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.nav-toggle { display: none; }
/* Tablets and phones: one row (logo + menu button); the links drop down as a panel. */
@media (max-width: 960px) {
  .header-inner { height: 68px; flex-wrap: nowrap; }
  .nav-toggle { display: grid; place-content: center; gap: 5px; margin-left: auto; width: 48px; height: 44px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); box-shadow: 2px 2px 0 var(--ink); cursor: pointer; }
  .nav-toggle span { display: block; width: 22px; height: 3px; border-radius: 3px; background: var(--ink); transition: transform .2s, opacity .2s; }
  .site-header.open .nav-toggle { background: var(--sun); }
  .site-header.open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .site-header.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-header.open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 6px; margin: 0; padding: 12px 18px 20px; background: var(--paper); border-bottom: var(--line); box-shadow: 0 14px 24px rgba(28, 20, 51, .12); }
  .site-header.open .nav { display: flex; }
  .nav a { font-size: 17px; padding: 12px 16px; border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) { .nav-toggle span { transition: none; } }

/* ---------- ⌘K search: a keyboard shortcut, so desktop only ---------- */
.cmdk-btn { display: inline-flex; align-items: center; gap: 8px; margin-left: -10px; height: 40px; padding: 0 8px 0 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink); box-shadow: 2px 2px 0 var(--ink); cursor: pointer; transition: transform .12s, box-shadow .12s, background .12s; }
.cmdk-btn:hover { background: var(--bg); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.cmdk-btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.cmdk-keys { display: inline-flex; gap: 3px; }
.cmdk-keys kbd, .cmdk kbd { margin: 0; min-width: 22px; text-align: center; font-size: 12px; padding: 4px 6px; }
@media (max-width: 960px), (hover: none), (pointer: coarse) { .cmdk-btn { display: none; } }

html.cmdk-open { overflow: hidden; }
.cmdk { width: min(640px, calc(100vw - 48px)); max-height: none; margin: 12vh auto auto; padding: 0; border: 0; background: none; overflow: visible; color: var(--ink); }
.cmdk::backdrop { background: rgba(28, 20, 51, .42); backdrop-filter: blur(3px); }
.cmdk[open] .cmdk-box { animation: cmdk-pop .16s cubic-bezier(.2, .9, .3, 1.2); }
.cmdk[open]::backdrop { animation: cmdk-fade .16s ease-out; }
@keyframes cmdk-pop { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
@keyframes cmdk-fade { from { opacity: 0; } }
.cmdk-box { display: flex; flex-direction: column; max-height: min(560px, 76vh); background: var(--paper); border: var(--line); border-radius: 22px; box-shadow: var(--pop-lg); overflow: hidden; }
.cmdk-field { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: var(--line); background: var(--sun); }
.cmdk-field svg { flex: none; }
.cmdk .cmdk-field input { flex: 1; min-width: 0; width: auto; height: 64px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; font: 800 20px/1 var(--body); color: var(--ink); outline: none; }
.cmdk-field input::placeholder { color: rgba(28, 20, 51, .55); }
.cmdk-list { overflow-y: auto; overscroll-behavior: contain; padding: 8px 10px 12px; scroll-padding: 34px 0 10px; }
.cmdk-group-title { position: sticky; top: -8px; z-index: 1; padding: 12px 10px 6px; background: var(--paper); font-size: 12.5px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.cmdk-item { display: flex; align-items: center; gap: 14px; padding: 9px 10px; border: 2px solid transparent; border-radius: 14px; text-decoration: none; color: var(--ink); }
.cmdk-item[aria-selected="true"] { background: var(--bg); border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.cmdk-icon { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border: 2px solid var(--ink); border-radius: 11px; background: var(--c); color: var(--ink); }
.cmdk-icon svg { width: 20px; height: 20px; }
.cmdk-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cmdk-title { font-weight: 900; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-title mark { background: none; color: inherit; text-decoration: underline 3px var(--tomato); text-underline-offset: 3px; }
.cmdk-desc { font-size: 13.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-kind { flex: none; font-size: 12px; font-weight: 800; color: var(--ink-3); }
.cmdk-item[aria-selected="true"] .cmdk-kind::after { content: "  ↵"; color: var(--ink); }
.cmdk-empty { margin: 0; padding: 36px 16px; text-align: center; font-weight: 700; color: var(--ink-2); }
.cmdk-empty em { font-style: normal; font-weight: 900; color: var(--ink); }
.cmdk-foot { display: flex; gap: 18px; padding: 10px 18px; border-top: 2px solid var(--bg); font-size: 13px; font-weight: 700; color: var(--ink-3); }
.cmdk-foot span { display: inline-flex; align-items: center; gap: 4px; }
.cmdk-foot kbd { font-size: 11px; padding: 3px 5px; min-width: 20px; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #d6d0ee; padding: 64px 0 32px; font-size: 15.5px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr repeat(5, 1fr); gap: 32px; }
.site-footer .brand { color: var(--paper); }
.footer-brand p { margin-top: 14px; max-width: 30ch; }
.tip-note { font-size: 14px; color: #d6d0ee; }
.site-footer .footer-grid a.tip-btn { display: inline-flex; white-space: nowrap; align-items: center; gap: 8px; margin-top: 12px; padding: 7px 16px 7px 10px; border-radius: 999px; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--sun); font-weight: 800; font-size: 15px; text-decoration: none; }
.site-footer .footer-grid a.tip-btn:hover { background: var(--sun); color: var(--ink); text-decoration: none; }
.mug { flex: none; display: block; }
.tip-line { margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }
.tip-line a { color: var(--ink); font-weight: 800; }
.tip-line.thanked { animation: tip-in .5s ease; }
@keyframes tip-in { from { opacity: 0; transform: translateY(4px); } }
/* Ko-fi corner button: just a mug until you hover or focus it. */
.kofi-float { position: fixed; left: 14px; bottom: 14px; z-index: 30; display: inline-flex; align-items: center; gap: 0; height: 44px; padding: 0 11px; border-radius: 999px; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); text-decoration: none; font-weight: 800; font-size: 14px; opacity: .85; transition: opacity .2s, gap .2s; }
.kofi-float span { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .25s ease; }
.kofi-float:hover, .kofi-float:focus-visible { opacity: 1; gap: 8px; background: var(--sun); }
.kofi-float:hover span, .kofi-float:focus-visible span { max-width: 160px; }
@media print { .kofi-float { display: none; } }
.site-footer h2 { font-size: 20px; color: var(--sun); margin-bottom: 10px; }
.site-footer .footer-sub { margin-top: 28px; }
.footer-grid a:not(.brand) { display: block; color: #d6d0ee; text-decoration: none; padding: 3px 0; font-weight: 600; }
.footer-grid a:not(.brand):hover { color: var(--paper); text-decoration: underline; }
.footer-bottom { margin-top: 48px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .15); font-size: 13.5px; color: #a59fc2; }
@media (max-width: 1020px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- buttons: blocks you can press ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 900; font-size: 16px;
  min-height: 48px; padding: 0 20px; border: var(--line); border-radius: 14px; background: var(--paper); color: var(--ink);
  box-shadow: var(--pop); cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .08s, box-shadow .08s, background .15s; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: var(--pop); }
.btn-primary, .btn-tape { background: var(--tomato); color: var(--paper); font-size: 18px; }
.btn-primary:hover, .btn-tape:hover { background: var(--tomato-deep); }
.btn-sun { background: var(--sun); }
.btn-secondary { background: var(--paper); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14.5px; box-shadow: 3px 3px 0 var(--ink); }

/* ---------- fields ---------- */
.field { display: flex; flex-direction: column; gap: 7px; margin: 0 0 18px; flex: 1; min-width: 0; }
.field > span { font-size: 15px; font-weight: 800; }
.field small { color: var(--ink-3); font-size: 13.5px; font-weight: 600; }
.field.inline { flex-direction: row; align-items: center; gap: 10px; margin: 0; flex: none; }
input[type=text], input[type=url], input[type=email], input[type=tel], input[type=password], input[type=number], input:not([type]), textarea, select {
  font: inherit; font-size: 16px; font-weight: 600; width: 100%; min-height: 48px; padding: 0 14px; border: var(--line); border-radius: 12px;
  background: var(--paper); color: var(--ink); transition: box-shadow .15s; }
textarea { padding: 12px 14px; resize: vertical; line-height: 1.5; }
select { cursor: pointer; }
input:focus, textarea:focus, select:focus { outline: none; box-shadow: 0 0 0 4px var(--sun); }
input::placeholder, textarea::placeholder { color: #a39cbb; font-weight: 600; }
input[type=color] { width: 100%; height: 48px; padding: 4px; border: var(--line); border-radius: 12px; background: var(--paper); cursor: pointer; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color]::-webkit-color-swatch { border: 0; border-radius: 8px; }
input[type=color]::-moz-color-swatch { border: 0; border-radius: 8px; }
input[type=range] { width: 100%; accent-color: var(--tomato); }
.field-row { display: flex; gap: 14px; align-items: flex-end; }
@media (max-width: 480px) { .field-row { flex-wrap: wrap; } .field-row > .field { flex-basis: 100%; } }
.input-row { display: flex; gap: 10px; }
.input-row input { flex: 1; }
.check { display: flex; align-items: center; gap: 10px; font-size: 15.5px; font-weight: 700; margin: 0 0 18px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--tomato); }
.warn { background: var(--caution-soft); color: var(--caution); border: 2px solid var(--ink); border-radius: 12px; padding: 9px 12px; font-size: 14px; font-weight: 700; margin: 0 0 16px; }
kbd { font: 800 12.5px/1 var(--body); padding: 3px 7px; border: 2px solid var(--ink); border-radius: 6px; background: var(--paper); box-shadow: 1.5px 1.5px 0 var(--ink); }

/* pill choices */
.tabs, .seg, .views { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs { margin-bottom: 24px; }
.tabs button, .seg span, .views button { display: block; font: inherit; font-size: 14.5px; font-weight: 800; padding: 7px 14px; border: 2px solid var(--ink);
  border-radius: 999px; background: var(--paper); color: var(--ink); cursor: pointer; white-space: nowrap; transition: background .12s; }
.tabs button:hover, .seg span:hover, .views button:hover { background: var(--bg); }
.tabs button[aria-selected=true], .seg input:checked + span, .views button[aria-pressed=true] { background: var(--ink); color: var(--paper); }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }
@media (max-width: 640px) {
  /* One swipeable row; the faded right edge shows there is more, and the end padding lets the last tab scroll clear of the fade. */
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px 40px 2px 2px; margin-right: -18px; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); }
  .tabs::-webkit-scrollbar { display: none; }
}

/* ---------- home hero ---------- */
.hero { background: var(--sun); border-bottom: var(--line); padding: 64px 0 80px; overflow: clip; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 4.5fr) minmax(0, 7.5fr); gap: 48px; align-items: center; }
.sticker { display: inline-block; font-family: var(--display); font-size: 20px; background: var(--tomato); color: var(--paper); padding: 4px 14px 2px;
  border: var(--line); border-radius: 12px; box-shadow: 3px 3px 0 var(--ink); transform: rotate(-6deg); margin-bottom: 18px; }
.hero h1 { font-size: clamp(52px, 7vw, 92px); line-height: .92; }
.hero .lead { margin-top: 22px; font-size: 20px; color: var(--ink); font-weight: 600; max-width: 34ch; }
.hero-alt { margin-top: 26px; font-weight: 700; color: var(--ink-2); }
.hero-alt a { color: var(--ink); font-weight: 900; }
@media (max-width: 1020px) {
  .hero { padding: 40px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
}
.lead { font-size: 19px; line-height: 1.55; color: var(--ink-2); font-weight: 600; max-width: 52ch; }

/* ---------- sections ---------- */
.section { padding: 88px 0; }
.section-tint { background: var(--paper); border-top: var(--line); border-bottom: var(--line); }
.section-narrow .wrap { max-width: 860px; }
.sec-head { margin-bottom: 40px; max-width: 720px; }
.sec-head h2 { font-size: clamp(38px, 4.6vw, 56px); }
.sec-head p { margin-top: 12px; font-size: 19px; color: var(--ink-2); font-weight: 600; }
@media (max-width: 760px) { .section { padding: 60px 0; } }
.group-title { font-size: 26px; margin: 0 0 18px; }
.plates + .group-title { margin-top: 56px; }

/* ---------- tool plates ---------- */
.plates { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.plate { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); background: var(--paper);
  border: var(--line); border-radius: 22px; box-shadow: var(--pop); overflow: hidden; transition: transform .12s, box-shadow .12s; }
.plate:hover { transform: translate(-3px, -3px); box-shadow: var(--pop-lg); }
.plate:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.demo { display: grid; place-items: center; aspect-ratio: 16 / 10; background: color-mix(in srgb, var(--c, var(--sun)) 28%, white); border-bottom: var(--line); overflow: hidden; }
.plate-text { padding: 16px 20px 20px; }
.plate-name { display: block; font-family: var(--display); font-size: 25px; line-height: 1.1; }
.plate-desc { display: block; margin-top: 6px; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; font-weight: 600; }

.mini-qr { width: 118px; aspect-ratio: 1; background: var(--paper); padding: 7px; border: 2px solid var(--ink); border-radius: 12px; box-shadow: 3px 3px 0 var(--ink); }
.mini-qr svg { display: block; width: 100%; height: auto; animation: plate-in .3s ease both; }
.mini-qr svg rect { shape-rendering: crispEdges; }
.mini-qr.lg { width: 140px; }
.mini-qr.sm { width: 52px; padding: 3px; border-radius: 7px; box-shadow: 2px 2px 0 var(--ink); border-width: 1.5px; }
@keyframes plate-in { from { opacity: 0; } to { opacity: 1; } }
.demo-pair { display: flex; align-items: center; gap: 20px; }
.demo-note { font-size: 13.5px; line-height: 1.4; color: var(--ink-2); font-weight: 700; max-width: 15ch; overflow-wrap: break-word; }
.demo-note strong { display: block; color: var(--ink); font-weight: 900; font-size: 14.5px; margin-bottom: 3px; }
.demo-bulk { display: grid; grid-template-columns: repeat(4, auto); gap: 9px; justify-content: center; }
.demo-files { grid-column: 1 / -1; text-align: center; font-size: 12.5px; font-weight: 800; color: var(--ink-2); margin-top: 4px; }
.demo-shot { display: grid; justify-items: center; gap: 12px; }
.shot-frame { display: flex; align-items: center; gap: 14px; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; padding: 14px 16px; box-shadow: 3px 3px 0 var(--ink); }
.shot-lines { width: 70px; height: 44px; background:
  linear-gradient(#ddd6f3, #ddd6f3) 0 0 / 100% 7px no-repeat,
  linear-gradient(#ddd6f3, #ddd6f3) 0 16px / 75% 7px no-repeat,
  linear-gradient(#ddd6f3, #ddd6f3) 0 32px / 88% 7px no-repeat; border-radius: 4px; }
.mini-qr.found { width: 84px; border: 0; box-shadow: none; padding: 0; position: relative; overflow: visible; }
.mini-qr.found::after { content: ""; position: absolute; inset: -7px; --k: var(--tomato); background:
  linear-gradient(var(--k), var(--k)) top left / 16px 4px no-repeat, linear-gradient(var(--k), var(--k)) top left / 4px 16px no-repeat,
  linear-gradient(var(--k), var(--k)) top right / 16px 4px no-repeat, linear-gradient(var(--k), var(--k)) top right / 4px 16px no-repeat,
  linear-gradient(var(--k), var(--k)) bottom left / 16px 4px no-repeat, linear-gradient(var(--k), var(--k)) bottom left / 4px 16px no-repeat,
  linear-gradient(var(--k), var(--k)) bottom right / 16px 4px no-repeat, linear-gradient(var(--k), var(--k)) bottom right / 4px 16px no-repeat; }
.demo-decoded { font-size: 13px; font-weight: 800; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 12px; }
.demo-verdict { width: min(260px, 82%); background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; padding: 14px 16px; box-shadow: 3px 3px 0 var(--ink); }
.dv-title { font-family: var(--display); font-size: 26px; line-height: 1; color: var(--alert); }
.dv-url { font-size: 13px; font-weight: 800; color: var(--ink-2); margin: 6px 0 10px; }
.dv-line { font-size: 13px; font-weight: 700; color: var(--ink-2); display: flex; gap: 8px; align-items: center; }
.dv-line::before { content: "!"; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--alert); color: #fff; font-size: 11px; font-weight: 900; flex: none; }
.dv-line + .dv-line { margin-top: 5px; }

/* ---------- comparison ---------- */
.table-card { background: var(--paper); border: var(--line); border-radius: 22px; box-shadow: var(--pop-lg); overflow-x: auto; }
.compare { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 16.5px; }
.compare th, .compare td { text-align: left; padding: 17px 24px; border-bottom: 2px solid #ece7fb; vertical-align: middle; }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare thead th { font-weight: 900; font-size: 15px; color: var(--ink-3); border-bottom: var(--line); }
.compare thead th.us span { display: inline-block; background: var(--tomato); color: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: 3px 14px; box-shadow: 2px 2px 0 var(--ink); }
.compare tbody th { font-weight: 800; width: 40%; }
.compare td { color: var(--ink-3); font-weight: 600; }
.compare td.us { color: var(--ink); font-weight: 900; background: #fffaf0; }
.compare .yes { display: inline-block; width: 24px; height: 24px; margin: 0 10px -6px 0; border-radius: 50%; border: 2px solid var(--ink); background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-6.5' fill='none' stroke='%231c1433' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.body-lg { font-size: 20px; line-height: 1.55; font-weight: 600; color: var(--ink-2); margin-bottom: 28px; max-width: 36ch; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } }

.closing { background: var(--tomato); border-top: var(--line); padding: 96px 0; }
.closing-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.closing h2 { font-size: clamp(40px, 5vw, 64px); color: var(--paper); max-width: 16ch; text-shadow: 3px 3px 0 var(--ink); }
.closing .btn { font-size: 19px; min-height: 58px; padding: 0 28px; }

/* ---------- tool pages ---------- */
.page-head { background: var(--tint); border-bottom: var(--line); padding: 40px 0 72px; }
.crumbs { display: flex; gap: 8px; font-size: 14.5px; font-weight: 800; color: var(--ink-2); margin-bottom: 18px; }
.page-head h1 { font-size: clamp(42px, 5.6vw, 72px); max-width: 16ch; }
.page-head .lead { margin-top: 16px; color: var(--ink); }
.tool-wrap { margin-top: -40px; position: relative; }

.tool { background: var(--paper); border: var(--line); border-radius: 26px; box-shadow: var(--pop-lg); overflow: hidden; }
/* Phones: the big hard shadows read as a thick second border on tall cards, so they shrink. */
@media (max-width: 640px) {
  :root { --pop-lg: 4px 4px 0 var(--ink); }
  .tool, .scanner-card { border-radius: 22px; }
  .guide-card { box-shadow: 4px 4px 0 var(--ink); }
  /* Pages without a tool card overlapping the header band don't need its extra bottom space. */
  .page-head:has(+ .section) { padding-bottom: 40px; }
}
.tool-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.tool-inputs { padding: 32px; }
.tool-output { padding: 32px; background: var(--tint); border-left: var(--line); }
.tool-output .exhibit { position: sticky; top: 24px; }
.dl { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.dl-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.dl .dl-buttons { margin-top: 0; }
.dl-buttons .btn-tape { grid-column: 1 / -1; min-height: 56px; }
.dl-buttons .btn:not(.btn-tape) { padding: 0 8px; font-size: 14px; min-height: 42px; box-shadow: 3px 3px 0 var(--ink); }
.dl .field.inline { justify-content: space-between; }
.dl .field.inline select { width: auto; min-height: 40px; }
.privacy-note { font-size: 14px; font-weight: 700; color: var(--ink-2); margin-top: 16px; }
@media (max-width: 960px) {
  .tool-grid { display: flex; flex-direction: column; }
  .tool-inputs, .tool-output { padding: 22px 18px; }
  .tool-output { border-left: 0; border-top: var(--line); }
  .tool-output .exhibit { position: static; max-width: 440px; margin: 0 auto; }
  [data-tool="generator"] .tool-inputs { display: contents; }
  [data-tool="generator"] .tabs, [data-tool="generator"] .type-form { margin-left: 18px; margin-right: 18px; }
  [data-tool="generator"] .tabs { margin-top: 22px; }
  [data-tool="generator"] .tool-output { order: 2; margin-top: 4px; border-bottom: var(--line); }
  [data-tool="generator"] .design { order: 3; margin: 0 18px 22px; }
}

.more { margin: 0 0 16px; }
.more summary { cursor: pointer; font-size: 15px; font-weight: 800; margin-bottom: 16px; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .2em; }
.design { margin-top: 8px; display: grid; gap: 12px; }
.panel { border: var(--line); border-radius: 16px; padding: 0 18px; background: var(--paper); }
.panel summary { list-style: none; cursor: pointer; padding: 14px 0; font-weight: 900; font-size: 16.5px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel summary::-webkit-details-marker { display: none; }
.panel summary::after { content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--ink); background: linear-gradient(var(--ink), var(--ink)) center / 12px 2.5px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 2.5px 12px no-repeat, var(--sun); transition: transform .2s; }
.panel[open] summary::after { transform: rotate(45deg); }
.panel[open] { padding-bottom: 8px; }
.logo-pick { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.logo-pick img { width: 48px; height: 48px; object-fit: contain; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); }

/* exhibit */
.exhibit { margin: 0; background: var(--paper); border: var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--pop); }
.exhibit-code { padding: 24px; border-bottom: var(--line); }
.qr-slot { aspect-ratio: 1; display: grid; place-items: center; transition: opacity .25s; }
.qr-slot svg, .qr-slot canvas { width: 100%; height: auto; display: block; }
.qr-slot svg rect { shape-rendering: crispEdges; }
.exhibit-caption { padding: 12px 18px; border-bottom: var(--line); font-size: 15px; font-weight: 900; }
.exhibit-caption > span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.exhibit-caption [data-status].error { color: var(--alert); white-space: normal; font-weight: 800; }
.specs { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.specs > div { padding: 10px 18px 12px; }
.specs > div:nth-child(odd) { border-right: 2px solid #ece7fb; }
.specs > div:nth-child(-n+2) { border-bottom: 2px solid #ece7fb; }
.specs dt { font-size: 12.5px; font-weight: 800; color: var(--ink-3); }
.specs dd { margin: 1px 0 0; font-size: 15.5px; font-weight: 900; font-variant-numeric: tabular-nums; }
.label-sheet.is-empty .qr-slot { opacity: .12; }
.label-sheet.is-empty .exhibit-caption { color: var(--ink-3); }

/* 3D tool */
.presets { display: flex; flex-wrap: wrap; gap: 10px; }
.preset { display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 2px solid var(--ink); border-radius: 14px; background: var(--paper); cursor: pointer; transition: transform .08s, box-shadow .08s; }
.preset span { width: 30px; height: 30px; border-radius: 8px; border: 2px solid var(--ink); background: linear-gradient(135deg, var(--b) 50%, var(--c) 50%); }
.preset em { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.preset:hover { transform: translateY(-2px); }
.preset[aria-pressed=true] { background: var(--sun); box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px, -1px); }
.unit { position: relative; }
.unit input { padding-right: 42px; }
.unit em { position: absolute; right: 14px; top: 50%; translate: 0 -50%; font-style: normal; font-weight: 800; color: var(--ink-3); pointer-events: none; }
.tool-3d .check { margin-top: 28px; }
.specs-3d { border: var(--line); border-radius: 16px; overflow: hidden; background: var(--paper); margin-top: 4px; }
.stage-wrap { position: relative; border: var(--line); border-radius: 22px; overflow: hidden; background: radial-gradient(circle at 50% 35%, #ffffff 0%, #f1edff 70%); box-shadow: var(--pop); }
.stage { width: 100%; aspect-ratio: 1; touch-action: none; cursor: grab; }
.stage:active { cursor: grabbing; }
.stage canvas { display: block; width: 100% !important; height: 100% !important; }
.verified { position: absolute; top: 12px; left: 12px; font-size: 13px; font-weight: 900; background: var(--mint); border: 2px solid var(--ink); border-radius: 999px; padding: 3px 12px 3px 8px; box-shadow: 2px 2px 0 var(--ink); }
.verified::before { content: "✓ "; }
.verified.inline { position: static; display: table; margin: 14px auto 0; }
.tool-3d .views { margin-top: 16px; justify-content: center; }
.tool-3d .privacy-note { text-align: center; }
.tool-3d .tool-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.tool-3d.compact { box-shadow: 9px 9px 0 var(--ink); }
@media (max-width: 640px) { .tool-3d.compact { box-shadow: 5px 5px 0 var(--ink); } }
.tool-3d.compact .tool-grid { display: block; }
.tool-3d.compact .tool-inputs { padding: 22px 24px 4px; border-bottom: var(--line); display: grid; grid-template-columns: 1.4fr 1fr; gap: 0 20px; }
.tool-3d.compact .tool-output { padding: 22px 24px 24px; border-left: 0; background: color-mix(in srgb, var(--tomato) 12%, white); }
.tool-3d.compact .stage { aspect-ratio: 16 / 10; }
.tool-3d.compact .dl-buttons { grid-template-columns: repeat(3, 1fr); }
.tool-3d.compact .dl-buttons .btn-tape { grid-column: 1 / -1; }
@media (max-width: 960px) {
  .tool-3d .tool-grid { display: flex; flex-direction: column-reverse; }
  .tool-3d .tool-output { border-top: 0; border-bottom: var(--line); }
  .tool-3d.compact .tool-inputs { grid-template-columns: 1fr; }
}

/* animated illusion tool */
.pics { display: flex; flex-wrap: wrap; gap: 8px; }
.pic { display: grid; place-items: center; width: 48px; height: 48px; font-size: 24px; border: 2px solid var(--ink); border-radius: 14px; background: var(--paper); cursor: pointer;
  transition: transform .08s, box-shadow .08s, background .12s; }
.pic:hover { transform: translateY(-2px) rotate(-4deg); }
.pic[aria-pressed=true] { background: var(--sun); box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px, -1px); }
.group { border: var(--line); border-radius: 18px; padding: 6px 18px 4px; margin: 6px 0 18px; background: var(--bg); }
.group legend { font-family: var(--display); font-size: 20px; padding: 0 8px; margin-left: -6px; background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; box-shadow: 2px 2px 0 var(--ink); }
.group .field-row { align-items: flex-start; }
.templates { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.chip { font: inherit; font-size: 14px; font-weight: 800; padding: 6px 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); cursor: pointer; }
.chip:hover { background: #fff6dc; }
.chip[aria-pressed=true] { background: var(--sun); box-shadow: 2px 2px 0 var(--ink); }
.banners, .swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.banner { width: 36px; height: 36px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--sw); cursor: pointer; padding: 0; }
.banner[aria-pressed=true] { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5.5px var(--ink); }
.swatch { cursor: pointer; position: relative; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { display: block; width: 36px; height: 36px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--sw); }
.swatch em { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.swatch input:checked + span { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5.5px var(--ink); }
.swatch input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 5px; }
.slider > span { display: flex; justify-content: space-between; align-items: baseline; }
.slider output { font-family: var(--display); font-size: 18px; color: var(--tomato); }
.slider input[type=range] { height: 28px; }
canvas.stage { display: block; width: 100%; aspect-ratio: 1; }
.tool-illusion.compact .tool-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
.tool-illusion.compact .tool-inputs { display: block; padding: 24px; border-bottom: 0; }
.tool-illusion.compact .tool-output { border-left: var(--line); }
.tool-illusion.compact .stage { aspect-ratio: 1; }
/* Hero: the code floats right on the panel, no box, nothing clipped while it turns. */
.tool-illusion.compact .stage-wrap { border: 0; background: none; box-shadow: none; overflow: visible; border-radius: 0; }
.tool-illusion.compact .pic { width: 44px; height: 44px; font-size: 22px; border-radius: 12px; }
.tool-illusion:not(.compact) .dl-buttons { grid-template-columns: repeat(3, 1fr); }
.tool-illusion.compact .dl-buttons { grid-template-columns: 1fr 1fr; }
.tool-illusion.compact .dl-buttons .btn:last-child { grid-column: 1 / -1; }
@media (max-width: 960px) { .tool-illusion.compact .tool-grid { display: flex; flex-direction: column-reverse; } .tool-illusion.compact .tool-output { border-left: 0; } }
.demo:has(.mini-3d) { position: relative; }
.mini-3d { position: absolute; inset: 2%; width: 96%; height: 96%; display: block; }

/* 3D plate preview: a tilted, extruded code */
.demo-3d { position: relative; perspective: 600px; }
.print-shot { display: block; height: 152px; width: auto; max-width: 92%; object-fit: contain; margin: 0 auto; }
.demo-3d .print-shot + .demo-tag { right: 8px; top: 6px; }
.mini-qr.tilt { width: 120px; transform: rotateX(52deg) rotateZ(-32deg); box-shadow: 1px 1px 0 #cbbfee, 2px 2px 0 #cbbfee, 3px 3px 0 #b9abe6, 4px 4px 0 #b9abe6, 5px 5px 0 var(--ink), 12px 22px 18px rgba(28, 20, 51, .25); }
.demo-tag { position: absolute; right: -26px; top: -10px; font-family: var(--display); font-size: 17px; background: var(--sun); border: 2px solid var(--ink); border-radius: 10px; padding: 2px 9px 0; box-shadow: 2px 2px 0 var(--ink); transform: rotate(8deg); }

/* scanner */
.scanner-card { background: var(--paper); border: var(--line); border-radius: 26px; box-shadow: var(--pop-lg); padding: 28px; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 60px 24px;
  border: 3px dashed var(--ink); border-radius: 20px; background: var(--tint); cursor: pointer; font-weight: 700; color: var(--ink-2); transition: background .15s, transform .1s; }
.dropzone svg { color: var(--ink); width: 42px; height: 42px; }
.dropzone strong { font-family: var(--display); font-weight: 400; font-size: 32px; color: var(--ink); }
.dropzone:hover, .dropzone.over { background: color-mix(in srgb, var(--theme) 50%, white); transform: rotate(-.4deg); }
.link-check { margin-top: 24px; }
.scan-results { display: grid; gap: 20px; margin-top: 28px; }
.result { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 26px; align-items: start; background: var(--paper); padding: 24px; border: var(--line); border-radius: 22px; box-shadow: var(--pop); }
.result.no-thumb, .result.sample { grid-template-columns: 1fr; }
@media (max-width: 600px) { .scanner-card { padding: 16px; } .result { grid-template-columns: 1fr; padding: 18px; } .result-thumb { max-width: 180px; } }
.result-thumb { border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; }
.result-thumb canvas { display: block; width: 100%; height: auto; }
.result h3 { margin: 0 0 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-family: var(--body); font-size: 14px; font-weight: 900; }
.result h3 .badge { background: var(--sun); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 12px; }
.result h3 .muted { font-size: 14px; font-weight: 700; }
.content-box { font: 700 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg); border: 2px dashed #cfc6ee; border-radius: 12px; padding: 12px 14px;
  word-break: break-all; white-space: pre-wrap; max-height: 220px; overflow: auto; margin: 0 0 16px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 16px; font-size: 15.5px; }
.kv dt { color: var(--ink-3); font-weight: 700; }
.kv dd { margin: 0; word-break: break-word; font-weight: 900; }
.verdict { padding: 14px 16px; margin: 0 0 16px; border: 2px solid var(--ink); border-radius: 14px; }
.verdict strong { display: block; font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.05; }
.verdict p { margin-top: 4px; font-size: 15px; font-weight: 700; }
.verdict .dot { display: none; }
.verdict.ok { background: var(--safe-soft); } .verdict.ok strong { color: var(--safe); }
.verdict.caution { background: var(--caution-soft); } .verdict.caution strong { color: var(--caution); }
.verdict.danger { background: var(--alert-soft); } .verdict.danger strong { color: var(--alert); }
.checks { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 9px; font-size: 15px; font-weight: 600; }
.checks li { display: flex; gap: 10px; }
.checks li::before { content: ""; flex: none; width: 12px; height: 12px; margin-top: .4em; border-radius: 50%; border: 2px solid var(--ink); background: #cfc6ee; }
.checks li.danger::before { background: var(--alert); }
.checks li.caution::before { background: var(--sun); }
.checks li.ok::before { background: var(--mint); }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* bulk */
.bulk-csv { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.bulk-preview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; min-height: 160px; align-content: start; }
.bulk-preview > p { grid-column: 1 / -1; margin: 56px 0; text-align: center; font-weight: 700; }
.bulk-preview figure { margin: 0; background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; padding: 6px; }
.bulk-preview figure img { display: block; width: 100%; }
.bulk-preview figcaption { font-size: 11.5px; font-weight: 700; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.bulk-sheet .preview-status { min-height: 1.5em; font-size: 14.5px; font-weight: 700; margin: 12px 0; }
.bulk-sheet .dl-buttons { display: block; }
.bulk-sheet .dl-buttons .btn-tape { width: 100%; }
.progress { height: 10px; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; margin-top: 18px; }
.progress div { height: 100%; width: 0; background: var(--mint); }

/* ---------- reading content ---------- */
.prose { max-width: 70ch; font-size: 17.5px; line-height: 1.7; color: var(--ink-2); font-weight: 500; }
.prose h2 { font-size: 34px; color: var(--ink); margin: 48px 0 14px; }
.prose > h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 16px; }
.prose li { margin: 8px 0; }
.prose li::marker { color: var(--tomato); font-weight: 900; }
.prose strong { color: var(--ink); font-weight: 900; }
.prose pre { background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; padding: 16px; overflow-x: auto; font-size: 14px; margin: 0 0 16px; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; }
.prose.page { max-width: 760px; }
.prose h3 { font-size: 22px; color: var(--ink); margin: 28px 0 10px; }
.prose h2[id] { scroll-margin-top: 20px; }
.table-wrap { overflow-x: auto; margin: 0 0 20px; border: var(--line); border-radius: 16px; box-shadow: var(--pop); background: var(--paper); }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 2px solid var(--bg); }
.prose thead th { background: var(--theme); color: var(--ink); font-weight: 900; border-bottom: var(--line); }
.prose tbody th { color: var(--ink); font-weight: 900; white-space: nowrap; }
.prose tbody tr:last-child > * { border-bottom: 0; }
.byline { margin-top: 14px; font-size: 15px; font-weight: 700; color: var(--ink-2); }
.toc { max-width: 70ch; margin: 0 0 40px; padding: 20px 24px; background: var(--paper); border: var(--line); border-radius: 18px; box-shadow: var(--pop); }
.toc h2 { font-size: 22px; margin: 0 0 8px; }
.toc ol { margin: 0; padding-left: 22px; columns: 2 260px; column-gap: 32px; }
.toc li { margin: 6px 0; break-inside: avoid; font-weight: 700; }
.toc li::marker { color: var(--tomato); font-weight: 900; }
.toc a { color: var(--ink); text-decoration-color: var(--theme); text-decoration-thickness: 2px; text-underline-offset: 3px; }
#questions { scroll-margin-top: 20px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.steps li { counter-increment: s; background: var(--paper); border: var(--line); border-radius: 20px; padding: 22px; box-shadow: var(--pop); font-weight: 700; font-size: 16px; line-height: 1.5; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: var(--line); background: var(--theme);
  font-family: var(--display); font-size: 24px; margin-bottom: 14px; }

.faq { display: grid; gap: 14px; }
.faq details { background: var(--paper); border: var(--line); border-radius: 18px; padding: 0 22px; box-shadow: 3px 3px 0 var(--ink); }
.faq summary { list-style: none; cursor: pointer; font-size: 18px; font-weight: 900; padding: 18px 44px 18px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 0; top: 50%; translate: 0 -50%; width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--ink); background: linear-gradient(var(--ink), var(--ink)) center / 12px 2.5px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 2.5px 12px no-repeat, var(--sun); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 20px; color: var(--ink-2); font-weight: 600; line-height: 1.6; }

/* ---------- ads: labelled, outside the tools, collapse when unfilled ---------- */
/* Sample ads (dist-ads-preview only): mimic a typical responsive Google display ad. */
.sim { display: flex; align-items: center; gap: 18px; max-width: 728px; min-height: 90px; margin: 0 auto; padding: 12px 18px; text-align: left;
  background: #fff; border: 1px solid #dadce0; border-radius: 4px; font-family: Arial, Helvetica, sans-serif; position: relative; }
.sim-art { flex: none; width: 200px; height: 125px; border-radius: 6px; overflow: hidden; background: color-mix(in srgb, var(--ac) 14%, white); }
.sim-art svg { display: block; width: 100%; height: 100%; }
.sim-copy { flex: 1; min-width: 0; display: grid; gap: 2px; }
.sim-copy strong { font-size: 17px; color: #202124; font-weight: 700; }
.sim-copy span { font-size: 13.5px; color: #5f6368; }
.sim-copy em { font-style: normal; font-size: 12px; color: #5f6368; }
.sim-cta { flex: none; background: var(--ac); color: #fff; font-size: 14px; font-weight: 700; padding: 10px 18px; border-radius: 20px; }
.sim-choices { position: absolute; top: 0; right: 0; font-size: 10px; color: #4285f4; background: #fff; padding: 0 4px; border-left: 1px solid #dadce0; border-bottom: 1px solid #dadce0; }
@media (max-width: 560px) { .sim { flex-wrap: wrap; } .sim-art { width: 100%; height: auto; aspect-ratio: 16 / 10; } .sim-cta { width: 100%; text-align: center; } }
.ad { max-width: 1200px; margin: 0 auto; padding: 44px 28px 0; text-align: center; }
.ad-label { display: block; font-size: 12px; font-weight: 800; color: var(--ink-3); margin-bottom: 8px; }
.ad ins { min-height: 100px; }
.ad:has(ins[data-ad-status=unfilled]) { display: none; }
.ad-preview div { height: 110px; display: grid; place-items: center; border: 2px dashed #cfc6ee; border-radius: 16px; color: var(--ink-3); font-size: 13px; font-weight: 700; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(16px); background: var(--ink); color: var(--paper);
  padding: 12px 20px; border-radius: 14px; font-size: 15px; font-weight: 800; box-shadow: 4px 4px 0 var(--sun); opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 50; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* barcode tool */
.barcode-sheet { background: var(--paper); border: var(--line); border-radius: 20px; box-shadow: var(--pop); padding: 28px 18px; display: grid; place-items: center; min-height: 220px; }
.barcode-sheet svg { max-width: 100%; height: auto; transition: opacity .2s; }
[data-tool="barcode"] [data-bulk] { margin-top: 8px; }
[data-tool="barcode"] [data-bulk] .btn { width: 100%; margin: 6px 0 4px; }
[data-tool="barcode"] .warn { margin-top: 14px; }

/* plate demos for keyword pages */
.demo-card { display: flex; align-items: center; gap: 16px; width: 76%; aspect-ratio: 1.75; background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; padding: 14px 16px; box-shadow: 4px 4px 0 var(--ink); }
.dc-text { flex: 1; display: grid; gap: 1px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.dc-text strong { font-family: var(--display); font-weight: 400; font-size: 18px; color: var(--ink); }
.mini-qr.xs { width: 72px; padding: 4px; border-width: 1.5px; box-shadow: none; border-radius: 6px; }
.demo-checker { padding: 10px; border-radius: 14px; border: 2px solid var(--ink); background: repeating-conic-gradient(#e6e0f7 0% 25%, #fff 0% 50%) 50% / 14px 14px; }
.mini-qr.clear { background: transparent; border: 0; box-shadow: none; padding: 0; }
.mini-qr.round { border-radius: 50%; padding: 4px; width: 132px; }
.demo-barcode { display: grid; justify-items: center; gap: 6px; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; padding: 14px 18px 10px; box-shadow: 3px 3px 0 var(--ink); }
.demo-barcode .bars { display: flex; width: 170px; height: 64px; }
.demo-barcode .bars i { background: var(--ink); }
.demo-barcode .bars b { background: transparent; }
.demo-barcode .digits { font: 700 13px/1 ui-monospace, Menlo, monospace; letter-spacing: .12em; }
.demo-barcodes { display: grid; gap: 8px; }
.demo-barcode.sm { padding: 6px 12px 5px; gap: 3px; box-shadow: 2px 2px 0 var(--ink); }
.demo-barcode.sm .bars { width: 140px; height: 22px; }
.demo-barcode.sm .digits { font-size: 10.5px; }

/* Crypto coin picture buttons */
.pic .coin { display: block; width: 1.15em; height: 1.15em; margin: auto; }
.pic-tabs { display: flex; gap: 5px; margin: 2px 0 10px; }
.pic-tabs button { font: inherit; font-weight: 800; font-size: 13.5px; padding: 4px 10px; white-space: nowrap; flex: none; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink); cursor: pointer; }
.pic-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.pics[hidden] { display: none; }
/* Two controls per row, each taking half and never overflowing. */
.group .field-row > .field { flex: 1 1 0; min-width: 0; }
.group .field-row select { width: 100%; }
/* The preview follows you down the long settings form. */
.tool-illusion .output-sticky { position: sticky; top: 16px; }
@media (max-width: 960px) { .tool-illusion .output-sticky { position: static; } }
.tool-illusion { overflow: clip; } /* clip (not hidden) so the sticky preview works */

/* ---------- Animated QR page on phones ----------
   The 3D preview pins to the top (about 44% of the screen) with its view buttons, settings
   scroll underneath it, and the download buttons come after the settings. */
@media (max-width: 960px) {
  .tool-illusion:not(.compact) .tool-grid { display: flex; flex-direction: column; }
  .tool-illusion:not(.compact) .tool-output,
  .tool-illusion:not(.compact) .output-sticky { display: contents; }
  /* Full card width with only a bottom edge, so it pins inside the card's own outline
     instead of drawing a second box. The model itself stays square and centred. */
  .tool-illusion:not(.compact) .stage-wrap {
    order: 1; position: sticky; top: 0; z-index: 6;
    margin: 0; border: 0; border-bottom: var(--line); border-radius: 0; box-shadow: none;
  }
  .tool-illusion:not(.compact) .stage { width: min(100%, 44vh); margin: 0 auto; }
  .tool-illusion:not(.compact) [data-verified] { order: 2; }
  .tool-illusion:not(.compact) .views { order: 3; margin: 12px 0 4px; padding: 0 18px; }
  .tool-illusion:not(.compact) .tool-inputs { order: 4; border-top: var(--line); margin-top: 12px; }
  .tool-illusion:not(.compact) .dl-buttons { order: 5; padding: 0 18px; margin: 4px 0 8px; grid-template-columns: 1fr 1fr; }
  .tool-illusion:not(.compact) .dl-buttons .btn-tape { grid-column: 1 / -1; }
  .tool-illusion:not(.compact) .embed-panel { order: 6; margin: 8px 18px 12px; }
  .tool-illusion:not(.compact) [data-status] { order: 7; padding: 0 18px; }
  .tool-illusion:not(.compact) .tip-line { order: 8; margin: 0; padding: 4px 18px 20px; }
  /* Swipe up/down on the preview scrolls the page; sideways turns the model. */
  .tool-illusion .stage { touch-action: pan-y; }
}
@media (max-width: 480px) {
  /* Narrow phones: settings rows stack full width, so nothing gets cut off. */
  .group .field-row { flex-wrap: wrap; }
  .group .field-row > .field { flex: 1 1 100%; }
  .swatches { flex-wrap: nowrap; gap: 8px; }
}
/* Surprise-me dice in the corner of the 3D preview */
.dice { position: absolute; top: 12px; right: 12px; z-index: 7; width: 46px; height: 46px; display: grid; place-items: center; padding: 0; color: var(--ink);
  background: var(--sun); border: var(--line); border-radius: 14px; box-shadow: 3px 3px 0 var(--ink); cursor: pointer; transition: transform .15s ease; }
.dice:hover { transform: rotate(-12deg) scale(1.06); }
.dice:active { transform: rotate(20deg) scale(.94); box-shadow: 1px 1px 0 var(--ink); }
.dice:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.play-icon { font-size: .8em; margin-right: 2px; }
/* On the tool page the dice sits top-left, clear of the headline */
.tool-illusion:not(.compact) .dice { right: auto; left: 12px; }
.tool-illusion textarea[name=headline] { resize: none; min-height: 0; line-height: 1.35; }
/* Scanner / safety checker: the card already has its own frame, so the outer one goes. */
.tool:has(> .scanner-card) { border: 0; box-shadow: none; background: none; overflow: visible; }
kbd { margin: 0 2px; }
/* Picture picker: an even grid of five across */
.pics { display: grid; grid-template-columns: repeat(5, minmax(0, 48px)); gap: 8px; }
.tool-illusion:not(.compact) .pics { grid-template-columns: repeat(10, minmax(0, 48px)); }
@media (max-width: 1100px) { .tool-illusion:not(.compact) .pics { grid-template-columns: repeat(5, minmax(0, 48px)); } }
.pics .pic { width: 100%; aspect-ratio: 1; height: auto; }
/* ---------- 404 ---------- */
.lost { background: radial-gradient(circle at 75% 45%, #ffe0ef 0%, var(--bg) 62%); border-bottom: var(--line); overflow: hidden; }
.lost-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 24px; padding-top: 56px; padding-bottom: 40px; }
.lost-code { font-family: var(--display); font-size: clamp(96px, 16vw, 200px); line-height: .8; margin: 0 0 16px; color: var(--gum); -webkit-text-stroke: 4px var(--ink); text-shadow: 8px 8px 0 var(--ink); letter-spacing: -2px; }
.lost h1 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.05; margin: 0 0 16px; }
.lost-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.lost-stage { width: 100%; aspect-ratio: 1; display: block; }
@media (max-width: 800px) { .lost-grid { grid-template-columns: 1fr; padding-top: 28px; padding-bottom: 8px; } .lost-stage { max-width: 440px; margin: -12px auto 0; } }
/* Brand search under the quick brand picks */
.brand-search { grid-column: 1 / -1; display: grid; gap: 8px; margin-top: 6px; }
.brand-search input { width: 100%; height: 48px; padding: 0 14px; border: var(--line); border-radius: 14px; font: inherit; font-weight: 600; background: var(--paper); color: var(--ink); }
.brand-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.brand-results:empty { display: none; }
.brand-hit { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); font: inherit; font-size: 14px; font-weight: 800; color: var(--ink); cursor: pointer; text-align: left; min-width: 0; }
.brand-hit img { width: 20px; height: 20px; flex: none; }
.brand-hit span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-hit[aria-pressed="true"] { background: var(--sun); }
.brand-search small { color: var(--ink-2); font-size: 12.5px; }
.logo-drop { grid-column: 1 / -1; position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border: 2px dashed var(--ink); border-radius: 14px; background: var(--paper); cursor: pointer; color: var(--ink); }
.logo-drop:hover, .logo-drop.over { background: var(--sun); }
.logo-drop:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }
.logo-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.logo-drop img { width: 44px; height: 44px; object-fit: contain; flex: none; border-radius: 8px; background: #fff; }
.logo-drop span { display: grid; gap: 2px; font-weight: 800; }
.logo-drop small { font-weight: 600; color: var(--ink-2); font-size: 13px; }
.logo-tip { grid-column: 1 / -1; color: var(--ink-2); font-size: 12.5px; }
@media (pointer: coarse) { .paste-hint { display: none; } } /* phones don't paste with a keyboard */
.kofi-float.away { opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s, transform .2s; }

/* Guides: cards on /guides/, /tools/, the home page and under each guide */
.guide-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.guide-card { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 30px 22px 20px; text-decoration: none; color: var(--ink); background: linear-gradient(var(--c, var(--sun)) 0 10px, var(--paper) 10px); border: var(--line); border-radius: 20px; box-shadow: 5px 5px 0 var(--ink); transition: transform .15s, box-shadow .15s; }
.guide-card:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.guide-name { font-family: 'Lilita One', 'Arial Black', sans-serif; font-size: 25px; line-height: 1.1; }
.guide-desc { color: var(--ink-2); font-weight: 600; line-height: 1.5; }
.guide-more { margin-top: auto; font-weight: 900; text-decoration: underline; text-underline-offset: 3px; }
.guide-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 24px; }
.guide-links a { font-weight: 800; color: var(--ink); }
.prose code { overflow-wrap: anywhere; }
@media (max-width: 600px) { .kofi-float { display: none; } } /* phones: the footer button and the after-download line are enough */

/* Do / Don't illustrated tips (qr-code-generator page) */
.scan-tips { display: grid; gap: 34px; margin: 8px 0 16px; }
.scan-tip > p { margin-bottom: 14px; }
.tip-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tip-fig { margin: 0; background: var(--paper); border: var(--line); border-radius: 18px; box-shadow: 4px 4px 0 var(--ink); overflow: hidden; }
.tip-fig svg { display: block; width: 100%; height: auto; background: #f4f1fb; border-bottom: var(--line); }
.tip-do svg { background: #e6f8f0; }
.tip-dont svg { background: #ffece6; }
.tip-fig figcaption { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 15px; line-height: 1.35; color: var(--ink); font-weight: 600; }
.tip-badge { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--ink); font-weight: 900; font-size: 14px; }
.tip-do .tip-badge { background: var(--mint); }
.tip-dont .tip-badge { background: var(--tomato); color: var(--paper); }
@media (max-width: 420px) { .tip-pair { gap: 12px; } .tip-fig figcaption { padding: 8px 10px; font-size: 13.5px; gap: 7px; } .tip-badge { width: 22px; height: 22px; font-size: 12px; } }

/* Example posts under "Ideas for your business" (animated QR page) */
.idea-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 8px 0 20px; width: min(1144px, calc(100vw - 72px)); }
@media (max-width: 980px) { .idea-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); width: auto; } }
@media (max-width: 560px) { .idea-grid { grid-template-columns: 1fr; max-width: 380px; } }
.idea-card { margin: 0; background: var(--paper); border: var(--line); border-radius: 18px; box-shadow: 4px 4px 0 var(--ink); overflow: hidden; display: flex; flex-direction: column; }
.idea-shot { background: var(--bg); border-bottom: var(--line); padding: 16px 12px 14px; text-align: center; }
.idea-head { margin: 0; min-height: 2.2em; display: grid; place-items: center; font-family: 'Lilita One', 'Arial Black', sans-serif; font-size: 22px; line-height: 1.1; color: var(--ink); }
.idea-head.swap, .idea-sub.swap { animation: tip-in .45s ease; }
.idea-stage { position: relative; aspect-ratio: 1; max-width: 220px; margin: 4px auto; }
.idea-sub { margin: 0; font-size: 14px; font-weight: 800; color: var(--ink); }
.idea-card figcaption { padding: 12px 14px 14px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
/* The hero's form column gets narrow on small desktops: keep the picker pills on one row. */
.tool-illusion .tool-inputs { container-type: inline-size; }
@container (max-width: 300px) { .pic-tabs { gap: 4px; } .pic-tabs button { font-size: 12.5px; padding: 3px 8px; } }
@media (min-width: 961px) and (max-width: 1200px) { .tool-illusion.compact .tool-inputs { padding: 20px 16px; } }

/* ---------- embeds ---------- */
/* The embed page: just the live scene, filling the iframe, with a small credit link. */
.embed-page, .embed-page body { margin: 0; height: 100%; background: transparent; overflow: hidden; }
.embed-main { position: relative; height: 100vh; display: grid; place-items: center; }
.embed-page .tool-illusion { border: 0; box-shadow: none; background: none; border-radius: 0; margin: 0; width: min(100vw, 100vh); }
.embed-page .tool-grid { display: block; }
.embed-page .tool-inputs, .embed-page .views, .embed-page .dl-buttons, .embed-page [data-verified], .embed-page [data-status], .embed-page .tip-line, .embed-page .embed-panel, .embed-page [data-dice] { display: none !important; }
.embed-page .tool-output, .embed-page .output-sticky { padding: 0; border: 0; position: static; }
.embed-page .stage-wrap { border: 0; box-shadow: none; border-radius: 0; background: none; margin: 0; }
.embed-page .stage { display: block; width: min(100vw, 100vh); height: auto; aspect-ratio: 1; }
.embed-credit { position: absolute; right: 8px; bottom: 8px; font: 800 11px/1 Nunito, system-ui, sans-serif; color: #1c1433; background: rgba(255, 255, 255, .82); padding: 4px 8px; border-radius: 999px; text-decoration: none; opacity: .75; }
.embed-credit:hover, .embed-credit:focus-visible { opacity: 1; text-decoration: underline; }
/* The Embed panel in the tool */
.embed-panel { margin-top: 14px; padding: 16px; border: var(--line); border-radius: 16px; background: var(--paper); box-shadow: 3px 3px 0 var(--ink); }
.embed-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.embed-head h3 { margin: 0; font-family: var(--display); font-size: 20px; font-weight: 400; }
.embed-close { font: inherit; font-size: 22px; line-height: 1; width: 34px; height: 34px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); cursor: pointer; }
.embed-note { margin: 6px 0 12px; font-size: 14px; color: var(--ink-2); }
.embed-body { display: grid; gap: 14px; }
.embed-preview { width: min(100%, 280px); margin: 0 auto; aspect-ratio: 1; border: 2px dashed var(--ink-2); border-radius: 12px; overflow: hidden; background: repeating-conic-gradient(#f3f0fa 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.embed-preview iframe { width: 100%; height: 100%; border: 0; display: block; }
.embed-code { display: grid; gap: 10px; }
.embed-code textarea { width: 100%; font: 12.5px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 10px; border: 2px solid var(--ink); border-radius: 12px; resize: vertical; background: #faf8ff; color: var(--ink); }
.embed-warn { margin: 0; font-size: 13.5px; font-weight: 700; color: #c92a2a; }
/* Small iframes trigger the tool's phone layout: undo it on the embed page. */
.embed-page .tool-illusion .stage-wrap { position: static !important; width: auto !important; max-width: none !important; margin: 0 !important; padding: 0 !important; overflow: visible !important; order: 0; }
.embed-page .tool-illusion .stage-wrap::before { display: none !important; }
.embed-page .tool-illusion:not(.compact) .tool-grid { display: block; }
