/* Owl: hero, conversation, findings. Howler tokens only (howler-tokens.css); no inline styles anywhere (CSP). */

.owl-mark { width: 1.25em; height: 1.25em; vertical-align: -0.2em; flex: none; }
.owl-mark-eye { fill: var(--howler-ink); }

/* ---- hero ------------------------------------------------------------------------------------------------------ */
.owl-hero {
    display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--space-8); align-items: center;
    margin-bottom: var(--space-6); padding: var(--space-8); border-radius: var(--radius-5);
    background: var(--howler-gradient-cosmos); color: var(--fg-on-dark-1); box-shadow: var(--shadow-glow-violet);
    position: relative; overflow: hidden;
}
.owl-hero::after {
    content: ""; position: absolute; inset: auto -10% -60% auto; width: 60%; aspect-ratio: 1; border-radius: 50%;
    background: var(--howler-gradient-radial); opacity: .35; pointer-events: none;
}
.owl-hero-text, .owl-stats { position: relative; z-index: 1; }
.owl-eyebrow { margin: 0 0 var(--space-2); display: flex; align-items: center; gap: var(--space-2); color: var(--howler-yellow); font-size: var(--fs-13); font-weight: var(--fw-semibold); letter-spacing: var(--tracking-caps); text-transform: uppercase; }
.owl-title { margin: 0; font-family: var(--font-display); font-size: var(--fs-48); font-weight: var(--fw-extrabold); letter-spacing: var(--tracking-tight); line-height: var(--lh-tight); color: var(--fg-on-dark-1); }
.owl-tagline { margin: var(--space-3) 0 var(--space-4); max-width: 46ch; font-size: var(--fs-18); line-height: var(--lh-relaxed); color: var(--fg-on-dark-2); }
.owl-badge { display: inline-flex; align-items: center; gap: var(--space-2); margin: 0; padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); border: 1px solid var(--border-on-dark); font-size: var(--fs-13); color: var(--fg-on-dark-2); }
.owl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 var(--success); animation: owl-pulse 2.4s var(--ease-out) infinite; }

.owl-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.owl-stat { padding: var(--space-4); border-radius: var(--radius-4); background: rgb(255 255 255 / .08); border: 1px solid var(--border-on-dark); backdrop-filter: blur(6px); }
.owl-stat-figure { margin: 0; font-family: var(--font-display); font-size: var(--fs-40); font-weight: var(--fw-bold); line-height: 1; color: var(--fg-on-dark-1); }
.owl-stat-label { margin: var(--space-1) 0 0; font-size: var(--fs-13); color: var(--fg-on-dark-3); }
.owl-stat-high .owl-stat-figure { color: var(--howler-coral); }
.owl-stat-medium .owl-stat-figure { color: var(--howler-yellow); }
.owl-stat-match .owl-stat-figure { color: var(--success); }

/* The display rules below would otherwise beat the hidden attribute the script toggles. */
.owl [hidden], .owl[hidden] { display: none !important; }

/* ---- conversation ---------------------------------------------------------------------------------------------- */
.owl-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--space-6); margin-bottom: var(--space-6); align-items: start; }
.owl-chat-title { display: flex; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-4); font-size: var(--fs-20); font-weight: var(--fw-bold); }
.owl-chat-title .owl-mark { color: var(--accent); }

.owl-thread { list-style: none; margin: 0 0 var(--space-4); padding: 0; display: grid; gap: var(--space-4); max-height: 520px; overflow-y: auto; scroll-behavior: smooth; }
.owl-msg { display: flex; gap: var(--space-3); align-items: flex-end; animation: owl-rise var(--dur-base) var(--ease-out); }
.owl-msg-user { justify-content: flex-end; }
.owl-avatar { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--howler-gradient-cosmos); color: var(--howler-yellow); box-shadow: var(--shadow-sm); }
.owl-bubble { max-width: 78%; padding: var(--space-3) var(--space-4); border-radius: var(--radius-4); border-bottom-left-radius: var(--radius-1); background: var(--bg-sunken); color: var(--fg-1); line-height: var(--lh-relaxed); }
.owl-bubble p { margin: 0; white-space: pre-wrap; }
.owl-msg-user .owl-bubble { background: var(--accent); color: var(--accent-ink); border-radius: var(--radius-4); border-bottom-right-radius: var(--radius-1); }

.owl-typing { display: inline-flex; gap: 4px; padding: var(--space-1) 0; }
.owl-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--fg-3); animation: owl-bounce 1.2s var(--ease-in-out) infinite; }
.owl-typing span:nth-child(2) { animation-delay: .15s; }
.owl-typing span:nth-child(3) { animation-delay: .3s; }

.owl-sources { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.owl-source { display: inline-flex; align-items: center; gap: var(--space-1); padding: 2px var(--space-3); border-radius: var(--radius-pill); background: var(--bg-surface); border: 1px solid var(--border-default); font-size: var(--fs-12); color: var(--fg-2); text-decoration: none; }
.owl-source:hover { border-color: var(--accent); color: var(--fg-1); }
.owl-source::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--fg-3); }
.owl-source.owl-sev-high::before { background: var(--danger); }
.owl-source.owl-sev-medium::before { background: var(--warning); }
.owl-source.owl-sev-match::before { background: var(--success); }

.owl-wake { display: grid; justify-items: center; gap: var(--space-2); padding: var(--space-4) 0; text-align: center; }
.owl-wake-btn { min-width: 220px; min-height: 48px; font-size: var(--fs-16); box-shadow: var(--shadow-glow-ember); }
.owl-progress { width: min(360px, 100%); height: 8px; accent-color: var(--accent); }

.owl-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-3); }
.owl-chip {
    padding: var(--space-2) var(--space-3); border-radius: var(--radius-pill); border: 1px solid var(--border-default);
    background: var(--bg-surface); color: var(--fg-1); font: inherit; font-size: var(--fs-14); cursor: pointer;
    transition: border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.owl-chip:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.owl-chip:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.owl-chip:disabled { opacity: .5; cursor: default; transform: none; }

.owl-ask { display: flex; gap: var(--space-2); align-items: center; }
.owl-input { flex: 1; min-width: 0; min-height: 44px; border-radius: var(--radius-pill); padding-inline: var(--space-4); }
.owl-fineprint { margin: var(--space-3) 0 0; color: var(--fg-3); }

/* ---- start here and the finding cards --------------------------------------------------------------------------- */
.owl-start-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); counter-reset: owl; }
.owl-start-item { position: relative; padding: var(--space-3) var(--space-4) var(--space-3) var(--space-10); border-radius: var(--radius-3); background: var(--bg-sunken); counter-increment: owl; }
.owl-start-item::before {
    content: counter(owl); position: absolute; left: var(--space-3); top: var(--space-3); display: grid; place-items: center;
    width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: var(--fs-13); font-weight: var(--fw-bold);
}
.owl-start-title { margin: 0; font-weight: var(--fw-semibold); }
.owl-start-title a { color: inherit; }
.owl-amount { margin: var(--space-1) 0; font-family: var(--font-display); font-size: var(--fs-20); font-weight: var(--fw-bold); }
.owl-next { margin: 0; font-size: var(--fs-14); color: var(--fg-2); }

.owl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-4); }
.owl-card {
    display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4); border-radius: var(--radius-4);
    background: var(--bg-surface); border: 1px solid var(--border-subtle); border-top: 4px solid var(--border-strong); box-shadow: var(--shadow-xs);
    transition: box-shadow var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.owl-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.owl-card p { margin: 0; }
.owl-card p:last-child { margin-top: auto; padding-top: var(--space-2); }
.owl-card-head { display: flex; justify-content: space-between; align-items: center; }
.owl-card-title { margin: 0; font-size: var(--fs-16); font-weight: var(--fw-semibold); line-height: var(--lh-snug); }
.owl-card-why { font-size: var(--fs-14); color: var(--fg-2); }
.owl-sev-high { border-top-color: var(--danger); }
.owl-sev-medium { border-top-color: var(--warning); }
.owl-start-item.owl-sev-high { box-shadow: inset 3px 0 0 var(--danger); }
.owl-start-item.owl-sev-medium { box-shadow: inset 3px 0 0 var(--warning); }
.table .mono { font-family: var(--font-mono); font-size: var(--fs-13); }

@keyframes owl-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes owl-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes owl-pulse { 0% { box-shadow: 0 0 0 0 rgb(46 204 113 / .6); } 70% { box-shadow: 0 0 0 8px rgb(46 204 113 / 0); } 100% { box-shadow: 0 0 0 0 rgb(46 204 113 / 0); } }

@media (max-width: 900px) {
    .owl-hero, .owl-layout { grid-template-columns: minmax(0, 1fr); }
    .owl-hero { padding: var(--space-6); }
    .owl-title { font-size: var(--fs-40); }
}
@media (prefers-reduced-motion: reduce) {
    .owl-msg, .owl-dot, .owl-typing span { animation: none; }
    .owl-chip, .owl-card { transition: none; }
    .owl-thread { scroll-behavior: auto; }
}
