:root{
  --bg: #0b1020;
  --bg2:#0f1730;
  --card:#121a33;
  --paper:#0f162e;
  --text:#e9eeff;
  --muted:#b8c2ffcc;
  --line:#2a3766;
  --accent:#6ae4ff;
  --accent2:#b7ff6a;
  --danger:#ff6a88;
  --shadow: 0 18px 50px rgba(0,0,0,.35);
  --radius: 18px;
  --radius2: 22px;
  --font: "Noto Sans Tamil", system-ui, -apple-system, Segoe UI, Roboto, Arial;
  --base: 16px;
}

[data-theme="light"]{
  --bg: #f6f7fb;
  --bg2:#ffffff;
  --card:#ffffff;
  --paper:#ffffff;
  --text:#111827;
  --muted:#4b5563;
  --line:#e5e7eb;
  --accent:#2563eb;
  --accent2:#16a34a;
  --danger:#ef4444;
  --shadow: 0 16px 40px rgba(15,23,42,.12);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--font);
  font-size:var(--base);
  color:var(--text);
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(106,228,255,.20), transparent 60%),
    radial-gradient(900px 650px at 10% 0%, rgba(183,255,106,.16), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg2));
}

/* Top bar */
.topbar{
  position:sticky; top:0; z-index:50;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px;
  background: linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,0));
  backdrop-filter: blur(10px);
}
.topbar__left{display:flex; align-items:center; gap:12px}
.topbar__right{display:flex; align-items:center; gap:10px}

.iconbtn{
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  color:var(--text);
  width:40px;height:40px;border-radius:12px;
  display:grid;place-items:center;
  cursor:pointer;
}
.icon{font-size:18px}

.brand{display:flex; align-items:center; gap:12px}
.brand__mark{
  width:44px;height:44px;border-radius:16px;
  display:grid;place-items:center;
  font-weight:800;
  background: linear-gradient(135deg, var(--accent), rgba(255,255,255,.08));
  color:#001018;
  box-shadow: var(--shadow);
}
.brand__title{font-weight:800; letter-spacing:.3px}
.brand__tag{font-size:12px; color:var(--muted)}

.pill{
  border:1px solid var(--line);
  padding:8px 12px; border-radius:999px;
  background:rgba(255,255,255,.04);
  color:var(--muted);
  font-size:12px;
}
.pillbtn{
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  color:var(--text);
  padding:9px 12px;
  border-radius:999px;
  cursor:pointer;
  font-weight:700;
}

/* Ticker */
.ticker{
  display:flex;
  gap:10px;
  align-items:center;
  padding:10px 18px;
}
.ticker__label{
  font-weight:800;
  letter-spacing:.9px;
  font-size:12px;
  padding:7px 10px;
  border-radius:999px;
  background: linear-gradient(135deg, var(--danger), rgba(255,255,255,.05));
  color:#140008;
}
.ticker__track{
  flex:1;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:999px;
  background: rgba(255,255,255,.04);
}
.ticker__items{
  display:inline-flex;
  gap:26px;
  padding:10px 16px;
  white-space:nowrap;
  animation: scroll 28s linear infinite;
}
.ticker__item{color:var(--muted)}
.ticker__item b{color:var(--text)}
@keyframes scroll{
  from{transform:translateX(0)}
  to{transform:translateX(-50%)}
}

/* Toolbar */
.toolbar{
  padding: 0 18px 14px;
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}
.tabs{
  display:flex; gap:8px; flex-wrap:wrap;
}
.tab{
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  color:var(--text);
  padding:9px 12px;
  border-radius:999px;
  cursor:pointer;
  font-weight:700;
  font-size:13px;
}
.tab[aria-selected="true"]{
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), rgba(255,255,255,.08));
  color:#001018;
}

.search{
  display:flex; align-items:center; gap:8px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  border-radius:999px;
  padding:10px 12px;
  min-width:320px;
}
.search input{
  border:none; outline:none; background:transparent;
  color:var(--text);
  font-family:var(--font);
  width:100%;
}
.search input::placeholder{color:var(--muted)}
.search__icon{color:var(--muted)}
.search__clear{
  border:none; background:transparent; cursor:pointer;
  color:var(--muted);
}

/* Layout */
.layout{
  padding: 0 18px 18px;
  display:grid;
  grid-template-columns: 1.55fr .85fr;
  gap:14px;
}
@media (max-width: 980px){
  .layout{grid-template-columns:1fr}
  .search{min-width: min(520px, 92vw)}
}

/* Hero */
.hero{
  border:1px solid var(--line);
  border-radius: var(--radius2);
  overflow:hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  box-shadow: var(--shadow);
}
.hero__media{position:relative}
.hero__img{
  height: 250px;
  background:
    radial-gradient(900px 300px at 20% 10%, rgba(106,228,255,.35), transparent 55%),
    radial-gradient(700px 240px at 90% 40%, rgba(183,255,106,.22), transparent 60%),
    linear-gradient(135deg, rgba(255,255,255,.10), rgba(0,0,0,.10));
}
.hero__overlay{
  position:absolute; inset:14px;
  display:flex; justify-content:space-between; align-items:flex-start;
}
.badge{
  display:inline-flex; align-items:center; gap:8px;
  padding:9px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.22);
  backdrop-filter: blur(8px);
  font-weight:800;
  font-size:12px;
}
.ghostbtn{
  border:1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.18);
  color: var(--text);
  padding:9px 12px;
  border-radius:999px;
  cursor:pointer;
  font-weight:800;
  backdrop-filter: blur(8px);
}

.hero__content{padding:16px 16px 18px}
.hero__title{
  margin:0;
  font-size: clamp(20px, 3.2vw, 30px);
  line-height:1.22;
  letter-spacing:.2px;
}
.hero__lead{color:var(--muted); margin:10px 0 12px; line-height:1.6}
.meta{display:flex; align-items:center; gap:8px; color:var(--muted); font-size:12px}
.meta__dot{width:7px;height:7px;border-radius:50%; background:var(--accent)}
.hero__actions{display:flex; gap:10px; margin-top:14px; flex-wrap:wrap}

.btn{
  border:none;
  padding:11px 14px;
  border-radius:14px;
  cursor:pointer;
  font-weight:800;
  font-family:var(--font);
  background: linear-gradient(135deg, var(--accent), rgba(255,255,255,.10));
  color:#001018;
}
.btn--soft{
  background: rgba(255,255,255,.06);
  border:1px solid var(--line);
  color:var(--text);
}

/* Columns */
.columns{margin-top:14px}
.columns__head{
  display:flex; align-items:baseline; justify-content:space-between;
  margin: 6px 2px 10px;
}
.columns__head h2{margin:0; font-size:16px}
.columns__hint{color:var(--muted); font-size:12px}

.paper{
  border:1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  padding:12px;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:12px;
}
@media (max-width: 980px){
  .paper{grid-template-columns:1fr}
}

.story{
  border:1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  min-height: 210px;
}
.story__top{
  padding:12px 12px 0;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
}
.kicker{
  font-size:12px;
  color: var(--muted);
  font-weight:700;
}
.story__save{
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  width:36px;height:36px;border-radius:12px;
  cursor:pointer;
}
.story__title{
  padding:8px 12px 0;
  margin:0;
  font-size:15px;
  line-height:1.35;
}
.story__desc{
  padding:8px 12px 12px;
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.55;
}
.story__foot{
  margin-top:auto;
  padding:10px 12px;
  border-top:1px dashed var(--line);
  display:flex; justify-content:space-between; align-items:center;
  color:var(--muted);
  font-size:12px;
}
.story__read{
  border:none;
  background:transparent;
  color:var(--accent);
  cursor:pointer;
  font-weight:800;
  font-family:var(--font);
}

/* Sidebar cards */
.card{
  border:1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.04);
  box-shadow: var(--shadow);
  padding:12px;
}
.card__head{
  display:flex; align-items:baseline; justify-content:space-between;
  gap:10px; margin-bottom:10px;
}
.card__head h3{margin:0; font-size:15px}
.linkbtn{
  border:none; background:transparent; color:var(--accent);
  cursor:pointer; font-weight:800; font-family:var(--font);
}
.mini{color:var(--muted); font-size:12px}

/* Trending */
.trending{margin:0; padding-left:18px}
.trending li{
  margin:8px 0;
  color:var(--text);
  line-height:1.4;
}
.trending li span{color:var(--muted); font-size:12px; display:block; margin-top:4px}

/* Weather */
.weather{
  display:grid; grid-template-columns: repeat(4, 1fr);
  gap:10px;
}
.weather__tile{
  border:1px solid var(--line);
  border-radius:14px;
  background: rgba(255,255,255,.03);
  padding:10px;
}
.weather__tile .k{color:var(--muted); font-size:12px}
.weather__tile .v{font-weight:900; margin-top:6px}
.note{margin-top:10px; color:var(--muted); font-size:12px; line-height:1.5}

/* Bookmarks */
.bookmarks .empty{
  color:var(--muted);
  border:1px dashed var(--line);
  border-radius:14px;
  padding:10px;
}
.bm{
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px;
  background: rgba(255,255,255,.03);
  margin-bottom:10px;
}
.bm__t{font-weight:800; margin:0 0 6px}
.bm__m{color:var(--muted); font-size:12px}
.bm__actions{display:flex; gap:10px; margin-top:10px}
.bm__actions button{
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  color:var(--text);
  padding:8px 10px;
  border-radius:12px;
  cursor:pointer;
  font-family:var(--font);
  font-weight:800;
}

/* Drawer */
.drawer{
  position:fixed;
  top:0; left:0;
  height:100%; width:min(360px, 92vw);
  background: var(--card);
  border-right:1px solid var(--line);
  transform: translateX(-102%);
  transition: transform .25s ease;
  z-index:80;
  box-shadow: var(--shadow);
  display:flex; flex-direction:column;
}
.drawer.open{transform: translateX(0)}
.drawer__top{
  display:flex; justify-content:space-between; align-items:center;
  padding:14px;
  border-bottom:1px solid var(--line);
}
.drawer__title{font-weight:900}
.drawer__content{padding:14px; display:flex; flex-wrap:wrap; gap:10px}
.drawer__footer{padding:14px; border-top:1px solid var(--line)}
.backdrop{
  position:fixed; inset:0;
  background: rgba(0,0,0,.50);
  z-index:70;
}

/* Modal */
.modal{
  position:fixed; inset:0;
  display:none;
  place-items:center;
  background: rgba(0,0,0,.55);
  z-index:90;
  padding:18px;
}
.modal.open{display:grid}
.modal__panel{
  width: min(820px, 100%);
  border:1px solid var(--line);
  border-radius: var(--radius2);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.modal__head{
  display:flex; justify-content:space-between; align-items:center;
  padding:12px 14px;
  border-bottom:1px solid var(--line);
}
.modal__kicker{color:var(--muted); font-weight:800; font-size:12px}
.modal__title{margin:0; padding:14px 14px 0; font-size:22px; line-height:1.25}
.modal__meta{padding:10px 14px 0; color:var(--muted); font-size:12px}
.modal__body{
  padding:14px;
  color: var(--text);
  line-height:1.75;
}
.modal__actions{
  padding:14px;
  border-top:1px solid var(--line);
  display:flex;
  gap:10px;
  justify-content:flex-end;
  flex-wrap:wrap;
}

/* ePaper */
.epaper{max-width:980px}
.epaper__viewer{
  display:grid;
  grid-template-columns: 48px 1fr 48px;
  align-items:center;
  gap:10px;
  padding:14px;
}
.epaper__nav{
  height:56px;
  border:1px solid var(--line);
  border-radius:16px;
  background: rgba(255,255,255,.04);
  color: var(--text);
  cursor:pointer;
  font-size:22px;
}
.epaper__page{display:flex; flex-direction:column; gap:10px}
.epaper__sheet{
  border:1px solid var(--line);
  border-radius:18px;
  background:
    radial-gradient(900px 300px at 10% 0%, rgba(255,255,255,.06), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  padding:14px;
}
.epaper__mast{
  font-weight:900;
  letter-spacing:.2px;
  padding-bottom:10px;
  border-bottom:1px dashed var(--line);
  margin-bottom:10px;
}
.epaper__cols{
  columns: 3;
  column-gap: 18px;
  font-size: 13px;
  color: var(--muted);
  line-height:1.75;
}
@media (max-width: 820px){
  .epaper__cols{columns:1}
  .epaper__viewer{grid-template-columns: 42px 1fr 42px}
}
.epaper__pageno{color:var(--muted); font-size:12px; text-align:center}

/* Footer */
.footer{
  padding:16px 18px 26px;
  color:var(--muted);
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

/* Font sizes */
[data-font="lg"]{ --base: 17px }
[data-font="xl"]{ --base: 18px }

/* ===== HERO IMAGE FULL WIDTH FIX ===== */

.hero__media {
  position: relative;
  width: 100%;
  height: 320px;          /* adjust if needed */
  overflow: hidden;
  border-radius: 22px;
}

/* Image should behave like background */
.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;     /* 🔥 THIS IS THE KEY */
  display: block;
}

/* Ensure overlay stays above image */
.hero__overlay {
  position: absolute;
  inset: 16px;
  z-index: 2;
}

/* Optional: darker bottom fade for readability */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.05),
    rgba(0,0,0,0.15),
    rgba(0,0,0,0.35)
  );
  z-index: 1;
}
