/* Shared shell and supporting copy. Keep this after the feature styles. */
.sidebar > .brand {gap:9px;min-height:48px}
.sidebar .brand-mark {width:36px;height:36px;min-width:36px;padding:0}
.sidebar .brand strong.brand-wordmark {font-size:var(--text-xl)}
.account-identity {gap:8px;padding:8px 2px 12px}
.account-identity > span {gap:2px}
.account-identity strong {line-height:1.35}
.account-identity small {line-height:1.3;color:#8e969f}
.sidebar-version {gap:8px}
.sidebar-logout {margin-left:auto;border:0;border-radius:6px;padding:5px 7px;background:transparent;color:#8e969f;font:var(--text-xs)/1.4 var(--font);white-space:nowrap}
.sidebar-logout:hover {color:var(--text);background:#82cdb510}
.sidebar-logout:focus-visible {outline:2px solid var(--accent);outline-offset:2px}
.topbar {height:64px}
.heading-actions .button {transition-property:color,background-color,border-color,box-shadow,transform}

/* Align multiline record labels, values and actions as complete cell contents. */
.return-attribution .ra-table > tbody > tr > td,
.pattern-screener .ps-table > tbody > tr > td {vertical-align:middle}

/* Titles remain distinct; explanatory paragraphs use tighter, neutral text. */
.research-limits > summary,
.field-help > summary {color:#a6afb9!important;line-height:var(--leading-help)}
.research-limits > .research-limits-body,
.field-help > .field-help-content {margin-top:10px;color:#8e969f;line-height:var(--leading-help)}
.field-help > .field-help-content {padding-top:0}
.research-limits-body > p,
.field-help-content > p {margin:0;line-height:var(--leading-help)}
.research-limits-body > p + p,
.field-help-content > p + p {margin-top:7px}
.research-limits-body > ul,
.field-help-content > ul {margin-top:8px;line-height:var(--leading-help)}
.research-limits-body li + li,
.field-help-content li + li {margin-top:4px}
.research-limits-body > :last-child,
.field-help-content > :last-child {margin-bottom:0}
.field-hint,
.field > small,
.check-field > span > small {color:#8e969f!important;line-height:var(--leading-help)}
.market-warnings:not(:empty) {padding-bottom:22px}
.panel > .research-limits:last-child {padding-bottom:22px}
.readiness-card .research-limits-body {color:#b5aa93}
.strategy-definition > .strategy-description {color:#929ba6;font-size:var(--text-sm);line-height:var(--leading-help);margin:10px 0}
.strategy-definition-meta {gap:4px;line-height:var(--leading-help)}
.strategy-backtest-range {color:#a5afb9;font-variant-numeric:tabular-nums}

/* Keep factor actions aligned with their priority label. */
.factor-card .factor-tools {align-items:center}
.factor-card .factor-tools > [data-action="research-factor"] {height:var(--control-height-compact);min-height:var(--control-height-compact);padding:4px 9px;border-radius:6px;font-size:var(--text-xs);line-height:1.5;white-space:nowrap}

/* The task list fills the height established by the adjacent sync form. */
.data-layout > .downloads-panel {display:flex;flex-direction:column;min-height:0}
.downloads-panel > .panel-header {flex-shrink:0}
.downloads-panel > #data-jobs {position:relative;flex:1;min-height:0}
.downloads-panel .jobs-list {position:absolute;inset:0;max-height:none;padding-bottom:16px}
.data-layout > .downloads-panel:has(#data-jobs > .empty-state),
.data-layout > .downloads-panel:has(.jobs-list > .job-card:only-child) {align-self:start}
.downloads-panel .jobs-list:has(> .job-card:only-child) {position:static;max-height:490px}

@media (max-width:1100px) {
  .account-identity {justify-content:center}
  .account-identity > span {display:none}
  .sidebar-version {flex-direction:column;gap:2px}
  .sidebar-logout {margin-left:0}
}
@media (max-width:800px) {
  .topbar {height:56px}
  .downloads-panel .jobs-list,
  .downloads-panel .jobs-list:has(> .job-card:only-child) {position:static;max-height:420px}
}
@media (max-width:560px) {
  .topbar {height:68px}
  #account-menu {display:none}
  .sidebar-version {gap:0}
  .sidebar-version .sidebar-settings {height:36px}
  .sidebar-logout {font-size:var(--text-xs);padding:4px 6px}
  .market-warnings:not(:empty) {padding-bottom:18px}
  .downloads-panel .jobs-list,
  .downloads-panel .jobs-list:has(> .job-card:only-child) {max-height:360px}
}

/* Keep account task feedback available in the compact navigation. */
@media (max-width:1100px) {
  .sidebar-bottom .task-activity {display:grid;place-items:center;width:36px;min-height:36px;margin:0 auto 6px;padding:0;border:0;border-radius:9px;background:transparent;flex:none}
  .task-activity > .local-dot {width:8px;height:8px}
  .task-activity > #account-task-label {position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
}
@media (min-width:561px) and (max-width:1100px) {
  .task-activity > #local-storage-note {position:fixed;left:90px;right:auto;top:auto;bottom:24px;width:220px;max-width:calc(100vw - 106px);transform:none}
}
@media (min-width:1001px) and (max-width:1100px) {
  .task-activity > #local-storage-note {left:222px;max-width:calc(100vw - 238px)}
}
@media (max-width:560px) {
  .sidebar-bottom {position:static;display:flex;flex:0 0 68px;gap:2px;align-items:center;justify-content:center}
  .sidebar-bottom .task-activity {position:static;width:32px;min-height:40px;margin:0}
  .sidebar-bottom .sidebar-version {flex:none;width:34px;margin:0}
  .task-activity > #local-storage-note {position:absolute;left:12px;right:12px;top:auto;bottom:calc(100% + 10px);width:auto;max-width:none;transform:none}
}
