/* Dashboard2 uses the same page gutter and type scale as the research pages. */
.d2 { color: var(--site-text); line-height: 1.5; }
.d2 a { text-underline-offset: 3px; }
.d2 a:focus-visible, .d2 summary:focus-visible { outline: 2px solid var(--site-link); outline-offset: 3px; }
.d2 p { margin: 0; }
.d2-header { margin-bottom: 12px; }
.d2-muted { color: var(--site-muted); font-size: .875rem; line-height: 1.5; }
.d2-market { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--site-border); }
.d2-panel-heading, .d2-attention-heading, .d2-section-line, .d2-screener-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px; border-bottom: 1px solid var(--site-border); padding-bottom: 8px; margin-bottom: 16px; }
.d2-panel-heading h2, .d2-attention-heading h2, .d2-screener-heading h2 { margin: 0; }
.d2-panel-heading .d2-muted { margin-top: 6px; }
.d2-monitor { margin-bottom: 28px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 24px; color: var(--site-muted); font-size: .8rem; }
.d2-monitor-title { display: flex; align-items: center; gap: 6px; color: var(--site-text); }
.d2-monitor-title strong { font-weight: 500; }
.d2-status-icon { color: var(--site-link); font-size: 1.1rem; }
.d2-monitor-facts, .d2-report-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.d2-monitor-facts a { color: var(--site-muted); }
.d2-monitor-facts strong { font-weight: 600; }
.d2-report-status { margin-left: auto; }
.d2-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: start; }
.d2-panel { min-width: 0; }
.d2-sidebar { display: grid; gap: 28px; }
.d2-sidebar-panel h2 { font-size: 1rem; margin: 0; font-weight: 600; }
.d2-sidebar-panel > p { font-size: .8rem; margin-top: 12px; }
.d2-count, .d2-premium-label { background: var(--site-surface-soft); color: var(--site-muted); padding: .2rem .5rem; border-radius: .25rem; font-size: .7rem; font-weight: 400; }
.d2-small-link { display: inline-block; font-size: .8rem; font-weight: 600; color: var(--site-muted); margin-top: 12px; }
.d2-screen-list, .d2-watchlist-list { list-style: none; margin: 0; padding: 0; }
.d2-screen-list { max-height: 340px; overflow-y: auto; }
.d2-screen-list li + li, .d2-watchlist-list li + li { border-top: 1px solid var(--site-border); }
.d2-screen-list a { display: flex; align-items: start; gap: 8px; padding: 12px 0; font-size: .875rem; }
.d2-screen-list a > span:first-of-type { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.d2-screen-list small, .d2-watchlist-list small { display: block; color: var(--site-muted); font-size: .8rem; line-height: 1.4; margin-top: 4px; }
.d2-watchlist-list li { padding: 10px 0; }
.d2-watchlist-list a { font-size: .875rem; overflow-wrap: anywhere; }
.d2-report-preview { display: block; border-top: 1px solid var(--site-border); margin-top: 12px; padding-top: 12px; font-size: .8rem; }
.d2-quiet { display: flex; gap: 10px; padding: 14px 16px; margin: 0 0 16px; border: 1px solid var(--site-border); border-radius: 8px; background: var(--site-surface-soft); font-size: .875rem; }
.d2-quiet > i { color: var(--site-link); }
.d2-quiet p { margin-top: 4px; color: var(--site-muted); font-size: .8rem; line-height: 1.4; }
.d2-quiet .btn { margin-top: 12px; }
.d2-empty-history { padding: 12px 0; font-size: .875rem; color: var(--site-muted); }
.d2-period-tabs { display: flex; flex-wrap: wrap; gap: 16px; }
.d2-period-tabs a { font-size: .8rem; padding: 4px 0; color: var(--site-muted); border-bottom: 2px solid transparent; }
.d2-period-tabs a[aria-current] { border-color: var(--site-link); color: var(--site-link); font-weight: 600; }
.d2-volume-summary { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: .8rem; margin-bottom: 12px; }
.d2-volume-summary > .d2-muted { margin-left: auto; }
.d2-company-event { border-top: 1px solid var(--site-border); }
.d2-company-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(140px,.65fr); gap: 8px 16px; padding: 14px 16px; align-items: start; font-size: .875rem; }
.d2-company-event > summary { cursor: pointer; list-style: none; }
.d2-company-event > summary::-webkit-details-marker { display: none; }
.d2-company-event > summary:hover { background: var(--site-surface-soft); }
.d2-company-name { min-width: 0; }
.d2-row-date { display: block; color: var(--site-muted); font-size: .8rem; font-weight: 400; margin-top: 4px; }
.d2-company-directions { display: flex; flex-direction: column; align-items: end; gap: 4px; font-size: .8rem; }
.d2-company-count { display: flex; flex-wrap: wrap; grid-column: 1 / -1; align-items: center; gap: 4px; font-size: .8rem; color: var(--site-muted); }
.d2-expand-label { margin-left: auto; color: var(--site-link); display: inline-flex; align-items: center; gap: 6px; }
.d2-company-event[open] .d2-expand-label .bi { transform: rotate(180deg); }
.d2-company-evidence { background: var(--site-surface-soft); padding: 12px 16px; }
.d2-reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.d2-reasons > span { color: var(--site-muted); background: var(--site-surface); border: 1px solid var(--site-border); border-radius: 4px; padding: 2px 6px; font-size: .75rem; overflow-wrap: anywhere; }
.d2-preview-trade { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--site-border); font-size: .875rem; }
.d2-preview-trade > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.d2-preview-trade > span:last-child { flex-shrink: 0; text-align: right; color: var(--site-muted); font-size: .8rem; }
.d2-transaction-insider { display: block; color: var(--site-muted); margin-top: 4px; }
.d2-company-evidence > .d2-muted { margin-top: 8px; }
.d2-summary-caption { color: var(--site-muted); font-size: .8rem; padding: 8px 0; }
.d2-buy-text { color: #24623b; }
.d2-sell-text { color: #a12f42; }
[data-bs-theme="dark"] .d2-buy-text { color: #a1dfb3; }
[data-bs-theme="dark"] .d2-sell-text { color: #ffb0bd; }
.d2-transactions { border-top: 1px solid var(--site-border); }
.d2-transactions > summary { padding: 12px 0; color: var(--site-link); cursor: pointer; font-size: .8rem; font-weight: 600; }
.d2-transaction-scroll { overflow-x: auto; }
.d2-transaction-table { margin: 0; font-size: .875rem; line-height: 1.4; table-layout: fixed; min-width: 680px; }
.d2 .d2-transaction-table > :not(caption) > * > * { padding: 12px; vertical-align: top; }
.d2 .d2-transaction-table > thead > tr > th { color: var(--site-muted); background: var(--site-surface-soft); font-weight: 600; }
.d2-transaction-table .d2-date, .d2-transaction-table td:nth-child(4) { white-space: nowrap; }
.d2-transaction-table .d2-reasons { margin-top: 8px; }
.d2-transaction-table td:nth-child(3) { overflow-wrap: anywhere; }
.d2-col-date { width: 125px; }
.d2-col-type { width: 145px; }
.d2-col-value { width: 120px; }
.d2-pagination { border-top: 1px solid var(--site-border); display: flex; justify-content: center; align-items: center; gap: 24px; padding: 16px 0; font-size: .8rem; }
.d2-attention { margin-bottom: 32px; }
.d2-attention-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,280px),1fr)); gap: 12px; }
.d2-attention-card { display: flex; flex-direction: column; min-width: 0; padding: 14px 16px; border: 1px solid var(--site-border); border-radius: 8px; background: var(--site-surface); }
.d2-attention-scope { font-size: .8125rem; color: var(--site-muted); font-weight: 400; }
.d2-attention-issuer { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; font-size: .875rem; margin-bottom: 8px; }
.d2-attention-card h3 { font-size: .9rem; font-weight: 600; line-height: 1.4; margin: 0 0 4px; }
.d2-attention-explanation { color: var(--site-muted); font-size: .8rem; line-height: 1.4; }
.d2-attention-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding-top: 12px; margin-top: auto; font-size: .8rem; }
.d2-attention-bottom > span { color: var(--site-muted); }
.d2-attention-bottom a { font-weight: 600; }
.d2-attention-grid--single .d2-attention-card { flex-direction: row; align-items: center; gap: 16px; }
.d2-attention-grid--single .d2-attention-main { flex: 1; min-width: 0; }
.d2-attention-grid--single .d2-attention-bottom { flex-direction: column; align-items: end; padding: 0; margin: 0; flex-shrink: 0; }
.d2-attention-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; font-size: .8rem; }
.d2-attention-tools > span { color: var(--site-muted); }
.d2-screeners { margin: 0; }
.d2-attention + .d2-screeners { margin-top: 32px; }
.d2-screener-heading > a { font-size: .8rem; }
@media (max-width:991px) { .d2-layout { grid-template-columns: 1fr; } .d2-sidebar { grid-template-columns: repeat(2,minmax(0,1fr)); } .d2-report-status { margin-left: 0; } }
@media (max-width:575px) { .d2-sidebar { grid-template-columns: 1fr; } .d2-company-row { grid-template-columns: 1fr; } .d2-company-directions { flex-direction: row; align-items: start; flex-wrap: wrap; gap: 6px 16px; } .d2-attention-grid--single .d2-attention-card { flex-direction: column; align-items: stretch; } .d2-attention-grid--single .d2-attention-bottom { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; } .d2-monitor { gap: 8px 16px; } .d2-monitor-title { width: 100%; } }

/* Match the existing compact issuer controls without resizing other pages. */
.d2 .issuer-link { align-items: flex-start; }
.d2 .issuer-link .issuer-link-actions { flex: 0 0 auto; }
.d2 .issuer-link .issuer-link-controls { gap: 3px; margin: 0 2px 2px 0; align-items: center; }
.d2 .issuer-link .issuer-link-controls > .sub-button,
.d2 .issuer-link .issuer-link-controls > .issuer-button {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 26px;
    width: 26px;
    min-width: 26px;
    max-width: 26px;
    height: 20px;
    margin: 0;
    padding: 0;
    font-size: 10.5px;
    line-height: 1;
}
.d2 .issuer-link .issuer-link-controls > a > .bi { font-size: 10.5px; line-height: 1; }
.d2 .issuer-link.issuer-link--labelled .issuer-link-controls > .sub-button {
    flex-basis: auto;
    width: auto;
    max-width: none;
    padding-inline: 7px;
    gap: 4px;
}

/* Shared navigation has dark text utilities; correct them only on dashboard2. */
[data-bs-theme="dark"] body:has(main.d2) #sidebar-fixed-div a,
[data-bs-theme="dark"] body:has(main.d2) #sidebar-fixed-div button,
[data-bs-theme="dark"] body:has(main.d2) #sidebar-fixed-div .nav-link {
    color: var(--site-text) !important;
}

.d2 #dashboard-feedback-form { max-width: 760px; }
.d2 #dashboard-feedback legend { font-size: 1rem; margin-bottom: 12px; }
.d2 #dashboard-feedback-choices { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.d2 #dashboard-feedback-choices label { display: inline-flex; align-items: center; gap: 8px; padding: 0; margin: 0; }
.d2 #dashboard-feedback-choices input { float: none; margin: 0; }

/* Keep async sections from moving already-visible content as they arrive. */
.d2 { min-height: 100vh; }
.d2-pending .d2-market { visibility: hidden; }
.d2-loading-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; min-height: max(580px, 75vh); }
.d2-loading-heading { height: 44px; margin-bottom: 16px; border-bottom: 1px solid var(--site-border); }
.d2-loading-heading::before { content: ""; display: block; width: 35%; height: 20px; background: var(--site-surface-soft); border-radius: 4px; }
.d2-loading-row { padding: 20px 16px; min-height: 90px; border-top: 1px solid var(--site-border); }
.d2-loading-row span { display: block; height: 12px; width: 60%; background: var(--site-surface-soft); border-radius: 4px; }
.d2-loading-row span + span { width: 35%; margin-top: 12px; }
@media(max-width:991px) { .d2-loading-layout { grid-template-columns: 1fr; } .d2-loading-sidebar { display: none; } }
