/* BuyTheDip.news */

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    background: #0f1117;
    color: #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
}

/* ── Header ── */
.btd-header {
    background: linear-gradient(180deg, #181d2a 0%, #141820 100%);
    border-bottom: 2px solid #1E3A8A;
    padding: 14px 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.btd-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.btd-body-light .btd-header-inner {
    max-width: 900px;
    padding: 0 32px 0 8px;
}

.btd-logo-link { display: flex; align-items: center; text-decoration: none; }
.btd-logo { height: 56px; width: auto; }
.btd-tagline { color: #9ca3af; font-size: 13px; }

.btd-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 20px;
}
.btd-nav-link {
    color: #9ca3af;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.15s;
    font-weight: 500;
}
.btd-nav-link:hover { color: #e2e8f0; }
.btd-nav-premium {
    color: #f59e0b;
    font-weight: 600;
}
.btd-nav-premium:hover { color: #fbbf24; }

/* ── Main ── */
.btd-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 20px;
}

/* ── Stats bar ── */
.btd-stats-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 22px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #1a1f2e 0%, #1e2438 100%);
    border-radius: 10px;
    border: 1px solid #2d3348;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btd-stat {
    font-size: 13px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
}

.btd-stat.buy   { background: #14532d; color: #4ade80; }
.btd-stat.hold  { background: #713f12; color: #fbbf24; }
.btd-stat.sell  { background: #7f1d1d; color: #f87171; }
.btd-stat.total { background: #1e293b; color: #94a3b8; cursor: default; font-size: 12px; border-radius: 20px; padding: 4px 16px; }
.btd-stat.btd-filter-active { outline: 2px solid white; }
.btd-filter-label { font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.08em; width: 120px; flex-shrink: 0; white-space: nowrap; }
.btd-filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btd-filter-row + .btd-filter-row { padding-top: 4px; border-top: 1px solid rgba(45, 51, 72, 0.5); }
.btd-filter-btn {
    font-size: 13px;
    font-weight: 700;
    padding: 6px 18px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btd-filter-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.btd-filter-btn.buy  { background: #14532d; color: #4ade80; }
.btd-filter-btn.hold { background: #713f12; color: #fbbf24; }
.btd-filter-btn.sell { background: #7f1d1d; color: #f87171; }
.btd-filter-btn.active { outline: 2px solid white; outline-offset: 1px; }
/* Neutral (unstyled) filter buttons: search, clear, latest toggle */
.btd-filter-btn:not(.buy):not(.hold):not(.sell) { background: #1e293b; color: #94a3b8; border-color: #374151; }
.btd-filter-btn:not(.buy):not(.hold):not(.sell):hover { color: #e2e8f0; border-color: #4b5563; }
.btd-filter-btn:not(.buy):not(.hold):not(.sell).active { background: #1E3A8A; color: white; border-color: #2563eb; outline: none; }

/* Ticker search input */
.btd-ticker-search {
    padding: 7px 14px;
    border: 1px solid #374151;
    border-radius: 6px;
    background: #111827;
    color: white;
    font-size: 14px;
    width: 220px;
    transition: border-color 0.15s;
}
.btd-ticker-search:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2); }
.btd-ticker-search::placeholder { color: #4b5563; }

/* ── Card grid ── */
.btd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin-bottom: 30px;
}

.btd-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background: #1a1f2e;
    border: 1px solid #2d3348;
    border-radius: 8px;
    padding: 16px;
    transition: box-shadow 0.2s, transform 0.1s;
    cursor: pointer;
    color: #e0e0e0;
}

.btd-card-locked {
    position: relative;
    cursor: default;
    overflow: hidden;
}

.btd-lock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(15, 18, 30, 0.72);
    border-radius: 8px;
    gap: 6px;
    padding: 12px;
}

.btd-lock-icon {
    font-size: 28px;
    line-height: 1;
}

.btd-lock-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #fbbf24;
}

.btd-lock-sublabel {
    font-size: 11px;
    color: #9ca3af;
    letter-spacing: 0.3px;
}

.btd-lock-cta {
    margin-top: 4px;
    background: #1E3A8A;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
}

.btd-lock-cta:hover {
    background: #2563eb;
    color: white;
    text-decoration: none;
}

.btd-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.4);
    transform: translateY(-2px);
    text-decoration: none;
    color: #e0e0e0;
}


.btd-card-ticker {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 2px;
    color: #93c5fd;
}


.btd-card-score {
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 6px;
}

.btd-card-headline {
    font-size: 13px;
    color: #d1d5db;
    flex: 1;
    line-height: 1.45;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btd-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.btd-rating-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
}

.btd-rating-badge.buy   { background: #14532d; color: #4ade80; }
.btd-rating-badge.hold  { background: #713f12; color: #fbbf24; }
.btd-rating-badge.sell  { background: #7f1d1d; color: #f87171; }
.btd-rating-badge.neutral { background: #374151; color: #9ca3af; }

.btd-date { font-size: 11px; color: #6b7280; }

.btd-yt-btn {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    background: #7f1d1d;
    color: #fca5a5;
    text-decoration: none;
    white-space: nowrap;
}
.btd-yt-btn:hover { background: #991b1b; color: #fca5a5; text-decoration: none; }

/* ── Pagination ── */
.btd-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.btd-page-btn {
    display: inline-block;
    padding: 8px 22px;
    background: #1E3A8A;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.btd-page-btn:hover { background: #2563eb; color: white; text-decoration: none; }
.btd-page-info { color: #6b7280; font-size: 14px; }

/* ── Footer ── */
.btd-footer {
    background: #141820;
    border-top: 1px solid #2d3348;
    padding: 16px 0;
    margin-top: 40px;
}

.btd-footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    font-size: 13px;
    color: #6b7280;
}

.btd-footer-inner a { color: #93c5fd; text-decoration: none; }
.btd-footer-inner a:hover { text-decoration: underline; }

/* ── Article page (dynamic rendering) ── */
.art-page {
    max-width: 900px;
    margin: 0 auto;
    background: #1a1f2e;
    border-radius: 8px;
    padding: 28px 32px;
}

.art-back {
    display: inline-block;
    color: #93c5fd;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 20px;
}
.art-back:hover { text-decoration: underline; }

.art-header {
    border-bottom: 2px solid #2d3348;
    padding-bottom: 20px;
    margin-bottom: 28px;
}

.art-ticker-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.art-nav-group {
    display: flex;
    gap: 6px;
    margin-left: auto;
    flex-shrink: 0;
}

.art-nav-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #1e293b;
    color: #93c5fd;
    border-radius: 6px;
    font-size: 16px;
    text-decoration: none;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}
.art-nav-arrow:hover:not(.art-nav-disabled) {
    background: #1E3A8A;
    color: white;
    text-decoration: none;
}
.art-nav-arrow.art-nav-disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

.art-ticker-badge {
    background: #1E3A8A;
    color: white;
    font-size: 20px;
    font-weight: 800;
    padding: 8px 16px;
    border-radius: 8px;
    letter-spacing: 1px;
}

.art-company-name {
    font-size: 18px;
    font-weight: 600;
    color: #93c5fd;
}

.art-headline {
    font-size: 26px;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.35;
    margin-bottom: 8px;
}

.art-meta {
    color: #9ca3af;
    font-size: 14px;
}
.art-meta a { color: #93c5fd; }

.art-original-link { text-decoration: none; }
.art-original-link:hover { text-decoration: underline; }

.art-section {
    margin-bottom: 28px;
}

.art-section-title {
    color: #93c5fd;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 14px;
}

.art-summary-box {
    background: #141820;
    border-left: 4px solid #1E3A8A;
    border-radius: 8px;
    padding: 20px 24px;
}

.art-summary-content {
    font-size: 16px;
    line-height: 1.8;
    color: #d1d5db;
}
.art-summary-content p { margin-bottom: 10px; }
.art-summary-content p:last-child { margin-bottom: 0; }

.art-sentiment-row {
    margin-bottom: 20px;
    font-size: 15px;
}

.art-sentiment-badge {
    display: inline-block;
    color: white;
    padding: 4px 14px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
    margin-left: 8px;
}

.art-rating-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #1E3A8A, #2563eb);
    color: white;
    padding: 20px 24px;
    border-radius: 8px;
    margin-bottom: 28px;
    gap: 16px;
    flex-wrap: wrap;
}

.art-rating-card-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.85;
}

.art-rating-card-name {
    font-size: 18px;
    font-weight: 700;
}

.art-rating-card-score { text-align: right; }

.art-score-value {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.1;
}

.art-score-rating {
    font-size: 16px;
    font-weight: 700;
}

.art-metrics-box {
    background: #141820;
    border-radius: 8px;
    padding: 20px 24px;
}

.art-metrics-table-wrap {
    overflow-x: auto;
}

.art-metrics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.art-metrics-table thead tr {
    background: linear-gradient(135deg, #1E3A8A, #2563EB);
    color: white;
}

.art-metrics-table th {
    padding: 12px 14px;
    text-align: left;
    white-space: nowrap;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.art-metrics-table th:nth-child(2),
.art-metrics-table th:nth-child(3) { text-align: center; }

.art-metrics-table tbody tr {
    border-bottom: 1px solid #2d3348;
}

.art-metrics-table tbody tr:nth-child(odd)  { background: #1a1f2e; }
.art-metrics-table tbody tr:nth-child(even) { background: #141820; }

.art-metrics-table td {
    padding: 12px 14px;
    vertical-align: top;
    color: #d1d5db;
}

.art-metric-name {
    font-weight: 600;
    white-space: nowrap;
    color: #e5e7eb !important;
}

.art-metric-value {
    text-align: center;
    font-weight: 700;
    white-space: nowrap;
}

.art-metric-weight {
    text-align: center;
    white-space: nowrap;
    color: #9ca3af !important;
}

.art-metric-analysis {
    width: 100%;
    line-height: 1.5;
}

.art-profile-box {
    background: #141820;
    border-radius: 8px;
    padding: 20px 24px;
}

.art-profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.art-tag {
    background: #2d3348;
    color: #93c5fd;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.art-description {
    font-size: 15px;
    line-height: 1.7;
    color: #d1d5db;
    margin-bottom: 10px;
}

.art-description:last-child {
    margin-bottom: 0;
}

/* Newsletter signup bar */
.btd-newsletter-bar {
    background: linear-gradient(135deg, #1E3A8A, #2563EB);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.btd-newsletter-label {
    color: white;
    font-size: 14px;
    font-weight: 500;
    flex: 1;
    min-width: 200px;
}
.btd-newsletter-form {
    display: flex;
    gap: 8px;
}
.btd-newsletter-input {
    padding: 8px 12px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    width: 220px;
    outline: none;
}
.btd-newsletter-btn {
    padding: 8px 18px;
    background: #f59e0b;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.btd-newsletter-btn:hover { background: #d97706; }
.btd-newsletter-msg {
    font-size: 13px;
    font-weight: 500;
}

/* Premium upsell banner (article pages) */
.btd-premium-upsell {
    background: linear-gradient(135deg, #1E3A8A, #2563EB);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.btd-premium-upsell-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
    flex: 1;
    min-width: 200px;
}
.btd-premium-upsell-btn {
    padding: 8px 18px;
    background: #f59e0b;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.btd-premium-upsell-btn:hover {
    background: #d97706;
    color: white;
    text-decoration: none;
}
