/* Public market-insights website theme.
   Scoped to the public (guest) layout only. */

:root {
    --pub-bg: #060a12;
    --pub-bg-soft: #0a101c;
    --pub-panel: #0c1422;
    --pub-panel-2: #101a2c;
    --pub-line: #1c2940;
    --pub-line-soft: rgba(148, 163, 184, 0.14);
    --pub-text: #e6edf7;
    --pub-muted: #93a4bd;
    --pub-blue: #3b82f6;
    --pub-blue-soft: #60a5fa;
    --pub-emerald: #34d399;
    --pub-amber: #fbbf24;
}

html {
    scroll-behavior: smooth;
    background: var(--pub-bg);
}

body.pub-body {
    background:
        radial-gradient(1100px 560px at 78% -12%, rgba(37, 99, 235, 0.16), transparent 62%),
        radial-gradient(900px 500px at 4% 8%, rgba(16, 185, 129, 0.09), transparent 58%),
        var(--pub-bg);
    color: var(--pub-text);
    overflow-x: hidden;
}

.pub-display {
    font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    letter-spacing: -0.025em;
    line-height: 1.08;
}

.pub-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--pub-blue-soft);
}

.pub-eyebrow::before {
    content: "";
    width: 1.6rem;
    height: 1px;
    background: linear-gradient(90deg, var(--pub-emerald), var(--pub-blue));
}

.pub-panel {
    background: linear-gradient(160deg, rgba(16, 26, 44, 0.92), rgba(9, 15, 26, 0.94));
    border: 1px solid var(--pub-line);
    border-radius: 1rem;
    box-shadow: 0 22px 60px -42px rgba(2, 8, 23, 0.95);
}

.pub-panel-hover {
    transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.pub-panel-hover:hover {
    transform: translateY(-3px);
    border-color: rgba(96, 165, 250, 0.46);
    box-shadow: 0 30px 70px -46px rgba(37, 99, 235, 0.8);
}

.pub-link {
    color: var(--pub-muted);
    transition: color 160ms ease;
}

.pub-link:hover {
    color: #ffffff;
}

.pub-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.8rem 1.35rem;
    border-radius: 0.65rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: 1px solid rgba(96, 165, 250, 0.6);
    box-shadow: 0 14px 34px -20px rgba(37, 99, 235, 0.95);
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.pub-btn-primary:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    transform: translateY(-1px);
}

.pub-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.8rem 1.35rem;
    border-radius: 0.65rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--pub-text);
    background: rgba(15, 25, 42, 0.78);
    border: 1px solid var(--pub-line);
    transition: border-color 160ms ease, background 160ms ease;
}

.pub-btn-secondary:hover {
    background: rgba(20, 33, 54, 0.95);
    border-color: rgba(148, 163, 184, 0.42);
}

.pub-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--pub-line);
    background: rgba(11, 19, 33, 0.72);
    color: var(--pub-muted);
    border-radius: 9999px;
    padding: 0.3rem 0.7rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.pub-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--pub-line), transparent);
}

.pub-grid-bg {
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at center, black 18%, transparent 74%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 18%, transparent 74%);
}

.pub-hero-glow {
    background:
        radial-gradient(420px 280px at 72% 42%, rgba(59, 130, 246, 0.22), transparent 68%),
        radial-gradient(340px 240px at 92% 74%, rgba(16, 185, 129, 0.16), transparent 70%);
    filter: blur(6px);
}

.pub-price-up {
    color: var(--pub-emerald);
}

.pub-price-down {
    color: #fb7185;
}

.pub-prose p {
    color: #b6c4d8;
    line-height: 1.85;
    margin-bottom: 1.15rem;
}

.pub-prose h2,
.pub-prose h3 {
    color: #ffffff;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.85rem;
}

.pub-prose ul {
    list-style: disc;
    padding-left: 1.35rem;
    color: #b6c4d8;
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.pub-prose a {
    color: var(--pub-blue-soft);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* TradingView and third-party embeds -------------------------------------- */

.chart-frame {
    position: relative;
    width: 100%;
    height: 480px;
    min-height: 320px;
    background: #0b1220;
    overflow: hidden;
    border-radius: 0.75rem;
}

.chart-frame--short {
    height: 400px;
}

.chart-frame--tall {
    height: 620px;
}

.chart-frame iframe {
    width: 100% !important;
    height: 100% !important;
    border: 0;
}

.pub-widget {
    background: #0b1220;
    border-radius: 0.75rem;
    overflow: hidden;
}

.pub-widget .tradingview-widget-container,
.pub-widget .tradingview-widget-container__widget {
    width: 100%;
}

.pub-attribution {
    font-size: 0.7rem;
    color: #7186a3;
}

.pub-attribution a {
    color: #8fb4e8;
}

.pub-attribution a:hover {
    color: #ffffff;
}

/* Header --------------------------------------------------------------- */

.pub-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(6, 10, 18, 0.88);
    border-bottom: 1px solid rgba(28, 41, 64, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.pub-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.15rem;
    font-size: 0.86rem;
    font-weight: 500;
    color: #b6c4d8;
    transition: color 160ms ease;
}

.pub-nav-link:hover {
    color: #ffffff;
}

.pub-nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 0.1rem;
    height: 1px;
    background: linear-gradient(90deg, var(--pub-blue), var(--pub-emerald));
    transition: right 180ms ease;
}

.pub-nav-link:hover::after {
    right: 0;
}

.pub-dropdown {
    background: #0b1220;
    border: 1px solid var(--pub-line);
    border-radius: 0.75rem;
    box-shadow: 0 28px 60px -30px rgba(0, 0, 0, 0.9);
    overflow: hidden;
}

.pub-dropdown a {
    display: block;
    padding: 0.6rem 0.9rem;
    font-size: 0.84rem;
    color: #b6c4d8;
    transition: background 140ms ease, color 140ms ease;
}

.pub-dropdown a:hover {
    background: #131f33;
    color: #ffffff;
}

[data-pub-hidden="true"] {
    display: none !important;
}

/* Footer --------------------------------------------------------------- */

.pub-footer {
    background: #050810;
    border-top: 1px solid var(--pub-line);
}

.pub-footer a {
    color: #93a4bd;
    transition: color 140ms ease;
}

.pub-footer a:hover {
    color: #ffffff;
}

.pub-risk {
    border: 1px solid rgba(251, 191, 36, 0.22);
    background: rgba(251, 191, 36, 0.05);
    border-radius: 0.85rem;
    color: #b9c6da;
}

.pub-skip {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    background: #1d4ed8;
    color: #fff;
    padding: 0.7rem 1rem;
    border-radius: 0 0 0.5rem 0;
}

.pub-skip:focus {
    left: 0;
}

/* Content cards -------------------------------------------------------- */

.pub-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.7rem;
    background: rgba(37, 99, 235, 0.14);
    border: 1px solid rgba(96, 165, 250, 0.22);
    color: #7dd3fc;
}

.pub-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.pub-tag-crypto { color: #fbbf24; background: rgba(251, 191, 36, 0.1); }
.pub-tag-forex { color: #60a5fa; background: rgba(96, 165, 250, 0.1); }
.pub-tag-stocks { color: #34d399; background: rgba(52, 211, 153, 0.1); }
.pub-tag-commodities { color: #f59e0b; background: rgba(245, 158, 11, 0.1); }
.pub-tag-indices { color: #a78bfa; background: rgba(167, 139, 250, 0.1); }

.pub-toc a {
    display: block;
    padding: 0.45rem 0;
    color: #93a4bd;
    font-size: 0.86rem;
    border-bottom: 1px solid rgba(28, 41, 64, 0.55);
}

.pub-toc a:hover {
    color: #ffffff;
}

.pub-metric {
    border-left: 1px solid var(--pub-line);
    padding-left: 1rem;
}

.pub-metric:first-child {
    border-left: 0;
    padding-left: 0;
}

.pub-mono {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

@media (max-width: 767px) {
    .chart-frame {
        height: 380px;
    }

    .chart-frame--short {
        height: 340px;
    }

    .chart-frame--tall {
        height: 480px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .pub-panel-hover,
    .pub-btn-primary,
    .pub-btn-secondary,
    .pub-nav-link::after {
        transition: none;
    }
}
