/* The one stylesheet for the whole site: the home page (hero with the wall of work, the tool, examples and reading
   matter), the stencil library pages and the text pages.
   One look, dark: near-black with stencil-carbon violet, white only for paper. Local files only: the site loads
   nothing from other sites. */
@font-face {
  font-family: "Archivo"; font-style: normal; font-weight: 400 800; font-stretch: 62% 125%; font-display: swap;
  src: url(/fonts/archivo-var.woff2) format("woff2");      /* SIL Open Font License, hosted with the site */
}
:root {
  --bg: #0b0a12;
  --surface: #15131f;
  --raise: #1e1b2c;
  --fg: #f4f2fb;
  --muted: #a9a4c2;
  --line: rgba(255, 255, 255, .12);
  --accent: #7c4dff;
  --accent-fg: #ffffff;
  --lift: #c1adff;         /* violet light enough to read on the dark ground */
  --paper: #ffffff;        /* stencils are always shown on white */
  --ink: #14121c;          /* text and marks on paper */
  --note-bg: #3a3210;
  --note-fg: #f6e9b0;
  --r: 18px;
  --r-sm: 12px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --shadow: 0 30px 60px -28px rgba(0, 0, 0, .9);
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
img { max-width: 100%; }
html { scroll-behavior: smooth; background: #0b0a12; color: #f4f2fb; }   /* literal values: also colours the overscroll area */
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden;
  padding: 0 max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px));
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 55% at 80% 18%, rgba(124, 77, 255, .26), transparent 70%), radial-gradient(40% 40% at 4% 92%, rgba(124, 77, 255, .12), transparent 70%);
}
a { color: var(--fg); text-underline-offset: .18em; }
::selection { background: var(--accent); color: #fff; }
:root { caret-color: var(--lift); scrollbar-color: #3a3550 var(--bg); }
h1, h2, h3, p { margin: 0; }
.top, .wrap, .foot { max-width: 1240px; margin-inline: auto; }

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-stretch: 112%; font-weight: 800; font-size: 19px; letter-spacing: -.01em; color: var(--fg); text-decoration: none; }
.logo svg { width: 30px; height: 30px; flex: none; }
.logo svg rect { fill: var(--accent); }
.top nav { display: flex; gap: 30px; font-size: 15px; font-weight: 500; }
.top nav a { color: var(--muted); text-decoration: none; transition: color .2s; }
.top nav a:hover, .top nav a:focus-visible, .top nav a[aria-current] { color: var(--fg); }

.wrap { display: flex; flex-direction: column; gap: 104px; }
.first { display: flex; flex-direction: column; gap: 28px; }

/* ---------- hero: the pitch at the left, a drifting wall of real results at the right ---------- */
.hero { display: flex; flex-direction: column; padding-top: 28px; }      /* plain page headings (library index) */
.first > .hero { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: 40px; align-items: center; min-height: min(700px, calc(100vh - 110px)); padding-top: 0; }
.hero.lost { align-items: flex-start; padding-block: 12vh; }
.copy { display: flex; flex-direction: column; align-items: flex-start; }
h1 { font-stretch: 118%; font-weight: 800; font-size: clamp(34px, 4.6vw, 64px); line-height: 1; letter-spacing: -.035em; text-wrap: balance; }
h1 em { font-style: normal; color: var(--lift); white-space: nowrap; }
.lede { margin-top: 22px; color: var(--muted); max-width: 30em; font-size: clamp(16px, 1.4vw, 19px); }
.acts { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.alt { font-weight: 600; font-size: 15px; display: inline-flex; gap: 8px; align-items: center; text-decoration: none; }
.alt svg, .btn svg { width: 18px; height: 18px; flex: none; }
.alt svg { transition: transform .25s var(--ease); } .alt:hover svg { transform: translateX(3px); }
.facts { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; font-size: 13px; color: var(--muted); }
.facts li { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
.wall { position: relative; height: min(700px, calc(100vh - 110px)); overflow: hidden; mask-image: linear-gradient(180deg, transparent, #000 14%, #000 84%, transparent); }
.tilt { position: absolute; inset: -18% -12%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; transform: rotate(-11deg); }
.col { display: flex; flex-direction: column; gap: 18px; animation: up 38s linear infinite; }
.col:nth-child(2) { animation-name: down; animation-duration: 46s; } .col:nth-child(3) { animation-duration: 54s; }
.wall:hover .col { animation-play-state: paused; }
@keyframes up { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes down { from { transform: translateY(-50%); } to { transform: translateY(0); } }
.wcard { position: relative; margin: 0; border-radius: var(--r); overflow: hidden; background: var(--paper); aspect-ratio: 4 / 3; flex: none; box-shadow: var(--shadow); }
.wcard img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wcard .src { position: absolute; left: 10px; bottom: 10px; width: 34%; height: auto; aspect-ratio: 4 / 3; border-radius: 10px; border: 2px solid #fff; box-shadow: 0 8px 18px -6px rgba(0, 0, 0, .6); }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
@keyframes fade { from { opacity: 0; } }
.copy > * { animation: rise .9s var(--ease) both; } .copy .lede { animation-delay: .08s; } .copy .acts { animation-delay: .16s; } .copy .facts { animation-delay: .24s; }
.wall { animation: fade 1.4s var(--ease) both .1s; }

/* ---------- the tool: one panel. The sheet lies at the left with its rulers; upload, readings, lines and print
   run down the right. On a phone the order is upload, sheet, readings, lines, print. ---------- */
.tool {
  display: grid; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: clip; scroll-margin-top: 20px;      /* clip, not hidden: hidden would stop the sheet from sticking */
  grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-areas: "preview s1" "preview read" "preview s2" "preview s3";
  grid-template-rows: auto auto 1fr auto;
}
.preview { grid-area: preview; min-width: 0; padding: 20px 24px 14px 16px; background: #100e1a; border-right: 1px solid var(--line); }

/* The sheet stays at the top of its column and follows the window while the options beside it are longer than it. */
.pin { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 10px; }

/* Rulers along the top and left edges, marked in centimetres at the size the stencil will print. */
/* The sheet is never taller than about two thirds of the window: a tall image gets a narrower sheet, centred. */
.bench { --rw: 22px; display: grid; grid-template-columns: var(--rw) minmax(0, 1fr); grid-template-rows: var(--rw) auto; width: 100%; max-width: calc(var(--rw) + min(640px, 68vh) * var(--ar, 1.3333)); margin-inline: auto; }
.ruler { position: relative; overflow: hidden; color: var(--muted); font: 500 10px/1 var(--mono); font-variant-numeric: tabular-nums; }
.ruler.x {
  grid-column: 2;
  background:
    linear-gradient(90deg, currentColor 1px, transparent 1px) var(--ox, 0px) 100% / calc(100% * var(--z, 1) / var(--cm, 12)) 9px repeat-x,
    linear-gradient(90deg, currentColor 1px, transparent 1px) var(--ox, 0px) 100% / calc(100% * var(--z, 1) / var(--cm, 12) / 2) 5px repeat-x;
}
.ruler.y {
  grid-column: 1; grid-row: 2;
  background:
    linear-gradient(180deg, currentColor 1px, transparent 1px) 100% var(--oy, 0px) / 9px calc(100% * var(--z, 1) / var(--cmh, 9)) repeat-y,
    linear-gradient(180deg, currentColor 1px, transparent 1px) 100% var(--oy, 0px) / 5px calc(100% * var(--z, 1) / var(--cmh, 9) / 2) repeat-y;
}
.ruler i { position: absolute; font-style: normal; }
.ruler.x i { top: 1px; left: calc(var(--p) * 100% * var(--z, 1) + var(--ox, 0px)); transform: translateX(3px); }
.ruler.y i { left: 0; top: calc(var(--p) * 100% * var(--z, 1) + var(--oy, 0px)); transform: translateY(3px); }
.bench .unit { grid-column: 1; grid-row: 1; font: 500 9px/1 var(--mono); color: var(--muted); align-self: end; padding-bottom: 3px; }

/* The sheet. The stencil is drawn on #out; the original sits on top in #before and is cut off at the divider. */
.stage { --pos: 50%; grid-column: 2; grid-row: 2; position: relative; overflow: hidden; background: var(--paper); border-radius: 10px; box-shadow: var(--shadow); }
.stage { touch-action: pan-y; }
.stage.zoomed { touch-action: none; cursor: grab; } .stage.zoomed:active { cursor: grabbing; }
.stage canvas { display: block; width: 100%; height: auto; transform-origin: 0 0; transform: translate(var(--ox, 0px), var(--oy, 0px)) scale(var(--z, 1)); }
#before { position: absolute; inset: 0; height: 100%; clip-path: inset(0 calc(100% - var(--cut, var(--pos))) 0 0); }
.stage.over { outline: 2px dashed var(--lift); outline-offset: 4px; }
.split { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 48px; margin-left: -24px; display: grid; place-items: center; cursor: ew-resize; touch-action: pan-y; outline: 0; }
.split::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(20, 18, 28, .3); }
.grip { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--ink); box-shadow: 0 8px 20px -6px rgba(20, 18, 28, .6); }
.grip svg { width: 20px; height: 20px; }
.split:focus-visible .grip { outline: 3px solid var(--accent); outline-offset: 3px; }
.stage.anim #before { transition: clip-path .7s var(--ease); }
.stage.anim .split { transition: left .7s var(--ease); }
.tagx { position: absolute; top: 14px; pointer-events: none; font: 700 12px/1 var(--font); padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 18, 28, .25); }
.tagx.l { left: 14px; } .tagx.r { right: 14px; }
.stage.busy::after { content: "Tracing your photo…"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .8); color: var(--ink); font-weight: 700; }
.zoom { position: absolute; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .96); color: var(--ink); box-shadow: 0 6px 16px -6px rgba(20, 18, 28, .55); }
.zoom button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: inherit; display: grid; place-items: center; cursor: pointer; font: 700 12px var(--font); }
.zoom button svg { width: 16px; height: 16px; }
.zoom button.fit { width: auto; padding-inline: 12px; border-radius: 999px; }
.zoom button:hover:not(:disabled) { background: rgba(20, 18, 28, .09); }
.zoom button:disabled { opacity: .35; cursor: default; }
.zoom button:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.zoom output { min-width: 44px; text-align: center; font: 700 12px var(--font); font-variant-numeric: tabular-nums; }
.stage.busy .split, .stage.busy .tagx, .stage.full .split, .stage.full .tagx, .stage.busy .zoom, .stage.full .zoom { visibility: hidden; }
.credit { font-size: 12px; color: var(--muted); padding-left: 22px; text-align: center; }
.credit a { color: var(--muted); }

/* Readings: what the sheet will measure when printed. */
.readout { grid-area: read; margin: 0; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); border-top: 1px solid var(--line); }
.readout > div { padding: 14px 24px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.readout > div + div { border-left: 1px solid var(--line); }
.readout dt { font-size: 12px; color: var(--muted); }
.readout dd { margin: 0; font-stretch: 100%; font-weight: 800; font-size: 27px; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.readout dd small { font-size: 14px; font-weight: 600; margin-left: 4px; color: var(--muted); }
.readout dd.thin { color: #ffb38a; }
.stats { grid-area: s2; align-self: start; margin: 12px 24px 0; font-size: 13px; color: var(--lift); }
.stats.quiet { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); margin: 0; }
.note { background: var(--note-bg); color: var(--note-fg); border-radius: var(--r-sm); padding: 10px 14px; font-size: 13px; line-height: 1.4; }

.step { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 20px 24px; border-top: 1px solid var(--line); }
.step.s1 { grid-area: s1; border-top: 0; } .step.s2 { grid-area: s2; } .step.s3 { grid-area: s3; }
.stats:not(.quiet) ~ .step.s2 { padding-top: 48px; }
.step h2 { font-size: 15px; font-stretch: 106%; font-weight: 700; letter-spacing: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > label, legend { font-size: 13px; color: var(--muted); }
.field output { font-family: var(--mono); color: var(--fg); float: right; font-variant-numeric: tabular-nums; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
legend { padding: 0; margin-bottom: 6px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.seg label { flex: 1; text-align: center; font-size: 13px; padding: 9px 4px; cursor: pointer; border-left: 1px solid var(--line); }
.seg label:first-of-type { border-left: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:checked + label { background: var(--fg); color: var(--bg); font-weight: 700; }
.seg input:focus-visible + label { outline: 2px solid var(--lift); outline-offset: -3px; }
input[type="range"] { width: 100%; accent-color: var(--lift); margin: 0; padding-block: 8px; }
.ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.check input { margin-top: 4px; accent-color: var(--lift); }
.check small { display: block; color: var(--muted); }
select { font: 14px var(--font); padding: 11px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--raise); color: var(--fg); width: 100%; }
/* Buttons. Violet is the main action: choosing an image, then printing once an image is in. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: 700 15px var(--font); border-radius: 14px; padding: 12px 20px; cursor: pointer; text-decoration: none;
  border: 1px solid transparent; background: var(--fg); color: var(--bg);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn.primary, .tool .file { background: var(--accent); color: var(--accent-fg); box-shadow: 0 0 0 1px rgba(255, 255, 255, .14) inset, 0 16px 30px -14px rgba(0, 0, 0, .9); }
.tool:has(#reset:not([hidden])) .file { background: transparent; color: var(--fg); border-color: var(--line); box-shadow: none; }
.tool:has(#reset:not([hidden])) #export { background: var(--accent); color: var(--accent-fg); box-shadow: 0 0 0 1px rgba(255, 255, 255, .14) inset, 0 16px 30px -14px rgba(0, 0, 0, .9); }
.btn.big { font-size: 17px; padding: 17px 30px; }
.tool .btn.big { padding: 15px; }
.btn:focus-visible, select:focus-visible, input:focus-visible, .linkbtn:focus-visible, .file:focus-within, a:focus-visible, summary:focus-visible { outline: 3px solid var(--lift); outline-offset: 3px; border-radius: 6px; }
.btn:focus-visible, .file:focus-within { border-radius: 14px; }
.file { position: relative; display: flex; }
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.hint { font-size: 12px; color: var(--muted); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; font-weight: 600; color: var(--lift); text-decoration: underline; text-underline-offset: .18em; cursor: pointer; text-align: left; }
.more > summary { font-size: 13px; font-weight: 600; color: var(--lift); cursor: pointer; }
.more > .inner { display: flex; flex-direction: column; gap: 16px; padding-top: 14px; }

/* ---------- the finished stencil ---------- */
#tray {
  display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 20px 32px; align-items: center; padding: 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; scroll-margin-top: 20px;
}
#tray img { display: block; width: 100%; height: auto; background: var(--paper); border-radius: 8px; box-shadow: var(--shadow); }
.proof { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.proof figcaption { font-size: 13px; color: var(--muted); text-align: center; }
#tray h2 { font-size: clamp(24px, 2.6vw, 32px); }
.tray-body { display: flex; flex-direction: column; gap: 14px; }
.tray-body p { font-size: 14px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- sections under the tool ---------- */
h2 { font-stretch: 114%; font-weight: 800; font-size: clamp(26px, 3.2vw, 42px); line-height: 1.05; letter-spacing: -.03em; text-wrap: balance; }
h3 { font-size: 18px; font-stretch: 106%; font-weight: 700; letter-spacing: -.01em; }
section[id] { scroll-margin-top: 20px; }
.head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.head p { color: var(--muted); max-width: 60ch; font-size: 17px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.card p { color: var(--muted); font-size: 15px; }
.ex { padding: 0; overflow: hidden; gap: 0; transition: transform .35s var(--ease), border-color .35s; }
.ex:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, .26); }
.pair { display: grid; grid-template-columns: minmax(0, 1fr); background: var(--paper); }
.pair img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.ex .txt { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
/* how it works: three steps, each with a small picture of that moment in the tool, joined by arrows */
.steps3 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; counter-reset: s; }
.steps3 li { counter-increment: s; position: relative; display: flex; flex-direction: column; gap: 8px; }
.steps3 h3 { margin-top: 14px; display: flex; align-items: center; gap: 10px; }
.steps3 h3::before { content: counter(s); flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 14px; font-weight: 800; }
.steps3 p { color: var(--muted); font-size: 15px; }
.steps3 li + li::before {      /* the arrow between two steps */
  content: ""; position: absolute; z-index: 2; left: -31px; top: calc((100% - 150px) * .28 + 40px); width: 34px; height: 34px; border-radius: 50%;
  background: var(--raise) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M3 9h12M10 4l5 5-5 5' fill='none' stroke='%23c1adff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
  border: 1px solid var(--line);
}
.shot {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; display: grid; place-items: center;
  border: 1px solid var(--line); background: radial-gradient(90% 90% at 50% 0%, rgba(124, 77, 255, .22), transparent 70%), var(--surface);
  transition: transform .45s var(--ease), border-color .35s;
}
.steps3 li:hover .shot { transform: translateY(-4px); border-color: rgba(255, 255, 255, .26); }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pill { position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; padding: 7px 11px; border-radius: 999px; background: var(--fg); color: var(--bg); box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .8); }
.pill svg { width: 13px; height: 13px; }
.pill.num { font-variant-numeric: tabular-nums; }
.s-up .drop { width: 62%; aspect-ratio: 4 / 3; padding: 8px; border-radius: 16px; border: 2px dashed rgba(193, 173, 255, .55); transform: rotate(-4deg); transition: transform .45s var(--ease); }
.s-up .drop img { border-radius: 9px; }
.steps3 li:hover .drop { transform: rotate(0deg) scale(1.03); }
.s-tune { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; padding: 16px; }
.s-tune .paper { align-self: center; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--paper); box-shadow: var(--shadow); }
.knobs { align-self: center; display: flex; flex-direction: column; gap: 7px; font-size: 11px; color: var(--muted); padding-bottom: 26px; }
.knobs i { display: block; position: relative; height: 4px; border-radius: 4px; background: var(--raise); margin-bottom: 8px; }
.knobs i::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--v); border-radius: 4px; background: var(--lift); transition: width .6s var(--ease); }
.knobs i::after { content: ""; position: absolute; top: 50%; left: var(--v); width: 13px; height: 13px; margin: -6.5px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .6); transition: left .6s var(--ease); }
.steps3 li:hover .knobs i { --v: 92%; } .steps3 li:hover .knobs i + span + i { --v: 40%; }
.s-print .a4 { position: relative; width: 44%; height: auto; min-width: 0; aspect-ratio: 210 / 297; background: var(--paper); border-radius: 4px; box-shadow: var(--shadow); transform: rotate(5deg); padding: 9% 10% 0; transition: transform .45s var(--ease); }
.s-print .a4 img { width: 100%; height: auto; aspect-ratio: 4 / 3; }
.s-print .a4 b {       /* the width mark under the stencil on the printed page */
  position: absolute; left: 10%; right: 10%; top: 58%; height: 7px; border-inline: 1.5px solid var(--ink);
  background: linear-gradient(var(--ink), var(--ink)) center / 100% 1.5px no-repeat;
}
.steps3 li:hover .a4 { transform: rotate(0deg) scale(1.04); }
.uses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.uses .card { flex-direction: row; gap: 16px; align-items: flex-start; }
.uses .card svg { width: 40px; height: 40px; flex: none; padding: 9px; border-radius: 12px; background: var(--raise); color: var(--lift); }
.uses .card div { display: flex; flex-direction: column; gap: 6px; }
.faq-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 22px; align-items: start; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 16px 20px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin-top: 10px; color: var(--muted); font-size: 15px; }
.faq details a { color: var(--lift); }
.band {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; padding: clamp(28px, 5vw, 56px);
  border-radius: 28px; border: 1px solid var(--line);
  background: radial-gradient(80% 140% at 100% 0%, rgba(124, 77, 255, .5), transparent 60%), var(--surface);
}
.band p { color: var(--muted); margin-top: 10px; max-width: 44ch; }

/* ---------- text pages (privacy, terms, contact) ---------- */
.prose { max-width: 70ch; }
.prose h1 { font-size: clamp(32px, 4vw, 48px); }
.prose h2 { margin: 40px 0 10px; font-size: 22px; letter-spacing: -.01em; font-stretch: 108%; }
.prose p, .prose li { margin-bottom: 10px; color: #d6d2e6; }
.prose ul { padding-left: 22px; margin: 0 0 10px; }
.prose a { color: var(--lift); }
.updated { color: var(--muted); font-size: 14px; margin-top: 8px; }

/* ---------- stencil library ---------- */
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.lib { display: flex; flex-direction: column; gap: 18px; }
.lib h1 { font-size: clamp(32px, 4.2vw, 54px); }
.lib-top { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px 48px; align-items: start; }
.sheet { margin: 0; padding: 5%; background: var(--paper); border-radius: var(--r); box-shadow: var(--shadow); }
.sheet img, .source img { display: block; width: 100%; height: auto; }
.lib-side { display: flex; flex-direction: column; gap: 18px; }
.lib-side .btn { align-self: flex-start; }
.specs { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 18px; font-size: 15px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 600; }
.sizes { border-collapse: collapse; width: 100%; max-width: 760px; font-size: 15px; font-variant-numeric: tabular-nums; }
.sizes td:nth-child(-n+2) { white-space: nowrap; }
.sizes small { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.sizes th, .sizes td { text-align: left; padding: 11px 16px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.sizes th { font-size: 13px; color: var(--muted); font-weight: 600; }
.sizes .now td { font-weight: 700; color: var(--lift); }
.source { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 16px 28px; align-items: start; }
.source img { border-radius: var(--r-sm); }
.source p + p { margin-top: 10px; }
.text p { max-width: 70ch; color: #d6d2e6; }
.text p + p { margin-top: 10px; }
.text a, .source a, .lib-side a:not(.btn) { color: var(--lift); }
.find { position: relative; display: flex; align-items: center; max-width: 520px; margin-bottom: 24px; }
.find svg { position: absolute; left: 16px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.find input { width: 100%; font: 16px var(--font); padding: 14px 84px 14px 46px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); }
.find input::placeholder { color: var(--muted); }
.find input:focus-visible { border-radius: 999px; }
.find span { position: absolute; right: 18px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; pointer-events: none; }
.none { margin-top: 8px; color: var(--muted); } .none a { color: var(--lift); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.tile { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: var(--fg); text-decoration: none; transition: transform .35s var(--ease), border-color .35s; }
.tile:hover, .tile:focus-visible { transform: translateY(-4px); border-color: rgba(255, 255, 255, .26); }
.tile .thumb { position: relative; aspect-ratio: 4 / 3; background: var(--paper); }
.tile .thumb img { position: absolute; inset: 16px; width: calc(100% - 32px); height: calc(100% - 32px); object-fit: contain; }
.tile .txt { display: flex; flex-direction: column; gap: 2px; padding: 16px 20px 20px; }
.tile span { font-size: 14px; color: var(--muted); }
#library .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.cta p { max-width: 52ch; }

/* ---------- footer ---------- */
.foot {
  margin-top: 104px; padding: 32px 0 48px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 24px; align-items: start;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: var(--muted); } .foot a:hover { color: var(--fg); }
.foot .logo { font-size: 17px; color: var(--fg); }
.foot .logo svg { width: 26px; height: 26px; }
.foot p { margin-top: 10px; max-width: 60ch; }
.foot .small { grid-column: 1 / -1; font-size: 13px; margin-top: 0; max-width: none; }

/* ---------- narrower screens ---------- */
@media (max-width: 960px) {
  .first > .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 26px; }
  .wall { height: 340px; margin-inline: -20px; } .tilt { inset: -30% -30%; gap: 12px; } .col { gap: 12px; } .wcard { border-radius: 12px; }
  .tool { grid-template-columns: minmax(0, 1fr); grid-template-areas: "s1" "preview" "read" "s2" "s3"; grid-template-rows: none; border-radius: 20px; }
  .preview { border-right: 0; border-block: 1px solid var(--line); padding: 12px 14px 10px 6px; }
  .pin { position: static; }
  .bench { --rw: 16px; } .ruler { font-size: 9px; } .credit { padding-left: 16px; }
  .readout { border-top: 0; }
  .step, .readout > div { padding-inline: 18px; }
  .stats { margin-inline: 18px; }
  .wrap { gap: 72px; }
}
@media (max-width: 700px) {
  body { padding-inline: max(16px, env(safe-area-inset-left, 0px)); }
  .top { padding-block: 16px; } .top nav { gap: 16px; }
  .top nav .inpage { display: none; }          /* phones keep the links to other pages and drop the in-page ones */
  .lede { margin-top: 14px; } .acts { margin-top: 20px; width: 100%; } .acts .btn { width: 100%; } .facts { margin-top: 18px; }
  .wall { margin-inline: -16px; height: 300px; }
  .lib-top, .source { grid-template-columns: minmax(0, 1fr); }
  .source img { max-width: 260px; }
  .cta { padding: 20px; } .cta .btn, .band .btn { width: 100%; }
  .faq-list, .uses, .steps3 { grid-template-columns: minmax(0, 1fr); }
  .steps3 { gap: 34px; } .steps3 li + li::before { left: 50%; top: -34px; margin-left: -17px; transform: rotate(90deg); }
  .cards { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  #library .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }   /* photo and stencil side by side keeps each example short */
  .readout dd { font-size: 22px; }
  .head { margin-bottom: 22px; } .head p { font-size: 16px; }
  #tray { grid-template-columns: minmax(0, 1fr); }
  #tray .proof { order: 2; max-width: 320px; }
  .foot { grid-template-columns: minmax(0, 1fr); margin-top: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stage.anim #before, .stage.anim .split { transition: none; }
  .col, .copy > *, .wall { animation: none; }
  .btn, .ex, .tile, .shot, .drop, .a4, .knobs i::before, .knobs i::after { transition: none; }
}
