/* Qelly product experience — single final visual authority.
 * Keep route-specific styles focused on layout and data semantics; put global
 * appearance, interaction, contrast and surface rules here. */

:root{
  --q-radius-control:10px;
  --q-radius-surface:12px;
  --q-radius-feature:16px;
  --q-target-min:40px;
  --q-focus-ring:color-mix(in srgb,var(--q-accent-strong) 78%,#fff);
  --q-elevation-rest:0 12px 34px rgba(0,0,0,.16),inset 0 1px rgba(255,255,255,.055);
  --q-elevation-hover:0 18px 46px rgba(0,0,0,.24),inset 0 1px rgba(255,255,255,.075);
  scrollbar-color:color-mix(in srgb,var(--q-accent) 76%,var(--q-muted)) transparent;
  scrollbar-width:thin;
}

html{scroll-behavior:smooth;scrollbar-gutter:stable}
/* Keep the document as the only vertical scroll container. A vertically
   scrollable body makes the sticky command header attach to a non-scrolling
   ancestor and disappear as the document moves. */
html[data-production-system="v8"]{overflow-x:clip!important;overflow-y:auto!important}
html[data-production-system="v8"] body{overflow-x:clip!important;overflow-y:visible!important}
*::-webkit-scrollbar{width:9px;height:9px}
*::-webkit-scrollbar-track{background:transparent}
*::-webkit-scrollbar-thumb{border:3px solid transparent;border-radius:999px;background:color-mix(in srgb,var(--q-accent) 72%,var(--q-muted));background-clip:padding-box}

/* One interaction contract for every route: visible keyboard focus, honest
   disabled states, consistent pressed feedback, and comfortable hit areas. */
html[data-production-system="v8"] :where(button,a[href],input,select,textarea,[role="button"],[role="link"],[role="tab"]){
  touch-action:manipulation;
}
html[data-production-system="v8"] :where(button,a[href],input,select,textarea,[role="button"],[role="link"],[role="tab"]):focus-visible{
  outline:3px solid var(--q-focus-ring)!important;
  outline-offset:3px!important;
  box-shadow:0 0 0 5px color-mix(in srgb,var(--q-focus-ring) 18%,transparent)!important;
}
html[data-production-system="v8"] :where(button:disabled,[aria-disabled="true"]){
  cursor:not-allowed!important;filter:saturate(.55)!important;opacity:.58!important;
}
html[data-production-system="v8"] :where(button,a[href],[role="button"],[role="link"],[role="tab"]).is-interacting{
  transform:translateY(0) scale(.985)!important;filter:brightness(.98)!important;
}
html[data-production-system="v8"] button[aria-label="Dismiss notification"]{
  min-width:var(--q-target-min)!important;min-height:var(--q-target-min)!important;padding:0!important;display:inline-grid!important;place-items:center!important;
}

/* Compact source links remain visually quiet while still being easy to tap. */
html[data-production-system="v8"] :where(
  .qelly-tradingview-attribution a,
  .q-v6-runtime-provider>a,
  .q-v7-provider-card>a,
  .q-external-research-actions>a
){
  display:inline-flex!important;align-items:center!important;min-height:var(--q-target-min)!important;padding-block:8px!important;text-underline-offset:3px;
}

/* Column resizing keeps a fine visual line but exposes a standards-sized
   keyboard and pointer target. */
html[data-production-system="v8"] .q-grid-resizer{
  right:-12px!important;top:-3px!important;bottom:-3px!important;width:24px!important;min-width:24px!important;border-radius:8px!important;
  background:linear-gradient(90deg,transparent 11px,color-mix(in srgb,var(--q-muted) 58%,transparent) 11px 13px,transparent 13px)!important;
}
html[data-production-system="v8"] .q-grid-resizer:is(:hover,:focus-visible){
  background:linear-gradient(90deg,transparent 10px,var(--q-accent-strong) 10px 14px,transparent 14px)!important;
}

html[data-production-system="v8"] body #app header.q-product-header{
  position:sticky!important;top:0!important;z-index:200!important;
  grid-template-areas:"brand nav search . actions"!important;
  grid-template-columns:132px max-content minmax(170px,210px) minmax(0,1fr) max-content!important;
  justify-content:stretch!important;
  align-items:center!important;
  gap:10px!important;
  border-radius:0!important;
  transition:background-color 180ms ease,box-shadow 180ms ease,backdrop-filter 180ms ease!important;
}
html[data-production-system="v8"] body #app header.q-product-header>*{align-self:center!important}
html[data-production-system="v8"] body #app header.q-product-header>.q-product-brand{grid-area:brand!important;min-width:0!important}
html[data-production-system="v8"] body #app header.q-product-header>.q-product-nav{grid-area:nav!important}
html[data-production-system="v8"] body #app header.q-product-header>.q-product-search{grid-area:search!important}
html[data-production-system="v8"] body #app header.q-product-header>.q-product-actions{grid-area:actions!important}
html[data-production-system="v8"] body #app header.q-product-header>.q-product-menu{display:none!important;grid-area:menu!important;width:max-content!important;max-width:100%!important;justify-self:end!important}
html[data-ui-lock-v53="active"][data-v53-active-shell="wave1"][data-product-surface="production"][data-production-system="v8"] body #app header.q-product-header>.q-product-menu[data-feature-navigation-owner="true"]{display:none!important}
html[data-production-system="v8"] body #app header.q-product-header.is-scrolled{
  background:color-mix(in srgb,var(--q-chrome) 94%,transparent)!important;
  box-shadow:0 1px 0 var(--q-divider),0 20px 48px rgba(0,0,0,.24)!important;
}
html[data-production-system="v8"] .q-product-brand__mark{
  display:grid!important;place-items:center!important;border-radius:10px!important;background:#fff!important;
}
html[data-production-system="v8"] .q-product-brand__mark img{display:block!important;width:27px!important;height:27px!important}

/* Calm navigation: location is shown by typography and accessible current-page
   state, without the historical underline artifact. */
html[data-production-system="v8"] .q-product-nav{
  height:42px!important;min-height:42px!important;align-items:center!important;gap:4px!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;overflow-x:auto!important;overflow-y:hidden!important;overflow-anchor:none!important;scrollbar-width:none!important;
}
html[data-production-system="v8"] .q-product-nav::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
html[data-production-system="v8"] .q-product-nav a{
  position:relative!important;z-index:1!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:42px!important;margin:0!important;padding:0 9px!important;border-radius:0!important;background:transparent!important;color:var(--q-muted)!important;font-size:13px!important;font-weight:620!important;line-height:1!important;
}
html[data-production-system="v8"] .q-product-nav a::before,
html[data-production-system="v8"] .q-product-nav a::after{content:none!important;display:none!important}
html[data-production-system="v8"] .q-product-nav a:hover,
html[data-production-system="v8"] .q-product-nav a:focus-visible{color:var(--q-text)!important}
html[data-production-system="v8"] .q-product-nav a[aria-current="page"],
html[data-production-system="v8"] .q-product-nav a[aria-current="true"]{
  color:var(--q-text)!important;background:transparent!important;box-shadow:none!important;
}
html[data-production-system="v8"] .q-product-header :where(.q-product-menu,.q-product-system,.q-product-account){height:44px!important;min-height:44px!important;margin:0!important;padding-inline:10px!important;align-items:center!important;justify-content:center!important;white-space:nowrap!important}
html[data-production-system="v8"] .q-product-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:4px!important;min-width:0!important}
html[data-production-system="v8"] .q-product-actions :where(.q-product-system,.q-product-ai){width:44px!important;min-width:44px!important;padding-inline:0!important}
html[data-production-system="v8"] .q-product-actions :where(.q-product-system,.q-product-ai)>span:last-child{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap!important}
html[data-production-system="v8"] .q-product-search{width:clamp(170px,14vw,210px)!important;max-width:210px!important;min-width:0!important;height:42px!important;min-height:42px!important;justify-self:end!important;align-self:center!important;margin:0!important;padding:2px!important;border-radius:var(--q-radius-control)!important}
html[data-production-system="v8"] .q-product-search :where(input,button){height:38px!important;min-height:38px!important;align-self:center!important;margin:0!important;transform:none!important}
html[data-production-system="v8"] .q-product-search input{padding-inline:11px!important;font-size:12px!important}
html[data-production-system="v8"] .q-product-search button{display:grid!important;place-items:center!important;width:40px!important;min-width:40px!important;padding:0!important}
html[data-production-system="v8"] .q-product-search button svg{width:17px!important;height:17px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round!important}
html[data-production-system="v8"] :where(.q-product-menu,.q-product-search button){border-radius:var(--q-radius-control)!important}

/* Market display controls should read as a compact toolbar, not three tall
   settings cards. The selects retain the 44px touch target. */
html[data-v53-real-market="active"] body #app #main .q-v6-market-controls{
  grid-template-columns:minmax(140px,180px) minmax(140px,180px) minmax(220px,1fr)!important;
  align-items:end!important;gap:10px!important;padding:10px!important;
}
html[data-v53-real-market="active"] body #app #main .q-v6-market-controls>.q-setting{
  display:grid!important;align-content:end!important;gap:6px!important;min-width:0!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;
}
html[data-v53-real-market="active"] body #app #main .q-v6-market-controls>.q-setting>span{margin:0!important}
html[data-v53-real-market="active"] body #app #main .q-v6-market-controls select{width:100%!important;height:44px!important;min-height:44px!important;margin:0!important}
html[data-v53-real-market="active"] body #app #main .q-v6-market-controls>.q-query-boundary{
  align-self:stretch!important;align-content:center!important;gap:3px!important;padding:6px 10px!important;border-left:1px solid var(--q-divider)!important;
}
html[data-v53-real-market="active"] body #app #main .q-v6-market-controls>.q-query-boundary>span{font-size:10px!important;line-height:1.25!important}
html[data-v53-real-market="active"] body #app #main .q-v6-market-controls>.q-query-boundary>strong{font-size:11px!important;line-height:1.25!important}
html[data-v53-real-market="active"] body #app #main .q-v6-market-controls>.q-query-boundary>small{font-size:9px!important;line-height:1.25!important}

/* Controls are compact precision objects. Semantic status labels remain pills. */
html[data-production-system="v8"] body #app #main :where(.q-button,button,[role="button"],[role="tab"]):not(.q-status):not(.q-truth-pill),
html[data-production-system="v8"] .q-feature-navigation>header button,
html[data-production-system="v8"] .q-feature-navigation__search input{
  border-radius:var(--q-radius-control)!important;
}
html[data-production-system="v8"] body #app #main :where(.q-button,button,[role="button"],[role="tab"]):not(:disabled){
  transition:transform 150ms ease,filter 150ms ease,box-shadow 150ms ease,background-color 150ms ease!important;
}
html[data-production-system="v8"] body #app #main :where(.q-button,button,[role="button"],[role="tab"]):not(:disabled):hover{transform:translateY(-1px)!important;filter:brightness(1.06)}
html[data-production-system="v8"] body #app #main :where(.q-button,button,[role="button"],[role="tab"]):not(:disabled):active{transform:translateY(0)!important}

/* Tonal hierarchy replaces old outlines and oversized rounding. */
html[data-production-system="v8"] body #app #main :where(
  .q-panel,.q-mn-panel,.q-mn-card,.q-kpi,.q-metric-card,.q-mi-kpi,.q-mi-regime,
  .q-auth-card,.q-auth-hero,.q-access-gate,.q-it-hero,.q-it-guide,.q-it-panel,
  .q-it-provider,.q-category-card,.q-venue-card,.q-dex-card,.q-provider-card,
  .q-research-card,.q-notification-card,.q-article-shell,.q-asset-hero,
  .q-persona-card,.q-market-pulse-card,.q-feature-card,.q-calculator-card,
  .q-saved-card,.q-chart-shell,.q-empty-state,.q-truth-callout,.q-result-priority,
  .q-indicator-mini-chart,.q-verify-hero,.q-v53-verify-workbench,
  [class$="-card"],[class*="-card "],[class$="-panel"],[class*="-panel "]
){
  border:0!important;border-radius:var(--q-radius-surface)!important;background:var(--q-luxe-panel)!important;box-shadow:var(--q-elevation-rest)!important;
}
html[data-production-system="v8"] body #app #main :where(.q-it-hero,.q-verify-hero,.q-auth-hero,.q-asset-hero,.q-home-lead,.q-market-safety,.q-about-hero){
  border:0!important;border-radius:var(--q-radius-feature)!important;background:var(--q-luxe-panel-strong)!important;box-shadow:var(--q-elevation-rest)!important;
}
html[data-production-system="v8"] body #app #main :where(.q-feature-card,.q-calculator-card,.q-persona-card,.q-saved-card,.q-category-card,.q-venue-card,.q-dex-card){
  transition:transform 180ms cubic-bezier(.2,.8,.2,1),box-shadow 180ms ease,background-color 180ms ease!important;
}
html[data-production-system="v8"] body #app #main :where(.q-feature-card,.q-calculator-card,.q-persona-card,.q-saved-card,.q-category-card,.q-venue-card,.q-dex-card):hover{
  transform:translateY(-2px)!important;box-shadow:var(--q-elevation-hover)!important;
}
html[data-production-system="v8"] .q-feature-navigation{border-radius:var(--q-radius-feature)!important}
html[data-production-system="v8"] .q-feature-navigation>header{border-radius:var(--q-radius-feature) var(--q-radius-feature) 0 0!important}
html[data-production-system="v8"] .q-feature-navigation>nav{overscroll-behavior:contain!important;scrollbar-gutter:stable!important}

/* Calculator workbench: legible rather than miniaturized. */
html[data-production-system="v8"] #main .q-calculator-workbench-page{gap:clamp(20px,2.4vw,34px)!important}
html[data-production-system="v8"] #main .q-v6-deterministic-banner{
  padding:16px 18px!important;border:0!important;border-radius:var(--q-radius-surface)!important;background:color-mix(in srgb,var(--q-informational) 8%,var(--q-surface))!important;box-shadow:inset 3px 0 0 var(--q-informational)!important;
}
html[data-production-system="v8"] #main .q-v6-deterministic-banner p{font-size:13px!important;line-height:1.6!important;color:var(--q-text-secondary)!important}
html[data-production-system="v8"] #main .q-v6-quant-kpis{gap:1px!important;border:0!important;border-radius:var(--q-radius-surface)!important;background:var(--q-divider)!important;box-shadow:var(--q-elevation-rest)!important}
html[data-production-system="v8"] #main .q-v6-quant-kpis>div{min-height:92px!important;padding:16px!important;border:0!important;background:var(--q-surface)!important}
html[data-production-system="v8"] #main .q-v6-quant-kpis span,
html[data-production-system="v8"] #main .q-v6-quant-kpis small{font-size:11px!important;line-height:1.45!important}
html[data-production-system="v8"] #main .q-v6-quant-kpis strong{font-size:22px!important}
html[data-production-system="v8"] #main .q-calculator-card-grid{gap:14px!important}
html[data-production-system="v8"] #main .q-calculator-card{
  min-height:208px!important;padding:18px!important;gap:11px!important;border:0!important;border-radius:var(--q-radius-surface)!important;background:linear-gradient(145deg,var(--q-surface),color-mix(in srgb,var(--q-accent) 4%,var(--q-surfacealt)))!important;box-shadow:var(--q-elevation-rest)!important;
}
html[data-production-system="v8"] #main .q-calculator-card::before{width:3px!important;background:linear-gradient(180deg,var(--q-accent-strong),transparent 82%)!important}
html[data-production-system="v8"] #main .q-calculator-card__meta{font-size:11px!important}
html[data-production-system="v8"] #main .q-calculator-card h3{font-size:17px!important;line-height:1.3!important}
html[data-production-system="v8"] #main .q-calculator-card>p{font-size:13px!important;line-height:1.55!important}
html[data-production-system="v8"] #main .q-v6-quant-method-strip span{padding:5px 8px!important;border:0!important;background:var(--q-surfacealt)!important;font-size:10px!important}
html[data-production-system="v8"] #main .q-calculator-card__footer{padding-top:12px!important;border:0!important;color:var(--q-text-secondary)!important;font-size:11px!important}
html[data-production-system="v8"] #main .q-calculator-card__footer strong{font-size:11px!important;color:var(--q-accent-strong)!important}

/* Official logo inside the About orbit. */
html[data-production-system="v8"] #main .q-about-orbit{border:0!important;box-shadow:0 0 0 1px color-mix(in srgb,var(--q-accent) 30%,transparent),0 0 80px color-mix(in srgb,var(--q-accent) 12%,transparent)!important}
html[data-production-system="v8"] #main .q-orbit-core{overflow:hidden!important;border-radius:22px!important;background:#fff!important;box-shadow:0 20px 52px color-mix(in srgb,var(--q-accent) 30%,transparent)!important}
html[data-production-system="v8"] #main .q-orbit-core img{width:68%!important;height:68%!important;object-fit:contain!important}
html[data-production-system="v8"] #main .q-about-orbit>span{border:0!important;border-radius:8px!important;background:var(--q-surface)!important;box-shadow:var(--q-elevation-rest)!important}

/* Light-theme semantic colors meet readable foreground/background contrast. */
:root[data-appearance="light"] .q-status--deterministic,
:root[data-resolved-appearance="light"] .q-status--deterministic{color:#174f78!important;background:#e1eff7!important;border-color:transparent!important}
:root[data-appearance="light"] :where(.q-status--cached,.q-truth-pill.is-cached),
:root[data-resolved-appearance="light"] :where(.q-status--cached,.q-truth-pill.is-cached){color:#28506e!important;background:#e5eef4!important;border-color:transparent!important}
:root[data-appearance="light"] :where(.q-status--live,.q-truth-pill.is-live),
:root[data-resolved-appearance="light"] :where(.q-status--live,.q-truth-pill.is-live){color:#076241!important;background:#ddf2e9!important;border-color:transparent!important}
:root[data-appearance="light"] :where(.q-status--warning,.q-status--delayed,.q-truth-pill.is-delayed),
:root[data-resolved-appearance="light"] :where(.q-status--warning,.q-status--delayed,.q-truth-pill.is-delayed){color:#764900!important;background:#f8ead0!important;border-color:transparent!important}
:root[data-appearance="light"] :where(.q-status--error,.q-status--unavailable,.q-truth-pill.is-unavailable),
:root[data-resolved-appearance="light"] :where(.q-status--error,.q-status--unavailable,.q-truth-pill.is-unavailable){color:#8d1c35!important;background:#f7e2e7!important;border-color:transparent!important}

/* Light appearance is an owned shell theme, not a late audit patch. */
html[data-resolved-appearance="light"] body,
html[data-appearance="light"] body{background:#f4f2f0!important;color:#211c1f!important}
html[data-resolved-appearance="light"] body #app .q-product-header,
html[data-appearance="light"] body #app .q-product-header{
  background:rgba(255,255,255,.96)!important;
  border-bottom:1px solid rgba(82,55,67,.14)!important;
  box-shadow:0 8px 28px rgba(63,34,46,.09)!important;
}
html[data-resolved-appearance="light"] :where(.q-panel,.q-mi-intelligence-module,.q-mn-panel,.q-category-card,.q-venue-card),
html[data-appearance="light"] :where(.q-panel,.q-mi-intelligence-module,.q-mn-panel,.q-category-card,.q-venue-card){
  background:#fff!important;
  border-color:rgba(82,55,67,.15)!important;
  box-shadow:0 8px 24px rgba(63,34,46,.055)!important;
}

/* Route entry motion is subtle and does not delay interaction. */
html[data-product-experience="ready"] #main>section{animation:q-product-enter 320ms cubic-bezier(.2,.8,.2,1) both}
@keyframes q-product-enter{from{opacity:.45;transform:translateY(8px)}to{opacity:1;transform:none}}

/* Once the complete primary set no longer fits without compressing Menu, move
   route discovery into the governed drawer and give the search the full band. */
@media(max-width:1520px){
  html[data-production-system="v8"] body #app header.q-product-header{grid-template-areas:"brand search . actions menu"!important;grid-template-columns:132px minmax(170px,210px) minmax(0,1fr) max-content auto!important}
  html[data-production-system="v8"] body #app .q-product-header .q-product-menu{display:inline-flex!important}
  html[data-ui-lock-v53="active"][data-v53-active-shell="wave1"][data-product-surface="production"][data-production-system="v8"] body #app header.q-product-header>.q-product-menu[data-feature-navigation-owner="true"]{display:inline-flex!important}
  html[data-production-system="v8"] body #app .q-product-header .q-product-nav{display:none!important}
  html[data-production-system="v8"] body #app .q-product-header .q-product-search{width:min(100%,210px)!important;max-width:210px!important;justify-self:start!important}
  html[data-production-system="v8"] body #app .q-product-header .q-product-actions{justify-self:end!important}
  html[data-production-system="v8"] body #app .q-product-header.is-menu-open .q-product-nav{display:grid!important;position:absolute!important;top:calc(100% + 8px)!important;right:16px!important;left:auto!important;width:min(440px,calc(100vw - 32px))!important;height:auto!important;max-height:min(70vh,560px)!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:4px!important;padding:10px!important;overflow:auto!important;border:1px solid var(--q-divider)!important;border-radius:var(--q-radius-surface)!important;background:color-mix(in srgb,var(--q-chrome) 98%,transparent)!important;box-shadow:0 24px 64px rgba(0,0,0,.36)!important}
  html[data-production-system="v8"] body #app .q-product-header.is-menu-open .q-product-nav a{justify-content:flex-start!important;min-height:44px!important;padding-inline:12px!important;border-radius:var(--q-radius-control)!important}
}

@media(max-width:920px){
  html[data-production-system="v8"] body #app header.q-product-header{grid-template-columns:132px minmax(160px,190px) minmax(0,1fr) auto!important}
  html[data-production-system="v8"] body #app .q-product-header .q-product-search{width:min(100%,190px)!important}
}

@media(max-width:760px){
  :root{--q-target-min:44px}
  html[data-production-system="v8"] body #app header.q-product-header{grid-template-areas:"brand menu actions"!important;grid-template-columns:44px 44px minmax(0,1fr)!important;gap:8px!important}
  html[data-production-system="v8"] body #app .q-product-header .q-product-search{display:none!important}
  html[data-production-system="v8"] body #app .q-product-header .q-product-menu{justify-self:start!important}
  html[data-production-system="v8"] body #app .q-product-header .q-product-actions{justify-self:end!important}
  html[data-production-system="v8"] body #app .q-product-account{max-width:112px!important}
  html[data-production-system="v8"] body #app .q-product-header.is-menu-open .q-product-nav{right:10px!important;left:10px!important;width:auto!important;grid-template-columns:1fr!important}
  html[data-production-system="v8"] #main .q-calculator-card{min-height:190px!important;padding:16px!important}
  html[data-production-system="v8"] #main .q-v6-quant-kpis>div{min-height:82px!important}
  html[data-production-system="v8"] .q-grid-resizer{right:-14px!important;width:28px!important;min-width:28px!important}
}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  html[data-product-experience="ready"] #main>section{animation:none}
  html[data-production-system="v8"] body #app.q-app *,
  html[data-production-system="v8"] body #app.q-app *::before,
  html[data-production-system="v8"] body #app.q-app *::after{
    scroll-behavior:auto!important;
    transition:none!important;
    animation:none!important;
  }
}

@media(max-width:720px){
  html[data-v53-real-market="active"] body #app #main .q-v6-market-controls{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html[data-v53-real-market="active"] body #app #main .q-v6-market-controls>.q-query-boundary{grid-column:1/-1!important;border-left:0!important;border-top:1px solid var(--q-divider)!important}
}

@media(max-width:520px){
  html[data-v53-real-market="active"] body #app #main .q-v6-market-controls{grid-template-columns:1fr!important}
  html[data-v53-real-market="active"] body #app #main .q-v6-market-controls>.q-query-boundary{grid-column:auto!important}
}
