/* Puttcroft base — fonts, reset, shared components (top bar, buttons, CA strip, footer, toast). Palette lives in tokens.css. */
@font-face { font-family: "Fredoka"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/fredoka-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Fredoka"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/fredoka-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/nunito-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/nunito-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "DM Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/dm-mono-latin-400-normal.woff2") format("woff2"); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--table); color: var(--ink);
  font: 400 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration-color: var(--flag); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--flag-2); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--flag); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--font-mono); font-size: .92em; }
.display { font-family: var(--font-display); font-weight: 600; }
.small { font-size: 14px; }
.muted { color: var(--ink-2); }
[hidden] { display: none !important; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--card-shadow); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  min-height: 44px; padding: .5em 1.15em; border: 0; border-radius: 999px;
  background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap;
  font: 600 15px/1 var(--font-display); letter-spacing: .02em;
  box-shadow: 0 2px 0 var(--table-2), 0 4px 12px rgba(60,40,20,.12);
  transition: transform .08s, box-shadow .12s, background-color .12s;
}
.btn:hover { color: var(--ink); background: #fff; }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--table-2); }
.btn-flag { background: var(--flag); color: #fff; box-shadow: 0 2px 0 var(--flag-2), 0 4px 12px rgba(232,86,63,.28); }
.btn-flag:hover { background: #ef6450; color: #fff; }
.btn-quiet { background: var(--cream); box-shadow: none; }
.btn-quiet:hover { background: #F1E4CC; }
.btn-sm { min-height: 34px; padding: .35em .9em; font-size: 13px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-sm svg { width: 12px; height: 12px; }
.iconbtn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: #F6EEDF; color: var(--ink); cursor: pointer; text-decoration: none; flex: none;
}
.iconbtn:hover { background: #EFE3CC; color: var(--ink); }
.iconbtn svg { width: 20px; height: 20px; }
.label { font: 600 12px/1 var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }

/* ---------- top bar (every page) ---------- */
.topbar {
  position: relative; z-index: 20; display: flex; align-items: center; gap: 12px;
  height: var(--topbar-h); padding: env(safe-area-inset-top) max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
  max-width: var(--wrap-top, none); margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); font: 600 21px/1 var(--font-display); letter-spacing: .01em; flex: none; }
.brand svg { width: 30px; height: 30px; margin: -4px -2px 0 -6px; }
.brand:hover { color: var(--ink); }
.brand:hover svg path { transform-origin: 13px 9px; animation: flutter .5s ease-in-out 2; }
@keyframes flutter { 50% { transform: scaleX(.86) skewY(4deg); } }
.brand-sm { font-size: 18px; }
.brand-sm svg { width: 26px; height: 26px; }
.navslot { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.navslot a {
  display: inline-flex; align-items: center; height: 36px; padding: 0 11px; border-radius: 999px;
  font: 600 15px/1 var(--font-display); letter-spacing: .01em; color: var(--ink); text-decoration: none;
}
.navslot a:hover { background: rgba(255,253,248,.7); color: var(--ink); }
.navslot a[aria-current="page"] { background: var(--card); box-shadow: 0 2px 0 var(--table-2); }
.navslot .nav-x { width: 36px; padding: 0; justify-content: center; }
.navslot .nav-x svg { width: 17px; height: 17px; }
@media (max-width: 374px) {
  .brand { font-size: 19px; }
  .navslot a { padding: 0 8px; font-size: 14px; }
  .navslot .nav-x { width: 32px; }
}

/* ---------- CA strip (rendered by site.js renderCaPill) ---------- */
.ca-pre { display: inline-flex; flex-direction: column; gap: 3px; min-width: 0; padding-left: 8px; line-height: 1; white-space: nowrap; }
.ca-pre .ca-k { font: 600 13px/1 var(--font-display); letter-spacing: .02em; color: var(--ink); }
.ca-pre .ca-v { font: 700 12px/1 var(--font-body); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.ca-cd { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 3px; margin-left: auto; padding: 5px 12px 5px 12px; border-radius: 12px; background: var(--cream); line-height: 1; white-space: nowrap; }
.ca-cd-k { font: 600 10px/1 var(--font-display); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.ca-cd b { font: 400 16px/1 var(--font-mono); letter-spacing: .02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.ca-cd.is-done b { font: 600 13px/1 var(--font-display); color: var(--felt-ink); }
.ca-pill { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font: 400 13px/1 var(--font-mono); color: var(--ink); background: var(--cream); border-radius: 999px; padding: 4px 4px 4px 12px; white-space: nowrap; }
.ca-pill .ca-k { font: 600 12px/1 var(--font-display); letter-spacing: .06em; color: var(--ink-2); }
.ca-pill .ca-note { font: 600 12px/1 var(--font-body); color: var(--ink-2); }
.ca-addr { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ca-full { display: none; }
.ca-copy, .ca-pill button { flex: none; border: 0; background: var(--card); border-radius: 50%; width: 28px; height: 28px; display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.ca-copy svg, .ca-pill button svg { width: 14px; height: 14px; }
.ca-copy.copied, .ca-pill button.copied { background: var(--felt); }
.ca-links { display: inline-flex; gap: 6px; margin-left: auto; flex: none; }
@media (min-width: 1100px) { .ca-full { display: inline; } .ca-short { display: none; } }
@media (max-width: 380px) { .ca-exp { display: none; } }

/* ---------- footer (every page) ---------- */
.foot { max-width: var(--wrap); margin: 0 auto; padding: 28px var(--gutter) calc(36px + env(safe-area-inset-bottom)); }
.f-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding-bottom: 16px; border-bottom: 2px dashed rgba(176,122,60,.28); }
.f-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.f-links a { font: 600 15px/1.4 var(--font-display); text-decoration: none; }
.f-links a:hover { text-decoration: underline; text-decoration-color: var(--flag); }
.f-wallets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 14px 0 2px; }
.f-wallets .label { width: 100%; }
.f-wallet { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: var(--card); box-shadow: 0 1px 0 var(--table-2); text-decoration: none; font-size: 14px; }
.f-wallet .f-wl { font: 600 13px/1 var(--font-display); }
.f-wallet .f-bal { font-weight: 700; }
.f-wallet svg { color: var(--ink-2); }
.disclaimer { font-size: 13.5px; line-height: 1.55; color: var(--ink-2); max-width: 78ch; margin: 14px 0 0; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 90; transform: translate(-50%, 8px);
  padding: 9px 18px; background: var(--ink); color: var(--card); border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.3);
  font: 600 14px/1.3 var(--font-display); letter-spacing: .02em; text-align: center; max-width: calc(100vw - 32px);
  pointer-events: none; opacity: 0; transition: opacity .2s, transform .2s;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .btn, .toast { transition: none; }
  .brand:hover svg path { animation: none; }
}
