:root {
    --bg: #0d1117;
    --panel: #131a24;
    --panel-soft: #182230;
    --text: #f7f4ea;
    --muted: #b9b2a2;
    --gold: #d7ad42;
    --gold-soft: #f7e6a7;
    --line: rgba(255, 255, 255, 0.11);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(215, 173, 66, 0.18), transparent 35rem),
        linear-gradient(180deg, #101722 0%, var(--bg) 40%, #0b0f15 100%);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.skip-link {
    position: absolute;
    left: -999px;
}

.skip-link:focus {
    left: 16px;
    top: 16px;
    z-index: 10;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 5;
    border-bottom: 1px solid var(--line);
    background: rgba(13, 17, 23, 0.82);
    backdrop-filter: blur(18px);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}

.brand,
.nav-links,
.hero-actions,
.price-row,
.tags {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.nav-links a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 650;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}

.hero {
    padding: 88px 0 48px;
}

.hero-grid,
.market-grid,
.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 32px;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    padding: 7px 12px;
    border: 1px solid rgba(215, 173, 66, 0.35);
    border-radius: 999px;
    color: var(--gold-soft);
    background: rgba(215, 173, 66, 0.08);
    font-weight: 700;
    font-size: 0.9rem;
}

h1,
h2,
h3 {
    line-height: 1.08;
    letter-spacing: -0.045em;
}

h1 {
    margin: 18px 0;
    font-size: clamp(2.7rem, 8vw, 5.7rem);
}

h2 {
    margin: 0 0 22px;
    font-size: clamp(2rem, 4vw, 3.2rem);
}

h3 {
    margin: 0 0 8px;
}

.lead {
    max-width: 720px;
    color: var(--muted);
    font-size: clamp(1.08rem, 2vw, 1.28rem);
}

.gold-text {
    color: var(--gold);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-weight: 800;
}

.btn-primary {
    color: #191100;
    border-color: transparent;
    background: linear-gradient(135deg, var(--gold), var(--gold-soft));
}

.btn-ghost {
    color: var(--text);
    background: rgba(255, 255, 255, 0.07);
}

.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035));
    box-shadow: var(--shadow);
}

.hero-card,
.market-card {
    padding: 28px;
}

.price-big {
    margin: 8px 0 2px;
    font-size: clamp(2rem, 5vw, 3.6rem);
    font-weight: 900;
    letter-spacing: -0.06em;
}

.muted {
    color: var(--muted);
}

.stats-grid,
.articles-grid,
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.stat,
.article-card,
.feature {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.045);
}

.stat-value {
    display: block;
    color: var(--gold-soft);
    font-size: 1.55rem;
    font-weight: 900;
}

.section {
    padding: 56px 0;
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: end;
    margin-bottom: 24px;
}

.article-card {
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.article-card:hover {
    transform: translateY(-4px);
    border-color: rgba(215, 173, 66, 0.55);
}

.article-meta,
.tags {
    color: var(--muted);
    font-size: 0.94rem;
}

.tags {
    flex-wrap: wrap;
    margin-top: 16px;
}

.tag {
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(215, 173, 66, 0.11);
    color: var(--gold-soft);
}

.article {
    max-width: 780px;
    padding: 56px 0;
}

.article-content {
    color: #ede7d8;
    font-size: 1.08rem;
}

.article-content h2 {
    margin-top: 42px;
    font-size: 2rem;
}

.article-content h3 {
    margin-top: 30px;
}

.article-content a {
    color: var(--gold-soft);
    text-decoration: underline;
}

.chart-box {
    min-height: 320px;
    padding: 20px;
}

.chart-canvas-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1000 / 400;
    min-height: 280px;
}

#gold-chart svg {
    display: block;
    width: 100%;
    height: 100%;
}

.chart-line {
    fill: none;
    stroke: var(--gold);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chart-area {
    fill: rgba(215, 173, 66, 0.14);
}

.chart-grid {
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 1;
}

.chart-label {
    fill: var(--muted);
    font-size: 13px;
    font-family: system-ui, sans-serif;
}

.chart-label-date {
    font-size: 11px;
    opacity: 0.7;
}

.chart-hit {
    fill: transparent;
    cursor: crosshair;
}

.chart-dot {
    fill: var(--gold-soft);
    stroke: var(--bg);
    stroke-width: 2;
    opacity: 0;
    transition: opacity 0.12s ease;
}

.chart-hit:hover + .chart-dot,
.chart-dot.active {
    opacity: 1;
}

.chart-hover-line {
    stroke: rgba(247, 230, 167, 0.5);
    stroke-width: 1;
    opacity: 0;
}

.chart-hover-line.active {
    opacity: 1;
}

.chart-tooltip {
    position: absolute;
    z-index: 2;
    min-width: 150px;
    padding: 10px 12px;
    border: 1px solid rgba(215, 173, 66, 0.35);
    border-radius: 14px;
    color: var(--text);
    background: rgba(13, 17, 23, 0.94);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    font-size: 0.9rem;
    pointer-events: none;
    transform: translate(-50%, calc(-100% - 14px));
}

.chart-tooltip strong {
    display: block;
    color: var(--gold-soft);
    font-size: 1rem;
}

.chart-toolbar,
.chart-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chart-toolbar {
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 16px;
}

.chart-controls button {
    cursor: pointer;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    padding: 8px 12px;
    font-weight: 750;
}

.chart-controls button.active {
    color: #191100;
    background: var(--gold);
}

.site-footer {
    margin-top: 40px;
    padding: 44px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.footer-grid {
    grid-template-columns: 1.4fr 0.6fr 1fr;
    align-items: start;
}

.footer-grid a {
    display: block;
    margin-top: 8px;
}

.error {
    padding: 80px 0;
    text-align: center;
}

@media (max-width: 820px) {
    .nav,
    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-grid,
    .market-grid,
    .footer-grid,
    .stats-grid,
    .articles-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 56px;
    }
}
