/* Markets financial article */
/* Financial-specific styles */
.verdict-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.verdict-badge__icon {
    font-size: 1.125rem !important;
    line-height: 1;
}

.verdict-buy {
    background-color: var(--md-sys-color-bull, #15803d);
    color: #fff;
}

.verdict-sell {
    background-color: var(--md-sys-color-bear, #b91c1c);
    color: #fff;
}

.verdict-hold {
    background-color: var(--md-sys-color-neutral-signal, #d97706);
    color: #1c1917;
}

.sidebar-risk-warning {
    background-color: color-mix(in srgb, var(--md-sys-color-neutral-signal, #d97706) 12%, transparent);
    border-left: 4px solid var(--md-sys-color-neutral-signal, #d97706);
}

.sidebar-risk-warning .sidebar-risk-body p:last-child {
    margin-bottom: 0;
}

.ticker-badge__icon {
    font-size: 1rem !important;
    line-height: 1;
}

.ticker-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background-color: color-mix(in srgb, var(--md-sys-color-secondary) 14%, transparent);
    color: var(--md-sys-color-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--md-sys-shape-corner-sm);
    font-weight: 600;
    font-family: var(--font-family-mono, ui-monospace, monospace);
    font-size: 0.875rem;
    text-decoration: none;
}
.ticker-badge:hover {
    color: var(--md-sys-color-on-secondary-container);
    text-decoration: none;
}
.article-category {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.article-category .category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    color: inherit;
    background-color: rgba(0, 0, 0, 0.06);
}
.article-category .category-badge:hover { text-decoration: none; opacity: 0.9; }

.sentiment-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-weight: 600;
    font-size: 0.875rem;
}
.sentiment-badge.sentiment-bullish {
    background-color: color-mix(in srgb, var(--md-sys-color-bull) 22%, transparent);
    color: var(--md-sys-color-bull);
}
.sentiment-badge.sentiment-bearish {
    background-color: color-mix(in srgb, var(--md-sys-color-bear) 22%, transparent);
    color: var(--md-sys-color-bear);
}
.sentiment-badge__icon {
    font-size: 1rem !important;
    line-height: 1;
}

.sentiment-badge.sentiment-neutral {
    background-color: color-mix(in srgb, var(--md-sys-color-on-surface-variant) 18%, transparent);
    color: var(--md-sys-color-on-surface-variant);
}

.article-category .tag-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    color: var(--color-accent-primary, #2563eb);
    background-color: rgba(37, 99, 235, 0.1);
}
.article-category .tag-badge:hover { text-decoration: none; opacity: 0.9; }

/* Gauge Styles */
.market-gauge-wrap {
    background: linear-gradient(
        160deg,
        color-mix(in srgb, var(--md-sys-color-primary-container) 55%, var(--md-sys-color-surface-container-lowest)),
        var(--md-sys-color-surface-container-lowest)
    );
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-md);
    box-shadow: var(--md-sys-elevation-1);
    padding: 1.25rem 1.25rem 1rem;
    margin: 2rem 0;
    overflow: visible;
}

#market-regime-gauge-chart {
    width: 100%;
    min-height: 380px;
}

/* TA dashboard components */
.ta-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1rem;
    margin: 1rem 0;
}

.ta-title {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
}

.ta-heatmap-grid {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.ta-heatmap-item {
    border-radius: 0.75rem;
    border: 1px solid #cbd5e1;
    padding: 0.6rem;
}

.ta-heatmap-head {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
}

.ta-heatmap-sub {
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: #334155;
}

.ta-level-row,
.ta-rsi-row {
    margin: 0.6rem 0;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: 90px 1fr auto;
    align-items: center;
}

.ta-level-label,
.ta-rsi-label {
    font-weight: 600;
    font-size: 0.85rem;
}

.ta-level-track,
.ta-rsi-track {
    position: relative;
    height: 10px;
    border-radius: 6px;
    background: #e2e8f0;
    overflow: hidden;
}

.ta-level-price,
.ta-level-pivot,
.ta-rsi-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.ta-level-price {
    background: #2563eb;
}

.ta-level-pivot {
    background: #f59e0b;
    width: 8px;
    height: 8px;
}

.ta-level-values,
.ta-rsi-value {
    font-family: monospace;
    font-size: 0.75rem;
    color: #475569;
}

.ta-rsi-zone {
    height: 100%;
    display: inline-block;
}

.ta-rsi-zone-oversold {
    width: 30%;
    background: #86efac;
}

.ta-rsi-zone-neutral {
    width: 40%;
    background: #93c5fd;
}

.ta-rsi-zone-overbought {
    width: 30%;
    background: #fca5a5;
}

.ta-rsi-marker {
    background: #0f172a;
}

.ta-div-grid {
    display: grid;
    gap: 0.5rem;
}

.ta-div-item {
    border-radius: 0.75rem;
    padding: 0.6rem;
    border: 1px solid #cbd5e1;
}

.ta-div-bull {
    background: #f0fdf4;
    border-color: #86efac;
}

.ta-div-bear {
    background: #fef2f2;
    border-color: #fca5a5;
}

.ta-div-group {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.ta-div-stock-head {
    font-size: 0.9rem;
    line-height: 1.35;
    margin-bottom: 0.35rem;
}

.ta-div-stock-head strong {
    font-weight: 600;
}

.ta-div-signal {
    margin-top: 0.35rem;
    padding: 0.4rem 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
}

.ta-div-stock-head + .ta-div-signal {
    margin-top: 0.2rem;
}

.ta-div-signal-head {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    font-size: 0.9rem;
    text-align: right;
}

.ta-div-head {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.ta-div-meta {
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #475569;
}

/* Indicator tooltip */
.ta-indicator-tip {
    position: relative;
    cursor: help;
    border-bottom: 1px dashed currentColor;
    white-space: nowrap;
}

.ta-indicator-tip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #f1f5f9;
    font-size: 0.73rem;
    font-weight: 400;
    line-height: 1.4;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    white-space: normal;
    width: max-content;
    max-width: 220px;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s;
    z-index: 10;
}

.ta-indicator-tip::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #1e293b;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s;
    z-index: 10;
}

.ta-indicator-tip:hover::after,
.ta-indicator-tip:hover::before {
    opacity: 1;
}

.ta-breadth-track {
    height: 12px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    background: #e2e8f0;
}

.ta-breadth-adv {
    background: #22c55e;
}

.ta-breadth-dec {
    background: #ef4444;
}

.ta-breadth-unc {
    background: #64748b;
}

.ta-breadth-legend {
    margin-top: 0.6rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #475569;
}

.ta-compare-table {
    display: grid;
    gap: 0.4rem;
}

.ta-compare-head,
.ta-compare-row {
    display: grid;
    gap: 0.4rem;
    grid-template-columns: 1.3fr repeat(3, 1fr);
    font-size: 0.8rem;
}

.ta-compare-head {
    font-weight: 700;
}

/* Sidebar card for quick business structure context */
.sidebar-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.sidebar-card h4 {
    margin: 0 0 0.6rem 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.sidebar-card ul {
    margin: 0 0 0.75rem 1rem;
    padding: 0;
}

.sidebar-card li {
    margin-bottom: 0.35rem;
    color: #334155;
    font-size: 0.85rem;
    line-height: 1.35;
}

.sidebar-card a {
    font-size: 0.85rem;
    font-weight: 600;
}

.business-structure-panel {
    margin-bottom: 1rem;
}

.business-structure-panel summary {
    cursor: pointer;
    font-weight: 700;
    color: #0f172a;
}

.business-structure-content {
    margin-top: 0.75rem;
    color: #334155;
    font-size: 0.9rem;
}

.share-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0 2rem 0;
    padding: 0.75rem 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.share-label {
    font-size: 0.85rem;
    color: #475569;
    margin-right: 0.25rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
    border: none;
    background: transparent;
    color: #64748b;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.share-btn:hover {
    background: #f1f5f9;
}

.share-btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.share-btn .material-symbols-outlined {
    font-size: 24px;
    line-height: 1;
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.share-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.share-btn-x:hover {
    color: #000000;
}

.share-btn-linkedin:hover {
    color: #0a66c2;
}

.share-btn-facebook:hover {
    color: #1877f2;
}

/* Cross-site promo (markets → thecloudarchitect.io) */
.sister-site-promo {
    margin: 2rem 0 0;
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--color-border, #e2e8f0);
    background: var(--color-surface-alt, #f8fafc);
}

.sister-site-promo a {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    text-decoration: none;
    color: var(--color-text, #0f172a);
}

.sister-site-promo a:hover strong {
    color: var(--color-accent-primary, #2563eb);
}

.sister-site-promo .promo-tagline {
    font-size: 0.9rem;
    color: var(--color-text-secondary, #475569);
}

.sister-site-promo .promo-cta {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-accent-primary, #2563eb);
    margin-top: 0.25rem;
}

/* Fluid figures/images in sidebar layout (belt-and-suspenders with md3-components) */
.article-main .article-featured-image,
.article-main .article-supporting-figure {
    max-width: 100%;
}

.article-main .article-featured-image picture,
.article-main .article-featured-image img,
.article-main .article-supporting-figure img {
    display: block;
    max-width: 100%;
    height: auto;
}

.article-main .article-body .section-content img,
.article-main .article-body .subsection-content img {
    max-width: 100%;
    height: auto;
}
