/* Shared by the landing pages and the server-rendered pages. Colours come from night.css / cream.css. */
@font-face { font-family: "Fredoka"; font-weight: 600; font-display: swap; src: url("/fonts/fredoka-latin-wght.woff2") format("woff2"); }
@font-face { font-family: "Fredoka"; font-weight: 700; font-display: swap; src: url("/fonts/fredoka-700-latin.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 500 700; font-display: swap; src: url("/fonts/nunito-latin.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url("/fonts/nunito-800-latin.woff2") format("woff2"); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  background: var(--bg); color: var(--text);
  font-family: "Nunito", system-ui, -apple-system, sans-serif; font-weight: 500;
}
h1, h2, h3 { font-family: "Fredoka", "Nunito", sans-serif; font-weight: 600; }
img { max-width: 100%; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
button, input { font: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Signup, shared by both landing pages ---- */
.signup, .waiting, .confirmed { display: flex; flex-direction: column; gap: 10px; max-width: 540px; }
.note { margin: 0; color: var(--muted); font-size: 14px; font-weight: 600; line-height: 1.45; }
.note-offer { color: var(--text); font-weight: 800; }
.form-error { margin: 0; color: var(--error); font-weight: 800; font-size: 15px; }
.form-error:empty { display: none; }
.typo-wrap { margin: 0; }
.typo-wrap:has(> [hidden]) { margin-bottom: -10px; }
.typo {
  align-self: flex-start; min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 1.5px dashed var(--muted); background: transparent; color: var(--text); font-weight: 800; font-size: 15px;
}
.ts-box:empty { display: none; }
.ts-box, .ts-fail { max-width: 540px; }
.signup-notes { margin-top: -12px; }
.ts-fail { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.ts-fail p { margin: 0; font-weight: 700; line-height: 1.45; }
.copy-url { width: 100%; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); color: var(--text); }
.linkish { padding: 0; border: 0; background: none; color: var(--link); font-weight: 800; text-decoration: underline; cursor: pointer; min-height: 0; }
.ghost {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--muted); background: transparent; color: var(--text); font-weight: 800; font-size: 15px;
}
.ghost:hover { border-color: var(--text); }

.waiting, .confirmed { padding: 22px 24px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); outline-offset: 4px; }
.waiting h2, .confirmed h2 { margin: 0; font-size: 26px; line-height: 1.15; }
.waiting p, .confirmed p { margin: 0; font-size: 17px; line-height: 1.5; }
.waiting .muted, .confirmed .muted { color: var(--muted); font-size: 15px; }
.w-email { overflow-wrap: anywhere; }
.w-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.confirmed { background: var(--ok-bg); color: var(--ok-text); border-color: transparent; }
.confirmed a { align-self: flex-start; }

/* ---- Server-rendered pages (confirm, expired, unsubscribe): one centred card with the mascot ---- */
body.card { display: grid; place-items: center; padding: 24px 16px; }
body.card > main {
  width: 100%; max-width: 480px; padding: 36px 28px; border-radius: 28px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
body.card > main::before {
  content: ""; display: block; width: 112px; height: 112px; margin: 0 auto 12px;
  background: url("/img/mascot.png") center / contain no-repeat;
}
body.card h1 { margin: 0 0 12px; font-size: 32px; line-height: 1.1; }
body.card p { margin: 0 0 14px; font-size: 17px; line-height: 1.5; color: var(--muted); }
body.card form { margin: 20px 0 0; }
body.card button {
  min-height: 52px; padding: 0 28px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--primary); color: var(--on-primary); font-weight: 800; font-size: 17px;
}

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