/* ---------- Reset & base ---------- */
:root{
  --bg:#ffffff;
  --muted:#6b7280;
  --accent:#1e73be;
  --card:#f8fafc;
  --maxw:920px;
  --container-pad:16px;
  --readable:18px;
  --shadow: 0 6px 24px rgba(16,24,40,0.06);
  --radius:12px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background:linear-gradient(180deg,#f6f7fb 0%, #ffffff 100%);
  color:#0f172a;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.5;
  font-size:16px;
}
a{color:var(--accent); text-decoration:none}
img{max-width:100%; height:auto; display:block}
.wrap{max-width:var(--maxw); margin:0px auto; padding:0 var(--container-pad);}

/* ---------- Header ---------- */
header.site-header{
  display:flex; align-items:center; gap:12px; margin-bottom:18px;
}
.brand-mark{
  width:44px;height:44px;border-radius:8px;background:linear-gradient(135deg,#06b6d4,#7c3aed);display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;
}
.byline{color:var(--muted); font-size:14px}

/* ---------- Hero Section ---------- */
.hero{
  background:linear-gradient(90deg, rgba(14,165,164,0.06), rgba(99,102,241,0.03));
  border-radius:var(--radius);
  padding:18px;
  display:grid;
  grid-template-columns: 1fr 140px;
  gap:16px;
  align-items:center;
  box-shadow:var(--shadow);
}
.hero .title{font-size:22px; margin:0 0 8px 0}
.hero .teaser{color:var(--muted); font-size:15px; margin:0}
.hero .hero-img{
  width:100%;
  border-radius:10px;
  overflow:hidden;
  background:#fff;
  display:flex; align-items:center; justify-content:center;
  padding:8px;
}

/* ---------- Read More Button ---------- */
.readmore-btn {
  background:var(--accent);
  color:#fff;
  border:none;
  padding:12px 38px;
  font-size:16px;
  font-weight:700;
  border-radius:40px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  transition:background 0.18s, transform 0.12s;
  box-shadow: 0 6px 18px rgba(30,115,190,0.18);
}
.readmore-btn:hover { background:#145a96; transform:translateY(-1px); }
.readmore-btn:active { transform:scale(0.99); }
.readmore-btn:focus { outline:3px solid rgba(14,165,164,0.18); outline-offset:4px; }

.arrow { font-size:18px; }

/* Hidden text helper */
.visually-hidden {
  position:absolute !important;
  height:1px; width:1px;
  overflow:hidden;
  clip:rect(1px,1px,1px,1px);
  white-space:nowrap;
}

/* ---------- Article ---------- */
article.post{
  margin-top:18px;
  display:grid;
  grid-template-columns: 1fr 320px;
  gap:18px;
}
.content{
  background:#fff;
  border-radius:12px;
  padding:18px;
  box-shadow:var(--shadow);
}
.sidebar{position:sticky; top:20px; height:fit-content}

.intro{
  font-size:var(--readable);
  color:#0b1220;
  margin-bottom:12px;
}

.list-item{
  display:flex;
  gap:14px;
  padding:14px;
  border-radius:10px;
  background:var(--card);
  margin-bottom:12px;
  align-items:flex-start;
}
.list-item .rank{
  min-width:58px; height:58px;
  border-radius:10px;
  background:#fff;
  box-shadow:0 4px 14px rgba(2,6,23,0.06);
  display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:18px;
}
.list-item .meta{flex:1}
.list-item h3{margin:0 0 6px 0; font-size:17px}
.list-item p{margin:0; color:var(--muted); font-size:14px}

.cta{
  margin-top:8px;
  display:flex; gap:8px; flex-wrap:wrap;
}

/* ---------- Buttons & Notes ---------- */
.btn{
  background:var(--accent);
  color:#fff;
  padding:10px 12px;
  border-radius:10px;
  font-weight:600;
  display:inline-block;
}
.btn.secondary{
  background:#111827;
  opacity:0.95;
}
.note{
  font-size:13px;
  color:var(--muted);
  margin-top:8px;
}

/* ---------- Ad placeholders ---------- */
.ad{
  background:linear-gradient(180deg,#f8fafc,#ffffff);
  border:2px dashed rgba(0,0,0,0.06);
  padding:12px;
  border-radius:8px;
  text-align:center;
  color:var(--muted);
  font-weight:600;
}
.ad.small{height:90px}
.ad.medium{height:250px}
.ad.native{height:140px}

/* ---------- Sidebar widgets ---------- */
.widget{
  background:#fff;
  padding:12px;
  border-radius:10px;
  box-shadow:var(--shadow);
  margin-bottom:12px;
}
.widget h4{margin:0 0 8px 0}

/* ---------- Sticky Bottom Bar ---------- */
.sticky-bottom{
  position:fixed;
  left:0; right:0; bottom:16px;
  display:flex; justify-content:center;
  pointer-events:auto;
  z-index:1200;
}
.sticky-inner{
  max-width:920px;
  padding:8px 12px;
  border-radius:12px;
  box-shadow:var(--shadow);
  display:flex; align-items:center; gap:12px;
  background:#0b1220;
  color:#fff;
}
.sticky-inner .s-text{font-weight:600}
.sticky-close{
  margin-left:8px;
  background:transparent;
  color:#fff;
  border:0;
  font-size:18px;
  cursor:pointer;
}

/* ---------- Interstitial overlay ---------- */
.overlay{
  position:fixed;
  inset:0;
  background:rgba(2,6,23,0.6);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:1200;
  padding:20px;
}
.interstitial{
  width:100%;
  max-width:720px;
  background:#fff;
  border-radius:14px;
  padding:18px;
  box-shadow:0 10px 40px rgba(2,6,23,0.35);
}
.interstitial .close{
  float:right;
  background:transparent;
  border:0;
  font-size:18px;
  cursor:pointer;
}

/* ---------- Exit popup ---------- */
.exit-popup{
  position:fixed;
  right:18px; top:18px;
  width:320px;
  background:#fff;
  border-radius:12px;
  padding:12px;
  box-shadow:var(--shadow);
  z-index:1300;
  display:none;
}
.exit-popup .close{
  float:right; border:0; background:transparent; cursor:pointer;
}

/* ---------- Footer ---------- */
footer{
  margin:24px 0;
  color:var(--muted);
  font-size:14px;
  text-align:center;
}

/* ---------- RESPONSIVE FIX (your request) ---------- */
/* Move hero image ABOVE description on mobile */
@media (max-width:740px){
  .hero{
    grid-template-columns: 1fr !important;
  }
  .hero .hero-img{
    order:-1 !important;
    margin-bottom:12px;
  }
}

/* ---------- Extra responsive rules ---------- */
@media (max-width:980px){
  article.post{grid-template-columns: 1fr 300px}
}
@media (max-width:720px){
  article.post{grid-template-columns: 1fr}
  .sidebar{position:static}
  .sticky-inner{width:calc(100% - 32px)}
}
