/* "Ask AI about my work": the site's AI guide, styled like the journal's paper notes.
   Cream paper panel, cobalt header, ink text, the vermilion dot from the name, Fraunces for titles and Inter for words. */
.nka { --ink: #171717; --ink-soft: #3a3a3a; --paper: #FBF6EA; --cream: #F5ECD9; --cobalt: #214EAD; --cobalt-deep: #183B85; --vermilion: #F04B2F; --vermilion-deep: #B02E18;
  --line: rgba(23, 23, 23, .14); --ease: cubic-bezier(.22, .61, .36, 1);
  --display: "Fraunces", Georgia, "Times New Roman", serif; --text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 70; font-family: var(--text); color: var(--ink);
  -webkit-font-smoothing: antialiased; transition: bottom .45s var(--ease); }
/* While the Listen player is open, sit just above it (listen.js sets --listen-h to its real height) */
@media (max-width: 900px) { body.nk-listening .nka:not(.on) { bottom: calc(var(--listen-h, 180px) + max(12px, env(safe-area-inset-bottom)) + 12px); } }

/* The red dot from the name */
.nka-lamp { position: relative; flex: none; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--vermilion); }
.nka-lamp::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--vermilion); opacity: 0; }
.nka.first .nka-open .nka-lamp::after { animation: nkaRing 1.6s ease-out .8s 2; }
@property --nka-a { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes nkaSpin { to { --nka-a: 360deg; } }
@keyframes nkaTwinkle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(.86) rotate(12deg); } }
@keyframes nkaRing { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.8); } }

/* Launcher: a round button with a slowly turning ring in the site's colors (like the glowing
   AI ring in social apps) and a sparkle. It opens to show its label on a first visit and, on
   desktop, on hover or keyboard focus. */
.nka-open { position: relative; display: inline-flex; align-items: center; width: 56px; height: 56px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer;
  font: 700 15px/1 var(--text); transition: width .45s var(--ease), transform .35s var(--ease), opacity .3s; }
.nka-open::before { content: ""; position: absolute; inset: 0; border-radius: 999px; padding: 3px;
  background: conic-gradient(from var(--nka-a, 0deg), #F04B2F, #EDB72D, #67B7E5, #214EAD, #EE8FB1, #F04B2F);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: nkaSpin 6s linear infinite; }
.nka-open::after { content: ""; position: absolute; inset: 3px; border-radius: 999px; background: var(--paper); box-shadow: 0 12px 24px -12px rgba(12, 22, 44, .55); z-index: -1; }
.nka-lamp { display: none; }
.nka-orb { position: relative; z-index: 1; flex: none; display: grid; place-items: center; width: 56px; height: 56px; color: var(--vermilion); }
.nka-orb svg { width: 26px; height: 26px; animation: nkaTwinkle 3.2s ease-in-out infinite; }
.nka-open-t { position: relative; z-index: 1; overflow: hidden; white-space: nowrap; max-width: 0; opacity: 0; transition: max-width .45s var(--ease), opacity .3s, margin .45s; }
/* The short label, "Ask AI". Desktop: always shown, with the ring turning around the pill, and it
   stays put while scrolling. Phones: a round button that peeks "Ask AI" on a first visit and tucks
   away while scrolling down. */
.nka-t-full { display: none; }
.nka.peek .nka-open { width: 126px; }
.nka.peek .nka-open-t { max-width: 80px; opacity: 1; margin-left: -6px; }
@media (min-width: 561px) {
  .nka-open, .nka.peek .nka-open { width: 132px; }
  .nka-open-t { max-width: 80px; opacity: 1; margin-left: -6px; }
  .nka-open:hover { transform: translateY(-2px); }
}
.nka.on .nka-open { opacity: 0; pointer-events: none; transform: translateY(6px); }
@media (max-width: 560px) { .nka.tuck:not(.on) .nka-open { transform: translateY(calc(100% + 30px)); opacity: 0; } }

/* Panel */
.nka-scrim { position: fixed; inset: 0; background: rgba(23, 23, 23, .35); opacity: 0; transition: opacity .3s var(--ease); }
.nka-scrim[hidden] { display: none; }
@media (min-width: 561px) { .nka-scrim { display: none; } }
.nka.on .nka-scrim { opacity: 1; }
.nka-panel { position: absolute; right: 0; bottom: 0; width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100dvh - 40px)); display: flex; flex-direction: column; overflow: hidden; border-radius: 18px;
  background: var(--paper); border: 1.5px solid var(--ink); box-shadow: 0 2px 3px rgba(23, 23, 23, .12), 0 30px 60px -24px rgba(12, 22, 44, .55);
  transform-origin: 90% 100%; opacity: 0; transform: translateY(12px); transition: opacity .3s var(--ease), transform .35s var(--ease); }
.nka-panel[hidden] { display: none; }
.nka.on .nka-panel { opacity: 1; transform: none; }

.nka-head { flex: none; display: flex; align-items: center; gap: 12px; padding: 14px 12px 12px 16px; border-bottom: 1px solid var(--line); }
.nka-badge { flex: none; position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--vermilion); }
.nka-badge::before { content: ""; position: absolute; inset: 0; border-radius: 50%; padding: 2px; background: conic-gradient(from var(--nka-a, 0deg), #F04B2F, #EDB72D, #67B7E5, #214EAD, #EE8FB1, #F04B2F); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: nkaSpin 6s linear infinite; }
.nka-badge svg { width: 17px; height: 17px; }
.nka-id { min-width: 0; }
.nka-t { margin: 0; font: 800 17px/1.2 var(--display); color: var(--ink); }
.nka-s { margin: 2px 0 0; font: 400 12.5px/1.3 var(--text); color: #5a5a5a; }
.nka-x { margin-left: auto; flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 0; cursor: pointer; color: var(--ink-soft); background: transparent; transition: background .2s; }
.nka-x svg { width: 16px; height: 16px; }
.nka-x:hover { background: var(--cream); }

/* Conversation */
.nka-log { flex: 1; overflow-y: auto; padding: 18px 16px 12px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(23, 23, 23, .2) transparent; }
.nka-welcome { padding: 2px; }
.nka-welcome.gone { display: none; }
.nka-hello { margin: 0; font: 800 21px/1.2 var(--display); color: var(--ink); }
.nka-hello span { display: block; }
.nka-lead { margin: 6px 0 0; font: 400 14.5px/1.45 var(--text); color: var(--ink-soft); }
.nka-sugg { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.nka-sugg li { display: contents; }
.nka-row { display: inline-flex; align-items: center; min-height: 38px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); text-align: left; cursor: pointer;
  font: 600 14px/1.25 var(--text); transition: background .2s, border-color .2s, transform .2s var(--ease); }
.nka-row:hover { border-color: var(--ink); transform: translateY(-1px); }

.nka-g { display: flex; flex-direction: column; gap: 6px; max-width: 88%; }
.nka-g-bot { align-self: flex-start; }
.nka-g-me { align-self: flex-end; align-items: flex-end; }
.nka-m { margin: 0; padding: 10px 14px; font: 400 15px/1.5 var(--text); white-space: pre-wrap; overflow-wrap: anywhere; animation: nkaIn .3s var(--ease); }
@keyframes nkaIn { from { opacity: 0; transform: translateY(6px); } }
.nka-g-me .nka-m { background: var(--ink); color: var(--paper); border-radius: 14px 14px 4px 14px; }
.nka-g-bot .nka-m { background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; box-shadow: 0 8px 18px -14px rgba(12, 22, 44, .5); }
.nka-m a { color: var(--cobalt); text-decoration: underline; text-underline-offset: 3px; }
.nka-g-me .nka-m a { color: #BFD3FF; }
.nka-typing { display: inline-flex; align-items: center; gap: 8px; padding: 15px 18px; }
.nka-typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--vermilion); animation: nkaStep 1.2s ease-in-out infinite; }
.nka-typing i:nth-child(2) { animation-delay: .2s; } .nka-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes nkaStep { 0%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.nka-replies { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; padding: 0 18px 12px; }
.nka-replies[hidden] { display: none; }
.nka-chip { min-height: 36px; padding: 7px 13px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); font: 600 14px/1.2 var(--text); cursor: pointer; animation: nkaIn .3s var(--ease); transition: background .2s; }
.nka-chip:hover { background: var(--cream); }

/* Composer */
.nka-form { display: flex; align-items: center; gap: 4px; margin: 0 12px; padding: 4px 4px 4px 16px; border-radius: 999px; background: #fff; border: 1px solid rgba(23, 23, 23, .25); transition: border-color .2s, box-shadow .2s; }
.nka-form:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(240, 75, 47, .18); }
.nka .nka-in, .nka .nka-in:focus, .nka .nka-in:focus-visible { outline: none !important; box-shadow: none !important; border: 0 !important; }
.nka-in { flex: 1; min-width: 0; height: 40px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 400 16px/1 var(--text); -webkit-appearance: none; appearance: none; }
.nka-in::placeholder { color: #6b6b6b; }
.nka-mic, .nka-send { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; transition: background .2s, color .2s, transform .2s var(--ease); }
.nka-mic { background: transparent; color: var(--ink); }
.nka-mic:hover, .nka.listening .nka-mic { background: var(--cream); }
.nka.listening .nka-mic { box-shadow: 0 0 0 2px var(--vermilion); }
.nka-send { background: var(--cream); color: rgba(23, 23, 23, .35); }
.nka-send:not(:disabled) { background: var(--vermilion); color: var(--ink); }
.nka-send:not(:disabled):hover { transform: translateY(-1px); }
.nka-send:disabled { cursor: default; }
.nka-mic svg, .nka-send svg { width: 18px; height: 18px; }
.nka-foot { margin: 0; padding: 8px 16px 12px; font: 400 12px/1.4 var(--text); color: #6b6b6b; text-align: center; }
.nka-foot a, .nka-voice { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; }
.nka-voice { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.nka button:focus-visible, .nka a:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.nka-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Phones: a bottom sheet, and a compact launcher */
@media (max-width: 560px) {
  .nka { right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); }
  .nka-open { width: 54px; height: 54px; font-size: 14px; } .nka-orb { width: 54px; height: 54px; }
  .nka.peek .nka-open { width: 122px; }
  .nka.peek .nka-open-t { max-width: 80px; }
  .nka-panel { position: fixed; left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); width: auto; height: min(78dvh, 560px); transform-origin: 50% 100%; transform: translateY(30px); }
}
@media (prefers-reduced-motion: reduce) {
  .nka-lamp::after, .nka-m, .nka-chip, .nka-typing i, .nka-open::before, .nka-orb svg, .nka-badge::before { animation: none !important; }
  .nka-panel, .nka-open, .nka-scrim { transition: none; }
}
@media print { .nka { display: none; } }

/* =====================================================================
   Journal touches: the window reads like a page from the site, not a standard chat app.
   A cobalt torn-paper header, a greeting on a cream strip, starter questions as taped
   paper notes, cobalt paper slips for the visitor, notebook notes for answers, and a
   ruled line with a stamp-style send button.
   ===================================================================== */
.nka-head { position: relative; padding: 16px 12px 22px 16px; border-bottom: 0; color: var(--paper);
  background: var(--cobalt) url('/assets/img/paper-cobalt.webp') 0 0 / 512px;
  clip-path: polygon(0 0, 100% 0, 100% 86%, 96% 92%, 89% 86%, 81% 93%, 72% 87%, 63% 94%, 54% 88%, 45% 95%, 36% 88%, 27% 94%, 18% 87%, 9% 93%, 0 87%); }
.nka-head .nka-t { color: var(--paper); }
.nka-head .nka-s { color: rgba(251, 246, 234, .82); }
.nka-badge { background: var(--paper); }
.nka-x { color: var(--paper); }
.nka-x:hover { background: rgba(251, 246, 234, .16); }
.nka-panel { background: var(--paper) url('/assets/img/paper-light.webp') 0 0 / 512px; border-radius: 6px; }

.nka-lead { margin-top: 10px; }

/* starter questions: taped paper notes in a 2 x 2 grid */
.nka-sugg { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; margin-top: 18px; }
.nka-row { position: relative; display: flex; align-items: flex-end; min-height: 74px; padding: 18px 12px 10px; border: 0; border-radius: 2px; text-align: left;
  background: #FFFDF7; color: var(--ink); font: 700 14px/1.3 var(--text); box-shadow: 0 1px 2px rgba(23, 23, 23, .14), 0 10px 18px -12px rgba(12, 22, 44, .45);
  transform: rotate(var(--tilt, -1.2deg)); transition: transform .3s var(--ease), box-shadow .3s; }
.nka-row::before { content: ""; position: absolute; top: -7px; left: 50%; width: 46px; height: 16px; margin-left: -23px; background: var(--tape, rgba(237, 183, 45, .8)); transform: rotate(-4deg); }
.nka-row::after { content: "\2192"; position: absolute; right: 10px; top: 8px; font-weight: 700; color: var(--vermilion); opacity: .7; transition: transform .3s var(--ease); }
.nka-sugg li:nth-child(1) .nka-row { --tilt: -1.6deg; --tape: rgba(237, 183, 45, .85); }
.nka-sugg li:nth-child(2) .nka-row { --tilt: 1.2deg; --tape: rgba(238, 143, 177, .85); }
.nka-sugg li:nth-child(3) .nka-row { --tilt: 1deg; --tape: rgba(103, 183, 229, .85); }
.nka-sugg li:nth-child(4) .nka-row { --tilt: -1.3deg; --tape: rgba(240, 75, 47, .75); }
.nka-row:hover, .nka-row:focus-visible { transform: rotate(0) translateY(-2px); box-shadow: 0 2px 3px rgba(23, 23, 23, .16), 0 16px 24px -14px rgba(12, 22, 44, .55); border: 0; }
.nka-row:hover::after { transform: translateX(3px); opacity: 1; }

/* messages: cobalt paper slips for the visitor, notebook notes for answers */
.nka-g-me .nka-m { background: var(--cobalt) url('/assets/img/paper-cobalt.webp') 0 0 / 512px; color: var(--paper); border-radius: 3px; transform: rotate(.6deg); }
.nka-g-bot .nka-m { position: relative; padding-left: 20px; background: #FFFDF7; border: 0; border-radius: 3px; box-shadow: 0 1px 2px rgba(23, 23, 23, .12), 0 10px 18px -14px rgba(12, 22, 44, .45); }
.nka-g-bot .nka-m::before { content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px; background: rgba(240, 75, 47, .55); }
.nka-chip { border: 0; border-radius: 2px; background: #FFFDF7; box-shadow: 0 1px 2px rgba(23, 23, 23, .14); transform: rotate(-.6deg); }
.nka-chip:nth-child(even) { transform: rotate(.6deg); }
.nka-chip:hover { background: #fff; transform: none; }

/* composer: a ruled notebook line and a stamp-style send button */
.nka-form { margin: 4px 16px 0; padding: 0 0 2px; border: 0; border-bottom: 2px solid var(--ink); border-radius: 0; background: transparent; }
.nka-form:focus-within { box-shadow: none; border-bottom-color: var(--vermilion); }
.nka-in { height: 42px; font: 400 16px/1 var(--text); }
.nka-in::placeholder { color: #7a7a7a; font-style: italic; }
.nka-send { width: 40px; height: 40px; border-radius: 50%; background: transparent; color: rgba(23, 23, 23, .3); border: 2px dashed rgba(23, 23, 23, .25); }
.nka-send:not(:disabled) { background: var(--vermilion); color: var(--paper); border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink); transform: rotate(-6deg); }
.nka-send:not(:disabled):hover { transform: rotate(0) translateY(-1px); }
.nka-foot { padding-top: 10px; }
@media (prefers-reduced-motion: reduce) { .nka-row, .nka-send { transition: none; } }

/* =====================================================================
   Two notebooks and the paper touches
   ===================================================================== */
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 500 700; font-display: swap; src: url('/assets/fonts/caveat-latin.woff2') format('woff2'); }
.nka { --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive; --mustard: #EDB72D; }

/* Paper tabs, like the dividers in a notebook */
.nka-tabs { flex: none; display: flex; gap: 6px; padding: 2px 16px 0; margin-top: -4px; border-bottom: 1.5px solid var(--ink); }
.nka-tab { position: relative; padding: 8px 14px 7px; border: 1.5px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; margin-bottom: -1.5px; background: transparent;
  color: #5a5a5a; font: 700 14px/1.2 var(--text); cursor: pointer; transition: color .2s, background .2s, transform .25s var(--ease); }
.nka-tab:hover { color: var(--ink); transform: translateY(-1px); }
.nka-tab[aria-selected="true"] { color: var(--ink); background: #FFFDF7; border-color: var(--ink); transform: none; }
.nka-tab::before { content: ""; position: absolute; left: 12px; right: 12px; top: -1.5px; height: 4px; border-radius: 0 0 3px 3px; background: var(--tab, var(--cobalt)); opacity: 0; transition: opacity .2s; }
.nka-tab[data-mode="learn"] { --tab: var(--mustard); }
.nka-tab[data-mode="agents"] { --tab: var(--vermilion, #E5452B); }
.nka-tab[aria-selected="true"]::before { opacity: 1; }
.nka-tab:disabled, .nka.busy .nka-tab[aria-selected="false"] { opacity: .5; cursor: default; }
.nka-log[hidden] { display: none; }
.nka-log { background: linear-gradient(#FFFDF7, rgba(255, 253, 247, 0) 90px); }

/* The greeting, underlined by a red pen that draws itself */
.nka-hello { position: relative; display: inline-block; margin: 2px 0 0; font: 900 23px/1.2 var(--display); color: var(--ink); }
.nka-hello-t { display: inline; }
.nka-pen { position: absolute; left: -4px; right: -8px; bottom: -9px; width: calc(100% + 12px); height: 12px; overflow: visible; }
.nka-pen path { fill: none; stroke: var(--vermilion); stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; vector-effect: non-scaling-stroke; }
.nka-welcome.play .nka-pen path { animation: nkaPen .8s cubic-bezier(.6, .05, .3, 1) .3s both; }
@keyframes nkaPen { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.nka-lead { margin: 16px 0 0; }

/* Handwritten aside, in the margin above the notes */
.nka-hand { display: flex; align-items: flex-end; justify-content: flex-end; gap: 2px; margin: 4px 6px -6px 0; font: 600 21px/1 var(--hand); color: var(--cobalt); transform: rotate(-3deg); }
.nka[data-mode="learn"] .nka-hand { color: var(--vermilion-deep); }
.nka-curl { width: 30px; height: 24px; margin-bottom: -10px; }
.nka-welcome.play .nka-hand { animation: nkaWrite .7s var(--ease) .35s both; }
@keyframes nkaWrite { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }

/* The starter notes drop in one by one, like notes being pinned */
.nka-welcome.play .nka-row { animation: nkaDrop .6s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(.45s + var(--i, 0) * .09s); }
@keyframes nkaDrop { from { opacity: 0; transform: translateY(-22px) rotate(calc(var(--tilt, 0deg) - 7deg)); } 60% { opacity: 1; } to { opacity: 1; transform: rotate(var(--tilt, 0deg)); } }
.nka[data-mode="learn"] .nka-sugg li:nth-child(1) .nka-row { --tape: rgba(103, 183, 229, .85); }
.nka[data-mode="learn"] .nka-sugg li:nth-child(2) .nka-row { --tape: rgba(237, 183, 45, .85); }
.nka[data-mode="learn"] .nka-sugg li:nth-child(3) .nka-row { --tape: rgba(240, 75, 47, .75); }
.nka[data-mode="learn"] .nka-sugg li:nth-child(4) .nka-row { --tape: rgba(238, 143, 177, .85); }
.nka[data-mode="agents"] .nka-hand { color: var(--cobalt); }
.nka[data-mode="agents"] .nka-sugg li:nth-child(1) .nka-row { --tape: rgba(240, 75, 47, .75); }
.nka[data-mode="agents"] .nka-sugg li:nth-child(2) .nka-row { --tape: rgba(103, 183, 229, .85); }
.nka[data-mode="agents"] .nka-sugg li:nth-child(3) .nka-row { --tape: rgba(238, 143, 177, .85); }
.nka[data-mode="agents"] .nka-sugg li:nth-child(4) .nka-row { --tape: rgba(237, 183, 45, .85); }

/* An invitation to talk instead of type */
.nka-talk-cta { display: flex; align-items: center; gap: 8px; margin: 20px auto 2px; padding: 6px 4px; border: 0; background: none; color: var(--ink-soft); cursor: pointer; font: 600 20px/1.1 var(--hand); }
.nka-talk-cta svg { flex: none; width: 18px; height: 18px; color: var(--vermilion); }
.nka-talk-cta span { background: linear-gradient(var(--vermilion), var(--vermilion)) 0 100% / 0 2px no-repeat; transition: background-size .35s var(--ease); }
.nka-talk-cta:hover span { background-size: 100% 2px; }
.nka-welcome.play .nka-talk-cta { animation: nkaIn .5s var(--ease) .9s both; }

/* Answers soak in like ink on paper, word by word */
.nka-ink .nka-w { animation: nkaInk .55s ease-out both; }
@keyframes nkaInk { from { opacity: 0; filter: blur(2.5px); color: #214EAD; } 60% { opacity: 1; } to { opacity: 1; filter: none; } }
.nka-g-bot .nka-m.nka-ink { animation: nkaPaper .35s var(--ease); }
@keyframes nkaPaper { from { opacity: 0; transform: translateY(4px) rotate(-.6deg); } }

/* Talk: a hands-free voice conversation */
.nka-talkbtn { margin-left: auto; flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid rgba(251, 246, 234, .55); cursor: pointer; color: var(--paper); background: transparent; transition: background .2s, border-color .2s; }
.nka-talkbtn svg { width: 17px; height: 17px; }
.nka-talkbtn:hover { background: rgba(251, 246, 234, .16); border-color: var(--paper); }
.nka-talkbtn + .nka-x { margin-left: 2px; }
.nka.talking .nka-talkbtn { background: var(--paper); color: var(--cobalt); border-color: var(--paper); }
.nka.talking .nka-form, .nka.talking .nka-replies { display: none; }
.nka-welcome.quiet .nka-sugg, .nka-welcome.quiet .nka-hand, .nka-welcome.quiet .nka-talk-cta { display: none; }
.nka-talk { display: flex; align-items: center; gap: 16px; margin: 4px 16px 0; padding: 12px 4px 6px; border-top: 2px solid var(--ink); }
.nka-talk[hidden] { display: none; }
.nka-talk-orb { position: relative; flex: none; width: 74px; height: 74px; border: 0; border-radius: 50%; padding: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.nka-talk-ring { position: absolute; inset: 0; border-radius: 50%; padding: 4px; background: conic-gradient(from var(--nka-a, 0deg), #F04B2F, #EDB72D, #67B7E5, #214EAD, #EE8FB1, #F04B2F);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: nkaSpin 6s linear infinite; }
.nka-talk-orb::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #FFFDF7; box-shadow: inset 0 0 0 1px var(--line); }
.nka-talk-orb::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--vermilion); opacity: 0; }
.nka-talk-bars { position: relative; display: flex; align-items: center; gap: 4px; height: 30px; }
.nka-talk-bars i { width: 4px; height: 8px; border-radius: 2px; background: var(--ink); transition: height .3s var(--ease), background .3s; }
.nka[data-talk="listen"] .nka-talk-orb::after { animation: nkaRing 1.8s ease-out infinite; }
.nka[data-talk="listen"] .nka-talk-bars i { background: var(--vermilion); animation: nkaBar 1s ease-in-out infinite; }
.nka[data-talk="speak"] .nka-talk-bars i { background: var(--cobalt); animation: nkaBar .7s ease-in-out infinite; }
.nka-talk-bars i:nth-child(2) { animation-delay: .15s !important; } .nka-talk-bars i:nth-child(3) { animation-delay: .3s !important; }
.nka-talk-bars i:nth-child(4) { animation-delay: .45s !important; } .nka-talk-bars i:nth-child(5) { animation-delay: .6s !important; }
.nka[data-talk="think"] .nka-talk-ring { animation-duration: 1.4s; }
.nka[data-talk="idle"] .nka-talk-ring { animation: none; opacity: .45; }
@keyframes nkaBar { 0%, 100% { height: 7px; } 50% { height: 26px; } }
.nka-talk-side { min-width: 0; flex: 1; }
.nka-talk-state { margin: 0; font: 700 23px/1.1 var(--hand); color: var(--ink); }
.nka-talk-heard { margin: 4px 0 0; min-height: 1.4em; font: 400 13.5px/1.4 var(--text); color: var(--ink-soft); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.nka-talk-end { margin-top: 4px; padding: 2px 0; border: 0; background: none; color: var(--ink-soft); font: 600 13px/1.3 var(--text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

@media (max-width: 560px) {
  .nka-s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nka-tabs { gap: 4px; padding: 2px 10px 0; }
  .nka-tab { padding: 8px 10px 7px; font-size: 13.5px; }
  .nka-hand { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .nka-welcome.play .nka-pen path, .nka-welcome.play .nka-hand, .nka-welcome.play .nka-row, .nka-welcome.play .nka-talk-cta,
  .nka-ink .nka-w, .nka-g-bot .nka-m.nka-ink, .nka-talk-ring, .nka-talk-orb::after, .nka-talk-bars i { animation: none !important; }
  .nka[data-talk="listen"] .nka-talk-bars i, .nka[data-talk="speak"] .nka-talk-bars i { height: 18px; }
}
