/* ============================================================
   SineGossip — Stylesheet
   Theme: Dark Velvet — deep purple + charcoal editorial
   Close to Sineth News structure, distinct colour identity
   ============================================================ */

:root {
    --primary:      #7B2D8B;
    --primary-dark: #5B1E68;
    --primary-light:#9B3DAB;
    --accent:       #F39C12;
    --dark:         #0F0018;
    --slate:        #2D2040;
    --mid:          #6B6080;
    --light-bg:     #F4F0F8;
    --border:       #DDD5E8;
    --white:        #FFFFFF;
    --press:        #E67E22;
    --gold:         #F1C40F;
    --text:         #1A1020;
    --text-muted:   #7A6F88;
    --font-main:    'Inter', sans-serif;
    --font-si:      'Noto Sans Sinhala', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    font-family: var(--font-main);
    background: var(--light-bg);
    color: var(--text);
    overflow-x: hidden;
    margin: 0;
    line-height: 1.7;
}
body.lang-si,
body.lang-si p,
body.lang-si h1, body.lang-si h2, body.lang-si h3,
body.lang-si h4, body.lang-si h5, body.lang-si h6,
body.lang-si .nav-link, body.lang-si .btn,
body.lang-si .strip-title, body.lang-si .card-title { font-family: var(--font-si); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 3px; }

/* ── Masthead ─────────────────────────────────────────────── */
.masthead {
    background: var(--dark);
    border-bottom: 3px solid var(--primary);
}
.masthead-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: stretch;
    min-height: 68px;
}
.masthead-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1.5rem .75rem 0;
    border-right: 1px solid rgba(255,255,255,.08);
    text-decoration: none;
}
.masthead-brand img { height: 40px; width: auto; }
.brand-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -.5px;
    line-height: 1.1;
}
.brand-name span { color: var(--primary-light); }
.brand-sub {
    font-size: .68rem;
    color: rgba(255,255,255,.4);
    letter-spacing: .08em;
    text-transform: uppercase;
}
.masthead-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-left: 1.5rem;
    flex: 1;
}
.masthead-date { font-size: .77rem; color: rgba(255,255,255,.35); white-space: nowrap; }
.masthead-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: .65rem;
}
.masthead-actions a {
    color: rgba(255,255,255,.65);
    font-size: .82rem;
    padding: .3rem .65rem;
    border-radius: 4px;
    transition: color .2s, background .2s;
}
.masthead-actions a:hover { color: #fff; background: rgba(255,255,255,.07); }
.lang-switch-btn {
    background: var(--primary) !important;
    color: #fff !important;
    padding: .3rem .8rem !important;
    border-radius: 4px;
    font-weight: 600;
    font-size: .78rem !important;
}
.lang-switch-btn:hover { background: var(--primary-dark) !important; }

/* ── Slim Nav ─────────────────────────────────────────────── */
.site-nav {
    background: var(--slate);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.site-nav .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 46px;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: .1rem;
    flex: 1;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-links a {
    display: block;
    padding: .38rem .8rem;
    font-size: .83rem;
    font-weight: 600;
    color: rgba(255,255,255,.7);
    text-transform: uppercase;
    letter-spacing: .04em;
    border-radius: 4px;
    transition: color .2s, background .2s;
}
.nav-links a:hover, .nav-links a.active {
    color: #fff;
    background: rgba(123,45,139,.5);
}
.nav-search { display: flex; align-items: center; gap: .4rem; }
.nav-search input {
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 20px;
    padding: .28rem .85rem;
    font-size: .82rem;
    width: 170px;
    outline: none;
    background: rgba(255,255,255,.08);
    color: #fff;
    transition: border-color .2s, width .3s;
}
.nav-search input::placeholder { color: rgba(255,255,255,.35); }
.nav-search input:focus { border-color: var(--primary-light); width: 210px; background: rgba(255,255,255,.12); }
.nav-search button {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: .28rem .85rem;
    font-size: .82rem;
    cursor: pointer;
    transition: background .2s;
}
.nav-search button:hover { background: var(--primary-dark); }

/* ── HOT Ticker ───────────────────────────────────────────── */
.breaking-ticker {
    background: var(--primary);
    color: #fff;
    padding: .42rem 0;
    overflow: hidden;
}
.breaking-ticker .container { display: flex; align-items: center; }
.breaking-label {
    background: var(--dark);
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: .22rem .7rem;
    border-radius: 2px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: .75rem;
}
.ticker-wrap { overflow: hidden; flex: 1; }
.ticker-items {
    display: flex;
    gap: 3rem;
    animation: ticker-scroll 35s linear infinite;
    white-space: nowrap;
}
.ticker-items a { color: rgba(255,255,255,.92); font-size: .83rem; font-weight: 500; text-decoration: none; white-space: nowrap; }
.ticker-items a:hover { text-decoration: underline; color: var(--gold); }
@keyframes ticker-scroll { from { transform: translateX(100%); } to { transform: translateX(-100%); } }

/* ── Featured Hero ────────────────────────────────────────── */
.featured-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--dark);
    overflow: hidden;
    margin-bottom: 1.5rem;
    min-height: 360px;
    border-radius: 8px;
}
.hero-text {
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(135deg, var(--dark) 60%, var(--slate));
}
.hero-text h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    margin: .75rem 0;
    font-style: italic;
}
.hero-text h2 a { color: #fff; }
.hero-text h2 a:hover { color: var(--gold); }
.hero-meta { font-size: .8rem; color: rgba(255,255,255,.5); display: flex; gap: 1rem; }
.hero-excerpt { color: rgba(255,255,255,.65); font-size: .9rem; margin: .5rem 0 1rem; line-height: 1.6; }
.hero-image { position: relative; overflow: hidden; min-height: 300px; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.hero-no-image {
    width: 100%; height: 100%; min-height: 300px;
    background: var(--slate);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.15); font-size: 3rem;
}

/* ── Post Cards (2-column grid on index) ──────────────────── */
.news-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(123,45,139,.08);
    transition: transform .2s, box-shadow .2s;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-top: 3px solid var(--primary);
}
.news-card:hover { transform: translateY(-5px); box-shadow: 0 10px 28px rgba(123,45,139,.18); }
.news-card .card-img-top { height: 200px; object-fit: cover; width: 100%; transition: transform .35s; }
.news-card:hover .card-img-top { transform: scale(1.04); }
.news-card .card-img-wrap { overflow: hidden; }
.news-card .card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.news-card .card-title {
    font-size: .98rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.4;
    font-style: italic;
}
.news-card .card-title a { color: inherit; }
.news-card .card-title a:hover { color: var(--primary); }
.news-card .card-text { font-size: .86rem; color: var(--text-muted); flex: 1; }
.news-card .card-footer-meta {
    font-size: .77rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 9px;
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
}

/* ── List items (sidebar) ─────────────────────────────────── */
.mini-post { display: flex; gap: .65rem; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.mini-post:last-child { border-bottom: none; }
.mini-post-img { width: 64px; height: 48px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.mini-post-placeholder {
    width: 64px; height: 48px; border-radius: 4px; flex-shrink: 0;
    background: var(--light-bg);
    display: flex; align-items: center; justify-content: center; color: var(--border); font-size: .9rem;
}
.mini-post-title { font-size: .82rem; font-weight: 600; color: var(--text); line-height: 1.35; }
.mini-post-title a { color: inherit; }
.mini-post-title a:hover { color: var(--primary); }
.mini-post-date { font-size: .72rem; color: var(--text-muted); margin-top: .2rem; }

/* ── Badges ───────────────────────────────────────────────── */
.badge-breaking {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .09em;
}
.badge-press {
    display: inline-block;
    background: var(--press);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.badge-cat {
    display: inline-block;
    background: rgba(123,45,139,.12);
    color: var(--primary);
    font-size: .72rem;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 20px;
    border: 1px solid rgba(123,45,139,.2);
}
.badge-cat:hover { background: var(--primary); color: #fff; }

/* ── Lang badge ───────────────────────────────────────────── */
.lang-badge {
    display: inline-block;
    font-size: .58rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    background: var(--gold);
    color: #fff;
    vertical-align: middle;
    margin-left: 5px;
    white-space: nowrap;
}
.lang-badge-only    { background: var(--accent); }
.lang-badge-primary { background: #9CA3AF; font-weight: 500; }
.translate-notice {
    background: #FDF5FF;
    border: 1px solid rgba(123,45,139,.3);
    border-left: 4px solid var(--primary);
    border-radius: 6px;
    padding: .9rem 1.1rem;
    font-size: .88rem;
    color: #555;
}

/* ── Section divider ──────────────────────────────────────── */
.section-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.5rem 0 1rem;
}
.section-divider-label {
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--primary);
    white-space: nowrap;
}
.section-divider-line { flex: 1; height: 2px; background: var(--primary); opacity: .4; }

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar-section {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 8px rgba(123,45,139,.07);
}
.sidebar-heading {
    background: var(--slate);
    color: #fff;
    font-size: .77rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: .6rem 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.sidebar-body { padding: .75rem 1rem; }
.cat-pill-list { display: flex; flex-wrap: wrap; gap: .4rem; padding: .75rem 1rem; }
.cat-pill {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    background: var(--light-bg);
    color: var(--slate);
    font-size: .78rem;
    font-weight: 600;
    padding: .3rem .75rem;
    border-radius: 20px;
    text-decoration: none;
    transition: background .2s, color .2s;
    border: 1px solid var(--border);
}
.cat-pill:hover, .cat-pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.cat-pill .cnt { font-weight: 400; font-size: .72rem; opacity: .7; }

/* ── CTA sidebar ──────────────────────────────────────────── */
.sineth-cta {
    background: linear-gradient(135deg, var(--dark), var(--slate));
    color: #fff;
    border-radius: 8px;
    padding: 1.25rem 1rem;
    text-align: center;
    margin-bottom: 1.25rem;
}
.sineth-cta img { height: 44px; margin: 0 auto .75rem; }
.sineth-cta h6 { color: #fff; font-weight: 700; margin-bottom: .25rem; }
.sineth-cta p { color: rgba(255,255,255,.55); font-size: .82rem; margin-bottom: .9rem; }
.btn-cta { display: inline-block; background: var(--primary); color: #fff; font-size: .82rem; font-weight: 700; padding: .42rem 1.2rem; border-radius: 4px; text-decoration: none; transition: background .2s; }
.btn-cta:hover { background: var(--primary-dark); color: #fff; }

/* ── Article page ─────────────────────────────────────────── */
.article-wrap {
    background: var(--white);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(123,45,139,.07);
}
.article-featured-img { width: 100%; border-radius: 6px; margin-bottom: 1.5rem; max-height: 480px; object-fit: cover; }
.article-meta {
    display: flex; flex-wrap: wrap; gap: 1rem;
    font-size: .82rem; color: var(--text-muted);
    margin-bottom: 1.25rem; padding-bottom: .75rem;
    border-bottom: 1px solid var(--border);
}
.article-content { font-size: 1rem; line-height: 1.9; color: var(--text); }
.article-content p { margin-bottom: 1.1rem; }
.article-content h2, .article-content h3 { color: var(--primary-dark); margin: 1.8rem 0 .8rem; font-style: italic; }
.article-content strong { font-weight: 700; }
.article-content img { max-width: 100%; height: auto; border-radius: 6px; margin: 1rem 0; }
.article-content ul, .article-content ol { padding-left: 1.5rem; margin-bottom: 1.1rem; }
.article-content li { margin-bottom: .35rem; }

/* ── Share bar ────────────────────────────────────────────── */
.share-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
    margin: 2rem 0;
    padding: 1rem 1.25rem;
    background: var(--light-bg);
    border-radius: 6px;
    border-left: 4px solid var(--primary);
}
.share-bar a {
    display: inline-flex; align-items: center; gap: .35rem;
    font-size: .8rem; font-weight: 600;
    padding: .4rem .9rem; border-radius: 4px;
    text-decoration: none; transition: opacity .2s;
}
.share-bar a:hover { opacity: .85; }
.share-fb  { background: #1877F2; color: #fff; }
.share-x   { background: #000; color: #fff; }
.share-wa  { background: #25D366; color: #fff; }
.share-li  { background: #0A66C2; color: #fff; }
.share-tg  { background: #229ED9; color: #fff; }
.share-em  { background: #6C757D; color: #fff; }
.share-copy { background: #6C757D; color: #fff; border: none; cursor: pointer; }
.share-copy.copied { background: var(--primary); }

/* ── Category cards ───────────────────────────────────────── */
.cat-card {
    display: block;
    background: var(--white);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 2px 8px rgba(123,45,139,.08);
    border: 2px solid transparent;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.cat-card:hover { border-color: var(--primary); box-shadow: 0 6px 20px rgba(123,45,139,.16); transform: translateY(-3px); color: var(--primary); }
.cat-icon {
    width: 56px; height: 56px;
    background: rgba(123,45,139,.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    margin: 0 auto .75rem;
}
.cat-card h5 { font-size: .95rem; font-weight: 700; margin-bottom: .3rem; }
.cat-count { font-size: .78rem; color: var(--text-muted); }

/* ── Login ────────────────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--dark) 0%, var(--slate) 100%);
    display: flex; align-items: center; justify-content: center;
    padding: 2rem 1rem;
}
.login-box {
    background: #fff;
    border-radius: 10px;
    padding: 2.5rem 2rem;
    width: 100%; max-width: 400px;
    box-shadow: 0 12px 48px rgba(0,0,0,.35);
    border-top: 4px solid var(--primary);
}
.login-box h3 { font-size: 1.3rem; font-weight: 800; color: var(--dark); text-align: center; margin-bottom: .25rem; }
.login-logo { text-align: center; margin-bottom: 1.25rem; }
.login-logo img { height: 52px; margin: 0 auto; }
.site-sub { text-align: center; color: var(--text-muted); font-size: .88rem; margin-bottom: 1.5rem; font-style: italic; }

/* ── Pagination ───────────────────────────────────────────── */
.pagination .page-link { color: var(--primary); border-color: var(--border); }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .page-link:hover { color: var(--primary-dark); }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
    background: var(--dark);
    color: rgba(255,255,255,.7);
    padding: 2.5rem 0 0;
    margin-top: 3rem;
    border-top: 4px solid var(--primary);
}
.footer-brand { font-size: 1.1rem; font-weight: 800; color: #fff; }
.footer-brand span { color: var(--primary-light); }
.footer-tagline-text { font-size: .8rem; color: rgba(255,255,255,.38); margin-top: .2rem; }
.footer-heading { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.4); margin-bottom: .75rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .4rem; }
.footer-links a { color: rgba(255,255,255,.6); font-size: .85rem; text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--primary-light); }
.footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-contact li { font-size: .82rem; color: rgba(255,255,255,.48); margin-bottom: .3rem; display: flex; align-items: center; gap: .5rem; }
.footer-divider { border-color: rgba(255,255,255,.07); margin: 1.5rem 0 0; }
.footer-bottom { background: rgba(0,0,0,.3); padding: .75rem 0; }
.social-icons { display: flex; gap: .5rem; margin-top: .75rem; }
.social-icons a {
    width: 34px; height: 34px;
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.55);
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: .85rem; text-decoration: none;
    transition: background .2s, color .2s;
}
.social-icons a:hover { background: var(--primary); color: #fff; }

/* ── Admin ────────────────────────────────────────────────── */
.admin-wrapper { display: flex; min-height: 100vh; background: var(--light-bg); }
.admin-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--slate);
    display: flex; flex-direction: column;
    min-height: 100vh;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-brand {
    background: var(--dark);
    padding: 1.1rem 1rem;
    border-bottom: 2px solid var(--primary);
}
.sidebar-brand .brand-name { font-size: 1rem; font-weight: 800; color: #fff; }
.sidebar-brand .brand-name span { color: var(--primary-light); }
.sidebar-brand .brand-sub { font-size: .68rem; color: rgba(255,255,255,.38); text-transform: uppercase; letter-spacing: .06em; }
.sidebar-nav { padding: 1rem 0; flex: 1; }
.sidebar-nav .nav-label { font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.3); padding: .5rem 1rem .2rem; }
.sidebar-nav .nav-link {
    display: flex; align-items: center; gap: .6rem;
    padding: .55rem 1rem;
    color: rgba(255,255,255,.62);
    font-size: .875rem; font-weight: 500; text-decoration: none;
    transition: background .15s, color .15s;
    border-left: 3px solid transparent;
}
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-nav .nav-link.active { background: rgba(123,45,139,.25); color: #fff; border-left-color: var(--primary-light); }
.admin-content { flex: 1; overflow: auto; }
.admin-topbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: .75rem 1.5rem;
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    border-top: 3px solid var(--primary);
}
.admin-topbar h5 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--dark); }
.admin-body { padding: 1.5rem; }
.stat-card {
    background: var(--white);
    border-radius: 8px; padding: 1.25rem;
    display: flex; align-items: center; gap: 1rem;
    box-shadow: 0 2px 8px rgba(123,45,139,.07);
    border-left: 4px solid var(--primary);
}
.stat-icon { width: 44px; height: 44px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.stat-value { font-size: 1.6rem; font-weight: 800; color: var(--dark); line-height: 1; }
.stat-label { font-size: .78rem; color: var(--text-muted); font-weight: 500; margin-top: .15rem; }

/* Bootstrap overrides */
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.breadcrumb { background: none; padding: 0; margin: 0 0 1rem; }
.breadcrumb-item a { color: var(--primary); }
.breadcrumb-item.active { color: var(--text-muted); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 992px) {
    .featured-hero { grid-template-columns: 1fr; }
    .hero-image { min-height: 220px; }
    .admin-sidebar { width: 200px; }
}
@media (max-width: 768px) {
    .masthead-inner { min-height: 54px; }
    .brand-name { font-size: 1.15rem; }
    .masthead-meta { display: none; }
    .nav-links a { font-size: .76rem; padding: .32rem .5rem; }
    .nav-search input { width: 110px; }
    .admin-sidebar { position: fixed; left: -200px; transition: left .25s; }
    .admin-sidebar.open { left: 0; }
}
@media (max-width: 575px) {
    .featured-hero .hero-text { padding: 1.5rem 1rem; }
    .hero-text h2 { font-size: 1.2rem; }
    .site-nav .container { gap: .4rem; }
    .news-card .card-img-top { height: 170px; }
    .article-wrap { padding: 1rem; }
    .login-box { padding: 2rem 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    .ticker-items { animation: none; }
}

/* ── Mobile Nav Toggle ───────────────────────────────────── */
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid rgba(255,255,255,.25);
    color: rgba(255,255,255,.75);
    font-size: 1.05rem;
    cursor: pointer;
    padding: .38rem .65rem;
    border-radius: 4px;
    line-height: 1;
    flex-shrink: 0;
    transition: background .2s, color .2s, border-color .2s;
}
.nav-toggle:hover { background: rgba(123,45,139,.45); color: #fff; border-color: var(--primary-light); }
.nav-toggle[aria-expanded="true"] { background: rgba(123,45,139,.55); color: #fff; border-color: var(--primary-light); }

@media (max-width: 767px) {
    .nav-toggle { display: flex; }
    .site-nav .container {
        flex-wrap: wrap;
        height: auto;
        min-height: 46px;
        padding-top: .3rem;
        padding-bottom: .3rem;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        order: 10;
        gap: 0;
        padding: .3rem 0;
        border-top: 1px solid rgba(255,255,255,.08);
        margin-top: .25rem;
        background: var(--slate);
    }
    .nav-links.open { display: flex; }
    .nav-links li { width: 100%; }
    .nav-links a {
        padding: .7rem 1rem;
        border-radius: 0;
        font-size: .88rem;
        border-bottom: 1px solid rgba(255,255,255,.05);
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    .nav-links a:last-child { border-bottom: none; }
    .nav-search { flex: 1; }
    .nav-search input { width: 100%; min-width: 0; }
}

@media (max-width: 575px) {
    .masthead-inner { flex-wrap: wrap; min-height: auto; padding: .5rem 1rem; gap: 0; }
    .masthead-brand { border-right: none; padding: .3rem 0; }
    .masthead-actions {
        width: 100%;
        justify-content: flex-end;
        padding: .25rem 0 .4rem;
        gap: .35rem;
        flex-wrap: wrap;
        margin-left: 0;
    }
    .masthead-actions a { font-size: .76rem; padding: .25rem .5rem; min-height: 36px; display: inline-flex; align-items: center; }
}

/* ── Homepage latest digest cards ───────────────────────────── */
.latest-digest-card { background:var(--white); border-radius:8px; overflow:hidden; box-shadow:0 1px 4px rgba(0,0,0,.07); border-top:4px solid var(--primary); }
.ldc-header { display:flex; align-items:center; padding:.8rem 1rem; border-bottom:1px solid var(--light-gray); font-size:.85rem; }
.ldc-archive-link { font-size:.75rem; text-decoration:none; font-weight:700; margin-left:auto; transition:opacity .15s; }
.ldc-archive-link:hover { opacity:.75; }
.ldc-body { display:block; padding:1.1rem 1rem; text-decoration:none; color:inherit; transition:background .15s; }
.ldc-body:hover { background:rgba(0,0,0,.03); }
.ldc-edition-badge { display:inline-block; font-size:.7rem; font-weight:700; padding:3px 10px; border-radius:20px; text-transform:uppercase; letter-spacing:.04em; margin-bottom:.55rem; }
.ldc-date { font-size:1rem; font-weight:700; color:var(--dark); margin-bottom:.25rem; }
.ldc-count { font-size:.82rem; color:var(--text-muted); }
.ldc-empty { color:var(--text-muted); font-size:.85rem; min-height:72px; display:flex; align-items:center; }
.dac-type-label { font-size:.68rem; font-weight:700; text-transform:uppercase; letter-spacing:.08em; margin-bottom:.3rem; }

/* ── Digest hero banner ──────────────────────────────────────── */
.digest-hero {
    padding: 1.75rem 0 1.5rem;
    margin-bottom: 0;
}
.digest-hero-back {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-size: .8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    opacity: .85;
    transition: opacity .2s;
}
.digest-hero-back:hover { opacity: 1; }
.digest-hero-body {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.digest-hero-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    color: #fff;
}
.digest-hero-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 .5rem;
    line-height: 1.15;
    letter-spacing: -.5px;
}
.digest-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    font-size: .82rem;
}
.digest-edition-pill {
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: .78rem;
    letter-spacing: .04em;
    display: inline-block;
}

/* ── Story card ───────────────────────────────────────────────── */
.story-card {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    margin-bottom: 1.5rem;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}
.story-num-circle {
    position: absolute;
    top: 1.1rem;
    left: 1.1rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    font-size: 1rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
    z-index: 2;
    flex-shrink: 0;
}
.story-card-body { padding: 1rem 1.25rem 0; padding-left: 4.25rem; }
.story-thumb-wrap {
    margin: 0 -1.25rem 1rem -4.25rem;
    max-height: 220px;
    overflow: hidden;
    position: relative;
}
.story-thumb-wrap img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}
.story-card:first-child .story-thumb-wrap {
    margin: -1rem -1.25rem 1rem -4.25rem;
}
.story-headline {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.35;
    margin: 0 0 .75rem;
}
.story-summary {
    font-size: .93rem;
    color: var(--text);
    line-height: 1.8;
    margin: 0 0 1rem;
}
.story-sources-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.25rem .9rem 4.25rem;
    border-top: 2px solid var(--light-gray);
    background: var(--light-gray);
    margin: 0 -1.25rem;
    margin-left: -4.25rem;
}
.sources-label {
    font-size: .74rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
}
.sources-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.source-chip {
    display: inline-flex;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--slate);
    padding: 4px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-size: .78rem;
    font-weight: 600;
    transition: background .15s, border-color .15s, color .15s;
}
.source-chip:hover {
    background: var(--chip-color, var(--primary));
    border-color: var(--chip-color, var(--primary));
    color: #fff;
}
.digest-bottom-nav { display: flex; gap: .75rem; margin-top: .5rem; }

/* ── Sidebar digest cards ─────────────────────────────────────── */
.sidebar-digest-card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    border-left: 4px solid var(--primary);
    overflow: hidden;
}
.sdc-header {
    padding: .65rem 1rem;
    font-size: .8rem;
    color: var(--slate);
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    align-items: center;
    gap: .35rem;
}
.sdc-link { display: block; padding: .85rem 1rem; text-decoration: none; color: inherit; transition: background .15s; }
.sdc-link:hover { background: var(--light-gray); color: inherit; }
.sdc-meta { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .3rem; }
.sdc-edition { font-size: .7rem; font-weight: 700; padding: 2px 9px; border-radius: 20px; display: inline-block; }
.sdc-morning { background: #FEF3E2; color: #D35400; }
.sdc-evening { background: #EEF2FF; color: #3730A3; }
.sdc-date { font-size: .82rem; color: var(--text-muted); }
.sdc-count { font-size: .88rem; font-weight: 700; color: var(--dark); }
.sidebar-cta {
    background: linear-gradient(135deg, var(--slate), var(--dark));
    color: #fff;
    border-radius: 8px;
    padding: 1.25rem 1rem;
    text-align: center;
}
.sidebar-cta img { height: 44px; margin: 0 auto .65rem; display: block; }
.cta-name { font-weight: 700; color: #fff; font-size: .95rem; margin-bottom: .6rem; }
.cta-btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    padding: .45rem 1.25rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background .2s;
}
.cta-btn:hover { background: var(--primary-dark); color: #fff; }

/* ── Archive listing cards ───────────────────────────────────── */
.digest-archive-hero { padding: 0; }
.digest-archive-card { display:block; background:var(--white); border-radius:8px; padding:1.1rem; box-shadow:0 1px 4px rgba(0,0,0,.06); text-decoration:none; color:inherit; border:2px solid transparent; transition:border-color .2s, box-shadow .2s; }
.digest-archive-card:hover { border-color:var(--acc, var(--primary)); box-shadow:0 4px 16px rgba(123,45,139,.12); color:inherit; }
.dac-edition { font-size:.75rem; font-weight:700; padding:2px 9px; border-radius:20px; display:inline-block; margin-bottom:.5rem; background:#F5EEF8; color:#7B2D8B; }
.dac-date { font-size:.95rem; font-weight:700; color:var(--dark); margin-bottom:.25rem; }
.dac-count { font-size:.78rem; color:var(--text-muted); }
.dac-arrow { text-align:right; color:var(--acc, var(--primary)); font-size:.85rem; margin-top:.4rem; }

/* ── Digest responsive ────────────────────────────────────────── */
@media (max-width: 767px) {
    .digest-hero { padding: 1.5rem 0 1.25rem; }
    .digest-hero-title { font-size: 1.5rem; }
    .digest-hero-icon { width: 44px; height: 44px; font-size: 1.1rem; }
    .story-card-body { padding: 1rem 1rem 0; padding-left: 3.75rem; }
    .story-num-circle { width: 36px; height: 36px; font-size: .85rem; top: .9rem; left: .9rem; }
    .story-thumb-wrap { margin: 0 -1rem 1rem -3.75rem; }
    .story-card:first-child .story-thumb-wrap { margin: -1rem -1rem 1rem -3.75rem; }
    .story-headline { font-size: 1rem; }
    .story-sources-bar { padding: .65rem 1rem .75rem 3.75rem; margin: 0 -1rem; margin-left: -3.75rem; }
    .digest-hero-meta { gap: .5rem; }
}
@media (max-width: 480px) {
    .story-card-body { padding: .85rem .85rem 0; padding-left: 3.5rem; }
    .story-num-circle { width: 32px; height: 32px; font-size: .78rem; top: .85rem; left: .85rem; }
    .story-thumb-wrap { margin: 0 -.85rem 1rem -3.5rem; }
    .story-card:first-child .story-thumb-wrap { margin: -.85rem -.85rem 1rem -3.5rem; }
    .story-sources-bar { padding: .6rem .85rem .7rem 3.5rem; margin: 0 -.85rem; margin-left: -3.5rem; }
}
