/* Scoped standard UI for recommendation tables and their existing supporting cards. */
body#sp-app[data-ui="components"]:has(.recommendation-workspace),
body#sp-app[data-ui="components"]:has(.signal-details-workspace) { background:#f4f4f5!important; }
body#sp-app[data-ui="components"] .recommendation-workspace { max-width:1440px; margin:0 auto; padding:40px 32px 80px; color:#09090b; font-size:15px; line-height:1.6; }
body#sp-app[data-ui="components"] .recommendation-workspace :is(.us-hero,.sp-sp-card,.us-leader) { background:#fff!important; border:1px solid #e4e4e7!important; border-radius:12px!important; box-shadow:0 1px 2px rgb(0 0 0 / 4%)!important; }
body#sp-app[data-ui="components"] .recommendation-workspace .us-hero { padding:24px; margin-bottom:40px; }
body#sp-app[data-ui="components"] .recommendation-workspace .us-hero h1 { margin:0 0 8px; color:#09090b!important; font-size:28px!important; font-weight:650!important; line-height:1.25; letter-spacing:-.04em; }
body#sp-app[data-ui="components"] .recommendation-workspace .us-hero p { max-width:980px; margin:0; color:#52525b; font-size:14px; line-height:1.7; }
body#sp-app[data-ui="components"] .recommendation-workspace > section { margin-top:40px; }
body#sp-app[data-ui="components"] .recommendation-workspace > section:first-of-type { margin-top:0; }
body#sp-app[data-ui="components"] .recommendation-workspace h2 { margin:0 0 12px!important; font-size:18px!important; font-weight:600; line-height:1.35; letter-spacing:-.025em; }
body#sp-app[data-ui="components"] .recommendation-workspace .us-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
body#sp-app[data-ui="components"] .recommendation-workspace .sp-sp-card { padding:24px; }
body#sp-app[data-ui="components"] .recommendation-workspace .sp-sp-card h3 { margin:0 0 12px; font-size:16px; line-height:1.4; }
body#sp-app[data-ui="components"] .recommendation-workspace :is(.us-badge,.us-rec-badge) { display:inline-block; margin-left:5px; padding:3px 8px; border:1px solid #e4e4e7!important; border-radius:6px!important; background:#f4f4f5; color:#18181b; font-size:12px; font-weight:500; }
body#sp-app[data-ui="components"] .recommendation-workspace .us-meta { color:#52525b; font-size:13px; line-height:1.7; }
body#sp-app[data-ui="components"] .recommendation-workspace .us-stat { margin-top:16px; padding-top:16px; border-top:1px solid #e4e4e7; font-size:14px; font-weight:600; }
body#sp-app[data-ui="components"] .recommendation-workspace a { color:#18181b; }
body#sp-app[data-ui="components"] .recommendation-workspace a:hover { color:#09090b; text-decoration:underline; }
body#sp-app[data-ui="components"] .recommendation-workspace :is(a,button,input,select,summary):focus-visible { outline:2px solid #71717a; outline-offset:3px; }

/* Full-height tables need horizontal scrolling only. Fractional row heights
   otherwise create a 1px vertical overflow and a nearly full-height thumb. */
body#sp-app[data-ui="components"] .recommendation-workspace .recommendation-table-scroll { max-width:100%; overflow-x:auto; overflow-y:hidden; padding-bottom:1px; border:1px solid #e4e4e7; border-radius:12px!important; background:#fff; }
body#sp-app[data-ui="components"] .recommendation-workspace table.recommendation-table { width:100%; margin:0; border:0!important; border-collapse:collapse!important; background:#fff!important; color:#09090b!important; font-size:14px!important; table-layout:fixed; }
body#sp-app[data-ui="components"] .recommendation-workspace table.recommendation-table--integrated { min-width:1240px; }
body#sp-app[data-ui="components"] .recommendation-workspace table.recommendation-table--recent { min-width:920px; }
body#sp-app[data-ui="components"] .recommendation-workspace table.recommendation-table :is(th,td) { padding:var(--sp-table-cell-y) var(--sp-table-cell-x)!important; font-size:var(--sp-table-font-size)!important; line-height:var(--sp-table-line-height)!important; text-align:left; vertical-align:var(--sp-table-cell-align)!important; }
body#sp-app[data-ui="components"] .recommendation-workspace table.recommendation-table thead th { position:sticky; z-index:1; top:0; height:44px!important; border-bottom:1px solid #e4e4e7!important; background:#fafafa!important; color:#52525b!important; font-weight:500!important; line-height:var(--sp-table-heading-line-height)!important; vertical-align:middle!important; white-space:nowrap; }
body#sp-app[data-ui="components"] .recommendation-workspace table.recommendation-table tbody td { border-bottom:1px solid #e4e4e7!important; background:#fff!important; color:#09090b!important; }
body#sp-app[data-ui="components"] .recommendation-workspace table.recommendation-table tbody tr:last-child td { border-bottom:0!important; }
body#sp-app[data-ui="components"] .recommendation-workspace table.recommendation-table .numeric-column { text-align:right; font-variant-numeric:tabular-nums; }
body#sp-app[data-ui="components"] .recommendation-workspace table.recommendation-table .date-cell { white-space:nowrap; font-variant-numeric:tabular-nums; }
body#sp-app[data-ui="components"] .recommendation-workspace table.recommendation-table .stock-cell a { display:inline-flex; flex-direction:column; align-items:flex-start; text-decoration:none; }
body#sp-app[data-ui="components"] .recommendation-workspace table.recommendation-table .stock-name { color:#18181b!important; font-size:14px!important; font-weight:700; line-height:1.35!important; }
body#sp-app[data-ui="components"] .recommendation-workspace table.recommendation-table .stock-code { color:#71717a!important; font-size:12px!important; font-variant-numeric:tabular-nums; line-height:1.45!important; }
body#sp-app[data-ui="components"] .recommendation-workspace table.recommendation-table .signals-cell { line-height:1.8!important; }
body#sp-app[data-ui="components"] .recommendation-workspace table.recommendation-table .status-cell { white-space:nowrap; }
body#sp-app[data-ui="components"] .recommendation-workspace .recommendation-table--integrated .col-date { width:8%; }
body#sp-app[data-ui="components"] .recommendation-workspace .recommendation-table--integrated .col-stock { width:13%; }
body#sp-app[data-ui="components"] .recommendation-workspace .recommendation-table--integrated .col-score { width:10%; }
body#sp-app[data-ui="components"] .recommendation-workspace .recommendation-table--integrated .col-signals { width:22%; }
body#sp-app[data-ui="components"] .recommendation-workspace .recommendation-table--integrated .col-performance { width:19%; }
body#sp-app[data-ui="components"] .recommendation-workspace .recommendation-table--integrated .col-status { width:9%; }
body#sp-app[data-ui="components"] .recommendation-workspace .recommendation-table--recent .col-date { width:12%; }
body#sp-app[data-ui="components"] .recommendation-workspace .recommendation-table--recent .col-stock { width:20%; }
body#sp-app[data-ui="components"] .recommendation-workspace .recommendation-table--recent .col-signal { width:18%; }
body#sp-app[data-ui="components"] .recommendation-workspace .recommendation-table--recent .col-grade { width:13%; }
body#sp-app[data-ui="components"] .recommendation-workspace .recommendation-table--recent .col-status { width:10%; }
body#sp-app[data-ui="components"] .recommendation-workspace .recommendation-table--recent .col-reason { width:27%; }

body#sp-app[data-ui="components"] .recommendation-workspace .watch-star { display:inline-flex; width:28px; height:28px; align-items:center; justify-content:center; padding:0!important; border:1px solid #e4e4e7; border-radius:6px!important; background:#fff; color:#a1a1aa; font-size:14px!important; line-height:1; }
body#sp-app[data-ui="components"] .recommendation-workspace .watch-star.is-watching { border-color:#18181b; color:#18181b; }
body#sp-app[data-ui="components"] .recommendation-workspace .us-entry-verified :is(td,a) { font-weight:700; }
body#sp-app[data-ui="components"] .recommendation-workspace table.recommendation-table tbody tr.us-expired td:not(.us-reason), body#sp-app[data-ui="components"] .recommendation-workspace table.recommendation-table tbody tr.us-expired td:not(.us-reason) a { color:#71717a!important; font-weight:400; text-decoration:line-through; }
body#sp-app[data-ui="components"] .recommendation-workspace .us-expired-label { display:inline-block; padding:3px 8px; border:1px solid #e4e4e7!important; border-radius:6px!important; color:#dc2626; font-size:12px; font-weight:500; }
body#sp-app[data-ui="components"] .recommendation-workspace :is(.us-active-label,.us-sp-tab-active-label) { color:#18181b; font-size:13px; font-weight:600; }
body#sp-app[data-ui="components"] .recommendation-workspace .us-unknown-label { color:#52525b; font-size:13px; }
body#sp-app[data-ui="components"] .recommendation-workspace .us-reason { min-width:220px; color:#52525b!important; font-size:13px!important; text-decoration:none!important; }
body#sp-app[data-ui="components"] .recommendation-workspace .us-rec-badge { margin:2px 5px 2px 0; white-space:normal; }
body#sp-app[data-ui="components"] .recommendation-workspace .us-rec-badge.is-active { border-color:#18181b; background:#fff; color:#18181b; }
body#sp-app[data-ui="components"] .recommendation-workspace .us-rec-badge.is-expired { color:#71717a; opacity:.65; text-decoration:line-through; }
body#sp-app[data-ui="components"] .recommendation-workspace .us-rec-badge.perf-strong { border-color:#dc2626; background:#fff; color:#dc2626; }
body#sp-app[data-ui="components"] .recommendation-workspace .us-rec-badge.perf-good { border-color:#18181b; background:#fff; color:#18181b; }
/* Current, profitable signals get a quiet violet row wash. The cell-level
   selectors outrank shared table white-cell rules, and hover keeps the cue. */
body#sp-app[data-ui="components"] .recommendation-workspace table.recommendation-table--integrated tbody tr.us-profit-strong > td,
body#sp-app[data-ui="components"] .recommendation-workspace table.recommendation-table--integrated tbody tr.us-profit-strong:hover > td { background:#ede9fe!important; }
body#sp-app[data-ui="components"] .recommendation-workspace table.recommendation-table--integrated tbody tr.us-profit-good > td,
body#sp-app[data-ui="components"] .recommendation-workspace table.recommendation-table--integrated tbody tr.us-profit-good:hover > td { background:#f5f3ff!important; }
body#sp-app[data-ui="components"] .recommendation-workspace .us-profit-valid-badge { display:block; width:max-content; max-width:100%; margin-top:7px; padding:3px 8px; border:1px solid #c4b5fd!important; border-radius:6px!important; background:#fff; color:#4c1d95; font-size:14px!important; font-weight:600; line-height:1.35; white-space:normal; }
body#sp-app[data-ui="components"] .recommendation-workspace .us-perf { color:#52525b; font-size:12px; line-height:1.6; }
body#sp-app[data-ui="components"] .recommendation-workspace :is(.us-perf strong,.us-combo-strong,.grade-verified) { color:#dc2626; }
body#sp-app[data-ui="components"] .recommendation-workspace :is(.us-combo-good,.grade-conditional) { color:#18181b; }
body#sp-app[data-ui="components"] .recommendation-workspace :is(.us-combo-weak,.grade-observe,.grade-selection) { color:#52525b; }
body#sp-app[data-ui="components"] .recommendation-workspace .us-leaders { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
body#sp-app[data-ui="components"] .recommendation-workspace .us-leader { padding:16px 20px; font-size:14px; line-height:1.6; }
@media(max-width:600px) { body#sp-app[data-ui="components"] .recommendation-workspace { padding:40px 16px 88px; } body#sp-app[data-ui="components"] .recommendation-workspace .us-hero { margin-bottom:28px; padding:16px; } body#sp-app[data-ui="components"] .recommendation-workspace .us-hero h1 { font-size:26px!important; } body#sp-app[data-ui="components"] .recommendation-workspace :is(.us-grid,.us-leaders) { grid-template-columns:1fr; gap:16px; } body#sp-app[data-ui="components"] .recommendation-workspace > section { margin-top:28px; } body#sp-app[data-ui="components"] .recommendation-workspace .sp-sp-card { padding:16px; } }

/* Signal Details shares the neutral recommendation workspace without global overrides. */
body#sp-app[data-ui="components"] .signal-details-workspace { max-width:1440px; margin:0 auto; padding:32px 32px 80px; color:#09090b; font-size:14px; line-height:1.65; }
body#sp-app[data-ui="components"] .signal-details-workspace .sd-hero { min-height:128px; margin-bottom:24px; padding:24px; border:1px solid #e4e4e7!important; border-radius:12px!important; background:#fff!important; box-shadow:0 1px 2px rgb(0 0 0 / 4%); }
body#sp-app[data-ui="components"] .signal-details-workspace .sd-hero-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; margin-bottom:12px; }
body#sp-app[data-ui="components"] .signal-details-workspace .sd-hero h1 { margin:0; color:#09090b!important; font-size:28px!important; font-weight:600!important; line-height:1.25; letter-spacing:-.035em; }
body#sp-app[data-ui="components"] .signal-details-workspace .sd-asof { display:block; margin-top:5px; color:#71717a; font-size:13px; font-variant-numeric:tabular-nums; }
body#sp-app[data-ui="components"] .signal-details-workspace .sd-hero p { max-width:1050px; margin:0; color:#52525b!important; font-size:14px!important; line-height:1.65; }
body#sp-app[data-ui="components"] .signal-details-workspace .sd-return { display:inline-flex; min-height:36px; flex:0 0 auto; align-items:center; justify-content:center; padding:8px 12px; border:1px solid #d4d4d8!important; border-radius:6px!important; background:#fff; color:#18181b!important; font-size:14px; font-weight:500; line-height:1.2; text-decoration:none; }
body#sp-app[data-ui="components"] .signal-details-workspace .sd-return:hover { background:#f4f4f5; }
body#sp-app[data-ui="components"] .signal-details-workspace :is(a,button):focus-visible { outline:2px solid #71717a; outline-offset:3px; }
body#sp-app[data-ui="components"] .signal-details-workspace .sd-layout { display:grid; grid-template-columns:220px minmax(0,1fr); gap:24px; align-items:start; }
body#sp-app[data-ui="components"] .signal-details-workspace .sd-anchor-nav { position:sticky; top:128px; overflow:hidden; padding:8px; border:1px solid #e4e4e7!important; border-radius:12px!important; background:#fff; }
body#sp-app[data-ui="components"] .signal-details-workspace .sd-anchor-title { padding:8px 10px 10px; color:#71717a; font-size:12px; font-weight:600; }
body#sp-app[data-ui="components"] .signal-details-workspace .sd-anchor-nav a { display:flex; gap:8px; align-items:baseline; padding:7px 10px; border-radius:6px!important; color:#3f3f46; font-size:13px; line-height:1.35; text-decoration:none; }
body#sp-app[data-ui="components"] .signal-details-workspace .sd-anchor-nav a:hover { background:#f4f4f5; color:#09090b; }
body#sp-app[data-ui="components"] .signal-details-workspace .sd-anchor-nav a span { min-width:38px; color:#71717a; font-size:12px; font-weight:600; }
body#sp-app[data-ui="components"] .signal-details-workspace .sd-articles { min-width:0; }
body#sp-app[data-ui="components"] .signal-details-workspace .sd-sp-sp-card { margin:0 0 16px; padding:24px; scroll-margin-top:128px; border:1px solid #e4e4e7!important; border-radius:12px!important; background:#fff!important; box-shadow:0 1px 2px rgb(0 0 0 / 4%); }
body#sp-app[data-ui="components"] .signal-details-workspace .sd-title { display:flex; align-items:center; gap:9px; flex-wrap:wrap; margin-bottom:12px; }
body#sp-app[data-ui="components"] .signal-details-workspace .sd-title h2 { margin:0; color:#18181b!important; font-size:18px!important; font-weight:600!important; line-height:1.4; }
body#sp-app[data-ui="components"] .signal-details-workspace :is(.sd-code,.sd-grade) { display:inline-flex; align-items:center; justify-content:center; padding:3px 8px; border:1px solid #d4d4d8!important; border-radius:6px!important; background:#f4f4f5!important; color:#3f3f46!important; font-size:12px!important; font-weight:500; line-height:1.35; }
body#sp-app[data-ui="components"] .signal-details-workspace .sd-summary { margin-bottom:16px; color:#27272a; font-size:15px; line-height:1.7; }
body#sp-app[data-ui="components"] .signal-details-workspace .sd-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 24px; color:#3f3f46; font-size:14px; line-height:1.65; }
body#sp-app[data-ui="components"] .signal-details-workspace .sd-label { color:#18181b; font-size:14px; font-weight:600; }
body#sp-app[data-ui="components"] .signal-details-workspace .sd-stat { margin-top:18px; padding:12px 14px; border:0!important; border-radius:6px; background:#f4f4f5!important; color:#27272a; font-size:14px; font-weight:500; line-height:1.6; }
body#sp-app[data-ui="components"] .signal-details-workspace .sd-caution { margin-top:12px; color:#92400e!important; font-size:14px; line-height:1.65; }
body#sp-app[data-ui="components"] .signal-details-workspace .sd-caution b { display:inline-flex; margin-right:5px; padding:2px 7px; border:1px solid #fcd34d!important; border-radius:6px!important; background:#fffbeb; color:#92400e; font-size:12px; font-weight:600; }
@media(max-width:1050px) { body#sp-app[data-ui="components"] .signal-details-workspace { padding-inline:24px; } body#sp-app[data-ui="components"] .signal-details-workspace .sd-layout { grid-template-columns:1fr; } body#sp-app[data-ui="components"] .signal-details-workspace .sd-anchor-nav { position:static; display:flex; flex-wrap:wrap; gap:4px; padding:8px; } body#sp-app[data-ui="components"] .signal-details-workspace .sd-anchor-title { flex:0 0 100%; } }
@media(max-width:600px) { body#sp-app[data-ui="components"] .signal-details-workspace { padding:24px 16px 80px; } body#sp-app[data-ui="components"] .signal-details-workspace .sd-hero { padding:18px; } body#sp-app[data-ui="components"] .signal-details-workspace .sd-hero-heading { flex-direction:column; gap:14px; } body#sp-app[data-ui="components"] .signal-details-workspace .sd-hero h1 { font-size:26px!important; } body#sp-app[data-ui="components"] .signal-details-workspace .sd-sp-sp-card { padding:18px; } body#sp-app[data-ui="components"] .signal-details-workspace .sd-grid { grid-template-columns:1fr; } body#sp-app[data-ui="components"] .signal-details-workspace .sd-grid > div { grid-column:auto!important; } }
