/* =========================
   THEME (light/dark)
   ========================= */
:root{
  --c-bg:#ffffff;
  --c-text:#0b1220;
  --c-muted:rgba(11,18,32,.62);
  --c-line:rgba(0,0,0,.10);
  --c-pill:rgba(0,0,0,.04);
  --c-pill-border:rgba(0,0,0,.10);
  --c-header:#000000;
  --c-header-text:#ffffff;
}

html[data-theme="dark"]{
  --c-bg:#0b1220;
  --c-text:#eaf0ff;
  --c-muted:rgba(234,240,255,.68);
  --c-line:rgba(255,255,255,.12);
  --c-pill:rgba(255,255,255,.08);
  --c-pill-border:rgba(255,255,255,.12);
  --c-header:#000000;
  --c-header-text:#ffffff;
}

body{ background: var(--c-bg); color: var(--c-text); }

/* =========================
   TOPBAR
   ========================= */
.topbar{
  background: var(--c-bg);
  border-bottom:1px solid var(--c-line);
}

.topbar-inner{
  max-width:1400px;
  margin:0 auto;
  padding:10px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.topbar-date{
  font-size:14px;
  color: var(--c-muted);
}

.topbar-right{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.ui-btn{
  width:36px;height:36px;
  border-radius:12px;
  border:1px solid var(--c-pill-border);
  background: var(--c-pill);
  color: var(--c-text);
  display:grid;
  place-items:center;
  cursor:pointer;
  flex-shrink:0;
}

.ui-pill{
  height:36px;
  border-radius:999px;
  border:1px solid var(--c-pill-border);
  background: var(--c-pill);
  color: var(--c-text);
  padding:0 12px;
  display:inline-flex;
  gap:8px;
  align-items:center;
  cursor:pointer;
  font-size:13px;
  flex-shrink:0;
}

.social{
  display:flex;
  align-items:center;
  gap:8px;
}

.social-btn{
  width:36px;height:36px;
  border-radius:999px;
  border:1px solid var(--c-pill-border);
  background: var(--c-pill);
  display:grid;
  place-items:center;
  flex-shrink:0;
}

.social-btn svg{
  width:18px;height:18px;
  fill: currentColor;
  color: var(--c-text);
  opacity:.9;
}

/* =========================
   HEADER (logo + pub)
   ========================= */
.site-header{ background: var(--c-bg); }

.site-header-inner{
  max-width:1400px;
  margin:0 auto;
  padding:12px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.brand{ 
  display:flex; 
  align-items:center; 
  gap:10px;
  flex-shrink:0;
}

.brand-logo{ 
  height:46px; 
  width:auto; 
  display:block;
  max-width:100%;
}

.header-ad{
  width: 771px;
  max-width: 100%;
  height: 90px;
  background: #d9d9d9;
  border-radius: 6px;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
}

.header-ad-img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* =========================
   NAV BAR
   ========================= */
.nav-bar{
  background: var(--c-header);
  color: var(--c-header-text);
  position:relative;
  z-index: 999;
}

.nav-bar-inner{
  max-width:1400px;
  margin:0 auto;
  padding:10px 16px;
  display:flex;
  align-items:center;
  gap:16px;
  position:relative;
}

.nav-link{
  color: var(--c-header-text);
  opacity:.92;
  font-size:14px;
  padding:8px 0;
  white-space:nowrap;
}

.nav-link:hover{ opacity:1; }

.nav-btn{
  margin-left:auto;
  display:none;
  background: rgba(15,26,46,.55);
  border:1px solid rgba(255,255,255,.16);
  color:#eaf0ff;
  height:40px;
  padding:0 12px;
  border-radius:12px;
  cursor:pointer;
  font-size:20px;
  align-items:center;
  justify-content:center;
}

.nav-mobile{
  display:none;
  position:relative;
  z-index: 1000;
  max-width:1400px;
  margin:0 auto;
  padding:10px 16px 14px 16px;
  background: var(--c-header);
}

.nav-mobile .nav-link{
  display:block;
  padding:10px 0;
  border-top:1px solid rgba(255,255,255,.10);
}

.nav-mobile.is-open{
  display:grid;
  gap:8px;
  padding:12px;
  margin-top:10px;
  border-radius:16px;
  background: rgba(11,18,32,.92);
  border:1px solid rgba(255,255,255,.10);
  box-shadow: 0 18px 60px rgba(0,0,0,.20);
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 1100px){
  .header-ad{ width: 520px; }
}

@media (max-width: 900px){
  .site-header-inner{ 
    flex-direction:column; 
    align-items:flex-start; 
  }
  .header-ad{ 
    width: 100%;
    margin:0 auto;
  }
  .nav-btn{ 
    display:inline-flex;
  }
  .nav-bar-inner .nav-link{ 
    display:none;
  }
}

@media (max-width: 700px){
  .ui-pill span{ display:none; }
  .topbar-date{ font-size:12px; }
}

@media (max-width: 480px){
  .topbar-inner{
    padding:8px 12px;
    gap:8px;
  }
  .site-header-inner{
    padding:12px;
  }
  .nav-bar-inner{
    padding:10px 12px;
  }
  .brand-logo{
    height:38px;
  }
  .social{
    gap:6px;
  }
  .social-btn{
    width:32px;
    height:32px;
  }
  .ui-btn{
    width:32px;
    height:32px;
  }
}
