/* Agent Hoot — LaunchPad's pixel-owl guide (landing page + dashboard) */
.hoot-dock { --h-bg: #fff; --h-ink: #0f172a; --h-ink-2: #475569; --h-ink-3: #94a3b8; --h-line: #e3eaf3; --h-soft: #f1f5f9; --h-brand: #0774ff;
             position: fixed; right: 20px; bottom: 0; z-index: 1080; display: flex; flex-direction: column; align-items: flex-end; pointer-events: none;
             font-family: "Plus Jakarta Sans", Inter, system-ui, -apple-system, "Segoe UI", sans-serif; transition: opacity .3s ease, transform .4s ease; }
[data-bs-theme="dark"] .hoot-dock { --h-bg: #1e1e2d; --h-ink: #f5f8fa; --h-ink-2: #b5b5c3; --h-ink-3: #7e8299; --h-line: #2b2b40; --h-soft: #26263a; }
.hoot-dock.is-away { opacity: 0; transform: translateY(40px); }
.hoot-dock.is-away * { pointer-events: none !important; }

.hoot-perch { position: relative; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; line-height: 0;
              transform: translateY(40%); transition: transform .45s cubic-bezier(.3,1.4,.5,1); }
.hoot-perch:hover, .hoot-dock.is-open .hoot-perch { transform: translateY(22%); }
.hoot-perch:focus-visible { outline: 2px solid var(--h-brand); outline-offset: 4px; border-radius: 10px; }
.hoot-perch canvas { display: block; filter: drop-shadow(0 10px 18px rgba(15,23,42,.18)); }
.hoot-perch.is-hop canvas { animation: hoot-hop .55s cubic-bezier(.3,1.6,.5,1); }
@keyframes hoot-hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-16px); } }
.hoot-ping { position: absolute; top: 2px; right: 6px; width: 12px; height: 12px; border-radius: 50%; background: #f97316; border: 2px solid #fff; opacity: 0; transform: scale(.4); transition: all .25s ease; }
.hoot-ping.is-on { opacity: 1; transform: scale(1); animation: hoot-ping 1.6s ease-in-out infinite; }
@keyframes hoot-ping { 50% { box-shadow: 0 0 0 6px rgba(249,115,22,.18); } }

.hoot-hint { pointer-events: none; margin: 0 8px 4px 0; padding: 4px 10px; border-radius: 999px; background: var(--h-ink); color: #fff; font-size: 11px; font-weight: 700;
             opacity: 0; transform: translateY(6px); transition: all .2s ease; white-space: nowrap; }
.hoot-dock:not(.is-open) .hoot-perch:hover ~ .hoot-hint, .hoot-dock:not(.is-open):hover .hoot-hint { opacity: 1; transform: none; }
.hoot-dock .hoot-hint { order: 1; }
.hoot-dock .hoot-perch { order: 2; }

.hoot-card { pointer-events: auto; width: 330px; max-width: calc(100vw - 32px); margin-bottom: 10px; padding: 14px 16px 16px; border-radius: 18px;
             background: var(--h-bg); color: var(--h-ink); border: 1px solid var(--h-line); box-shadow: 0 30px 60px -28px rgba(15,23,42,.5), 0 4px 14px -6px rgba(15,23,42,.12);
             opacity: 0; visibility: hidden; transform: translateY(10px) scale(.98); transform-origin: bottom right; transition: opacity .22s ease, transform .22s ease, visibility 0s .22s; position: relative; }
.hoot-dock.is-open .hoot-card { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.hoot-card::after { content: ""; position: absolute; right: 46px; bottom: -7px; width: 12px; height: 12px; background: var(--h-bg); border: solid var(--h-line); border-width: 0 1px 1px 0; transform: rotate(45deg); }
.hoot-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.hoot-badge { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--h-brand); letter-spacing: .01em; }
.hoot-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.18); }
.hoot-role { font-weight: 600; color: var(--h-ink-3); }
.hoot-role::before { content: "\00b7"; margin: 0 4px 0 1px; }
.hoot-x { width: 26px; height: 26px; border: 0; border-radius: 999px; background: none; color: var(--h-ink-3); font-size: 18px; line-height: 1; cursor: pointer; }
.hoot-x:hover { background: var(--h-soft); color: var(--h-ink); }
.hoot-step { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--h-ink-3); margin-bottom: 3px; }
.hoot-title { font-size: 15px; font-weight: 800; color: var(--h-ink); line-height: 1.3; margin-bottom: 4px; }
.hoot-body { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.6; color: var(--h-ink-2); min-height: 20px; }
.hoot-body::after { content: ""; display: inline-block; width: 7px; height: 12px; margin-left: 2px; vertical-align: -1px; background: var(--h-brand); animation: hoot-caret 1s step-end infinite; }
@keyframes hoot-caret { 50% { opacity: 0; } }
.hoot-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.hoot-btn { display: inline-flex; align-items: center; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--h-line); background: var(--h-bg); color: var(--h-ink);
            font-family: inherit; font-size: 12px; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; transition: all .15s ease; }
.hoot-btn:hover { border-color: var(--h-brand); color: var(--h-brand); text-decoration: none; }
.hoot-btn.is-primary { background: var(--h-brand); border-color: var(--h-brand); color: #fff; box-shadow: 0 8px 18px -10px rgba(7,116,255,.8); }
.hoot-btn.is-primary:hover { background: #0661e0; color: #fff; }

.hoot-check { margin-top: 10px; }
.hoot-check-head { font-size: 11px; font-weight: 800; color: var(--h-ink-2); margin-bottom: 6px; }
.hoot-check-bar { height: 6px; border-radius: 999px; background: var(--h-soft); overflow: hidden; margin-bottom: 8px; }
.hoot-check-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0774ff, #06b6d4); transition: width .6s ease; }
.hoot-check ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.hoot-check li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--h-ink-2); }
.hoot-check li a { color: var(--h-brand); text-decoration: none; }
.hoot-check li a:hover { text-decoration: underline; }
.hoot-check li.is-done span:last-child { color: var(--h-ink-3); text-decoration: line-through; }
.hoot-check li.is-current { color: var(--h-ink); }
.hoot-tick { width: 18px; height: 18px; flex-shrink: 0; border-radius: 6px; border: 1.5px solid var(--h-line); display: grid; place-items: center; font-size: 11px; font-weight: 900; color: #fff; }
.hoot-check li.is-done .hoot-tick { background: #22c55e; border-color: #22c55e; }
.hoot-check li.is-current .hoot-tick { border-color: var(--h-brand); box-shadow: 0 0 0 3px rgba(7,116,255,.15); }

.hoot-spot { position: fixed; z-index: 1079; pointer-events: none; border-radius: 16px; border: 2px solid #0774ff; opacity: 0;
             box-shadow: 0 0 0 4px rgba(7,116,255,.18), 0 0 0 9999px rgba(15,23,42,.18); transition: opacity .25s ease, top .3s ease, left .3s ease, width .3s ease, height .3s ease; }
.hoot-spot.is-on { opacity: 1; animation: hoot-spot 1.8s ease-in-out infinite; }
@keyframes hoot-spot { 50% { box-shadow: 0 0 0 8px rgba(7,116,255,.12), 0 0 0 9999px rgba(15,23,42,.18); } }

@media (max-width: 575px) {
    .hoot-dock { right: 10px; }
    .hoot-card { width: calc(100vw - 20px); }
    .hoot-card::after { right: 34px; }
}
@media (prefers-reduced-motion: reduce) {
    .hoot-dock *, .hoot-spot { animation: none !important; transition: none !important; }
}
@media print { .hoot-dock, .hoot-spot { display: none !important; } }

/* Halloween: the sprite is 8 rows taller (witch hat), so peek the same amount of owl as usual */
html.halloween .hoot-perch { transform: translateY(29%); }
html.halloween .hoot-perch:hover, html.halloween .hoot-dock.is-open .hoot-perch { transform: translateY(16%); }
html.halloween .hoot-perch canvas { animation: hoot-spooky 2.8s ease-in-out infinite; }
html.halloween .hoot-perch.is-hop canvas { animation: hoot-hop .55s cubic-bezier(.3,1.6,.5,1); }
@keyframes hoot-spooky {
    0%, 100% { filter: drop-shadow(0 8px 14px rgba(88, 28, 135, .45)) drop-shadow(0 0 4px rgba(163, 230, 53, .35)); }
    50%      { filter: drop-shadow(0 8px 14px rgba(88, 28, 135, .45)) drop-shadow(0 0 14px rgba(163, 230, 53, .8)); }
}
@media (prefers-reduced-motion: reduce) { html.halloween .hoot-perch canvas { animation: none; } }

/* ── Agent Hoot chat (hoot-chat.js) ─────────────────────────────────────────────────── */
.hc-panel { --c-bg: #fff; --c-ink: #0f172a; --c-ink-2: #475569; --c-ink-3: #94a3b8; --c-line: #e3eaf3; --c-soft: #f1f5f9; --c-brand: #0774ff; --c-me: #0774ff;
            position: fixed; right: 20px; bottom: 20px; z-index: 1090; width: 400px; max-width: calc(100vw - 32px); height: 600px; max-height: calc(100vh - 40px);
            display: none; flex-direction: column; overflow: hidden; border-radius: 18px; background: var(--c-bg); color: var(--c-ink);
            border: 1px solid var(--c-line); box-shadow: 0 24px 60px -20px rgba(15,23,42,.35); font: 14px/1.5 "Plus Jakarta Sans", Inter, system-ui, sans-serif; }
[data-bs-theme="dark"] .hc-panel { --c-bg: #1e1e2d; --c-ink: #f5f8fa; --c-ink-2: #b5b5c3; --c-ink-3: #7e8299; --c-line: #2b2b40; --c-soft: #26263a; }
html.halloween .hc-panel { --c-brand: #ff7a1a; --c-me: #6d28d9; }
.hc-panel.is-open { display: flex; animation: hc-in .22s ease-out; }
/* The landing page has no Bootstrap reset, so the panel sets its own box model */
.hc-panel, .hc-panel * { box-sizing: border-box; }
.hc-msg.hc-hoot:has(.hc-card) { width: 92%; }
@keyframes hc-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.hc-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--c-line); }
.hc-face { width: 44px; height: auto; image-rendering: pixelated; }
.hc-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.hc-who b { font-size: 15px; }
.hc-sub { font-size: 12px; color: var(--c-ink-3); }
.hc-icon { width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--c-ink-2); font-size: 18px; cursor: pointer; }
.hc-icon:hover { background: var(--c-soft); color: var(--c-ink); }
.hc-list { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.hc-msg { max-width: 92%; }
.hc-msg .hc-text { padding: 9px 12px; border-radius: 14px; white-space: pre-wrap; word-wrap: break-word; }
.hc-hoot { align-self: flex-start; }
.hc-hoot .hc-text { background: var(--c-soft); border-bottom-left-radius: 4px; }
.hc-user { align-self: flex-end; }
.hc-user .hc-text { background: var(--c-me); color: #fff; border-bottom-right-radius: 4px; }
.hc-text code, .hc-card code { font: 12.5px ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace; background: rgba(15,23,42,.07); padding: 1px 5px; border-radius: 5px; }
.hc-user .hc-text code { background: rgba(255,255,255,.2); }
.hc-typing { display: flex; gap: 4px; padding: 12px 14px; background: var(--c-soft); border-radius: 14px; width: fit-content; }
.hc-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--c-ink-3); animation: hc-dot 1s infinite ease-in-out; }
.hc-typing span:nth-child(2) { animation-delay: .15s; } .hc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes hc-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.hc-card { margin-top: 8px; padding: 12px; border: 1px solid var(--c-line); border-radius: 14px; background: var(--c-bg); display: flex; flex-direction: column; gap: 8px; }
.hc-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hc-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.hc-badge.hc-high, .hc-badge.hc-user { background: #dcfce7; color: #166534; }
.hc-badge.hc-medium { background: #e0f2fe; color: #075985; }
.hc-badge.hc-low { background: #fef3c7; color: #92400e; }
.hc-repo { font: 12px ui-monospace, Menlo, Consolas, monospace; color: var(--c-ink-3); word-break: break-all; }
.hc-field { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 8px; margin: 0; font-size: 12.5px; color: var(--c-ink-2); }
.hc-field input { width: 100%; min-width: 0; padding: 6px 9px; border: 1px solid var(--c-line); border-radius: 8px; background: var(--c-bg); color: var(--c-ink); font: inherit; font-size: 13px; }
.hc-field input.hc-mono { font-family: ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace; font-size: 12.5px; }
.hc-field input:focus { outline: 2px solid var(--c-brand); outline-offset: -1px; }
.hc-field input:disabled { opacity: .7; }
.hc-field em { font-style: normal; font-size: 12px; color: var(--c-ink-3); white-space: nowrap; }
.hc-warn { font-size: 12.5px; padding: 7px 9px; border-radius: 8px; background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
[data-bs-theme="dark"] .hc-warn { background: #2d2412; color: #fcd34d; border-color: #5c4813; }
.hc-why { font-size: 12.5px; color: var(--c-ink-2); }
.hc-why summary { cursor: pointer; color: var(--c-ink-3); }
.hc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hc-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 9px; border: 1px solid var(--c-line); background: var(--c-bg); color: var(--c-ink);
          font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1.2; cursor: pointer; text-decoration: none; margin-top: 4px; }
.hc-btn:hover { border-color: var(--c-brand); color: var(--c-ink); }
.hc-btn.hc-primary { background: var(--c-brand); border-color: var(--c-brand); color: #fff; }
.hc-btn.hc-primary:hover { filter: brightness(1.08); color: #fff; }
.hc-btn:disabled { opacity: .6; cursor: default; }
.hc-choices { gap: 6px; }
.hc-choice { justify-content: space-between; width: 100%; margin-top: 0; text-align: left; }
.hc-choice .hc-hint { font-weight: 400; font-size: 12px; color: var(--c-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.hc-ask-ai { padding-bottom: 8px; border-bottom: 1px solid var(--c-line); }
.hc-err { font-size: 12.5px; color: #dc2626; }
.hc-err:empty { display: none; }
.hc-key { margin: 0; padding: 9px; max-height: 96px; overflow: auto; border-radius: 8px; background: var(--c-soft); font: 11.5px ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-all; }
.hc-status { font-weight: 600; }
.hc-status.hc-bad { color: #dc2626; font-weight: 500; }
.hc-link { color: var(--c-brand); font-size: 13px; }
.hc-form { display: flex; gap: 8px; padding: 10px 12px 4px; border-top: 1px solid var(--c-line); }
.hc-input { flex: 1; resize: none; min-height: 40px; max-height: 120px; padding: 9px 11px; border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-bg); color: var(--c-ink); font: inherit; }
.hc-input:focus { outline: 2px solid var(--c-brand); outline-offset: -1px; }
.hc-send { padding: 0 14px; border: 0; border-radius: 12px; background: var(--c-brand); color: #fff; font-weight: 700; cursor: pointer; }
.hc-send:disabled { opacity: .5; cursor: default; }
.hc-foot { padding: 2px 14px 10px; font-size: 11.5px; color: var(--c-ink-3); }
.hc-launch { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 520px) { .hc-panel { right: 8px; left: 8px; bottom: 8px; width: auto; max-width: none; height: calc(100vh - 16px); } }
@media (prefers-reduced-motion: reduce) { .hc-panel.is-open { animation: none; } .hc-typing span { animation: none; } }
/* "Paste your repo" button in the landing page's speech bubble */
.hoot-chat-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 7px 13px; border-radius: 999px; border: 0; cursor: pointer;
                 background: #0774ff; color: #fff; font: 600 13px/1.2 "Plus Jakarta Sans", Inter, system-ui, sans-serif; box-shadow: 0 8px 20px -10px rgba(7,116,255,.8); }
.hoot-chat-btn:hover { filter: brightness(1.08); }
html.halloween .hoot-chat-btn { background: #ff7a1a; color: #1a0b2e; }
/* While the chat is open, the docked Hoot steps aside (he's in the chat header) and nothing sits on top of the chat */
html.hc-chat-open .hoot-dock { opacity: 0; transform: translateY(40px); pointer-events: none; }
html.hc-chat-open .hoot-dock * { pointer-events: none !important; }
html.hc-chat-open .hw-pill { display: none; }
.hc-badge.hc-bad { background: #fee2e2; color: #991b1b; }
.hc-diagnose { align-self: flex-start; }
.hc-note { font-size: 12px; color: var(--c-ink-3); }
/* Halloween cobwebs and spider stay off the chat while it's open */
html.hc-chat-open .hw-layer { display: none; }
