/* TOPPLEDAY shared chrome — tokens, fonts, top bar, CA pill, buttons, cards, toast, footer.
   Used by every page (/, /docs, /proof, /404). Page-specific styles live next to the page. */
@font-face { font-family: 'Bowlby One'; src: url('/assets/fonts/bowlby-one-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'DM Mono'; src: url('/assets/fonts/dm-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'DM Mono'; src: url('/assets/fonts/dm-mono-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --snow: #F7FBFF;
  --ice: #CFE8F5;
  --sky: #BFE0F2;
  --shadow: #8DB4D1;
  --ink: #14202B;
  --cherry: #E3263B;
  --cherry-d: #B01528;
  --muted: #4f6578;
  --f-display: 'Bowlby One', system-ui, sans-serif;
  --f-mono: 'DM Mono', ui-monospace, monospace;
  --f-body: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: 16px;
  --nav-h: 56px;
  --radius: 10px;
  --line: 2px solid var(--ink);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: light;
}
@media (max-width: 767px) { :root { --nav-h: 48px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--sky); color: var(--ink); font-family: var(--f-body); }
body { min-height: 100vh; overflow-x: hidden; line-height: 1.45; }
a { color: inherit; }
button { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
.mono { font-family: var(--f-mono); }
.display { font-family: var(--f-display); font-weight: 400; letter-spacing: .01em; }
.muted { color: var(--muted); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
:focus-visible { outline: 3px solid var(--cherry); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ── buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 12px; border: var(--line); border-radius: 8px; background: var(--snow);
  font-family: var(--f-mono); font-size: 13px; font-weight: 500; text-decoration: none; cursor: pointer;
  box-shadow: inset 0 -3px 0 rgba(20, 32, 43, .14); white-space: nowrap;
}
.btn:hover { background: #fff; }
.btn:active { transform: translateY(1px); box-shadow: inset 0 -1px 0 rgba(20, 32, 43, .14); }
.btn svg { width: 15px; height: 15px; }
.btn-cherry { background: var(--cherry); color: #fff; box-shadow: inset 0 -3px 0 var(--cherry-d); }
.btn-cherry:hover { background: #ec3348; }
.btn-sm { height: 28px; padding: 0 9px; font-size: 12px; }
.btn[aria-disabled="true"], .btn:disabled { opacity: .55; cursor: default; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border: var(--line); border-radius: 8px;
  background: var(--snow); cursor: pointer; text-decoration: none; padding: 0; box-shadow: inset 0 -3px 0 rgba(20, 32, 43, .14);
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { background: #fff; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: var(--line); border-radius: 999px;
  background: var(--snow); font-family: var(--f-mono); font-size: 12px; font-weight: 500; white-space: nowrap;
}
.pill b { font-weight: 500; color: var(--cherry); }

/* ── top bar ─────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h); display: flex; align-items: center; gap: 12px;
  padding: 0 calc(var(--gutter) + var(--safe-r)) 0 calc(var(--gutter) + var(--safe-l));
  background: var(--snow); border-bottom: var(--line);
}
.nav-word { font-family: var(--f-display); font-size: 22px; letter-spacing: .02em; text-decoration: none; line-height: 1; display: flex; align-items: center; gap: 8px; flex: none; }
.nav-word svg { width: 28px; height: 28px; }
.nav-mid { flex: 1; display: flex; justify-content: center; min-width: 0; }
.nav-right { display: flex; align-items: center; gap: 8px; flex: none; }
.nav-link { font-family: var(--f-mono); font-size: 13px; font-weight: 500; text-decoration: none; padding: 6px 8px; border-radius: 6px; }
.nav-link:hover, .nav-link[aria-current="page"] { background: var(--ice); }
.nav-burger { display: none; }

.ca { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 4px 0 12px; border: var(--line); border-radius: 999px; background: #fff; min-width: 0; max-width: 100%; font-family: var(--f-mono); font-size: 12px; }
.ca-addr { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca-note { color: var(--muted); white-space: nowrap; }
.ca .btn { height: 26px; border-radius: 999px; padding: 0 9px; box-shadow: none; }
.ca .ca-copy { width: 26px; padding: 0; }
.ca .ca-copy svg { width: 13px; height: 13px; }
.ca-short { display: none; }

.nav-menu {
  position: fixed; z-index: 49; top: var(--nav-h); left: 0; right: 0; display: none; flex-direction: column;
  padding: 6px var(--gutter) 12px; background: var(--snow); border-bottom: var(--line); box-shadow: 0 10px 24px rgba(20, 32, 43, .18);
}
.nav-menu.open { display: flex; }
.nav-menu > a, .nav-menu .menu-row { font-family: var(--f-mono); font-size: 15px; font-weight: 500; text-decoration: none; min-height: 46px; padding: 6px 2px; border-bottom: 1px solid var(--ice); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nav-menu > :last-child { border-bottom: 0; }
.nav-menu [data-menu-slot]:empty { display: none; }

@media (max-width: 1023px) { .nav-right .nav-link { padding: 6px 5px; } .ca-note-long { display: none; } }
@media (max-width: 767px) {
  .nav { gap: 8px; }
  .nav-word { font-size: 18px; }
  .nav-word svg { width: 22px; height: 22px; }
  .nav-right .nav-link, .nav-right [data-link], .nav-right [data-mute], .nav-right .pill-launch { display: none !important; }
  .nav-burger { display: inline-grid; }
  .nav-mid { justify-content: flex-end; }
  .ca { height: 30px; padding: 0 3px 0 10px; }
  .ca-long, .ca .ca-buy { display: none; }
  .ca-short { display: inline; }
}

/* ── cards ───────────────────────────────────────────── */
.card { background: var(--snow); border: var(--line); border-radius: var(--radius); box-shadow: 0 4px 0 var(--ink); padding: 16px; min-width: 0; }
.card h2, .card h3 { font-family: var(--f-display); font-weight: 400; font-size: 18px; margin: 0 0 10px; letter-spacing: .01em; }

/* ── toast ───────────────────────────────────────────── */
.toast-host { position: fixed; z-index: 80; left: 50%; top: calc(var(--nav-h) + var(--hp-h, 0px) + 66px); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; width: min(92vw, 480px); }
.toast { pointer-events: auto; background: var(--ink); color: var(--snow); font-family: var(--f-mono); font-size: 13px; padding: 9px 14px; border-radius: 8px; box-shadow: 0 3px 0 rgba(20, 32, 43, .3); opacity: 0; transform: translateY(-6px); transition: opacity .18s, transform .18s; text-align: center; }
.toast.show { opacity: 1; transform: none; }
.toast.sticky { background: var(--cherry); border: 2px solid var(--ink); }

/* ── footer ──────────────────────────────────────────── */
.foot { background: var(--ink); color: var(--ice); padding: 36px 0 calc(28px + var(--safe-b)); }
.foot a { color: var(--snow); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.foot-word { font-family: var(--f-display); font-size: 26px; color: var(--snow); text-decoration: none; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--f-mono); font-size: 13px; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
.foot-legal { font-size: 12px; line-height: 1.6; color: #a9bfd0; max-width: 90ch; margin: 22px 0 0; }

@media (prefers-reduced-motion: reduce) { * { transition-duration: 0s !important; animation-duration: 0s !important; } }
