:root {
  --brand: #0f6b5c;
  --brand-dark: #0a5044;
  --brand-soft: #e3f0ec;
  --accent: #f4b942;
  --bg: #f7f5f0;
  --card: #ffffff;
  --ink: #22222a;
  --muted: #5d5d68;
  --line: #e4e2dc;
  --praise: #2f9e44;
  --suggest: #f08c00;
  --complaint: #e03131;
  --question: #4c6ef5;
  --radius: 14px;
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--font); -webkit-text-size-adjust: 100%; }
img, svg { max-width: 100%; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5.2vw, 3.3rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(247,245,240,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.logo { font-weight: 800; font-size: 1.35rem; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; display: inline-block; }
.logo b { color: var(--brand); }
.nav-links { display: flex; gap: 20px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--brand); }
.nav-links a.btn, .nav-links a.btn:hover { color: #fff; }
@media (max-width: 720px) { .nav .wrap { flex-wrap: wrap; padding-block: 8px; } .nav-links { margin-left: 0; gap: 14px; width: 100%; } }

/* buttons */
.btn { display: inline-block; background: var(--brand); color: #fff; font: 800 1rem var(--font); text-decoration: none; padding: 13px 24px; border-radius: 999px; border: 0; cursor: pointer; transition: transform .12s, background .12s; }
.btn:hover { background: var(--brand-dark); color: #fff; transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn.ghost { background: transparent; color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.small { padding: 8px 16px; font-size: .9rem; }
.btn.block { display: block; width: 100%; text-align: center; }
.textlink { font-weight: 700; }

/* sections */
section { padding: 64px 0; }
section.tint { background: var(--brand-soft); }
section.dark { background: var(--ink); color: #f4f2ec; }
section.dark a { color: var(--accent); }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 40em; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 800; color: var(--brand); margin-bottom: .6em; }
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; align-items: center; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 860px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { margin-top: 0; }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 16px; }
.steps li { counter-increment: s; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 18px 68px; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 18px; top: 16px; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; display: grid; place-items: center; }
.steps li strong { display: block; }
.price { font-size: 3.4rem; font-weight: 800; line-height: 1; }
.price small { font-size: 1rem; font-weight: 600; color: var(--muted); }
.checks { list-style: none; padding: 0; margin: 0 0 1.2em; }
.checks li { padding-left: 28px; position: relative; margin-bottom: .55em; }
.checks li::before { content: ""; position: absolute; left: 0; top: .42em; width: 16px; height: 16px; border-radius: 50%; background: var(--brand); box-shadow: inset 0 0 0 4px var(--brand-soft); }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details[open] summary { margin-bottom: .5em; }
.quote { border-left: 4px solid var(--accent); padding: 4px 0 4px 18px; font-size: 1.1rem; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 12px; font-size: .82rem; font-weight: 700; background: var(--brand-soft); color: var(--brand-dark); }
.pill.praise { background: #dff3e4; color: #1f6f31; }
.pill.suggestion { background: #fdebc9; color: #8a5300; }
.pill.complaint { background: #fbdcdc; color: #a01d1d; }
.pill.question { background: #dfe5fd; color: #2d43b5; }

/* tapi: the same drawing as the feedback pages (src/lib/tapi.ts lifts it from engine/shell.html).
   /js/tapi.js decides when each pose class goes on; the poses themselves are here. */
.tapi { --tapi: #1c4e4a; --tapi-light: #fdfcfa; --tapi-cheek: #f4b942; width: 100%; max-width: 320px; margin-inline: auto; display: block; overflow: visible; }
.tapi .pose { transform-box: view-box; transform-origin: 116px 184px; }
.tapi .head { transform-box: view-box; transform-origin: 110px 108px; }
.tapi .giggle { transform-box: view-box; transform-origin: 160px 46px; }
.tapi .arm { transform-box: fill-box; transform-origin: 50% 12%; }
.tapi .foot { transform-box: fill-box; transform-origin: 50% 16%; }
.tapi .ear { transform-box: fill-box; transform-origin: 50% 100%; }
.tapi .eye-lid { transform-box: fill-box; transform-origin: 50% 0; animation: tapi-blink 3.2s infinite; }
@keyframes tapi-blink { 0%, 92%, 100% { transform: scaleY(0); } 95% { transform: scaleY(1); } }
/* A paw held up with no motion, for anything that runs no script: the flyer PDF, a thank-you page. */
.tapi.is-wave-still .arm-r { display: none; }
.tapi.is-wave-still .arm-wave { display: inline; }
/* The breath. About 1.5 per cent, so a resting Tapi is never quite frozen. */
.tapi.is-breathe .pose { animation: tapi-breathe 4.2s ease-in-out infinite; }
@keyframes tapi-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.012, 1.018); } }
/* The wave. The short resting paw cross-fades to the long raised one at the bottom of the swing,
   so the arm reads as one limb lifting rather than as two arms swapping over. */
.tapi.is-wave .arm-r { animation: tapi-armswap 2.1s ease-in-out both; }
.tapi.is-wave .arm-wave { display: inline; transform-box: view-box; transform-origin: 140px 118px; animation: tapi-wave 2.1s ease-in-out both; }
@keyframes tapi-armswap { 0%, 5% { opacity: 1; } 11%, 89% { opacity: 0; } 95%, 100% { opacity: 1; } }
@keyframes tapi-wave {
  0%, 5% { transform: rotate(126deg); opacity: 0; }
  11% { transform: rotate(108deg); opacity: 1; }
  24% { transform: rotate(-9deg); }
  36% { transform: rotate(7deg); }
  48% { transform: rotate(-11deg); }
  60% { transform: rotate(7deg); }
  72% { transform: rotate(-11deg); }
  84% { transform: rotate(5deg); }
  89% { transform: rotate(108deg); opacity: 1; }
  95%, 100% { transform: rotate(126deg); opacity: 0; }
}
/* The greeting. A page that renders the paw already up hands it straight to this, which waves and
   then lowers it, so the arm never drops a frame before it starts. */
.tapi.is-greet .arm-r { animation: tapi-armswap-down 1.8s ease-in-out both; }
.tapi.is-greet .arm-wave { display: inline; transform-box: view-box; transform-origin: 140px 118px; animation: tapi-wave-down 1.8s ease-in-out both; }
@keyframes tapi-armswap-down { 0%, 84% { opacity: 0; } 92%, 100% { opacity: 1; } }
@keyframes tapi-wave-down {
  0% { transform: rotate(0); opacity: 1; }
  14% { transform: rotate(9deg); }
  28% { transform: rotate(-10deg); }
  42% { transform: rotate(7deg); }
  56% { transform: rotate(-11deg); }
  70% { transform: rotate(5deg); }
  84% { transform: rotate(108deg); opacity: 1; }
  92%, 100% { transform: rotate(126deg); opacity: 0; }
}
/* The poke. Tapi leans back, all four limbs go, and three laugh marks drift off his head.
   These rules sit after the breath on purpose: same weight, so the later one wins while it runs. */
.tapi.is-poke { cursor: default; }
.tapi.is-poke .pose { animation: tapi-tickle 1.25s ease-in-out; }
.tapi.is-poke .arm-l { animation: tapi-flail-l .16s ease-in-out 7; }
.tapi.is-poke .arm-r { animation: tapi-flail-r .16s ease-in-out 7; }
.tapi.is-poke .foot-l { animation: tapi-kick-l .2s ease-in-out 6; }
.tapi.is-poke .foot-r { animation: tapi-kick-r .2s ease-in-out 6 .1s; }
.tapi.is-poke .head { animation: tapi-head-back 1.25s ease-in-out; }
.tapi.is-poke .ear { animation: tapi-ear-flap .16s ease-in-out 7; }
.tapi.is-poke .eye-lid { animation: tapi-squint 1.25s ease-in-out; }
.tapi.is-poke .giggle { animation: tapi-laugh 1.25s ease-out; }
@keyframes tapi-tickle {
  0%, 100% { transform: rotate(0) translateY(0) scale(1, 1); }
  14% { transform: rotate(-5deg) translateY(-4px) scale(.97, 1.05); }
  34% { transform: rotate(3deg) translateY(0) scale(1.05, .95); }
  54% { transform: rotate(-4deg) translateY(-5px) scale(.97, 1.04); }
  74% { transform: rotate(2deg) translateY(0) scale(1.04, .96); }
  88% { transform: rotate(-1deg) translateY(-2px) scale(1, 1.01); }
}
@keyframes tapi-flail-l { 0%, 100% { transform: rotate(6deg); } 50% { transform: rotate(46deg); } }
@keyframes tapi-flail-r { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(-46deg); } }
@keyframes tapi-kick-l { 0%, 100% { transform: rotate(2deg); } 50% { transform: rotate(-24deg); } }
@keyframes tapi-kick-r { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(24deg); } }
@keyframes tapi-head-back { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(9deg); } 55% { transform: rotate(4deg); } 80% { transform: rotate(7deg); } }
@keyframes tapi-ear-flap { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-11deg); } }
@keyframes tapi-squint { 0%, 100% { transform: scaleY(0); } 6%, 90% { transform: scaleY(1); } }
@keyframes tapi-laugh {
  0% { opacity: 0; transform: translate(-6px, 10px) scale(.5); }
  22% { opacity: .8; }
  100% { opacity: 0; transform: translate(12px, -20px) scale(1.2); }
}
/* Tapi standing next to a line or two of text, on the short pages worth a hello */
.tapi-say { display: flex; align-items: center; gap: clamp(16px, 3vw, 30px); }
.tapi-say > .tapi { width: var(--tapi-size, 128px); max-width: var(--tapi-size, 128px); flex: none; margin: 0; }
.tapi-say > div { min-width: 0; }
.tapi-say h1, .tapi-say p:last-child { margin-bottom: 0; }
@media (max-width: 620px) { .tapi-say { flex-direction: column; align-items: flex-start; gap: 6px; } .tapi-say > .tapi { margin-left: -12px; } }
@media (prefers-reduced-motion: reduce) { .tapi, .tapi * { animation: none !important; } html { scroll-behavior: auto; } }

/* forms */
.form { display: grid; gap: 16px; }
.field label, .field .lab { display: block; font-weight: 700; margin-bottom: 4px; font-size: .95rem; }
.field .hint { font-size: .85rem; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=url], input[type=number], input[type=date], select, textarea {
  width: 100%; font: inherit; padding: 11px 13px; border: 1.5px solid #cfcdc6; border-radius: 10px; background: #fff; color: var(--ink);
}
textarea { min-height: 110px; resize: vertical; }
input[type=color] { width: 56px; height: 44px; padding: 2px; border: 1.5px solid #cfcdc6; border-radius: 10px; background: #fff; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .row2 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { margin-top: .4em; width: 18px; height: 18px; flex: none; }
.err { background: #fbdcdc; color: #7a1414; padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.ok { background: #dff3e4; color: #1a5a29; padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.codebox { min-height: 1.6em; font-weight: 700; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.aspects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; }
@media (max-width: 640px) { .aspects { grid-template-columns: 1fr; } }

/* legal + prose */
.prose { max-width: 720px; }
.prose h2 { margin-top: 1.6em; font-size: 1.4rem; }
.prose h3 { margin-top: 1.3em; }
.prose li { margin-bottom: .4em; }
.legal-meta { color: var(--muted); font-size: .9rem; margin-bottom: 1.5em; }
table.plain { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.plain th, table.plain td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }

/* footer */
.footer { background: var(--ink); color: #cfcdc6; padding: 40px 0; font-size: .92rem; }
.footer a { color: #f4f2ec; }
.footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
@media (max-width: 720px) { .footer .cols { grid-template-columns: 1fr 1fr; } }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: .4em; }
.footer .fine { margin-top: 24px; color: #9b9aa3; font-size: .82rem; }

/* result box (calculators) */
.big { font-size: clamp(2.6rem, 8vw, 4.5rem); font-weight: 800; color: var(--brand); line-height: 1; }
.result { background: var(--card); border: 2px solid var(--brand); border-radius: var(--radius); padding: 24px; margin-top: 20px; }
.tools { display: grid; gap: 16px; }

/* demo page: one card per demo business, in that business's colours */
.demo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 28px; }
@media (max-width: 1000px) { .demo-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .demo-grid { grid-template-columns: 1fr; } }
.demo-card { display: flex; flex-direction: column; background: var(--card); border-radius: 20px; overflow: hidden; text-decoration: none; color: var(--ink); border: 1px solid var(--line); box-shadow: 0 1px 0 rgba(0,0,0,.02); transition: transform .18s ease, box-shadow .18s ease; }
.demo-card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px -22px var(--b); color: var(--ink); }
.demo-top { display: block; background: var(--b); color: #fff; padding: 16px 18px 34px; position: relative; min-height: 104px; }
.demo-top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 22px; background: var(--card); border-radius: 22px 22px 0 0; }
.demo-kind { display: block; font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.demo-biz { display: block; font-size: 1.12rem; font-weight: 800; line-height: 1.25; margin-top: 2px; }
.demo-qr { display: grid; place-items: center; padding: 0 18px; margin-top: -6px; position: relative; }
.demo-qr img { border-radius: 12px; box-shadow: 0 0 0 6px var(--bs); }
.demo-go { display: block; margin: 18px; padding: 11px 14px; border-radius: 999px; background: var(--bs); color: var(--bi); font-weight: 800; text-align: center; font-size: .95rem; transition: background .15s, color .15s; }
.demo-card:hover .demo-go { background: var(--b); color: #fff; }
@media (prefers-reduced-motion: reduce) { .demo-card, .demo-card:hover { transition: none; transform: none; } }

/* homepage: the live demo in a phone, and the owner's email arriving when it's finished */
.live { position: relative; display: grid; justify-items: center; padding: 8px 0 4px; }
.live-phone { position: relative; width: 300px; height: 624px; border-radius: 46px; background: #1b1b22; padding: 11px; box-shadow: 0 50px 90px -48px rgba(15,107,92,.65), inset 0 0 0 2px #3a3a44; }
.live-phone iframe { display: block; width: 100%; height: 100%; border: 0; border-radius: 36px; background: var(--bg); }
.live-notch { position: absolute; z-index: 2; top: 11px; left: 50%; width: 84px; height: 20px; transform: translateX(-50%); background: #1b1b22; border-radius: 0 0 14px 14px; }
.live-tapi { position: absolute; left: -104px; bottom: 6px; width: 132px; z-index: 3; pointer-events: none; }
.live-tapi .tapi { pointer-events: auto; }
.live-tapi .tapi { max-width: 132px; transform: scaleX(-1); filter: drop-shadow(0 10px 12px rgba(0,0,0,.12)); }
.live-bubble { position: absolute; left: 18px; bottom: 138px; background: #fff; color: var(--ink); font-weight: 800; font-size: .9rem; white-space: nowrap; padding: 9px 14px; border-radius: 16px 16px 16px 4px; box-shadow: 0 10px 24px -12px rgba(0,0,0,.3); border: 1px solid var(--line); animation: bob 2.6s ease-in-out infinite; transition: opacity .3s; }
.live-tapi.is-done .live-bubble { opacity: 0; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.live-mail { --c: var(--praise); position: absolute; z-index: 4; right: -34px; top: 84px; width: 310px; background: #fff; border-radius: 16px; padding: 12px 16px 14px; border-left: 6px solid var(--c); box-shadow: 0 30px 60px -24px rgba(0,0,0,.4); display: grid; gap: 4px; opacity: 0; transform: translateY(-18px) scale(.96); transition: opacity .35s ease, transform .5s cubic-bezier(.2,.9,.3,1.25); }
.live-mail.is-on { opacity: 1; transform: none; }
.live-mail[data-cat="complaint"] { --c: var(--complaint); }
.live-mail[data-cat="suggestion"] { --c: var(--suggest); }
.live-mail[data-cat="question"] { --c: var(--question); }
.live-mail strong { font-size: .98rem; line-height: 1.35; }
.live-mail-app { font-size: .75rem; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.live-mail-to { font-size: .8rem; color: var(--muted); line-height: 1.4; }
.live-reset { margin-top: 14px; border: 0; background: none; color: var(--muted); font: 700 .9rem var(--font); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.live-reset:hover { color: var(--brand); }
@media (max-width: 860px) {
  .live-phone, .live-mail, .live-reset, .live-bubble { display: none; }
  .live-tapi { position: static; width: 220px; }
  .live-tapi .tapi { max-width: 220px; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .live-bubble { animation: none; } .live-mail { transition: none; } }
