/* Tiny AI Team site styles (design E3 "Colour-coded team", picked by Anmol 2026-10-25).
   Loud solid fills in the four mascot colours, big heavy type, few sections with lots of room.
   Text on fills: ink on green / coral / blue / sun / pink, white on purple (all AA). No patterns. */
@font-face { font-family: "Fredoka"; src: url("/fonts/fredoka.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --ink: #111a19;
  --cream: #f6f1e7;
  --paper: #fffdf8;
  --sprout: #3fa86b;
  --pixel: #7b5cf0;
  --buzz: #ef5a4c;
  --otto: #4a7fe0;
  --sun: #f39b4a;
  --pink: #ef6f8f;
  --line: 4px;
  --gut: 16px;
  --max: 1240px;
  --r: 22px;
  --display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --round: "Fredoka", "Inter", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --out: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 500 1.0625rem/1.55 var(--sans); overflow-x: clip; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 900; letter-spacing: -.045em; line-height: .9; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; }
::selection { background: var(--ink); color: var(--cream); }
:focus-visible { outline: 4px solid var(--ink); outline-offset: 3px; }
.on-ink :focus-visible { outline-color: var(--sun); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -80px; z-index: 50; background: var(--ink); color: var(--cream); padding: 12px 16px; font-weight: 800; text-decoration: none; border-radius: 12px; }
.skip:focus { top: 8px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }

/* fills: one class per mascot, sets background + readable text colour */
.f-sprout { --fill: var(--sprout); --on: var(--ink); }
.f-pixel  { --fill: var(--pixel);  --on: #fff; }
.f-buzz   { --fill: var(--buzz);   --on: var(--ink); }
.f-otto   { --fill: var(--otto);   --on: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  --sh: var(--sun);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border: 3px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: var(--cream); font: 800 1rem/1 var(--sans); text-decoration: none; cursor: pointer;
  box-shadow: 5px 5px 0 var(--sh); transition: transform .18s var(--out), box-shadow .18s var(--out);
  touch-action: manipulation;
}
.btn--paper { background: var(--paper); color: var(--ink); --sh: var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--sh); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--sh); }
  .btn:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--sh); }
}

/* ---------- top bar ---------- */
.top { padding: 12px 0; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; font: 700 1.25rem/1 var(--round); letter-spacing: -.01em; }
.logo img { width: 40px; height: 36px; object-fit: contain; }
.top nav { display: flex; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; min-width: 44px; justify-content: center; padding: 0 12px;
  border: 3px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink); text-decoration: none; font: 800 .875rem/1 var(--sans);
  transition: transform .18s var(--out), background-color .18s;
}
.pill svg { width: 20px; height: 20px; flex-shrink: 0; }
.pill .lbl { display: none; }
@media (min-width: 640px) { .pill .lbl { display: inline; } .pill { padding: 0 16px; } }
@media (hover: hover) and (pointer: fine) { .pill:hover { transform: translateY(-2px) rotate(-2deg); background: var(--sun); } }

/* ---------- hero ---------- */
.hero { padding: 6px 0 40px; }
.hero-grid { display: grid; gap: 18px; grid-template-areas: "h" "chat" "sub"; }
.hero h1 { grid-area: h; font-size: clamp(2.35rem, 10.6vw, 5.6rem); line-height: .92; }
.hero h1 .b {
  display: inline-block; padding: .02em .14em .07em; margin: .05em 0; border: var(--line) solid var(--ink); border-radius: .16em;
  background: var(--fill); color: var(--on); box-shadow: 4px 4px 0 var(--ink);
}
.hero h1 .b1 { transform: rotate(-2.5deg); }
.hero h1 .b2 { transform: rotate(2deg); }
.hero h1 .b3 { transform: rotate(-1.5deg); }
.hero .side { grid-area: sub; display: grid; gap: 18px; align-content: start; }
.hero .sub { font-size: 1.1875rem; font-weight: 600; line-height: 1.45; max-width: 34ch; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; }
.textlink { font-weight: 800; text-underline-offset: 4px; text-decoration-thickness: 2px; min-height: 44px; display: inline-flex; align-items: center; }

/* chat window */
.chat {
  grid-area: chat; display: flex; flex-direction: column; min-width: 0;
  background: var(--paper); border: var(--line) solid var(--ink); border-radius: 26px; box-shadow: 8px 8px 0 var(--ink); overflow: hidden;
}
.chat-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--ink); color: var(--cream); }
.faces { display: flex; }
.face {
  width: 40px; height: 40px; padding: 2px; margin-right: -6px; border: 2px solid var(--ink); border-radius: 50%; background: var(--fill); cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.face img { width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 100%; }
.chat-head b { display: block; font: 700 1rem/1.2 var(--round); }
.chat-head span { display: block; font-size: .8125rem; line-height: 1.2; color: #d9d3c7; }
.chat-head .txt { margin-left: 8px; min-width: 0; }

.log {
  display: flex; flex-direction: column; gap: 12px; padding: 14px 12px 10px;
  height: clamp(150px, calc(100svh - 480px), 380px); overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth;
  scrollbar-width: thin; scrollbar-color: var(--ink) transparent;
}
.msg { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 8px; align-items: end; max-width: 94%; }
.msg[hidden] { display: none; }
.msg .av { width: 38px; height: 38px; object-fit: contain; transform-origin: 50% 100%; }
.bubble {
  background: var(--fill, var(--cream)); color: var(--on, var(--ink));
  border: 3px solid var(--ink); border-radius: 18px 18px 18px 5px; padding: 8px 13px 10px;
  font-size: 1rem; line-height: 1.42; font-weight: 600; justify-self: start; max-width: 100%;
}
.bubble .who { display: block; font: 700 .75rem/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 3px; }
.msg.me { align-self: flex-end; grid-template-columns: minmax(0, 1fr); }
.msg.me .bubble { background: var(--ink); color: var(--cream); border-radius: 18px 18px 5px 18px; font-weight: 800; letter-spacing: .03em; }
.msg.typing .bubble { display: flex; gap: 5px; align-items: center; height: 40px; padding: 0 15px; }
.msg.typing i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: dot 1s infinite ease-in-out; }
.msg.typing i:nth-child(2) { animation-delay: .15s; }
.msg.typing i:nth-child(3) { animation-delay: .3s; }
.msg.in { animation: pop .42s var(--spring) both; transform-origin: 0 100%; }
.msg.me.in { transform-origin: 100% 100%; }
.found {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; padding: 10px 12px;
  background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 14px; text-decoration: none; box-shadow: 3px 3px 0 var(--ink);
}
.found b { display: block; font-weight: 800; }
.found small { display: block; font-size: .875rem; font-weight: 500; line-height: 1.35; }
.found .go { font-size: 1.4rem; font-weight: 900; }
.wordlist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.wordlist a { padding: 7px 11px; min-height: 36px; display: inline-flex; align-items: center; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; font: 900 .8125rem/1 var(--sans); letter-spacing: .04em; text-decoration: none; }

.composer { padding: 10px 12px 12px; border-top: 3px solid var(--ink); background: var(--paper); }
.composer label { display: block; font-size: .875rem; font-weight: 800; margin: 0 2px 6px; }
.composer .row { display: flex; gap: 8px; }
.composer input {
  flex: 1; min-width: 0; min-height: 52px; padding: 0 16px; border: 3px solid var(--ink); border-radius: 999px; background: #fff;
  font-size: 1.0625rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.composer input::placeholder { color: #5f6863; font-weight: 600; letter-spacing: 0; text-transform: none; }
.composer input:focus-visible { outline: 4px solid var(--pixel); outline-offset: 2px; }
.send {
  width: 52px; height: 52px; flex-shrink: 0; border: 3px solid var(--ink); border-radius: 50%; background: var(--sun); color: var(--ink);
  font-size: 1.4rem; font-weight: 900; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); touch-action: manipulation;
}
.send:active { transform: translate(3px, 3px); box-shadow: none; }
.quick { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.quick::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .quick { flex-wrap: wrap; overflow: visible; } }
.quick > * {
  flex-shrink: 0; min-height: 40px; padding: 0 14px; display: inline-flex; align-items: center; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--cream); font-size: .875rem; font-weight: 800; text-decoration: none; cursor: pointer; white-space: nowrap; touch-action: manipulation;
}
@media (hover: hover) and (pointer: fine) { .quick > *:hover, .wordlist a:hover { background: var(--sun); } .send:hover { background: var(--pink); } }

@media (min-width: 900px) {
  .hero { padding: 26px 0 64px; }
  .hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); grid-template-areas: "h chat" "sub chat"; gap: 28px 56px; align-items: start; }
  .hero h1 { align-self: end; padding-top: 18px; }
  .log { height: clamp(220px, calc(100vh - 390px), 380px); }
  .quick > * { padding: 0 12px; }
}

/* ---------- stacked ribbons: big keyword ticker on top, smaller one right below, both straight ---------- */
.ribbons { margin: 6px 0; border-block: var(--line) solid var(--ink); }
.rib { display: flex; overflow: hidden; }
.rib--kw { background: var(--ink); color: var(--cream); }
.rib--alt { background: var(--pink); color: var(--ink); border-top: var(--line) solid var(--ink); }
.track { display: flex; width: max-content; animation: slide 34s linear infinite; }
.rib--alt .track { animation-direction: reverse; animation-duration: 30s; }
.set { display: flex; align-items: center; flex-shrink: 0; }
.rib .w { font: 900 clamp(1.7rem, 7vw, 4.25rem)/1 var(--display); letter-spacing: -.04em; padding: 14px 0; white-space: nowrap; }
.rib--alt .w { font-size: clamp(1.05rem, 3.6vw, 1.75rem); letter-spacing: .02em; padding: 10px 0; text-transform: uppercase; }
.rib .dot { width: .34em; height: .34em; border-radius: 50%; margin: 0 .55em; flex-shrink: 0; font-size: clamp(1.9rem, 7.5vw, 4.25rem); background: var(--c); }
.rib--alt .dot { font-size: clamp(1.05rem, 3.6vw, 1.75rem); background: var(--ink); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- section heads ---------- */
.sec { padding: 56px 0 72px; }
.head { display: grid; gap: 14px; margin-bottom: 28px; }
.head h2 { font-size: clamp(2.6rem, 11vw, 6.25rem); }
.head p { font-size: 1.125rem; font-weight: 600; max-width: 46ch; }
@media (min-width: 900px) { .sec { padding: 88px 0 104px; } .head { margin-bottom: 40px; } }

/* ---------- library ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 4px 8px; margin: 0 -4px 6px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 14px 0 8px; border: 3px solid var(--ink); border-radius: 999px;
  background: var(--paper); color: var(--ink); font-weight: 800; font-size: .9375rem; cursor: pointer; touch-action: manipulation;
  transition: transform .18s var(--out), box-shadow .18s var(--out);
}
.chip.all { padding-left: 14px; }
.chip img { width: 30px; height: 28px; object-fit: contain; }
.chip .n { font-size: .8125rem; font-weight: 900; padding: 2px 7px; border-radius: 999px; background: var(--ink); color: var(--cream); }
.chip[aria-pressed="true"] { background: var(--fill, var(--ink)); color: var(--on, var(--cream)); box-shadow: 3px 3px 0 var(--ink); }
.chip.all[aria-pressed="true"] .n { background: var(--sun); color: var(--ink); }
.chip[aria-pressed="true"]:not(.all) .n { background: var(--paper); color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .chip:hover { transform: translateY(-2px); } }
.lib-status { font-size: .9375rem; font-weight: 700; margin-bottom: 18px; }

.keys { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.keys li[hidden] { display: none; }
.key {
  --t: -1.6deg;
  container-type: inline-size; position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 22px;
  height: 100%; min-height: 168px; padding: 14px 14px 16px; border: var(--line) solid var(--ink); border-radius: var(--r);
  background: var(--fill); color: var(--on); text-decoration: none; box-shadow: 5px 5px 0 var(--ink);
  transition: transform .32s var(--spring), box-shadow .32s var(--out);
}
.keys li:nth-child(even) .key { --t: 1.6deg; }
.key b.l6 { font-size: min(3.6rem, 17.5cqi); }
.key b.l7 { font-size: min(3.2rem, 15.5cqi); }
.key img { position: absolute; top: -18px; right: 8px; width: 52px; height: 47px; object-fit: contain; transform-origin: 50% 100%; }
.key b { display: block; font: 900 min(4.2rem, 22cqi)/1 var(--display); letter-spacing: -.04em; padding-top: 22px; overflow-wrap: anywhere; }
.key span { font-size: .9375rem; font-weight: 700; line-height: 1.3; }
.key:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .key:hover { transform: translateY(-6px) rotate(var(--t)); box-shadow: 8px 11px 0 var(--ink); }
}
.empty { border: var(--line) dashed var(--ink); border-radius: var(--r); padding: 20px; font-weight: 600; }
.empty b { display: block; font-size: 1.125rem; }
.lib-foot { margin-top: 28px; font-weight: 600; }
.lib-foot a { font-weight: 800; text-underline-offset: 3px; }
@media (min-width: 640px) { .keys { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1000px) { .keys { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 22px; } .key { min-height: 196px; padding: 18px; } }

/* ---------- team ---------- */
.team { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px 14px; padding-top: 40px; }
.mate {
  position: relative; display: flex; flex-direction: column; padding: 0 14px 18px; border: var(--line) solid var(--ink); border-radius: var(--r);
  background: var(--fill); color: var(--on); box-shadow: 6px 6px 0 var(--ink); cursor: default; -webkit-tap-highlight-color: transparent;
}
.mate .fig { width: 78%; max-width: 200px; margin: -46px auto 6px; }
.mate .fig img { width: 100%; transform-origin: 50% 100%; transition: transform .4s var(--spring); }
.mate .role { align-self: flex-start; padding: 5px 10px; border-radius: 999px; background: var(--ink); color: var(--cream); font: 800 .6875rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.mate h3 { font-size: clamp(2rem, 9vw, 3.4rem); margin: 10px 0 8px; }
.mate p { font-size: .9375rem; font-weight: 600; line-height: 1.4; }
@media (min-width: 900px) {
  .team { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; padding-top: 60px; }
  .mate { padding: 0 20px 24px; }
  .mate .fig { margin-top: -62px; }
}

/* ---------- coming soon ---------- */
.soon { display: grid; gap: 22px; }
.brain {
  position: relative; display: grid; gap: 14px; align-content: start; padding: 24px 22px 26px; border-radius: 26px;
  background: var(--ink); color: var(--cream); box-shadow: 8px 8px 0 var(--sun); overflow: hidden;
}
.brain .tag { justify-self: start; padding: 6px 12px; border-radius: 999px; background: var(--sun); color: var(--ink); font: 800 .75rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.brain h3 { font-size: clamp(2.2rem, 9vw, 3.6rem); max-width: 10ch; }
.brain p { max-width: 38ch; font-weight: 500; color: #ece6da; }
.brain .btn { justify-self: start; background: var(--sun); color: var(--ink); border-color: var(--sun); --sh: var(--cream); margin-top: 6px; }
.brain .peek { position: absolute; right: -6px; bottom: -34px; width: 92px; transform-origin: 50% 100%; }
.brain .btn, .brain p, .brain h3 { position: relative; z-index: 1; }
.kits { list-style: none; display: grid; border: var(--line) solid var(--ink); border-radius: 26px; background: var(--paper); overflow: hidden; }
.kits li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; padding: 16px 18px; border-top: 3px solid var(--ink); }
.kits li:first-child { border-top: 0; }
.kits b { font: 800 1.0625rem/1.3 var(--sans); }
.kits em { font-style: normal; align-self: start; padding: 4px 10px; border-radius: 999px; background: var(--ink); color: var(--cream); font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.kits span { grid-column: 1 / -1; font-size: .9375rem; line-height: 1.45; color: #39433f; }
@media (min-width: 560px) { .brain { padding-right: 150px; } .brain .peek { width: 170px; right: 0; bottom: -46px; } }
@media (min-width: 900px) { .soon { grid-template-columns: 1fr 1fr; gap: 32px; align-items: stretch; } .brain { padding: 36px 190px 40px 34px; } .brain .peek { width: 210px; } }

/* ---------- email + follow band ---------- */
.band-sun { background: var(--sun); border-block: var(--line) solid var(--ink); padding: 56px 0 64px; }
.band-sun .grid { display: grid; gap: 40px; }
.band-sun h2 { font-size: clamp(2.5rem, 10vw, 5rem); margin-bottom: 14px; }
.band-sun .lede { font-size: 1.125rem; font-weight: 600; max-width: 40ch; margin-bottom: 22px; }
.join { background: var(--paper); border: var(--line) solid var(--ink); border-radius: 24px; box-shadow: 8px 8px 0 var(--ink); padding: 18px; max-width: 560px; }
.join label { display: block; font-weight: 800; margin-bottom: 8px; }
.join .row { display: grid; gap: 12px; }
.join input[type=email] { width: 100%; min-height: 54px; padding: 0 16px; border: 3px solid var(--ink); border-radius: 999px; background: #fff; font-size: 1.0625rem; font-weight: 600; }
.join input[type=email]:focus-visible { outline: 4px solid var(--pixel); outline-offset: 2px; }
.join input[aria-invalid="true"] { border-color: #b3261e; }
.join .btn { --sh: var(--sun); }
.join .note { font-size: .875rem; font-weight: 600; margin-top: 10px; color: #39433f; }
.msg-out { font-weight: 800; margin-top: 8px; min-height: 0; }
.msg-out:empty { display: none; }
.msg-out.err { color: #a3221a; }
.join.done .row { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.follow { display: grid; gap: 16px; align-content: start; }
.follow .row { display: flex; flex-wrap: wrap; gap: 14px; }
.follow .heads { display: flex; gap: 6px; margin-top: 8px; }
.follow .heads button { width: 64px; height: 64px; padding: 6px; border: 3px solid var(--ink); border-radius: 50%; background: var(--fill); cursor: pointer; touch-action: manipulation; }
.follow .heads img { width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 100%; }
@media (min-width: 600px) { .join .row { grid-template-columns: minmax(0, 1fr) auto; } }
@media (min-width: 900px) { .band-sun { padding: 88px 0 96px; } .band-sun .grid { grid-template-columns: 1.15fr .85fr; gap: 64px; } }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: var(--cream); padding: 34px 0 40px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 14px; }
.foot nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; text-underline-offset: 4px; }
.foot small { font-size: .875rem; color: #d9d3c7; }

/* ---------- hop (A): hover on a pointer, tap on touch, focus on keyboard ---------- */
.hop .hop-t, .hop-t.hop { animation: hop .62s var(--out); }
@media (hover: hover) and (pointer: fine) {
  [data-hop]:hover .hop-t, .heads button:hover, .face:hover img, .kw .mascot:hover { animation: hop .62s var(--out); }
}
[data-hop]:focus-visible .hop-t, .face:focus-visible img, .heads button:focus-visible { animation: hop .62s var(--out); }

@keyframes hop {
  0% { transform: none; }
  18% { transform: scale(1.12, .84); }
  45% { transform: translateY(-32%) scale(.92, 1.1) rotate(-4deg); }
  72% { transform: translateY(0) scale(1.08, .92); }
  100% { transform: none; }
}
@keyframes pop { 0% { opacity: 0; transform: scale(.82) translateY(8px); } 100% { opacity: 1; transform: none; } }
@keyframes dot { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }

/* ---------- keyword page (trade.html) ---------- */
.kw { background: var(--fill, var(--pixel)); color: var(--on, #fff); border-bottom: var(--line) solid var(--ink); padding: 18px 0 44px; position: relative; overflow: hidden; }
.kw .wrap { position: relative; }
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 800; text-underline-offset: 4px; }
.kw .say { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 10px; align-items: end; max-width: 560px; margin: 14px 0 24px; }
.kw .say img { width: 54px; height: 49px; object-fit: contain; transform-origin: 50% 100%; }
.kw .say .bubble { background: var(--paper); color: var(--ink); }
.kw .big { font: 900 clamp(4.2rem, 24vw, 11rem)/.8 var(--display); letter-spacing: -.06em; display: block; margin-bottom: 14px; }
.kw h1 { font-size: clamp(2.1rem, 8.5vw, 4.25rem); margin-bottom: 16px; }
.kw .lead { font-size: 1.1875rem; font-weight: 600; line-height: 1.45; max-width: 46ch; }
.kw-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 22px; }
.kw-meta span { padding: 6px 12px; border-radius: 999px; border: 2px solid currentColor; font-size: .875rem; font-weight: 800; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; }
.jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 3px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink); text-decoration: none; font-weight: 800; font-size: .9375rem; box-shadow: 3px 3px 0 var(--ink); transition: transform .18s var(--out); }
@media (hover: hover) and (pointer: fine) { .jump a:hover { transform: translateY(-2px) rotate(-1.5deg); background: var(--sun); } }
.kw .mascot { display: none; }
.kw :focus-visible { outline-color: currentColor; }
@media (min-width: 900px) {
  .kw { padding: 26px 0 64px; }
  .kw .mascot { display: block; position: absolute; right: 24px; bottom: -110px; width: 270px; border: 0; padding: 0; background: none; cursor: pointer; }
  .kw .mascot img { width: 100%; transform-origin: 50% 100%; }
  .kw .lead, .kw h1 { max-width: 760px; }
}

.doc { max-width: 780px; margin: 0 auto; padding: 40px var(--gut) 72px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.block { background: var(--paper); border: var(--line) solid var(--ink); border-radius: 24px; padding: 22px 18px; box-shadow: 6px 6px 0 var(--ink); scroll-margin-top: 16px; }
.block > * + * { margin-top: 14px; }
.block h2 { font-size: clamp(2rem, 8vw, 3rem); }
.block h3 { font-size: 1.375rem; letter-spacing: -.03em; line-height: 1.1; margin-top: 24px; }
.block ul:not(.skills), .block ol:not(.steps) { padding-left: 1.2em; }
.block li + li { margin-top: 6px; }
.block code { font: 600 .9em var(--mono); background: #efe9dc; border: 1px solid #d8d0bf; border-radius: 6px; padding: 1px 5px; overflow-wrap: anywhere; }
.linkcard {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border: var(--line) solid var(--ink); border-radius: 18px;
  background: var(--fill, var(--pixel)); color: var(--on, #fff); text-decoration: none; box-shadow: 5px 5px 0 var(--ink); transition: transform .25s var(--spring), box-shadow .25s var(--out);
}
.linkcard b { display: block; font: 900 1.375rem/1.1 var(--display); letter-spacing: -.03em; }
.linkcard small { display: block; font-size: .875rem; font-weight: 600; overflow-wrap: anywhere; }
.linkcard .go { font-size: 1.8rem; font-weight: 900; }
@media (hover: hover) and (pointer: fine) { .linkcard:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: 7px 9px 0 var(--ink); } }
.warn { background: var(--sun); border: 3px solid var(--ink); border-radius: 16px; padding: 12px 14px; font-weight: 600; }
.codebox { border: 3px solid var(--ink); border-radius: 16px; overflow: hidden; background: var(--ink); color: var(--cream); }
.codebox .bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 6px 6px 14px; border-bottom: 2px solid #34403e; font-size: .8125rem; font-weight: 700; color: #d9d3c7; }
.copy { min-height: 40px; min-width: 76px; padding: 0 14px; border: 2px solid var(--cream); border-radius: 999px; background: var(--sun); color: var(--ink); font-weight: 900; font-size: .875rem; cursor: pointer; touch-action: manipulation; }
.copy.ok { background: var(--sprout); }
.codebox pre { margin: 0; padding: 14px; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 500 .875rem/1.6 var(--mono); }
.codebox pre code { background: none; border: 0; padding: 0; color: inherit; overflow-wrap: normal; }
.skills { list-style: none; display: grid; gap: 10px; }
.skills li { margin: 0 !important; padding: 12px 14px; border: 3px solid var(--ink); border-radius: 14px; background: var(--cream); font-size: .9375rem; line-height: 1.4; }
.skills li code { display: inline-block; margin-bottom: 4px; background: var(--fill, var(--pixel)); color: var(--on, #fff); border-color: var(--ink); }
@media (min-width: 640px) { .skills { grid-template-columns: 1fr 1fr; } }
.steps { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; counter-reset: s; }
.steps li { margin: 0 !important; counter-increment: s; padding: 6px 12px 6px 6px; border: 3px solid var(--ink); border-radius: 999px; background: var(--paper); font-weight: 800; display: inline-flex; align-items: center; gap: 8px; }
.steps li::before { content: counter(s); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--fill, var(--pixel)); color: var(--on, #fff); font-size: .8125rem; }
.block .join { box-shadow: none; border-width: 3px; padding: 0; border: 0; background: none; }
.block.f-mail { background: var(--sun); }
.foot-back { margin-top: 0; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .track { transform: none !important; }
  .log { scroll-behavior: auto; }
}

/* keyword page header joins the purple hero */
.top--kw { background: var(--fill, var(--pixel)); color: var(--on, #fff); }
.top--kw :focus-visible { outline-color: currentColor; }
@media (hover: hover) and (pointer: fine) { .kw .mascot:hover { animation: hop .7s var(--out); } }

/* ---------- generated pages (build.mjs): markdown extras, legal + simple pages ---------- */
.f-sun { --fill: var(--sun); --on: var(--ink); }
.block blockquote { margin: 14px 0 0; background: var(--sun); border: 3px solid var(--ink); border-radius: 16px; padding: 12px 14px; font-weight: 600; }
.block blockquote > * + * { margin-top: 8px; }
.block a:not(.linkcard):not(.btn) { text-underline-offset: 3px; text-decoration-thickness: 2px; overflow-wrap: anywhere; }
.block hr { border: 0; border-top: 3px dashed #d8d0bf; margin: 22px 0; }
.block h2 + * { margin-top: 16px; }
.block h4 { margin: 18px 0 0; font: 900 1.125rem/1.2 var(--display); letter-spacing: -.02em; }
.kw--plain { padding-bottom: 40px; }
.kw--plain h1 { margin-top: 14px; }
.kw .ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.kw .ctas .btn { --sh: var(--paper); }
