/* Kevbot: a little TV in a corner that shows a fact card (kb-) */
.kb { position: fixed; z-index: 90; display: flex; flex-direction: column; align-items: flex-end; pointer-events: none; transform: translateY(140%); transition: transform .5s cubic-bezier(.34, 1.4, .64, 1), opacity .3s; font-family: "Inter", "Helvetica Neue", Arial, sans-serif; }
.kb.kb-in { transform: none; }
.kb.kb-away { opacity: 0; transform: translateY(140%); }
.kb > * { pointer-events: auto; }

/* corners only: bottom-right (default), bottom-left, top-right, top-left; top corners clear the sticky nav */
.kb, .kb.kb-c-br { right: clamp(10px, 1.6vw, 22px); bottom: clamp(10px, 1.6vw, 20px); left: auto; top: auto; }
.kb.kb-c-bl { left: clamp(10px, 1.6vw, 22px); bottom: clamp(10px, 1.6vw, 20px); right: auto; top: auto; }
.kb.kb-c-tr { right: clamp(10px, 1.6vw, 22px); top: 84px; left: auto; bottom: auto; }
.kb.kb-c-tl { left: clamp(10px, 1.6vw, 22px); top: 84px; right: auto; bottom: auto; }
.kb.kb-left { align-items: flex-start; }
.kb.kb-below { flex-direction: column-reverse; }
/* hidden while the home-page photo is on screen */
.kb.kb-hero { opacity: 0; transform: translateY(140%); pointer-events: none; }
.kb.kb-hero > * { pointer-events: none; }
.kb.kb-c-tr.kb-hero, .kb.kb-c-tl.kb-hero { transform: translateY(-160%); }

/* the TV */
.kb-bot { appearance: none; position: relative; z-index: 2; width: 84px; height: 88px; padding: 0; border: 0; background: none; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; filter: drop-shadow(3px 3px 0 rgba(21,23,28,.85)); animation: kb-bob 2.8s ease-in-out infinite; }
.kb-bot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.kb-bot:hover { animation-play-state: paused; transform: translateY(-3px) rotate(-3deg); }
.kb-bot:focus-visible { outline: 3px solid #c98a4b; outline-offset: 4px; border-radius: 14px; }
.kb.kb-dragging { transition: none !important; }
.kb.kb-dragging .kb-bot { cursor: grabbing; animation: none; transform: scale(1.08) rotate(-4deg); filter: drop-shadow(6px 8px 0 rgba(21,23,28,.6)); }
.kb-eyes { transform-box: fill-box; transform-origin: center; animation: kb-blink 4.5s infinite; }
.kb-bulb { animation: kb-glow 1.6s ease-in-out infinite alternate; }
.kb-mini { transition: opacity .2s; }
.kb.kb-open .kb-mini { opacity: 0; }   /* the little card is now the open card above */
.kb-dot { position: absolute; top: 30px; right: 0; width: 13px; height: 13px; border-radius: 50%; background: #f0b44c; border: 2.5px solid #15171c; transform: scale(0); transition: transform .25s; }
.kb.kb-ping:not(.kb-open) .kb-dot { transform: scale(1); animation: kb-ping 1.6s ease-out infinite; }

/* the fact card: minimal white card, clean type */
.kb-bubble { position: relative; z-index: 1; width: min(250px, calc(100vw - 28px)); margin: 0 10px -18px 0; padding: 12px 14px 13px; color: #15171c; background: #fff; border: 1.5px solid #15171c; border-radius: 12px; box-shadow: 0 10px 28px rgba(21,23,28,.14), 3px 3px 0 #15171c; transform-origin: bottom right; font-family: "Inter", "Helvetica Neue", Arial, sans-serif; }
.kb.kb-left .kb-bubble { margin: 0 0 -18px 10px; transform-origin: bottom left; }
.kb.kb-below .kb-bubble { margin: 8px 10px 0 0; transform-origin: top right; }
.kb.kb-below.kb-left .kb-bubble { margin: 8px 0 0 10px; transform-origin: top left; }
.kb-bubble[hidden] { display: none; }
.kb-pop { animation: kb-pop .28s cubic-bezier(.34, 1.4, .64, 1); }
.kb-x { appearance: none; position: absolute; top: 7px; right: 7px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: none; color: #6b6a66; font: 500 17px/1 sans-serif; cursor: pointer; }
.kb-x:hover { background: #f3f1ed; color: #15171c; }
.kb-mast { display: flex; align-items: center; gap: 8px; margin: 0 26px 6px 0; }
.kb-mast b { font: 700 10.5px/1 "Inter", sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #8a5a3b; }
.kb-step { font: 600 10.5px/1 "Inter", sans-serif; color: #8d8a84; white-space: nowrap; }
.kb-step::before { content: '·'; margin-right: 8px; color: #c9c2b6; }
.kb-step[hidden] { display: none; }
.kb-say { margin: 0 0 11px; font: 500 14px/1.48 "Inter", sans-serif; color: #15171c; }
.kb-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.kb-b { appearance: none; display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: 999px; border: 1.5px solid #d9d4cc; background: #fff; color: #15171c; font: 600 12px/1 "Inter", sans-serif; text-decoration: none; cursor: pointer; }
.kb-b:hover { border-color: #15171c; }
.kb-main { background: #15171c; border-color: #15171c; color: #fff; }
.kb-main:hover { background: #8a5a3b; border-color: #8a5a3b; color: #fff; }
.kb-mini rect:first-child { fill: #fff; }
@keyframes kb-bob { 50% { transform: translateY(-4px); } }
@keyframes kb-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes kb-glow { to { fill: #ffe2a8; } }
@keyframes kb-ping { 0% { box-shadow: 0 0 0 0 rgba(240,180,76,.7); } 70% { box-shadow: 0 0 0 10px rgba(240,180,76,0); } }
@keyframes kb-pop { from { opacity: 0; transform: scale(.92) translateY(8px); } }

/* phones: a much smaller TV and a slimmer email */
@media (max-width: 600px) {
  .kb-bot { width: 46px; height: 48px; filter: drop-shadow(2px 2px 0 rgba(21,23,28,.85)); }
  .kb-dot { top: 15px; width: 10px; height: 10px; border-width: 2px; }
  .kb-bubble { width: min(216px, calc(100vw - 24px)); padding: 9px 11px 10px; margin-bottom: -9px; border-radius: 11px; }
  .kb.kb-left .kb-bubble { margin-bottom: -9px; }
  .kb.kb-below .kb-bubble { margin-top: 6px; margin-bottom: 0; }
  .kb-mast { margin-bottom: 4px; }
  .kb-say { font-size: 12.5px; line-height: 1.42; margin-bottom: 8px; }
  .kb-b { min-height: 26px; padding: 0 10px; font-size: 11px; }
  .kb-x { top: 4px; right: 4px; width: 22px; height: 22px; font-size: 15px; }
  .kb.kb-c-tr, .kb.kb-c-tl { top: 70px; }
  .kb.kb-c-br, .kb.kb-c-bl { bottom: 10px; }
}@media (prefers-reduced-motion: reduce) { .kb, .kb-bot, .kb-eyes, .kb-bulb, .kb-dot, .kb-pop { animation: none !important; transition: none !important; } }
@media print { .kb { display: none; } }

/* facts are links to their proof */
.kb-say.kb-link { cursor: pointer; text-decoration: underline; text-decoration-color: rgba(138,90,59,.35); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.kb-say.kb-link:hover, .kb-say.kb-link:focus-visible { text-decoration-color: #8a5a3b; color: #5e3b24; outline: none; }
/* the spot the visitor lands on glows for a moment */
.kb-spot { outline: 3px solid #f0b44c !important; outline-offset: 6px; border-radius: 14px; animation: kb-spot 2.4s ease-out; scroll-margin-top: 90px; }
@keyframes kb-spot { 0% { box-shadow: 0 0 0 0 rgba(240,180,76,.65); } 35% { box-shadow: 0 0 0 14px rgba(240,180,76,0); } 60% { box-shadow: 0 0 0 0 rgba(240,180,76,.45); } 100% { box-shadow: 0 0 0 14px rgba(240,180,76,0); } }
@media (prefers-reduced-motion: reduce) { .kb-spot { animation: none; } }
/* no name label: the header only shows the chapter (or tour step) */
.kb-step::before { content: none !important; }
.kb-step { color: #8a5a3b !important; font: 700 10.5px/1 "Inter", sans-serif !important; letter-spacing: .1em; text-transform: uppercase; }
.kb-mast:has(.kb-step[hidden]) { display: none; }
.kb-say { padding-right: 18px; }

/* blue palette (matches the site's violet-blue) */
.kb-dot { background: #5b9bff !important; }
.kb.kb-ping:not(.kb-open) .kb-dot { animation-name: kb-ping-b; }
@keyframes kb-ping-b { 0% { box-shadow: 0 0 0 0 rgba(91,155,255,.7); } 70% { box-shadow: 0 0 0 10px rgba(91,155,255,0); } }
@keyframes kb-glow { to { fill: #cfe0ff; } }
.kb-bot:focus-visible { outline-color: #5b9bff; }
.kb-step { color: #361eae !important; }
.kb-main:hover { background: #361eae !important; border-color: #361eae !important; }
.kb-say.kb-link { text-decoration-color: rgba(54,30,174,.35); }
.kb-say.kb-link:hover, .kb-say.kb-link:focus-visible { text-decoration-color: #361eae; color: #361eae; }
.kb-spot { outline-color: #5b9bff !important; }
@keyframes kb-spot { 0% { box-shadow: 0 0 0 0 rgba(91,155,255,.6); } 35% { box-shadow: 0 0 0 14px rgba(91,155,255,0); } 60% { box-shadow: 0 0 0 0 rgba(91,155,255,.45); } 100% { box-shadow: 0 0 0 14px rgba(91,155,255,0); } }

/* tucked: flicked to the side, the TV hides mostly off screen and peeks out now and then */
.kb.kb-tucked .kb-bubble { display: none !important; }
.kb .kb-bot { transition: translate .45s cubic-bezier(.34, 1.3, .64, 1), rotate .45s; }
.kb.kb-tucked.kb-c-br .kb-bot, .kb.kb-tucked.kb-c-tr .kb-bot { translate: calc(62% + clamp(10px, 1.6vw, 22px)) 0; rotate: -14deg; animation: kb-peep-r 7s ease-in-out 2s infinite; }
.kb.kb-tucked.kb-c-bl .kb-bot, .kb.kb-tucked.kb-c-tl .kb-bot { translate: calc(-62% - clamp(10px, 1.6vw, 22px)) 0; rotate: 14deg; animation: kb-peep-l 7s ease-in-out 2s infinite; }
.kb.kb-tucked .kb-bot:hover, .kb.kb-tucked .kb-bot:focus-visible { animation-play-state: paused; translate: calc(30% + 10px) 0; }
.kb.kb-tucked.kb-c-bl .kb-bot:hover, .kb.kb-tucked.kb-c-tl .kb-bot:hover, .kb.kb-tucked.kb-c-bl .kb-bot:focus-visible, .kb.kb-tucked.kb-c-tl .kb-bot:focus-visible { translate: calc(-30% - 10px) 0; }
.kb.kb-tucked .kb-dot { display: none; }
@keyframes kb-peep-r { 0%, 70%, 100% { translate: calc(62% + clamp(10px, 1.6vw, 22px)) 0; } 78%, 90% { translate: calc(28% + 8px) 0; } }
@keyframes kb-peep-l { 0%, 70%, 100% { translate: calc(-62% - clamp(10px, 1.6vw, 22px)) 0; } 78%, 90% { translate: calc(-28% - 8px) 0; } }
@media (prefers-reduced-motion: reduce) { .kb.kb-tucked .kb-bot { animation: none !important; } }
/* tucked deeper: only a sliver of the TV shows until it peeps */
.kb.kb-tucked.kb-c-br .kb-bot, .kb.kb-tucked.kb-c-tr .kb-bot { translate: calc(74% + clamp(10px, 1.6vw, 22px)) 0; }
.kb.kb-tucked.kb-c-bl .kb-bot, .kb.kb-tucked.kb-c-tl .kb-bot { translate: calc(-74% - clamp(10px, 1.6vw, 22px)) 0; }
@keyframes kb-peep-r { 0%, 68%, 100% { translate: calc(74% + clamp(10px, 1.6vw, 22px)) 0; } 76%, 90% { translate: calc(30% + 8px) 0; } }
@keyframes kb-peep-l { 0%, 68%, 100% { translate: calc(-74% - clamp(10px, 1.6vw, 22px)) 0; } 76%, 90% { translate: calc(-30% - 8px) 0; } }
