/* idread.app: the corkboard. */

:root {
  --cork: #b07c47;
  --cork-deep: #7e5228;
  --ink: #1b1a17;
  --ink-soft: #3b3731;
  --white-paper: #fbf8f0;
  --tape: rgba(236, 224, 196, .88);
  --gaffer: #1b1a17;
  --pin: #c8102e;

  /* topic papers (neon copy paper) */
  --p-bubble: #ffd400;
  --p-owner: #ff5fa8;
  --p-freelancer: #7be05a;
  --p-husband: #45b8ff;
  --p-parent: #ff8a2a;
  --p-custom: #fbf8f0;
  --paper: var(--p-bubble);

  --f-display: "Anton", "Arial Narrow", sans-serif;
  --f-type: "Courier Prime", "Courier New", monospace;
  --f-marker: "Permanent Marker", "Comic Sans MS", cursive;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --lift: 0 1px 1px rgba(40, 20, 0, .28), 0 12px 22px -10px rgba(40, 20, 0, .55);
  --lift-high: 0 2px 2px rgba(40, 20, 0, .25), 0 26px 38px -16px rgba(40, 20, 0, .6);

  color-scheme: light;
}

body[data-topic="owner"] { --paper: var(--p-owner); }
body[data-topic="freelancer"] { --paper: var(--p-freelancer); }
body[data-topic="husband"] { --paper: var(--p-husband); }
body[data-topic="parent"] { --paper: var(--p-parent); }
body[data-topic="custom"] { --paper: var(--p-custom); }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 400 17px/1.45 var(--f-type);
  background-color: var(--cork);
  /* cork: fine grain, coarse chunks, light flecks, vignette */
  background-image:
    radial-gradient(ellipse at 50% 30%, rgba(255, 220, 170, .14), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .25 0 0 0 0 .13 0 0 0 0 .03 0 0 0 2.2 -.95'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.32' numOctaves='2' seed='9' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .96 0 0 0 0 .8 0 0 0 0 .56 0 0 0 2.6 -1.55'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='h'%3E%3CfeTurbulence type='turbulence' baseFrequency='.045' numOctaves='2' seed='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .16 0 0 0 0 .05 0 0 0 1.4 -.55'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23h)'/%3E%3C/svg%3E");
  background-attachment: fixed, scroll, scroll, scroll;
  overflow-x: hidden;
}

::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 2px; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.marker { font-family: var(--f-marker); font-weight: 400; }

/* ---------- paper strips (headlines) ---------- */
.strip {
  position: relative;
  display: inline-block;
  margin: 0;
  padding: .2em .45em .25em;
  background: var(--white-paper);
  box-shadow: var(--lift);
}
.strip::before, .strip::after {          /* masking tape at both ends */
  content: "";
  position: absolute;
  top: -9px;
  width: 56px;
  height: 22px;
  background: var(--tape);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .12);
  -webkit-mask: linear-gradient(90deg, transparent 0 2px, #000 2px calc(100% - 2px), transparent 0),
                repeating-linear-gradient(0deg, #000 0 3px, transparent 3px 4px);
  -webkit-mask-composite: source-over;
}
.strip::before { left: -18px; transform: rotate(-24deg); }
.strip::after { right: -18px; transform: rotate(21deg); }
.strip--title {
  font: 400 clamp(2.6rem, 9vw, 5.6rem)/.95 var(--f-display);
  letter-spacing: -.01em;
  text-transform: uppercase;
  transform: rotate(-1.6deg);
  text-wrap: balance;
}
.strip--h2 { font-size: clamp(2.1rem, 6vw, 4rem); transform: rotate(1deg); }
.strip--sub {
  font: 700 clamp(1rem, 2.4vw, 1.2rem)/1.35 var(--f-type);
  max-width: 34ch;
  transform: rotate(.8deg);
  margin-top: 18px;
}
.strip--sub::before, .strip--sub::after { display: none; }
.strip--fine { font: 400 .9rem/1.5 var(--f-type); max-width: 62ch; transform: rotate(-.4deg); }
.strip--fine::before, .strip--fine::after { display: none; }

/* ---------- masthead ---------- */
.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: max(18px, env(safe-area-inset-top)) clamp(16px, 4vw, 48px) 0;
}
.logo {
  font: 400 30px/1 var(--f-display);
  letter-spacing: .02em;
  text-decoration: none;
  color: var(--white-paper);
  background: var(--gaffer);
  padding: 10px 16px 9px;
  transform: rotate(-2deg);
  box-shadow: var(--lift);
  -webkit-mask: linear-gradient(#000, #000) 6px 0 / calc(100% - 12px) 100% no-repeat,
    repeating-linear-gradient(180deg, #000 0 4px, transparent 4px 7px) 0 0 / 6px 100% no-repeat,
    repeating-linear-gradient(180deg, #000 0 5px, transparent 5px 7px) 100% 0 / 6px 100% no-repeat;
}
.logo span { color: var(--p-bubble); }
.tally-tag {
  margin: 0;
  font: 400 1.05rem/1.1 var(--f-marker);
  background: var(--white-paper);
  padding: 8px 12px;
  transform: rotate(2.5deg);
  box-shadow: var(--lift);
}

main { padding: 0 clamp(16px, 4vw, 48px); }

/* ---------- board / composer ---------- */
.board { padding: clamp(22px, 3.5vw, 40px) 0 24px; overflow-x: clip; }
.headline { display: grid; justify-items: start; gap: 4px; margin-bottom: clamp(22px, 3vw, 32px); }

.board-grid {
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}

.composer-col { position: relative; display: grid; gap: 16px; }

.swatches {
  position: relative;
  border: 0;
  margin: 0;
  padding: 0 0 0 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  row-gap: 14px;
}
.swatches legend {
  float: left;
  margin-right: 6px;
  font-size: 1.35rem;
  color: var(--ink);
}
.swatch { position: relative; z-index: var(--z, 1); }
.swatch + .swatch { margin-left: -12px; }
.swatch:has(input:checked) { z-index: 9; }
.swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.swatch span {
  display: block;
  padding: 12px 18px 11px 14px;
  font: 700 .92rem/1 var(--f-type);
  background: var(--sw);
  box-shadow: var(--lift);
  transform: rotate(var(--r, 0deg));
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.swatch:hover span { transform: rotate(var(--r, 0deg)) translateY(-2px); }
.swatch input:checked + span {
  transform: rotate(0deg) translateY(-8px) scale(1.06);
  box-shadow: var(--lift-high);
  outline: 2.5px solid var(--ink);
  outline-offset: -2.5px;
}
.swatch input:focus-visible + span { outline: 3px solid var(--white-paper); outline-offset: 3px; }

.custom-topic { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.custom-topic label { color: var(--ink); font-size: 1.2rem; }
.line-input {
  flex: 1 1 200px;
  border: 0;
  border-bottom: 2px solid var(--ink);
  background: var(--white-paper);
  padding: 8px 10px;
  font: 700 1rem var(--f-type);
  box-shadow: var(--lift);
}
.line-input:focus { outline: none; box-shadow: var(--lift), inset 0 -3px 0 var(--ink); }

/* flyer: the core object */
.flyer {
  --tilt: -1.4deg;
  position: relative;
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 -.5'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='.22'/%3E%3C/svg%3E");
  box-shadow: var(--lift-high), inset 0 0 28px rgba(60, 40, 0, .16);
  transform: rotate(var(--tilt));
  transition: background-color .45s var(--ease-out);
}
.flyer::after {                           /* photocopier toner speckle */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='t'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='2.2' numOctaves='1' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .1 0 0 0 0 .09 0 0 0 9 -8.1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23t)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
  opacity: .55;
}
.flyer-head, .small-head { text-shadow: .6px .4px 0 rgba(27, 26, 23, .35); }
/* staples: two bent wire marks where a flyer was stapled instead of pinned */
.staple {
  position: absolute;
  width: 26px;
  height: 6px;
  border-radius: 2px;
  background: linear-gradient(180deg, #e6e9ec, #8d949b);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .35);
  z-index: 3;
}
.pin-svg {
  position: absolute;
  top: -20px;
  left: 50%;
  width: 40px;
  height: 46px;
  margin-left: -20px;
  z-index: 3;
  overflow: visible;
  filter: drop-shadow(0 3px 2px rgba(40, 18, 0, .35));
}
.pin-svg--small { width: 30px; height: 35px; margin-left: -15px; top: -16px; }

.flyer--composer {
  display: grid;
  padding: 34px clamp(20px, 4vw, 34px) 0;
  min-height: clamp(380px, 48vh, 470px);
  grid-template-rows: auto 1fr auto auto auto;
}
.flyer-head {
  font: 400 clamp(4rem, 15vw, 6.4rem)/.85 var(--f-display);
  letter-spacing: -.01em;
  display: block;
  cursor: text;
}
.flyer--composer textarea {
  width: 100%;
  min-height: 2.4em;
  margin-top: 14px;
  padding: 0;
  border: 0;
  resize: none;
  background: transparent;
  font: 700 clamp(1.5rem, 5.4vw, 2.1rem)/1.2 var(--f-type);
  color: var(--ink);
  caret-color: var(--ink);
  outline: none;
  field-sizing: content;
}
.flyer--composer textarea::placeholder { color: rgba(27, 26, 23, .64); }
.flyer--composer:focus-within { box-shadow: var(--lift-high), 0 0 0 3px var(--ink); }
.flyer-sig { margin: 8px 0 0; font: 400 1.05rem var(--f-type); }
.char-count { margin: 4px 0 14px; font: 400 .85rem var(--f-type); text-align: right; color: var(--ink-soft); }

/* tear-off tabs */
.tabs {
  display: flex;
  height: 116px;
  margin: 0 calc(-1 * clamp(20px, 4vw, 34px));
  border-top: 2px dashed rgba(27, 26, 23, .55);
}
.tab {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-left: 1.5px dashed rgba(27, 26, 23, .5);
  background: transparent;
  padding: 6px 0;
  writing-mode: vertical-rl;
  font: 700 9.4px/1 var(--f-type);
  white-space: nowrap;
  overflow: hidden;
  color: var(--ink);
  transform-origin: 50% 0;
}
.tab:first-child { border-left: 0; }
.tab.torn {
  visibility: hidden;
  position: relative;
}
.tab.torn::before {                       /* the ragged stub left behind */
  content: "";
  visibility: visible;
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 9px;
  background: var(--paper);
  -webkit-mask: radial-gradient(circle at 3px 9px, transparent 3px, #000 3.5px) 0 0 / 6px 9px repeat-x;
}
button.tab:not(.torn):hover { background: rgba(255, 255, 255, .28); }
button.tab:not(.torn):active { transform: translateY(2px) rotate(-3deg); }
button.tab:focus-visible { outline: 3px solid var(--ink); outline-offset: -3px; }

/* the falling scrap */
.scrap {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  background-color: var(--paper);
  box-shadow: 0 6px 12px rgba(40, 20, 0, .3);
  writing-mode: vertical-rl;
  font: 700 10.5px/1 var(--f-type);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pin-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 6px;
}
.print-as { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.print-as .marker { color: var(--ink); font-size: 1.15rem; margin-right: 2px; }
.paper-chip {
  border: 0;
  padding: 7px 10px;
  font: 700 .85rem/1 var(--f-type);
  background: var(--white-paper);
  box-shadow: var(--lift);
  transition: transform .3s var(--ease-out);
}
.paper-chip:nth-of-type(1) { transform: rotate(-2deg); }
.paper-chip:nth-of-type(2) { transform: rotate(1.5deg); }
.paper-chip:nth-of-type(3) { transform: rotate(-1deg); }
.paper-chip[aria-checked="true"] { background: var(--ink); color: var(--white-paper); }
.paper-chip:hover { transform: translateY(-2px); }

/* gaffer-tape buttons */
.tape-btn {
  position: relative;
  border: 0;
  padding: 14px 30px 12px;
  font: 400 1.7rem/1 var(--f-display);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--white-paper);
  background: var(--gaffer);
  box-shadow: var(--lift);
  transform: rotate(1.5deg);
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
  -webkit-mask: linear-gradient(#000, #000) 7px 0 / calc(100% - 14px) 100% no-repeat,
    repeating-linear-gradient(180deg, #000 0 5px, transparent 5px 8px) 0 0 / 7px 100% no-repeat,
    repeating-linear-gradient(180deg, #000 0 4px, transparent 4px 8px) 100% 0 / 7px 100% no-repeat;
}
.tape-btn:hover { transform: rotate(0deg) translateY(-3px); box-shadow: var(--lift-high); }
.tape-btn:active { transform: rotate(0deg) translateY(1px); }
.tape-btn:disabled { opacity: .6; cursor: progress; }
.tape-btn:focus-visible { outline: 3px solid var(--white-paper); outline-offset: 4px; }
.tape-btn--small { font-size: 1.25rem; padding: 12px 22px 10px; }

.hint {
  justify-self: start;
  margin: 0;
  padding: 6px 10px;
  font: 700 .95rem/1.35 var(--f-type);
  color: var(--ink);
  background: var(--white-paper);
  box-shadow: var(--lift);
  transform: rotate(-.6deg);
}
.hint.err { color: #9b0b1f; }

/* Turnstile only appears when Cloudflare needs a human check */
.turnstile:empty { display: none; }
.turnstile { justify-self: start; max-width: 100%; }

/* result: the card, pinned like a photo */
.result { display: grid; gap: 22px; align-content: start; padding-top: 40px; }
.board-grid.has-result { grid-template-columns: minmax(0, 1fr); justify-items: center; }
.board-grid.has-result .nearby,
.board-grid.has-result .composer-col { display: none; }
.board-grid .result { grid-column: 2; grid-row: 1; }
.board-grid.has-result .result { grid-column: 1; padding-top: 10px; justify-items: center; }
.result-note { margin: 0; justify-self: center; }
.photo { width: min(100%, 520px); }
.photo {
  position: relative;
  margin: 0;
  justify-self: center;
  background: var(--white-paper);
  padding: 12px 12px 14px;
  box-shadow: var(--lift-high);
  transform: rotate(2deg);
}
.photo::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 90px;
  height: 26px;
  margin-left: -45px;
  background: var(--tape);
  transform: rotate(-3deg);
}
.photo img { display: block; width: 100%; height: auto; aspect-ratio: 1080 / 1350; background: var(--cork-deep); }
.photo figcaption { margin-top: 10px; font-size: 1.05rem; line-height: 1.3; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.strip-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  padding: 11px 14px;
  font: 700 1rem/1 var(--f-type);
  background: var(--white-paper);
  box-shadow: var(--lift);
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.strip-btn:nth-child(odd) { transform: rotate(-1.2deg); }
.strip-btn:nth-child(even) { transform: rotate(1deg); }
.strip-btn:hover { transform: translateY(-2px); box-shadow: var(--lift-high); }
.strip-btn svg { width: 18px; height: 18px; flex: none; }
.strip-btn--quiet { background: var(--paper); }

/* nearby flyers (desktop: the board is the index) */
.nearby {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 44px 32px;
  padding-top: 70px;
}
.nearby .flyer:nth-child(1) { --tilt: 2.4deg; }
.nearby .flyer:nth-child(2) { --tilt: -3deg; margin-top: 54px; }
.nearby .flyer:nth-child(3) { --tilt: -1.2deg; margin-top: -10px; }
.nearby .flyer:nth-child(4) { --tilt: 3.2deg; margin-top: 30px; }

/* ---------- small flyers (index + nearby) ---------- */
.flyer--small {
  display: grid;
  padding: 30px 20px 0;
  min-height: 300px;
  grid-template-rows: auto 1fr auto auto;
}
.flyer--small .rank {
  position: absolute;
  top: 10px;
  right: 14px;
  font: 400 1.6rem/1 var(--f-marker);
  transform: rotate(8deg);
}
.flyer--small .small-head { font: 400 2.6rem/.9 var(--f-display); margin: 0; }
.flyer--small .small-text { margin: 10px 0 12px; font: 700 1.2rem/1.2 var(--f-type); overflow-wrap: anywhere; }
.flyer--small .meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 10px; margin-bottom: 10px; }
.tally {
  font: 400 1.15rem/1.1 var(--f-marker);
  display: inline-block;
}
.tally.bump { animation: bump .5s var(--ease-out); }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.25) rotate(-3deg); } 100% { transform: scale(1); } }
.mini-link {
  border: 0;
  background: none;
  padding: 2px 0;
  font: 700 .85rem var(--f-type);
  text-decoration: underline;
  text-underline-offset: .2em;
}
.flyer--small .tabs { height: 112px; margin: 0 -20px; }
.flyer--small .tab { font-size: 8.8px; }
.mine-note { font: 400 1rem var(--f-marker); }

/* ---------- index ---------- */
.index { padding: clamp(48px, 8vw, 96px) 0 24px; }
.index > .strip--sub { display: block; width: fit-content; }
.topic-tabs { display: flex; flex-wrap: wrap; gap: 10px 8px; margin: 34px 0 40px; }
.topic-tab {
  border: 0;
  padding: 9px 13px 8px;
  font: 700 .92rem/1 var(--f-type);
  background: var(--sw);
  box-shadow: var(--lift);
  transform: rotate(var(--r, 0deg));
  transition: transform .35s var(--ease-out);
}
.topic-tab[aria-selected="true"] { transform: translateY(-4px); outline: 2.5px solid var(--ink); outline-offset: -2.5px; box-shadow: var(--lift-high); }
.flyers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  grid-auto-flow: dense;
  gap: 30px 6px;
}
.flyers > li { z-index: calc(40 - var(--rank, 1)); }
.flyers > li:nth-child(5n + 1) { --tilt: -3.2deg; }
.flyers > li:nth-child(5n + 2) { --tilt: 2.6deg; margin-top: 26px; margin-left: -18px; }
.flyers > li:nth-child(5n + 3) { --tilt: -1.2deg; margin-top: -8px; }
.flyers > li:nth-child(5n + 4) { --tilt: 4deg; margin-top: 34px; margin-left: -22px; }
.flyers > li:nth-child(5n) { --tilt: -2.4deg; margin-top: 6px; }
.flyers > li.top { grid-column: span 2; min-height: 360px; padding: 38px 30px 0; }
.flyers > li.top .small-head { font-size: 4rem; }
.flyers > li.top .small-text { font-size: 1.7rem; }
.flyers > li.top .tabs { height: 132px; margin: 0 -30px; }
.flyers > li.top .tab { font-size: 10.5px; }
.flyers > li.top .rank { font-size: 2.4rem; }
.starter { font: 400 .95rem var(--f-marker); opacity: .85; }
.flyers > li.enter { animation: pinDrop .6s var(--ease-out) backwards; }
.empty { margin-top: 10px; }

/* ---------- report + business card ---------- */
.report {
  display: grid;
  grid-template-columns: minmax(0, 620px) minmax(0, 340px);
  justify-content: space-between;
  align-items: start;
  gap: 48px;
  padding: clamp(56px, 9vw, 110px) 0 40px;
}
.clipboard {
  position: relative;
  background: #6b4a2b;
  background-image: linear-gradient(120deg, rgba(255, 255, 255, .1), transparent 40%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .22' numOctaves='3' seed='5' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .11 0 0 0 0 .04 0 0 0 1.3 -.45'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23w)'/%3E%3C/svg%3E");
  padding: 46px 18px 18px;
  border-radius: 10px;
  box-shadow: var(--lift-high);
  transform: rotate(-1deg);
}
.clip {
  position: absolute;
  top: -14px;
  left: 50%;
  width: 150px;
  height: 46px;
  margin-left: -75px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #e9ecef, #9aa1a8 55%, #c9ced3);
  box-shadow: 0 3px 4px rgba(0, 0, 0, .35), inset 0 1px 0 #fff;
}
.sheet {
  background: var(--white-paper);
  padding: 26px clamp(18px, 4vw, 34px) 10px;
  background-image: linear-gradient(90deg, transparent 0 46px, rgba(200, 16, 46, .35) 46px 48px, transparent 48px);
}
.sheet-title { margin: 0; font: 400 clamp(2rem, 6vw, 3.2rem)/1 var(--f-display); text-transform: uppercase; }
.sheet-sub { margin: 10px 0 18px; font: 400 1.02rem/1.45 var(--f-type); max-width: 52ch; }
.sheet-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 16px; }
.sheet-label { flex-basis: 100%; font: 400 1.05rem var(--f-marker); }
.sheet-input {
  flex: 1 1 240px;
  border: 0;
  border-bottom: 2px solid var(--ink);
  background: transparent;
  padding: 6px 2px;
  font: 400 1.35rem var(--f-marker);
}
.sheet-input::placeholder { color: rgba(27, 26, 23, .68); }
.sheet-input:focus { outline: none; border-bottom-width: 3px; }
.sheet-note { margin: 14px 0 0; font: 400 .9rem var(--f-type); color: var(--ink-soft); }
.sheet-note.ok { font: 400 1.1rem var(--f-marker); color: var(--ink); }
.sheet-note.err { color: #9b0b1f; font-weight: 700; }
.sheet-lines { list-style: none; margin: 12px 0 0; padding: 0; }
.sheet-lines li { height: 34px; border-bottom: 1px solid rgba(60, 110, 180, .35); }

.biz-card {
  position: relative;
  display: grid;
  gap: 6px;
  margin-top: 40px;
  padding: 30px 24px 22px;
  background: var(--white-paper);
  text-decoration: none;
  box-shadow: var(--lift-high);
  transform: rotate(3deg);
  transition: transform .4s var(--ease-out);
}
.biz-card:hover { transform: rotate(0deg) translateY(-4px); }
.biz-name { font: 400 2.2rem/1 var(--f-display); letter-spacing: .01em; }
.biz-line { font: 400 1rem/1.35 var(--f-type); }
.biz-cta { display: inline-flex; align-items: center; gap: 6px; font: 700 1rem var(--f-type); text-decoration: underline; text-underline-offset: .2em; margin-top: 6px; }
.biz-cta svg { width: 18px; height: 18px; }

.footer { padding: 30px clamp(16px, 4vw, 48px) max(40px, env(safe-area-inset-bottom)); }

/* ---------- motion ---------- */
@keyframes pinDrop {
  0% { transform: translateY(-22px) rotate(calc(var(--tilt) * 3)) scale(1.03); box-shadow: 0 2px 2px rgba(40,20,0,.2), 0 46px 40px -18px rgba(40,20,0,.45); }
  100% { transform: rotate(var(--tilt)); }
}
@keyframes pinPress {
  0% { transform: translateY(-46px) scale(1.5); opacity: 0; }
  60% { transform: translateY(3px) scale(.96); opacity: 1; }
  100% { transform: none; }
}
.flyer--composer.pinned .pin-svg { animation: pinPress .55s var(--ease-out); }
.flyer--composer.pinned { animation: settle .6s .18s var(--ease-out); }
@keyframes settle { 0% { transform: rotate(var(--tilt)); } 40% { transform: rotate(calc(var(--tilt) - 1.6deg)) translateY(2px); } 100% { transform: rotate(var(--tilt)); } }
.result.enter .photo { animation: photoIn .7s var(--ease-out) both; }
@keyframes photoIn { 0% { opacity: 0; transform: translateY(30px) rotate(8deg); } 100% { opacity: 1; transform: rotate(2deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (min-width: 1021px) {
  .headline { grid-template-columns: auto auto; justify-content: start; align-items: end; column-gap: 34px; }
  .headline .strip--sub { margin-top: 0; margin-bottom: 6px; }
}

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .board-grid { grid-template-columns: minmax(0, 1fr); }
  .composer-col { max-width: 600px; }
  .board-grid { position: relative; }
  .composer-col { z-index: 2; }
  .nearby {                               /* one neighbour flyer peeks in from the right edge */
    display: block;
    position: absolute;
    top: 120px;
    right: calc(-1 * clamp(16px, 4vw, 48px) - 120px);
    width: 250px;
    padding: 0;
    z-index: 1;
    pointer-events: none;
  }
  .nearby .flyer:not(:first-child) { display: none; }
  .nearby .flyer:first-child { --tilt: 7deg; }
  .board-grid .result { grid-column: 1; grid-row: auto; padding-top: 8px; }
  .report { grid-template-columns: minmax(0, 1fr); }
  .biz-card { max-width: 340px; justify-self: end; margin-top: 0; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .logo { font-size: 24px; padding: 8px 12px 7px; }
  .tally-tag { font-size: .9rem; }
  .strip::before, .strip::after { width: 40px; height: 18px; }
  .strip::before { left: -10px; }
  .strip::after { right: -10px; }
  .flyer--composer { min-height: 0; }
  .tabs { height: 124px; }
  .tab { font-size: 9.6px; }
  .print-as .marker { flex-basis: 100%; }
  .headline .strip--sub { display: none; }
  .headline { margin-bottom: 18px; }
  .pin-row { flex-direction: column-reverse; align-items: stretch; }
  .pin-row .tape-btn {
    position: sticky;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 20;
    width: 100%;
    font-size: 2rem;
    padding: 16px 20px 14px;
    transform: rotate(-.8deg);
    box-shadow: var(--lift-high);
  }
  .composer-col { padding-bottom: 4px; }
  .flyers { gap: 28px; }
  .flyers > li { margin-left: 0 !important; }
  .flyers > li.top { grid-column: auto; }
  .biz-card { justify-self: stretch; }
}
