/* Lupito, the Orada Tech Repair mascot (views/partials/lupito.hbs, 2026-10-12).
   One drawing; data-pose picks what shows and how it moves. Blue is Orada's, .k12 is
   the K12 side's teal. Anyone who asks for less motion gets him standing still. */
.lupito { --lp-rim: #1554c0; --lp-dark: #0f3d8f; --lp-glass: #cfe3ff; --lp-ink: #0b1f45;
  display: block; overflow: visible; }
.lupito.k12 { --lp-rim: #0a7264; --lp-dark: #075247; --lp-glass: #cff3ec; }
.lupito .lp-rim-f { fill: var(--lp-rim); }
.lupito .lp-dark-f { fill: var(--lp-dark); }
.lupito .lp-dark-s { stroke: var(--lp-dark); }
.lupito .lp-ink-f { fill: var(--lp-ink); }
.lupito .lp-lens { fill: var(--lp-glass); stroke: var(--lp-rim); stroke-width: 9; }
.lupito .lp-arm { stroke: var(--lp-rim); stroke-width: 5; fill: none; stroke-linecap: round; }
.lupito .lp-wl { stroke: var(--lp-rim); stroke-width: 2; fill: none; stroke-linecap: round; }
.lupito .lp-line { stroke: var(--lp-ink); fill: none; stroke-linecap: round; }
.lupito .lp-dot { fill: var(--lp-rim); opacity: .55; }
.lupito .lp-spark { fill: #f5b301; }

/* What each pose shows. Idle (no pose) is the resting one. */
.lupito .lp-v { display: none; }
.lupito .lp-al-rest, .lupito .lp-ar-rest, .lupito .lp-eyes, .lupito .lp-cheeks, .lupito .lp-m-smile { display: inline; }
.lupito[data-pose="hello"] .lp-ar-rest { display: none; }
.lupito[data-pose="hello"] .lp-ar-wave { display: inline; }
.lupito[data-pose="think"] .lp-ar-rest, .lupito[data-pose="think"] .lp-m-smile, .lupito[data-pose="think"] .lp-cheeks { display: none; }
.lupito[data-pose="think"] .lp-ar-chin, .lupito[data-pose="think"] .lp-br-think, .lupito[data-pose="think"] .lp-m-flat, .lupito[data-pose="think"] .lp-dots { display: inline; }
.lupito[data-pose="found"] .lp-al-rest, .lupito[data-pose="found"] .lp-ar-rest, .lupito[data-pose="found"] .lp-eyes, .lupito[data-pose="found"] .lp-m-smile { display: none; }
.lupito[data-pose="found"] .lp-al-up, .lupito[data-pose="found"] .lp-ar-up, .lupito[data-pose="found"] .lp-happy, .lupito[data-pose="found"] .lp-m-open, .lupito[data-pose="found"] .lp-sparks { display: inline; }
.lupito[data-pose="unsure"] .lp-al-rest, .lupito[data-pose="unsure"] .lp-ar-rest, .lupito[data-pose="unsure"] .lp-m-smile, .lupito[data-pose="unsure"] .lp-cheeks { display: none; }
.lupito[data-pose="unsure"] .lp-al-shrug, .lupito[data-pose="unsure"] .lp-ar-shrug, .lupito[data-pose="unsure"] .lp-br-unsure, .lupito[data-pose="unsure"] .lp-m-wavy, .lupito[data-pose="unsure"] .lp-drop { display: inline; }

/* How he moves. */
.lupito .lp-move { animation: lp-bob 3s ease-in-out infinite; }
.lupito .lp-blink { transform-origin: 0px -2px; animation: lp-blink 4.2s infinite; }
.lupito .lp-ar-wave { transform-origin: 13px 48px; animation: lp-wave 1.1s ease-in-out infinite; }
.lupito[data-pose="think"] .lp-look { animation: lp-look 3.6s ease-in-out infinite; }
.lupito .lp-dot { animation: lp-dot 2.4s infinite; }
.lupito .lp-dot.d2 { animation-delay: .35s; } .lupito .lp-dot.d3 { animation-delay: .7s; }
.lupito[data-pose="found"] .lp-move { animation: lp-hop 1.8s cubic-bezier(.3, .7, .4, 1) infinite; }
.lupito .lp-spark { transform-box: fill-box; transform-origin: 50% 50%; animation: lp-twinkle 1.8s ease-in-out infinite; }
.lupito .lp-spark.s2 { animation-delay: .5s; }
.lupito[data-pose="unsure"] .lp-tilt { transform-origin: 0px 95px; animation: lp-tilt 3.2s ease-in-out infinite; }
.lupito .lp-drop { animation: lp-drop 2.4s ease-in infinite; }
@keyframes lp-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes lp-blink { 0%, 90%, 100% { transform: scaleY(1); } 93% { transform: scaleY(.12); } 96% { transform: scaleY(1); } }
@keyframes lp-wave { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(14deg); } }
@keyframes lp-look { 0%, 100% { transform: translate(0, 0); } 30%, 55% { transform: translate(3px, -3px); } 75% { transform: translate(-3px, -2px); } }
@keyframes lp-dot { 0% { opacity: 0; } 20%, 70% { opacity: .55; } 90%, 100% { opacity: 0; } }
@keyframes lp-hop { 0%, 45%, 100% { transform: translateY(0); } 18% { transform: translateY(-16px); } 30% { transform: translateY(0); } 36% { transform: translateY(-4px); } }
@keyframes lp-twinkle { 0%, 100% { transform: scale(.5) rotate(0deg); opacity: .5; } 40% { transform: scale(1.15) rotate(20deg); opacity: 1; } }
@keyframes lp-tilt { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes lp-drop { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 80% { transform: translateY(12px); opacity: 1; } 100% { transform: translateY(16px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .lupito *, .lupito .lp-move { animation: none !important; }
  .lupito .lp-dot, .lupito .lp-drop { opacity: .55; }
}

/* On the K12 side he wears its teal. */
.k12side .lupito { --lp-rim: #0a7264; --lp-dark: #075247; --lp-glass: #cff3ec; }

/* In the bubble on the right edge, and on its menu. */
.ticket-fab .tf-lp .lupito { width: 26px; height: 33px; margin: 0 auto; }
.ticket-fab .tf-x { display: none; }
.ticket-fab.tf-open .tf-x { display: inline; }
.ticket-fab.tf-open .tf-lp { display: none; }
.fabmenu .fm-i .lupito { width: 16px; height: 20px; }

/* What Loupe means: Lupito in a lens (a circle, like the life of a device), a dictionary
   line, and each paragraph's lead as a small label. */
.lp-card.la-card { width: min(480px, calc(100vw - 24px)); }
.la-top { display: flex; align-items: center; gap: 16px; padding-right: 30px; }
.la-ring { flex: none; width: 88px; height: 88px; border-radius: 50%; border: 3px solid var(--accent);
  display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 9%, transparent); }
.la-ring .lupito { width: 54px; height: 68px; }
.la-top h3 { margin: 0 0 4px; font-size: 19px; line-height: 1.2; text-wrap: balance; }
.la-word { margin: 0; color: var(--muted); font-size: 14px; }
.la-word b { color: var(--ink); font-size: 16px; margin-right: 2px; }
.la-body p { margin: 14px 0 0; font-size: 14.5px; line-height: 1.55; }
.la-body p > b:first-child { display: block; margin-bottom: 2px; font-size: 11.5px; letter-spacing: .07em;
  text-transform: uppercase; color: var(--accent); }
.la-faq { margin: 14px 0 0; font-size: 13px; text-align: right; }
.la-lk { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline dotted; text-underline-offset: 3px; }
.lp-say .lp-why { margin-top: 4px; font-size: 13px; }
.lp-say .lp-why .la-lk { color: var(--accent); }
@media (max-width: 520px) { .la-ring { width: 70px; height: 70px; } .la-ring .lupito { width: 44px; height: 55px; } .lp-card.la-card { padding: 16px 14px 14px; } }

/* Ask Lupito: the pop-up. */
.lp-modal { z-index: 400; }
/* The card is the screen less 24px: the backdrop pads 12px a side, not its usual 20px, or a phone pushes it 16px right. */
.sh-modal.lp-modal { padding: 12px; }
.lp-card { position: relative; width: min(540px, calc(100vw - 24px)); max-height: min(86vh, 760px); overflow: auto;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; padding: 18px 18px 16px;
  box-shadow: 0 24px 70px rgba(4, 10, 22, .35); }
.lp-x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--panel); color: var(--muted); font-size: 15px; cursor: pointer; }
.lp-top { display: flex; align-items: center; gap: 14px; padding-right: 30px; }
.lp-top .lupito { width: 74px; height: 92px; flex: none; }
.lp-say h3 { margin: 0 0 4px; font-size: 18px; }
.lp-say p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.lp-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 14px; }
.lp-form textarea { flex: 1 1 auto; min-width: 0; resize: vertical; min-height: 46px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--ink); font: inherit; font-size: 15px; padding: 10px 12px; }
.lp-form textarea:focus { outline: none; border-color: var(--accent); }
.lp-err { color: #b91c1c; font-size: 13px; min-height: 0; margin-top: 6px; }
.lp-err:empty { display: none; }
.lp-ans { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--chip, rgba(21, 84, 192, .07)); font-size: 14.5px; line-height: 1.55; }
.lp-ans p, .lp-a p { margin: 0 0 6px; }
.lp-ans ol, .lp-ans ul, .lp-a ol, .lp-a ul { margin: 4px 0 6px; padding-left: 20px; }
.lp-thinking { color: var(--muted); font-style: italic; }
.lp-more { font-size: 13px; color: var(--muted); margin: 8px 0 0 !important; }
.lp-mine { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 10px; }
.lp-mine h4 { margin: 0 0 6px; font-size: 13px; color: var(--muted); font-weight: 700; }
.lp-mine ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.lp-q { font-weight: 600; font-size: 13.5px; }
.lp-mine .lp-a { font-size: 13.5px; color: var(--ink); margin-top: 3px; }
.lp-st { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--chip, rgba(100, 116, 139, .12)); color: var(--muted); margin-left: 4px; white-space: nowrap; }
.lp-st.ok { color: #15803d; background: rgba(22, 163, 74, .12); }
.lp-st.wait { color: #b45309; background: rgba(245, 158, 11, .14); }
@media (prefers-color-scheme: dark) { .lp-st.ok { color: #86efac; } .lp-st.wait { color: #fbbf24; } .lp-err { color: #fca5a5; } }
@media (max-width: 520px) { .lp-top .lupito { width: 58px; height: 72px; } .lp-card { padding: 16px 14px 14px; } }

/* At night his rim lightens, so he does not sink into the dark bar. */
@media (prefers-color-scheme: dark) {
  .lupito { --lp-rim: #3b82f6; --lp-dark: #2563eb; }
  .lupito.k12, .k12side .lupito { --lp-rim: #14b8a6; --lp-dark: #0d9488; }
}
