.fg-main {
    max-width: 80%;
    margin: 0 auto;
    padding: 1.25rem 1.5rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.fg-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding: .25rem 0 .5rem;
}

.fg-page-header h2 {
    font-size: clamp(1.35rem, 2.5vw, 2rem);
    margin: .2rem 0;
    color: var(--text-primary);
}

.fg-page-header p {
    font-size: .82rem;
    color: var(--text-muted);
}

.fg-eyebrow,
.fg-kicker {
    font-size: .67rem !important;
    font-weight: 700;
    letter-spacing: .13em;
    color: var(--accent-strong) !important;
}

.fg-updated,
.fg-section-badge,
.fg-live-badge {
    font-size: .69rem;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    padding: .3rem .55rem;
    border-radius: 999px;
}

.fg-error {
    padding: 1rem;
    border: 1px solid rgba(239, 68, 68, .4);
    border-radius: 12px;
    background: rgba(239, 68, 68, .08);
    color: #ef4444;
}

.fg-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
    gap: 1.25rem;
}

.fg-gauge-card,
.fg-insight-card {
    padding: 1.5rem;
    min-height: 460px;
}

.fg-card-heading,
.fg-section-header,
.fg-section-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.fg-card-heading h3,
.fg-section-header h3,
.fg-section-intro h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-top: .22rem;
}

.fg-gauge-wrap {
    position: relative;
    max-width: 540px;
    margin: .1rem auto 0;
    text-align: center;
}

.fg-gauge {
    display: block;
    width: 100%;
    height: auto;
}

.fg-sector {
    transition: opacity .4s ease;
}

.fg-gauge-needle {
    transform-origin: 160px 165px;
    transform: rotate(-90deg);
    transition: transform 1.1s cubic-bezier(.22, 1, .36, 1);
}

.fg-gauge-needle path {
    fill: var(--text-primary);
}

.fg-gauge-needle circle:first-of-type {
    fill: var(--text-primary);
}

.fg-gauge-needle circle:last-of-type {
    fill: var(--bg-card);
}

.fg-gauge-tick {
    fill: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    text-anchor: middle;
}

.fg-gauge-label {
    fill: var(--text-muted);
    font-size: 8.5px;
    font-weight: 700;
    text-anchor: middle;
    dominant-baseline: central;
    text-transform: uppercase;
    letter-spacing: .03em;
    opacity: .55;
    transition: opacity .4s ease, fill .4s ease;
}

.fg-gauge-label-active {
    opacity: 1;
    fill: var(--text-primary);
}

.fg-gauge-value {
    position: absolute;
    left: 50%;
    bottom: -2%;
    transform: translateX(-50%);
    display: flex;
    align-items: baseline;
}

.fg-gauge-value strong {
    font-size: clamp(2.4rem, 6vw, 3.6rem);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.fg-regime {
    margin-top: -.6rem;
    font-size: 1rem;
    font-weight: 800;
    color: var(--regime-color, #eab308);
}

.fg-insight-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.fg-insight-icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    margin: 1.8rem 0 1rem;
    border-radius: 16px;
    background: color-mix(in srgb, var(--regime-color, #eab308) 14%, transparent);
    color: var(--regime-color, #eab308);
    font-size: 1.5rem;
    font-weight: 800;
}

.fg-insight-card h3 {
    font-size: 1.45rem;
    color: var(--text-primary);
    margin-bottom: .55rem;
}

.fg-insight-body {
    font-size: .86rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.fg-reading-guide {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: .7rem;
    width: 100%;
    margin: 1.4rem 0;
    padding: 1rem 1.1rem;
    border-radius: 12px;
    background: var(--bg-secondary);
}

.fg-reading-guide div:first-child { text-align: left; }
.fg-reading-guide div:last-child  { text-align: right; }

.fg-reading-guide span {
    display: block;
    font-size: .61rem;
    color: var(--text-muted);
}

.fg-reading-guide strong {
    font-size: .73rem;
    color: var(--text-primary);
}

.fg-guide-arrow {
    font-size: .64rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.fg-caution {
    margin-top: auto;
    padding: 1rem 1.15rem;
    border-left: 3px solid var(--regime-color, #eab308);
    background: color-mix(in srgb, var(--regime-color, #eab308) 6%, transparent);
    border-radius: 0 10px 10px 0;
}

.fg-caution strong {
    font-size: .75rem;
    color: var(--text-primary);
}

.fg-caution p {
    margin-top: .3rem;
    font-size: .72rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.fg-section {
    padding: 1.25rem 1.5rem;
}

.fg-section-header {
    margin-bottom: .8rem;
}

.fg-chart-wrap {
    position: relative;
    height: 380px;
}

.fg-chart-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--text-muted);
    font-size: .8rem;
}

.fg-components-section {
    padding: .7rem 0;
}

.fg-section-intro {
    margin-bottom: .85rem;
}

.fg-section-intro p {
    max-width: 460px;
    text-align: right;
    font-size: .75rem;
    color: var(--text-muted);
}

.fg-component-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.fg-component-card {
    position: relative;
    overflow: hidden;
    padding: 1.15rem 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
}

.fg-component-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--component-color);
}

.fg-component-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .6rem;
}

.fg-component-title {
    display: flex;
    gap: .65rem;
}

.fg-component-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: color-mix(in srgb, var(--component-color) 12%, transparent);
    color: var(--component-color);
    font-weight: 800;
    font-size: .75rem;
}

.fg-component-title h4 {
    font-size: .82rem;
    color: var(--text-primary);
}

.fg-component-title p {
    margin-top: .18rem;
    font-size: .62rem;
    color: var(--text-muted);
}

.fg-weight {
    font-size: .65rem;
    font-weight: 800;
    color: var(--component-color);
    padding: .22rem .42rem;
    border-radius: 6px;
    background: color-mix(in srgb, var(--component-color) 10%, transparent);
}

.fg-component-formula {
    margin: .9rem 0 .7rem;
    padding: .65rem;
    border-radius: 9px;
    background: var(--bg-secondary);
}

.fg-component-formula span {
    display: block;
    font-size: .6rem;
    color: var(--text-muted);
    margin-bottom: .23rem;
}

.fg-component-formula strong {
    font-size: .72rem;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.fg-score-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .35rem;
    font-size: .65rem;
    color: var(--text-muted);
}

.fg-score-row strong {
    font-size: .77rem;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.fg-score-track {
    height: 6px;
    border-radius: 999px;
    background: var(--bg-secondary);
    overflow: hidden;
}

.fg-score-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: var(--component-color);
    transition: width .9s ease;
}

.fg-contribution {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    row-gap: .42rem;
    justify-content: space-between;
    margin-top: .65rem;
    padding-top: .6rem;
    border-top: 1px solid var(--border-color);
    font-size: .64rem;
    color: var(--text-muted);
}

.fg-contribution strong {
    color: var(--text-primary);
    text-align: right;
}

.fg-contribution strong:first-of-type {
    justify-self: end;
    padding: .12rem .42rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: .61rem;
}

.fg-vk-section {
    margin-top: 1rem;
    padding: 1.15rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.fg-vk-chart-wrap {
    position: relative;
    height: 270px;
}

.fg-method-card {
    padding: 1.5rem;
}

.fg-method-flow {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    align-items: stretch;
    gap: .5rem;
}

.fg-method-step {
    display: flex;
    gap: .65rem;
    padding: .85rem;
    border-radius: 12px;
    background: var(--bg-secondary);
}

.fg-method-step > span {
    width: 25px;
    height: 25px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--accent-gradient);
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
}

.fg-method-step strong {
    font-size: .71rem;
    color: var(--text-primary);
}

.fg-method-step p {
    margin-top: .24rem;
    font-size: .62rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.fg-method-connector {
    align-self: center;
    color: var(--accent-strong);
    font-weight: 800;
}

.fg-formula {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .4rem 1rem;
    align-items: center;
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-glow);
    border-radius: 12px;
    background: var(--accent-muted);
}

.fg-formula span {
    font-size: .65rem;
    color: var(--accent-strong);
    font-weight: 800;
}

.fg-formula strong {
    font-size: .85rem;
    color: var(--text-primary);
}

.fg-formula small {
    grid-column: 1 / -1;
    font-size: .65rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.fg-thresholds {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: .5rem;
    margin-top: .8rem;
}

.fg-thresholds > div {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .1rem .4rem;
    align-items: center;
    padding: .55rem;
    border: 1px solid var(--border-color);
    border-radius: 9px;
}

.fg-thresholds .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    grid-row: 1 / 3;
}

.dot.extreme-fear  { background: #ef4444; }
.dot.fear          { background: #f97316; }
.dot.neutral       { background: #eab308; }
.dot.greed         { background: #84cc16; }
.dot.extreme-greed { background: #10b981; }

.fg-thresholds strong {
    font-size: .66rem;
    color: var(--text-primary);
}

.fg-thresholds small {
    font-size: .58rem;
    color: var(--text-muted);
}

.fg-loading-card {
    min-height: 150px;
    display: grid;
    place-items: center;
    color: var(--text-muted);
    font-size: .8rem;
}

.hidden {
    display: none !important;
}

@media (max-width: 980px) {
    .fg-component-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fg-method-flow {
        grid-template-columns: 1fr 1fr;
    }

    .fg-method-connector {
        display: none;
    }
}

@media (max-width: 760px) {
    .fg-main {
        max-width: 100%;
        padding: 1rem .75rem 2.5rem;
    }

    .fg-page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .fg-hero-grid {
        grid-template-columns: 1fr;
    }

    .fg-gauge-card,
    .fg-insight-card {
        min-height: 0;
    }

    .fg-component-grid {
        grid-template-columns: 1fr;
    }

    .fg-section-intro {
        align-items: flex-start;
        flex-direction: column;
    }

    .fg-section-intro p {
        text-align: left;
    }

    .fg-chart-wrap {
        height: 270px;
    }

    .fg-thresholds {
        grid-template-columns: 1fr 1fr;
    }

    .fg-method-flow {
        grid-template-columns: 1fr;
    }

    .fg-method-card,
    .fg-section,
    .fg-vk-section {
        padding: 1rem;
    }

    .fg-vk-chart-wrap {
        height: 240px;
    }

}

@media (max-width: 430px) {
    .fg-scale span {
        font-size: .52rem;
    }

    .fg-reading-guide {
        gap: .3rem;
        padding: .7rem .55rem;
    }

    .fg-guide-arrow {
        font-size: .55rem;
    }

    .fg-gauge-card {
        padding: 1rem;
    }

    .fg-gauge-value strong {
        font-size: 2.8rem;
    }
}

[data-theme="light"] .fg-component-card,
[data-theme="light"] .fg-gauge-card,
[data-theme="light"] .fg-insight-card {
    box-shadow: none;
}
