/* =========================================================================
   ePaper public theme - "Stitch" editorial design system
   Editorial navy + crimson accent, Domine headlines, Source Sans 3 body,
   JetBrains Mono for dates/counters. Light "paper" and dark "obsidian" modes.
   Brand colours come from Admin > White Label (CSS vars injected by header.php).
   ========================================================================= */
:root {
  --primary: #1b3a8c;
  --primary-deep: #00236e;
  --accent: #d6204e;
  --accent-deep: #b9003d;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-low: #eff4ff;
  --surface-mid: #e5eeff;
  --surface-high: #dce9ff;
  --ink: #0f172a;
  --ink-2: #475569;
  --muted: #64748b;
  --line: #e2e8f0;
  --header-bg: #ffffff;
  --nav-bg: var(--surface-high);
  --nav-text: var(--ink);
  --footer-bg: #0f172a;
  --footer-color: #94a3b8;
  --shadow-1: 0 1px 3px 0 rgba(15, 23, 42, .04);
  --shadow-2: 0 8px 20px -4px rgba(27, 58, 140, .10);
  --shadow-3: 0 4px 16px -2px rgba(15, 23, 42, .12);
  --font: 'Source Sans 3', 'Noto Sans Telugu', sans-serif;
  --font-head: 'Geist', 'Noto Sans Telugu', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --radius: 4px;
  --radius-lg: 8px;
  --fs-scale: 1;
}
html[data-theme="dark"] {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-low: #172033;
  --surface-mid: #223049;
  --surface-high: #1b2436;
  --ink: #e2e8f0;
  --ink-2: #a3b1c6;
  --muted: #8a9ab3;
  --line: #334155;
  --header-bg: #111827;
  --accent: #ff2a5f;
  --shadow-1: none;
  --shadow-2: 0 0 0 1px rgba(214, 32, 78, .25);
  color-scheme: dark;
}
html[data-theme="dark"] .main-nav { --nav-bg: #172033; --nav-text: #e2e8f0; }
/* navy-on-dark text gets the light "inverse primary" tone for contrast */
html[data-theme="dark"] :is(.sec-tools button, .live-links .yday, .ps-more, .edition-pick i, .widget-title i, .vt-group > i, .oe-item i.ic, .badge-soft:not(.badge-live), .crumbs li:last-child, .search-box i) { color: #b5c4ff; }
html[data-theme="dark"] .badge-soft:not(.badge-live) { background: rgba(181, 196, 255, .12); }

html { font-size: calc(16px * var(--fs-scale)); }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: .94rem; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
html[data-theme="dark"] a { color: #9db4ff; }
a:hover { color: var(--accent); }
h1, h2, h3, h4, h5, .head { font-family: var(--font-head); color: var(--ink); }
.mono { font-family: var(--font-mono); letter-spacing: .02em; }
.container-x { max-width: 1360px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 992px) { .container-x { padding: 0 2rem; } }

/* Buttons ---------------------------------------------------------------- */
.btn-navy, .btn-crimson, .btn-soft, .btn-line {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border-radius: var(--radius);
  font-weight: 600; font-size: .85rem; padding: .45rem .9rem; border: 1px solid transparent; line-height: 1.2;
  transition: background .15s, transform .15s, color .15s; white-space: nowrap; cursor: pointer;
}
.btn-navy { background: var(--primary); color: #fff !important; }
.btn-navy:hover { background: var(--primary-deep); transform: translateY(-1px); }
.btn-crimson { background: var(--accent); color: #fff !important; }
.btn-crimson:hover { background: var(--accent-deep); transform: translateY(-1px); }
.btn-soft { background: var(--surface-mid); color: var(--ink) !important; }
.btn-soft:hover { background: var(--surface-high); }
.btn-line { background: var(--surface); border-color: var(--line); color: var(--ink) !important; }
.btn-line:hover { border-color: var(--primary); }
.btn-sq { width: 36px; height: 36px; padding: 0; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-deep); border-color: var(--primary-deep); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }
.btn-accent { background: var(--accent); color: #fff; }
.badge-soft { display: inline-block; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; padding: .15rem .4rem; border-radius: var(--radius); background: rgba(27, 58, 140, .08); color: var(--primary); }
.badge-live { background: rgba(214, 32, 78, .12); color: var(--accent); font-weight: 700; }
.form-control, .form-select { border-color: var(--line); border-radius: var(--radius); background-color: var(--surface); color: var(--ink); }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(27, 58, 140, .25); background-color: var(--surface); color: var(--ink); }

/* Top utility bar -------------------------------------------------------- */
.topbar { background: var(--primary); color: #dce1ff; font-size: .75rem; }
.topbar .container-x { height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.topbar .tb-left, .topbar .tb-right { display: flex; align-items: center; gap: .9rem; min-width: 0; }
.topbar .tb-date { font-family: var(--font-mono); color: #fff; white-space: nowrap; }
.topbar .tb-badge { background: var(--accent); color: #fff; padding: .1rem .45rem; border-radius: var(--radius); font-weight: 700; white-space: nowrap; }
.topbar .tb-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.theme-toggle { background: rgba(255, 255, 255, .12); color: #fff; border: 0; border-radius: var(--radius); padding: .2rem .55rem; font-size: .75rem; display: inline-flex; gap: .35rem; align-items: center; }
.theme-toggle:hover { background: rgba(255, 255, 255, .22); }

.theme-toggle[hidden] { display: none !important; }
.push-toggle.on { background: var(--accent); }

/* Push notification prompt ------------------------------------------------ */
.push-prompt { position: fixed; left: 50%; bottom: 18px; z-index: 1080; width: min(420px, calc(100% - 24px)); transform: translate(-50%, 140%);
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 28px -4px rgba(15, 23, 42, .28);
  display: flex; gap: .8rem; padding: 1rem; transition: transform .35s ease; }
.push-prompt.show { transform: translate(-50%, 0); }
.push-prompt .pp-ic { width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.push-prompt b { font-family: var(--font-head); font-size: 1rem; display: block; }
.push-prompt p { margin: .2rem 0 .7rem; font-size: .84rem; color: var(--ink-2); }
.push-prompt .pp-actions { display: flex; gap: .5rem; }

/* WhatsApp channel button ------------------------------------------------- */
.btn-wa-channel { display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; background: #22c55e; color: #fff !important; font-weight: 700; border-radius: var(--radius); padding: .7rem 1rem; font-size: .95rem; transition: background .15s, transform .15s; }
.btn-wa-channel:hover { background: #16a34a; transform: translateY(-1px); }
.btn-wa-channel i { font-size: 1.25rem; }

/* Masthead --------------------------------------------------------------- */
.site-header { background: var(--header-bg); position: sticky; top: 0; z-index: 1030; box-shadow: var(--shadow-3); }
.masthead .container-x { min-height: 76px; display: flex; align-items: center; gap: 1rem; justify-content: space-between; padding-top: .5rem; padding-bottom: .5rem; }
.brand { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.brand img { max-height: 54px; max-width: 220px; }
.brand-name { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; color: var(--primary); line-height: 1.05; display: block; }
html[data-theme="dark"] .brand-name { color: #dce1ff; }
.brand-sub { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); display: block; margin-top: 2px; }
.search-box { position: relative; flex: 1; max-width: 440px; }
.search-box input { width: 100%; height: 38px; border: 1px solid transparent; background: var(--surface-low); border-radius: var(--radius); padding: 0 .8rem 0 2.2rem; color: var(--ink); font-size: .88rem; }
.search-box input:focus { outline: none; border-color: var(--primary); }
.search-box i { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; }
.mast-actions { display: flex; align-items: center; gap: .6rem; }
.edition-pick { display: flex; align-items: center; gap: .35rem; }
.edition-pick i { color: var(--primary); }
.edition-pick select { height: 34px; border: 0; background: var(--surface-mid); color: var(--ink); border-radius: var(--radius); font-size: .8rem; font-weight: 600; padding: 0 1.6rem 0 .5rem; max-width: 190px; }
.avatar-btn { width: 34px; height: 34px; border-radius: 50%; background: var(--primary-deep); color: #fff !important; display: inline-flex; align-items: center; justify-content: center; }
html[data-theme="dark"] .avatar-btn { background: var(--primary); }

/* Main nav --------------------------------------------------------------- */
.main-nav { background: var(--nav-bg); padding: 0; }
.main-nav .container-x { display: flex; align-items: center; justify-content: space-between; min-height: 44px; width: 100%; }
.main-nav .navbar-nav { gap: .15rem; }
.main-nav .nav-link { color: var(--nav-text) !important; font-weight: 600; font-size: .9rem; padding: .35rem .8rem !important; border-radius: var(--radius); }
.main-nav .nav-link:hover { background: rgba(27, 58, 140, .08); }
.main-nav .nav-link.active { background: var(--primary); color: #fff !important; }
.main-nav .nav-tools { display: flex; gap: .2rem; }
.main-nav .nav-tools button, .main-nav .nav-tools a { border: 0; background: transparent; color: var(--ink-2); width: 32px; height: 32px; border-radius: var(--radius); display: inline-flex; align-items: center; justify-content: center; }
.main-nav .nav-tools button:hover, .main-nav .nav-tools a:hover { background: rgba(27, 58, 140, .1); color: var(--primary); }
.main-nav .navbar-toggler { border: 0; color: var(--nav-text); font-size: 1.2rem; padding: .3rem .5rem; }
.main-nav .dropdown-menu { border-radius: 0 0 var(--radius-lg) var(--radius-lg); border-color: var(--line); background: var(--surface); }
.main-nav .dropdown-item { color: var(--ink); }

/* Live strip ------------------------------------------------------------- */
.live-strip { background: var(--surface); border-bottom: 1px solid var(--line); }
.live-strip .container-x { display: flex; align-items: center; gap: .9rem; min-height: 54px; flex-wrap: wrap; padding-top: .45rem; padding-bottom: .45rem; }
.live-pill { display: inline-flex; align-items: center; gap: .45rem; background: var(--accent); color: #fff; border-radius: 999px; padding: .25rem .8rem .25rem .45rem; font-weight: 700; font-size: .8rem; line-height: 1.1; }
.live-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); animation: pulse 1.6s infinite; }
.live-pill > span:last-child { display: flex; flex-direction: column; line-height: 1.15; white-space: nowrap; }
.live-pill small { display: block; font-family: var(--font-mono); font-size: .6rem; letter-spacing: .12em; opacity: .9; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.7); } 70% { box-shadow: 0 0 0 7px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
.ticker { flex: 1; min-width: 200px; overflow: hidden; white-space: nowrap; font-size: .88rem; color: var(--ink-2); }
.ticker strong { color: var(--ink); margin-right: .4rem; }
.ticker .ticker-move { display: inline-block; padding-left: 100%; animation: ticker 28s linear infinite; }
.ticker:hover .ticker-move { animation-play-state: paused; }
/* clear gap + dot between headlines (plain spaces would collapse) */
.ticker .tk-item + .tk-item::before { content: '•'; display: inline-block; margin: 0 1.25rem; color: var(--accent); font-weight: 700; }
@keyframes ticker { to { transform: translateX(-100%); } }
.live-links { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.live-links .yday { font-size: .8rem; font-weight: 600; color: var(--primary); }
.live-links .today-chip { background: var(--primary); color: #fff; border-radius: var(--radius); padding: .35rem .7rem; font-size: .8rem; font-weight: 700; font-family: var(--font-mono); }

/* Page index strip ------------------------------------------------------- */
.page-strip { background: var(--surface); border-bottom: 1px solid var(--line); }
.page-strip .container-x { display: flex; align-items: center; gap: 1.2rem; padding-top: .9rem; padding-bottom: .9rem; }
.ps-label { flex: 0 0 auto; border-right: 1px solid var(--line); padding-right: 1.2rem; }
.ps-label h3 { font-size: 1.15rem; margin: 0; color: var(--primary); }
html[data-theme="dark"] .ps-label h3 { color: #dce1ff; }
.ps-label small { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.ps-track { display: flex; gap: .7rem; overflow-x: auto; scroll-behavior: smooth; flex: 1; padding: 2px; scrollbar-width: none; }
.ps-track::-webkit-scrollbar { display: none; }
.ps-item { flex: 0 0 76px; text-align: center; font-size: .72rem; color: var(--ink-2); }
.ps-item .ps-img { position: relative; display: block; border: 1px solid var(--line); border-radius: 2px; background: #fff; aspect-ratio: 1 / 1.45; overflow: hidden; transition: border-color .15s, transform .15s; }
.ps-item img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.ps-item .pno { position: absolute; right: 3px; bottom: 3px; background: var(--ink); color: #fff; font-family: var(--font-mono); font-size: .6rem; padding: 0 .3rem; border-radius: 2px; }
html[data-theme="dark"] .ps-item .pno { background: #000; }
.ps-item.active .ps-img { border: 2px solid var(--accent); }
.ps-item.active .pno { background: var(--accent); }
.ps-item:hover .ps-img { border-color: var(--primary); transform: translateY(-2px); }
.ps-item span.cap { display: block; margin-top: .3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-more { flex: 0 0 76px; aspect-ratio: 1 / 1.45; border-radius: var(--radius); background: var(--surface-mid); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700; color: var(--primary); text-align: center; gap: .2rem; }
.ps-arrows { display: flex; gap: .35rem; }
.ps-arrows button { width: 32px; height: 32px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); color: var(--ink-2); }
.ps-arrows button:hover { border-color: var(--primary); color: var(--primary); }

/* Section heading -------------------------------------------------------- */
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .8rem; border-bottom: 1px solid var(--line); padding-bottom: .9rem; margin-bottom: 1.4rem; }
.sec-head h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 700; margin: 0; display: flex; align-items: center; gap: .6rem; letter-spacing: -.01em; }
.sec-head h2::before { content: ''; width: 8px; height: 1.1em; background: var(--accent); border-radius: 2px; flex: 0 0 auto; }
.sec-head p { margin: .35rem 0 0; color: var(--ink-2); font-size: .9rem; }
.sec-tools { display: flex; align-items: center; gap: .15rem; background: var(--surface-low); border-radius: var(--radius); padding: .2rem; }
.sec-tools button { border: 0; background: transparent; color: var(--primary); font-family: var(--font-mono); font-size: .72rem; padding: .3rem .55rem; border-radius: var(--radius); }
.sec-tools button.on, .sec-tools button:hover { background: var(--surface); box-shadow: var(--shadow-1); }
.sec-tools .sep { width: 1px; height: 16px; background: var(--line); margin: 0 .2rem; }
.sec-tools a { font-size: .8rem; font-weight: 600; color: var(--accent); padding: .3rem .55rem; }
.section-title { font-family: var(--font-head); font-size: 1.35rem; font-weight: 700; margin-bottom: 1.2rem; display: flex; align-items: center; gap: .55rem; }
.section-title::before { content: ''; width: 6px; height: 1.05em; background: var(--accent); border-radius: 2px; }
.section-title.text-center { justify-content: center; }

/* Edition cards ---------------------------------------------------------- */
.ed-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; height: 100%; display: flex; flex-direction: column; box-shadow: var(--shadow-1); transition: border-color .2s, box-shadow .2s; }
.ed-card:hover { border-color: var(--primary); box-shadow: var(--shadow-2); }
.ed-head { background: var(--primary); color: #fff; display: flex; align-items: center; gap: .55rem; padding: .7rem .9rem; font-weight: 700; font-size: .82rem; line-height: 1.25; }
.ed-card.alt .ed-head { background: var(--ink); }
html[data-theme="dark"] .ed-card.alt .ed-head { background: #0b1220; }
.ed-head .ed-name { flex: 1; color: #fff; }
.ed-head .ed-count { background: var(--accent); border-radius: var(--radius); padding: .15rem .5rem; font-size: .72rem; font-family: var(--font-mono); white-space: nowrap; }
.ed-card.alt .ed-head .ed-count { background: #dce1ff; color: var(--primary); }
.ed-thumb { position: relative; display: block; margin: .9rem .9rem 0; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; aspect-ratio: 1 / 1.45; background: #fff; }
.ed-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .4s; }
.ed-card:hover .ed-thumb img { transform: scale(1.03); }
.ed-thumb .ed-tag { position: absolute; left: .5rem; top: .5rem; background: rgba(15, 23, 42, .82); color: #fff; font-size: .7rem; padding: .15rem .45rem; border-radius: 2px; }
.ed-thumb.thumb-top { aspect-ratio: 4 / 3; }
.ed-body { padding: .9rem; display: flex; flex-direction: column; flex: 1; }
.ed-title { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; color: var(--primary); margin: 0 0 .35rem; line-height: 1.35; }
html[data-theme="dark"] .ed-title { color: #dce1ff; }
.ed-card:hover .ed-title { color: var(--accent); }
.ed-desc { color: var(--ink-2); font-size: .85rem; line-height: 1.45; margin: 0 0 .8rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ed-meta { display: flex; justify-content: space-between; gap: .5rem; border-top: 1px solid var(--line); padding-top: .65rem; margin-top: auto; font-family: var(--font-mono); font-size: .7rem; color: var(--ink-2); }
.ed-meta span { display: inline-flex; gap: .35rem; align-items: center; }
.ed-actions { display: grid; grid-template-columns: 1fr 44px 44px; gap: .45rem; margin-top: .75rem; }
.ed-actions .btn-navy { padding: .5rem; }
.ed-actions .btn-soft { padding: .5rem 0; }
/* simple card (legacy style) */
.edition-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px; text-align: center; height: 100%; }
.edition-card:hover { border-color: var(--primary); box-shadow: var(--shadow-2); }
.edition-name { display: block; font-family: var(--font-head); font-weight: 700; margin-bottom: 8px; }
.edition-thumb { display: block; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; aspect-ratio: 1 / 1.45; background: #fff; }
.edition-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.edition-date { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); margin-top: 8px; }
.no-thumb { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 3rem; color: #cbd5e1; }

/* Promo banner ----------------------------------------------------------- */
.promo { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: linear-gradient(120deg, var(--primary) 0%, var(--primary-deep) 55%, #0b1c4d 100%); color: #fff; padding: 2rem; display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center; margin-bottom: 1.5rem; }
.promo::after { content: ''; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .05); }
.promo .promo-badge { display: inline-flex; gap: .35rem; align-items: center; background: var(--accent); padding: .2rem .55rem; border-radius: var(--radius); font-size: .75rem; font-weight: 700; }
.promo h3 { color: #fff; font-size: clamp(1.4rem, 3vw, 2.1rem); font-weight: 700; margin: .7rem 0 .5rem; line-height: 1.25; }
.promo p { color: #c7d2fe; margin: 0 0 1.1rem; max-width: 560px; }
.promo .btn-line { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .25); color: #fff !important; }
.promo img { width: 190px; border-radius: 2px; transform: rotate(3deg); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); position: relative; z-index: 1; }
@media (max-width: 767.98px) { .promo { grid-template-columns: 1fr; padding: 1.4rem; } .promo img { width: 140px; justify-self: center; } }

/* Feature tiles ---------------------------------------------------------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.feature { background: var(--surface-low); border-radius: var(--radius-lg); padding: 1.1rem; display: flex; gap: .8rem; }
.feature i { font-size: 1.35rem; color: var(--accent); margin-top: .15rem; }
.feature h4 { font-size: 1rem; font-weight: 700; margin: 0 0 .2rem; color: var(--primary); }
html[data-theme="dark"] .feature h4 { color: #dce1ff; }
.feature p { margin: 0; font-size: .83rem; color: var(--ink-2); }

/* Sidebar widgets -------------------------------------------------------- */
.widget { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.1rem; margin-bottom: 1.1rem; box-shadow: var(--shadow-1); }
.widget-title { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: .5rem; margin: 0 0 .7rem; }
html[data-theme="dark"] .widget-title { color: #dce1ff; }
.widget-title i { color: var(--primary); font-size: .95rem; }
.widget-title .wt-aside { margin-left: auto; font-family: var(--font-mono); font-size: .66rem; color: var(--accent); font-weight: 500; text-align: right; }
.widget-sub { font-size: .83rem; color: var(--ink-2); margin: -.2rem 0 .8rem; }
.widget.tint { background: var(--surface-low); border-color: transparent; }
.widget.dark { background: linear-gradient(160deg, var(--primary), var(--primary-deep)); color: #dce1ff; border: 0; }
.widget.dark .widget-title, .widget.dark .widget-title i { color: #fff; }
.widget.dark .widget-sub { color: #c7d2fe; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.link-list li:last-child { border-bottom: 0; }
.modal .widget { border: 0; padding: 0; margin: 0; box-shadow: none; background: transparent; }
.modal .widget-title { display: none; }

/* Calendar --------------------------------------------------------------- */
.ep-calendar .cal-head { display: flex; gap: .3rem; align-items: center; margin-bottom: .7rem; background: var(--surface-low); border-radius: var(--radius); padding: .3rem; }
.ep-calendar .cal-head select { flex: 1; height: 30px; padding: 0 1.5rem 0 .4rem; font-size: .78rem; font-weight: 600; border: 0; background-color: var(--surface); }
.ep-calendar .cal-head button { border: 0; background: transparent; width: 26px; height: 30px; color: var(--ink-2); border-radius: var(--radius); font-size: 1.1rem; line-height: 1; }
.ep-calendar .cal-head button:hover { background: var(--surface); color: var(--primary); }
.ep-calendar table { width: 100%; table-layout: fixed; text-align: center; }
.ep-calendar th { font-size: .66rem; font-weight: 600; color: var(--muted); padding: .3rem 0; }
.ep-calendar th:first-child { color: var(--accent); }
.ep-calendar td { padding: 2px; }
.ep-calendar td span, .ep-calendar td a { display: flex; align-items: center; justify-content: center; height: 32px; border-radius: 50%; font-family: var(--font-mono); font-size: .8rem; color: var(--ink); opacity: .3; margin: 0 auto; width: 32px; }
.ep-calendar td a { opacity: 1; color: var(--ink); font-weight: 500; }
.ep-calendar td a:hover { background: var(--surface-mid); color: var(--primary); }
.ep-calendar td .other { opacity: .25; }
.ep-calendar td:first-child a { color: var(--accent); }
.ep-calendar td .sel { background: var(--primary) !important; color: #fff !important; opacity: 1; }
.ep-calendar td .today { outline: 2px solid var(--accent); outline-offset: -2px; font-weight: 700; opacity: 1; }
.ep-calendar td .sel.today { background: var(--accent) !important; outline: 0; }
.cal-legend { display: flex; gap: 1rem; margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--line); font-size: .72rem; color: var(--ink-2); align-items: center; flex-wrap: wrap; }
.cal-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .3rem; vertical-align: -1px; }

/* Subscribe & stats ------------------------------------------------------ */
.sub-form .input-group-text { background: var(--surface); border-color: var(--line); font-family: var(--font-mono); font-size: .8rem; color: var(--muted); }
.sub-form .btn-crimson { width: 100%; margin-top: .55rem; padding: .6rem; }
.sub-form .sub-msg { font-size: .8rem; margin-top: .45rem; }
.widget.dark .sub-form .form-control { background: #fff; color: #0f172a; }
.widget.dark .sub-note { color: #c7d2fe; font-size: .72rem; text-align: center; margin-top: .5rem; }
.stat-row { margin-bottom: .8rem; }
.stat-row .d-flex { font-size: .82rem; color: var(--ink-2); }
.stat-row strong { font-family: var(--font-mono); color: var(--ink); }
.stat-bar { height: 6px; border-radius: 3px; background: var(--surface-mid); margin-top: .35rem; overflow: hidden; }
.stat-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.stat-row.navy .stat-bar i { background: var(--primary); }

/* Other editions / edition info ----------------------------------------- */
.oe-item { display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; background: var(--surface-low); border-radius: var(--radius); margin-bottom: .5rem; color: var(--ink) !important; transition: background .15s; }
.oe-item:hover { background: var(--surface-mid); }
.oe-item i.ic { color: var(--primary); font-size: 1.1rem; width: 22px; text-align: center; }
.oe-item b { display: block; font-size: .85rem; }
.oe-item small { font-size: .72rem; color: var(--ink-2); }
.oe-item .fa-arrow-right { margin-left: auto; color: var(--muted); }
.ed-info .ei-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .45rem; }
.ed-info h3 { font-size: 1.2rem; color: var(--primary); margin: 0 0 .8rem; font-weight: 700; }
html[data-theme="dark"] .ed-info h3 { color: #dce1ff; }
.ei-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; background: var(--surface-low); border-radius: var(--radius); padding: .8rem; font-family: var(--font-mono); font-size: .72rem; }
.ei-grid small { display: block; color: var(--muted); font-family: var(--font); font-size: .7rem; }
.ei-grid div { color: var(--ink); }
.ei-foot { display: flex; justify-content: space-between; gap: .5rem; margin-top: .7rem; font-size: .72rem; color: var(--ink-2); }
.ei-foot span:last-child { font-family: var(--font-mono); }

/* Viewer ----------------------------------------------------------------- */
.viewer-toolbar { background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: var(--hdr-h, 120px); z-index: 1020; }
.clip-banner { position: sticky; top: calc(var(--hdr-h, 120px) + var(--vt-h, 50px)); z-index: 1019; }
.thumb-rail { top: calc(var(--hdr-h, 120px) + var(--vt-h, 50px) + 12px); }
.viewer-toolbar .container-x { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding-top: .45rem; padding-bottom: .45rem; max-width: 1440px; }
.vt-group { display: flex; align-items: center; gap: .2rem; background: var(--surface-low); border-radius: var(--radius-lg); padding: .2rem; }
.vt-group .page-select { border: 0; background-color: transparent; font-weight: 600; font-size: .82rem; height: 32px; padding: 0 1.8rem 0 .3rem; min-width: 180px; max-width: 290px; box-shadow: none; }
.vt-group > i { color: var(--primary); padding-left: .5rem; }
.vt-pill { min-width: 30px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius); font-family: var(--font-mono); font-size: .75rem; color: var(--ink) !important; padding: 0 .35rem; }
.vt-pill:hover { background: var(--surface); }
.vt-pill.active { background: var(--primary); color: #fff !important; font-weight: 700; }
.vt-group .vt-dots { font-family: var(--font-mono); font-size: .75rem; color: var(--muted); padding: 0 .2rem; }
.vt-btn { width: 32px; height: 32px; border: 0; background: transparent; border-radius: var(--radius); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.vt-btn:hover { background: var(--surface); color: var(--primary); }
.vt-zoom { font-family: var(--font-mono); font-size: .75rem; min-width: 64px; gap: .3rem; width: auto; padding: 0 .4rem; }
.vt-actions { display: flex; gap: .45rem; flex-wrap: wrap; }
.vt-actions .btn-crimson.active { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6); }
.clip-banner { background: var(--accent); color: #fff; font-size: .85rem; font-weight: 600; }
.clip-banner .container-x { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding-top: .5rem; padding-bottom: .5rem; max-width: 1440px; flex-wrap: wrap; }
.clip-banner button { border: 0; border-radius: var(--radius); padding: .25rem .7rem; font-weight: 700; font-size: .8rem; }
.clip-banner .do { background: #fff; color: var(--accent); }
.clip-banner .no { background: rgba(0, 0, 0, .2); color: #fff; }
.viewer-wrap { max-width: 1440px; }
.thumb-rail { position: sticky; max-height: calc(100vh - 190px); overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.rail-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .7rem; }
.rail-head h3 { font-size: 1.05rem; margin: 0; color: var(--primary); font-weight: 700; }
html[data-theme="dark"] .rail-head h3 { color: #dce1ff; }
.thumb-item { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: .45rem; margin-bottom: .7rem; color: var(--ink-2) !important; font-size: .75rem; transition: border-color .15s; }
.thumb-item .ti-img { position: relative; display: block; aspect-ratio: 1 / 1.45; overflow: hidden; border-radius: 2px; background: #fff; }
.thumb-item img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.thumb-item .ti-no { position: absolute; left: 5px; top: 5px; background: var(--ink); color: #fff; font-size: .65rem; font-weight: 700; padding: .1rem .4rem; border-radius: 2px; }
.thumb-item .ti-cap { display: flex; justify-content: space-between; align-items: center; margin-top: .4rem; gap: .3rem; }
.thumb-item .ti-cap span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb-item:hover { border-color: var(--primary); }
.thumb-item.active { border: 2px solid var(--accent); }
.thumb-item.active .ti-no { background: var(--accent); }
.thumb-item.active .ti-cap { color: var(--accent); font-weight: 700; }
.crumbs { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; font-size: .78rem; color: var(--ink-2); margin-bottom: .7rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.crumbs li + li::before { content: '\203A'; margin-right: .35rem; color: var(--muted); }
.crumbs li:last-child { background: var(--surface-mid); color: var(--primary); font-weight: 700; padding: .05rem .45rem; border-radius: var(--radius); }
.crumbs .live-dot { font-size: .75rem; color: var(--ink-2); display: inline-flex; gap: .35rem; align-items: center; }
.crumbs .live-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.viewer-title { font-family: var(--font-head); font-size: 1.05rem; font-weight: 700; margin: 0 0 .7rem; }
.page-stage { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: .6rem; box-shadow: var(--shadow-2); }
.page-wrap { overflow: auto; max-width: 100%; border-radius: 2px; touch-action: pan-x pan-y; overscroll-behavior: contain; }
/* zoomed: the page stays inside a frame the height of the screen and is moved by dragging */
.page-wrap.zoomed { max-height: calc(100vh - var(--hdr-h, 120px) - var(--vt-h, 50px) - 40px); cursor: grab; touch-action: none; }
.page-wrap.zoomed .map-area { cursor: pointer; }
.page-wrap.dragging, .page-wrap.dragging .map-area { cursor: grabbing; user-select: none; }
.page-stage:fullscreen .page-wrap.zoomed { max-height: calc(100vh - 2rem); }
.map-layer { position: relative; width: 100%; margin: 0 auto; transform-origin: top left; }
.map-layer img { display: block; width: 100%; height: auto; user-select: none; background: #fff; }
.map-area { position: absolute; display: block; border: 1px solid transparent; z-index: 2; transition: background .15s; }
.map-area:hover { background: rgba(27, 58, 140, .10); border-color: var(--primary); box-shadow: 0 0 0 2px rgba(27, 58, 140, .25); }
.map-area.kind-ad:hover { background: rgba(214, 32, 78, .08); border-color: var(--accent); }
.map-area.mode-nav:hover::after, .map-area.mode-external:hover::after { content: '\f35d'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; right: 4px; top: 4px; background: var(--primary); color: #fff; font-size: 11px; padding: 3px 5px; border-radius: 3px; }
.map-area.mode-nav:hover::after { content: '\f0a9'; }
body.clipping .map-area, body.clipping .page-nav { display: none; }
.page-nav { position: absolute; top: 45%; z-index: 5; width: 40px; height: 44px; display: flex; align-items: center; justify-content: center; background: rgba(15, 23, 42, .78); color: #fff !important; border-radius: var(--radius); }
.page-nav:hover { background: var(--primary); }
.page-nav.prev { left: -6px; }
.page-nav.next { right: -6px; }
.page-stage:fullscreen { overflow: auto; background: #0f172a; padding: 1rem; }
.page-stage:fullscreen .page-wrap { max-width: 1100px; margin: 0 auto; }
.page-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem; margin-top: .8rem; font-family: var(--font-mono); font-size: .75rem; color: var(--ink-2); }
.page-foot .pf-actions { display: flex; gap: .4rem; flex-wrap: wrap; font-family: var(--font); }
.btn-wa { background: #22c55e; color: #fff !important; }
.btn-wa:hover { background: #16a34a; }
.issue-nav { display: flex; justify-content: space-between; margin-top: 1.2rem; }
.clip-frame { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 0; overflow: hidden; } /* overflow: image follows the rounded corners */
.clip-frame img { display: block; margin: 0 auto; }

/* Share bar -------------------------------------------------------------- */
.share-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.share-bar .share { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff !important; font-size: .9rem; }
.share.facebook { background: #1877f2; } .share.twitter { background: #000; } .share.whatsapp { background: #22c55e; }
.share.linkedin { background: #0a66c2; } .share.telegram { background: #229ed9; } .share.email { background: #64748b; }
.share.print { background: #334155; } .share.copy { background: var(--accent); }
.share-bar .share:hover { filter: brightness(1.12); }

/* Ads -------------------------------------------------------------------- */
.ad-slot { text-align: center; margin: 12px 0; }
.ad-item + .ad-item { margin-top: 10px; }
.ad-sidebar .ad-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 6px; }

/* Footer ----------------------------------------------------------------- */
.site-footer { background: var(--footer-bg); color: var(--footer-color); margin-top: 3rem; font-size: .85rem; }
.site-footer .container-x { padding-top: 2.8rem; }
.site-footer h4 { font-family: var(--font-head); color: #fff; font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem; }
.site-footer .f-brand { font-family: var(--font-head); color: #fff; font-size: 1.5rem; font-weight: 700; display: inline-flex; align-items: center; gap: .5rem; }
.site-footer .f-brand .badge-ep { background: var(--accent); font-family: var(--font-mono); font-size: .62rem; padding: .15rem .45rem; border-radius: var(--radius); }
.site-footer a { color: var(--footer-color); }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: .45rem; }
.site-footer .f-meta { font-family: var(--font-mono); font-size: .72rem; line-height: 1.7; margin-top: 1rem; }
.site-footer .f-meta b { color: #e2e8f0; font-weight: 500; }
.site-footer .f-sub { display: flex; margin-top: .8rem; }
.site-footer .f-sub input { flex: 1; min-width: 0; background: #1e293b; border: 1px solid #334155; color: #fff; border-radius: var(--radius) 0 0 var(--radius); padding: .5rem .7rem; font-size: .82rem; }
.site-footer .f-sub button { border-radius: 0 var(--radius) var(--radius) 0; width: auto; margin-top: 0; padding: .5rem .9rem; }
.site-footer .app-btn { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid #334155; background: #1e293b; color: #e2e8f0; border-radius: var(--radius); padding: .4rem .7rem; font-family: var(--font-mono); font-size: .72rem; margin: .7rem .4rem 0 0; }
.site-footer .social a { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: var(--radius); background: #1e293b; border: 1px solid #334155; margin-right: .4rem; color: #e2e8f0; }
.site-footer .social a:hover { background: var(--accent); border-color: var(--accent); }
.footer-bottom { border-top: 1px solid #1e293b; margin-top: 2.2rem; padding: 1.1rem 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; font-family: var(--font-mono); font-size: .7rem; }
.footer-bottom ul { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer-widgets .widget { background: transparent; border-color: #1e293b; box-shadow: none; }
.footer-widgets .widget-title { color: #fff; }

/* Misc pages ------------------------------------------------------------- */
.static-content { background: var(--surface); padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.contact-info i { color: var(--accent); width: 20px; }
.card { background: var(--surface); border-color: var(--line); color: var(--ink); }
.mini-issue { display: block; text-align: center; font-size: .72rem; color: var(--ink-2) !important; }
.mini-issue img { width: 100%; aspect-ratio: 1 / 1.45; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: 2px; margin-bottom: 4px; }
.mini-clip img { width: 100%; height: 110px; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: var(--radius); }
.block { margin-bottom: 1rem; }
.search-hit { display: flex; gap: .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: .8rem; margin-bottom: .7rem; color: var(--ink) !important; }
.search-hit:hover { border-color: var(--primary); }
.search-hit img { width: 70px; aspect-ratio: 1 / 1.45; object-fit: cover; object-position: top; border-radius: 2px; border: 1px solid var(--line); }
.search-hit h5 { font-size: 1rem; margin: 0 0 .2rem; }
.search-hit small { color: var(--ink-2); font-family: var(--font-mono); font-size: .72rem; }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); }
.pagination .page-link { color: var(--primary); background: var(--surface); border-color: var(--line); }
.modal-content { background: var(--surface); color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .btn-close { filter: invert(1); }
/* article headline + description: Baloo Tammudu 2 (Telugu + Latin) in the popup and on the article page */
:root { --font-article: 'Baloo Tammudu 2', 'Noto Sans Telugu', sans-serif; }
#clipModal .modal-title, #clipModal .art-desc, .clip-page .viewer-title, .article-summary { font-family: var(--font-article); }
.clip-page .viewer-title { font-size: 1.3rem; font-weight: 700; line-height: 1.35; }
.article-summary, #clipModal .art-desc { line-height: 1.7; font-weight: 500; }
#clipModal .art-desc { font-size: .98rem; opacity: 1; color: var(--ink-2, #334155); text-align: left; }
html[data-theme="dark"] #clipModal .art-desc { color: #cbd5e1; }

/* clip / article popup: small one-line title (long headlines end with …, full text on hover) */
/* Telugu vowel signs reach far above/below the line: tall line-height + padding so nothing is clipped; up to 2 lines */
#clipModal .modal-title { font-size: .95rem; font-weight: 600; line-height: 1.75; padding: .5em 0 0 0; min-width: 0; overflow: hidden;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
@media (max-width: 575.98px) { #clipModal .modal-title { font-size: .85rem; } }

/* article page: editor's summary under the headline */
.article-summary { font-size: 1.05rem; line-height: 1.95; color: var(--ink-2, #334155); margin: 1rem 0 .4rem; max-width: none; }
html[data-theme="dark"] .article-summary { color: #cbd5e1; }
.art-desc { font-size: .9rem; line-height: 1.5; margin: 1rem 0 .2rem; opacity: .85; }
/* dark mode: invert the logo so a dark masthead stays readable; hue-rotate keeps the brand colours (navy stays blue, red stays red) */
.brand img { transition: filter .2s; }
html[data-theme="dark"] .brand img { filter: invert(1) hue-rotate(180deg); }
html[data-theme="dark"] .alert-info { background: #172554; border-color: #1e3a8a; color: #dbeafe; }
.powered-by { opacity: .8; margin-left: 6px; }
.toast { box-shadow: 0 12px 28px -4px rgba(15, 23, 42, .28); border-radius: .75rem; }

@media (max-width: 991.98px) {
  .page-strip .ps-label { display: none; }
  .main-nav .container-x { flex-wrap: wrap; }
  .main-nav .navbar-collapse { width: 100%; }
  .main-nav .nav-tools { display: none; }
}
@media (max-width: 767.98px) {
  /* keep the reading area large on phones: only the viewer toolbar stays pinned */
  .site-header { position: relative; }
  .viewer-toolbar { top: 0; }
  .page-wrap.zoomed { max-height: calc(100vh - var(--vt-h, 96px) - 24px); }
  .clip-banner { top: var(--vt-h, 96px); }
  .brand-sub { display: none; }
  .brand-name { font-size: 1.3rem; }
  .brand img { max-height: 42px; }
  .topbar .tb-text, .topbar .tb-weather { display: none; }
  .viewer-toolbar .vt-actions .lbl { display: none; }
  .page-nav { width: 32px; height: 40px; }
  .live-links .yday { display: none; }
}
@media print {
  .topbar, .site-header, .site-footer, .viewer-toolbar, .thumb-rail, .share-bar, .ad-slot, .page-nav, aside, .btn-navy, .btn-crimson, .btn-soft, .btn-line, .page-foot, .crumbs, .live-strip, .page-strip { display: none !important; }
  .page-stage { border: 0; box-shadow: none; padding: 0; }
  .col-md-9, .col-lg-7, .col-lg-8 { width: 100% !important; }
}
