:root {
    --brand-red: #b40f1b;
    --brand-red-dark: #7e0d16;
    --ink: #16202a;
    --line: #d8dee8;
}

body {
    font-family: 'Barlow', sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(180, 15, 27, 0.08), transparent 24%),
        linear-gradient(180deg, #f8fafc 0%, #eef2f6 100%);
}

.top-strip {
    background: linear-gradient(90deg, var(--brand-red-dark), var(--brand-red));
    color: #fff;
}

.market-header {
    font-weight: 600;
    min-height: 34px;
}

.ticker-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: rgba(255, 255, 255, 0.92);
}

.ticker-item strong {
    font-size: 0.88rem;
}

.ticker-item em {
    font-style: normal;
    font-weight: 800;
}

.ticker-item small {
    font-size: 0.8rem;
}

.ticker-up em,
.ticker-up small {
    color: #9ef29a;
}

.ticker-down em,
.ticker-down small {
    color: #ffd1d1;
}

.weather-select-form {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.weather-toolbar {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.weather-search {
    width: 110px;
    min-width: 110px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.weather-search::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.weather-select {
    min-width: 150px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.weather-select option {
    color: #111827;
}

.weather-badge {
    white-space: nowrap;
    font-weight: 700;
    font-size: 0.95rem;
}

.navbar-brand {
    font-size: 1.4rem;
    letter-spacing: 0.02em;
}

.brand-mark {
    background: var(--brand-red);
    color: #fff;
    border-radius: 0.6rem;
    padding: 0.18rem 0.55rem;
    margin-right: 0.45rem;
}

.hero-card,
.news-card,
.latest-card,
.headline-sidebar,
.editor-box,
.article-shell,
.ad-slot,
.stat-box,
.module-panel,
.market-tile {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(216, 222, 232, 0.9);
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.hero-card {
    position: relative;
    min-height: 480px;
}

.hero-card img,
.latest-card img,
.news-thumb,
.headline-item img,
.article-image {
    width: 100%;
    object-fit: cover;
    display: block;
}

.hero-card img {
    height: 480px;
}

.hero-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 2rem;
    background: linear-gradient(180deg, transparent, rgba(12, 17, 24, 0.88));
    color: #fff;
}

.hero-overlay h1,
.article-title,
.news-card h3,
.latest-card h3,
.headline-item h3 {
    font-family: 'Merriweather', serif;
}

.hero-overlay h1 {
    font-size: clamp(1.9rem, 4vw, 3rem);
    margin-bottom: 0.75rem;
}

.headline-sidebar {
    padding: 1rem;
}

.headline-item {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line);
}

.headline-item:last-child {
    border-bottom: 0;
}

.headline-item img {
    width: 112px;
    height: 84px;
    border-radius: 0.9rem;
    flex-shrink: 0;
}

.headline-item h3 {
    font-size: 1rem;
    color: var(--ink);
    margin: 0.2rem 0 0;
    line-height: 1.45;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--brand-red);
}

.section-label::before {
    content: '';
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-red), #ff7d62);
}

.news-thumb,
.latest-card img {
    height: 220px;
}

.news-card h3,
.latest-card h3 {
    font-size: 1.15rem;
    margin: 0.75rem 0;
    color: var(--ink);
    line-height: 1.45;
}

.pill {
    display: inline-flex;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(180, 15, 27, 0.08);
    color: var(--brand-red);
    font-size: 0.78rem;
    font-weight: 700;
}

.editor-box {
    padding: 1.6rem;
}

.sidebar-stack {
    position: sticky;
    top: 112px;
    display: grid;
    gap: 1rem;
}

.article-shell {
    padding: 1.4rem;
}

.article-title {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.article-summary {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.article-image {
    border-radius: 1rem;
    height: 420px;
    margin-bottom: 1.5rem;
}

.article-body {
    font-size: 1.06rem;
    line-height: 1.9;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    font-family: 'Merriweather', serif;
    color: var(--ink);
    margin-top: 1.5rem;
    margin-bottom: 0.85rem;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote,
.article-content table {
    margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
    padding-left: 1.3rem;
}

.article-content blockquote {
    border-left: 4px solid var(--brand-red);
    padding-left: 1rem;
    color: #475569;
    font-style: italic;
}

.article-content a {
    color: var(--brand-red);
}

.article-content img,
.article-content table {
    max-width: 100%;
}

.ckeditor-field + .ck-editor .ck-editor__editable {
    min-height: 420px;
}

.article-metrics {
    margin-top: 1.25rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    color: #6b7280;
    font-size: 0.95rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.source-box {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.88);
}

.ad-slot {
    text-align: center;
}

.admin-body,
.admin-login-body,
.install-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top, rgba(180, 15, 27, 0.14), transparent 22%),
        linear-gradient(180deg, #f3f6fa 0%, #e6ecf4 100%);
}

.stat-box {
    padding: 1.2rem;
}

.stat-box span {
    display: block;
    color: #657184;
    margin-bottom: 0.35rem;
}

.stat-box strong {
    font-size: 1.8rem;
}

.module-panel {
    padding: 1.25rem;
}

.market-tile {
    padding: 1rem;
    height: 100%;
}

.market-up {
    border-color: rgba(22, 163, 74, 0.35);
}

.market-down {
    border-color: rgba(220, 38, 38, 0.35);
}

.market-tile span,
.market-tile small {
    display: block;
}

.market-tile span {
    color: #6b7280;
    margin-bottom: 0.45rem;
}

.market-tile strong {
    font-size: 1.45rem;
}

.market-tile small {
    margin-top: 0.45rem;
    color: var(--brand-red);
    font-weight: 600;
}

.market-up small {
    color: #15803d;
}

.market-down small {
    color: #dc2626;
}

.sparkline {
    display: flex;
    align-items: end;
    gap: 3px;
    height: 58px;
    margin-top: 0.85rem;
}

.sparkline i {
    display: block;
    width: 100%;
    min-width: 6px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(180, 15, 27, 0.18), rgba(180, 15, 27, 0.9));
}

.market-up .sparkline i {
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.18), rgba(21, 128, 61, 0.95));
}

.market-down .sparkline i {
    background: linear-gradient(180deg, rgba(248, 113, 113, 0.18), rgba(220, 38, 38, 0.95));
}

.score-row,
.module-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line);
}

.score-row:last-child,
.module-status-row:last-child {
    border-bottom: 0;
}

.standings-table thead th {
    color: #6b7280;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.module-check {
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid var(--line);
    border-radius: 1rem;
    padding: 1rem 1rem 1rem 2.5rem;
    min-height: 100%;
}

.poll-title {
    font-family: 'Merriweather', serif;
    font-size: 1.15rem;
    line-height: 1.5;
}

.poll-option {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    border: 1px solid var(--line);
    border-radius: 1rem;
    padding: 0.9rem 1rem;
    margin-top: 0.75rem;
    cursor: pointer;
}

.poll-option input {
    margin-top: 0.3rem;
}

.horoscope-list {
    display: grid;
    gap: 0.85rem;
}

.horoscope-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.horoscope-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 84px;
    border-radius: 0;
    text-decoration: none;
    color: #fff;
    background: var(--sign-color);
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.horoscope-tile:hover {
    transform: translateY(-2px);
    opacity: 0.94;
}

.horoscope-tile-label {
    color: #222;
    background: #fff;
    width: 100%;
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.18rem 0.35rem;
}

.horoscope-tile-icon {
    font-size: 2rem;
    line-height: 1;
    padding-top: 0.55rem;
}

.weather-focus {
    text-align: center;
    padding: 1rem 0.5rem;
}

.weather-focus h3 {
    font-size: 1.4rem;
    margin-bottom: 0.35rem;
}

.weather-focus-temp {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    color: var(--brand-red);
    margin-bottom: 0.75rem;
}

.weather-focus p {
    margin-bottom: 0.35rem;
    color: #475569;
}

.horoscope-shell {
    overflow: visible;
}

.horoscope-hero {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: linear-gradient(135deg, color-mix(in srgb, var(--sign-color) 82%, white), var(--sign-color));
    color: #fff;
    border-radius: 1.25rem;
    padding: 1.5rem;
}

.horoscope-symbol {
    width: 92px;
    height: 92px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.16);
    font-size: 3rem;
}

.mini-sign-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    background: var(--sign-color);
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 700;
}

.horoscope-item {
    border: 1px solid var(--line);
    border-radius: 1rem;
    padding: 0.95rem 1rem;
    background: rgba(248, 250, 252, 0.92);
}

.horoscope-item strong {
    display: block;
    margin-bottom: 0.45rem;
}

.horoscope-item p {
    margin: 0;
    color: #4b5563;
    line-height: 1.6;
}

canvas {
    max-width: 100%;
}

@media (max-width: 991.98px) {
    .hero-card,
    .hero-card img {
        min-height: 360px;
        height: 360px;
    }

    .sidebar-stack {
        position: static;
    }

    .article-image {
        height: 260px;
    }

    .score-row,
    .module-status-row {
        align-items: flex-start;
    }

    .horoscope-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .hero-overlay {
        padding: 1.2rem;
    }

    .headline-item img {
        width: 88px;
        height: 72px;
    }

    .weather-toolbar {
        width: 100%;
        flex-wrap: wrap;
    }

    .horoscope-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ticker-strip {
        gap: 0.6rem;
    }
}
