:root {
  --max: 1200px;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --brand: #2563eb;
  --brand-600: #1d4ed8;
  --border: #e5e7eb;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(2,6,23,.06);
}
* { box-sizing: border-box; }
body { margin:0; font-family: Nunito, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; line-height:1.7; color:var(--text); background:var(--bg); }
h1 { font-weight: 800; }
button {
  font-family: Nunito, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
a, a:visited { color: var(--brand); }
.container { max-width: var(--max); margin: 0 auto; padding: 80px 20px; }
/* default hide for mobile-only elements */
.menu-close { display: none; }

.site-header { position: sticky; top:0; z-index: 20; backdrop-filter: saturate(160%) blur(8px); background: rgba(255,255,255,.8); border-bottom:1px solid var(--border); }
.site-header .container { display:flex; align-items:center; justify-content:space-between; padding-top: 14px; padding-bottom: 14px; gap: 16px; }
.site-header .brand { display:flex; flex-direction:column; }
.site-header .logo { display:flex; align-items:center; gap:16px; font-weight:800; font-size:22px; line-height: 15px; color: var(--brand); text-decoration:none; letter-spacing:.2px; }
.site-header .logo-img { width:48px; height:48px; object-fit:contain; display:block; }
.site-header .tagline { margin:2px 0 0; font-size:12px; color:#64748b; }
.site-header .nav a { margin-left:16px; color:#334155; text-decoration:none; padding:6px 10px; border-radius:10px; font-size:16px; }
.site-header .nav a:hover { background:#eef2ff; color:var(--brand-600); }
.menu-toggle { display:none; border:none; background:#fff; border:1px solid var(--border); border-radius:10px; padding:6px 10px; font-size:18px; }

/* Dropdown */
.dropdown { position: relative; display:inline-flex; align-items:center; margin-left:16px; }
.dd-toggle { border:none; background:transparent; padding:6px 10px; border-radius:10px; color:#334155; cursor:pointer; font-size:16px; line-height:1; display:inline-flex; align-items:center; gap:6px; -webkit-tap-highlight-color: transparent; }
.dd-toggle::after { content:""; width: 6px; height: 6px; border-right:2px solid #64748b; border-bottom:2px solid #64748b; display:inline-block; transform: rotate(45deg) translateY(-1px); transition: transform .2s ease; }
.dropdown.open .dd-toggle::after { transform: rotate(-135deg); }
.dd-toggle:hover { background:#eef2ff; color:var(--brand-600); }
.dd-menu { position:absolute; top: calc(100% + 8px); left:0; min-width: 260px; background:#fff; border:1px solid var(--border); border-radius:12px; box-shadow: var(--shadow); padding: 8px; display:none; }
.dd-item { display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:8px; text-decoration:none; color:#0f172a; }
.dd-item:hover { background:#f8fafc; }
.dropdown.open .dd-menu { display:block; }

.site-footer { border-top:1px solid var(--border); margin-top:32px; padding:20px 0; color:var(--muted); background: var(--surface); }
h1 { font-size: 32px; margin: 12px 0 12px; line-height:1.25; }
h2 { font-size: 22px; margin: 8px 0; }
h3 { font-size: 18px; margin: 8px 0; }
.ads { margin: 16px 0; }
.layout { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
.content-column { min-width: 0; }
.sidebar { position: sticky; top: 84px; z-index: 1; height: fit-content; }
.sidebar .widget { background: var(--surface); border:1px solid var(--border); padding:14px 25px; margin-bottom:16px; border-radius: var(--radius); box-shadow: var(--shadow); }
.sidebar .widget h3 { margin: 0 0 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: #475569; font-weight: 800; }
.sidebar .widget ul { list-style: none; padding:0; margin:0; }
.sidebar .widget li { margin: 6px 0; }
.sidebar .widget a { text-decoration: none; color: #0f172a; padding: 6px 10px; display:block; border-radius:10px; }
.sidebar .widget ul a { display:flex; align-items:center; gap:10px; }
.sidebar .widget a:hover { background:#f1f5f9; color:#1d4ed8; }
.cat-svg { width:24px; height:24px; margin-right:8px; display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; }
.cat-svg .ico { width:18px; height:18px; display:block; border-radius:50%; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.tags { display:flex; flex-wrap:wrap; gap:8px; }
.tag { background:linear-gradient(135deg,#eef2ff,#e0f2fe); padding:6px 10px; border-radius:999px; text-decoration:none; color:#0f172a; font-size: 13px; box-shadow: 0 1px 2px rgba(2,6,23,.06); border:0; transition: transform .15s ease, box-shadow .15s ease; }
.tag:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(2,6,23,.08); }
.tags .tag:nth-child(7n+1){ background:linear-gradient(135deg,#dbeafe,#bfdbfe); }
.tags .tag:nth-child(7n+2){ background:linear-gradient(135deg,#ccfbf1,#a7f3d0); }
.tags .tag:nth-child(7n+3){ background:linear-gradient(135deg,#ede9fe,#ddd6fe); }
.tags .tag:nth-child(7n+4){ background:linear-gradient(135deg,#ffedd5,#fed7aa); }
.tags .tag:nth-child(7n+5){ background:linear-gradient(135deg,#ffe4e6,#fecdd3); }
.tags .tag:nth-child(7n+6){ background:linear-gradient(135deg,#e0f2fe,#bae6fd); }
.tags .tag:nth-child(7n+7){ background:linear-gradient(135deg,#f5d0fe,#e9d5ff); }
.tags .tag::before { content:"#"; margin-right:4px; color:#94a3b8; }
.nav-overlay {
  display: none;
}
@media (min-width: 960px){
  .layout { grid-template-columns: 2.4fr 1fr; }
}

/* Mobile nav */
@media (max-width: 960px){
  .nav-overlay { display: flex; position: fixed; inset:0; background: rgba(15,23,42,.35); opacity:0; visibility:hidden; transition: opacity .2s ease; }
  .nav.open + .nav-overlay { opacity:1; visibility:visible; z-index: 1000; }
  .site-header .nav { position: fixed; top:0; left:0; right:0; bottom:0; width:100vw; height:100vh; z-index: 1001; background:#ffffff; padding: 16px; display:none; flex-direction:column; overflow-y:auto; }
  .site-header .nav .menu-close { display:block; align-self:flex-end; border:1px solid var(--border); background:#fff; font-size:22px; padding:6px 8px; margin-bottom:10px; border-radius:10px; }
  .site-header .nav a, .site-header .nav .dropdown { margin:6px 0; }
  .site-header .nav a { display:block; padding:14px 6px; font-size:18px; color:#0f172a; }
  .site-header .nav .dropdown { width:100%; }
  .site-header .nav .dd-toggle { width:100%; justify-content:space-between; padding:10px 12px; background:transparent; border-radius:10px; }
  .site-header .nav .dd-toggle:hover { background:#f8fafc; }
  .site-header .nav .dd-menu { position: static; box-shadow:none; border:none; margin:6px 0 0 0; padding:6px 0; display:none; width:100%; }
  .site-header .nav .dd-item { padding:10px 12px; border-radius:10px; }
  .site-header .nav .dd-item { opacity:.0; transform: translateY(6px); }
  .site-header .nav .dropdown.open .dd-menu { display:grid; grid-template-columns: 1fr; gap:8px; animation: reveal .25s ease; }
  .site-header .nav .dropdown.open .dd-item { animation: rise .25s ease both; }
  .site-header .nav .dropdown.open .dd-item:nth-child(1){ animation-delay: 40ms; }
  .site-header .nav .dropdown.open .dd-item:nth-child(2){ animation-delay: 80ms; }
  .site-header .nav .dropdown.open .dd-item:nth-child(3){ animation-delay: 120ms; }
  .site-header .nav .dropdown.open .dd-item:nth-child(4){ animation-delay: 160ms; }
  .site-header .nav .dropdown.open .dd-item:nth-child(5){ animation-delay: 200ms; }
  .menu-toggle { display:block; }
  .nav.open { display:flex; animation: slideDown .25s ease; }
}

@keyframes slideDown { from { transform: translateY(-8px); opacity:.8; } to { transform:none; opacity:1; } }
@keyframes reveal { from { opacity:0; transform:scaleY(.98); } to { opacity:1; transform:scaleY(1); } }
@keyframes rise { from { opacity:0; transform: translateY(6px); } to { opacity:1; transform: translateY(0); } }

/* Cards */
.cards { display:grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap:18px; }
.card { position:relative; border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; background:var(--surface); box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(2,6,23,.08); }
.card .thumb { display:block; position: relative; background:#f3f6f8; }
.card .thumb::before { content:""; display:block; padding-top:56.25%; }
.card .thumb img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; }
.card img { max-width: 100%; width: 100%; height: auto; display: block; }
.card-body { padding:14px 16px; }
.card-title { margin:0 0 8px 0; font-size:20px; line-height:1.35; }
.card-title a { color: inherit; text-decoration: none; }
.card-title a:hover { color: var(--brand); }
.card-excerpt { margin:0 0 10px 0; color:var(--muted); }
.card-meta { display:flex; gap:8px; align-items:center; color:#475569; font-size:13px; }
.chip { background:#e8eefc; color:#1e3a8a; border-radius:999px; padding:4px 8px; text-decoration:none; font-weight:600; }
.card.small .card-title { font-size:16px; }
.prevnext { display:flex; justify-content:space-between; gap:12px; margin:20px 0; }
.prevnext a { text-decoration:none; color:#1f2937; padding:8px 12px; border:1px solid var(--border); border-radius:10px; background:#fff; }
.prevnext a:hover { border-color:#cbd5e1; }

/* Article content */
.content { color:#0f172a; }
.content p { margin: 12px 0; }
.content h2 { margin: 18px 0 10px; font-size: 24px; }
.content ul { margin: 10px 0 10px 20px; }
.content blockquote { border-left:3px solid #cbd5e1; margin:12px 0; padding:8px 12px; color:#475569; background:#f8fafc; }
pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
pre { background:#0b1020; color:#e2e8f0; padding:12px; border-radius:12px; overflow:auto; }

/* Article cover */
.article-cover { margin: 10px 0 16px; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); border:1px solid var(--border); background:#f3f6f8; }
.article-cover img { width:100%; height:auto; max-height: 50vh; object-fit: cover; display:block; }

/* Breadcrumbs & Pagination */
.breadcrumbs { font-size:14px; color:#64748b; margin:8px 0 12px; }
.breadcrumbs a { color:var(--brand); text-decoration:none; }
.breadcrumbs .sep { margin:0 6px; color:#cbd5e1; }
.pagination { display:flex; gap:12px; align-items:center; margin:20px 0; justify-content:center; }
.pagination .page { padding:8px 12px; border:1px solid var(--border); border-radius:999px; text-decoration:none; color:#1f2937; background:#fff; }
.pagination .page:hover { border-color:#cbd5e1; }
.pagination .page-state { color:#64748b; }

/* Hero banner */
.hero { margin-bottom: 22px; }
.hero-inner { border-radius: 18px; background: linear-gradient(135deg, #0ea5e9, #1f2937); padding: 36px; box-shadow: var(--shadow); }
.hero-text h1 { margin: 0 0 10px; color: #f8fafc; font-size: 36px; line-height: 1.2; }
.hero-text p { margin: 0; color: #e2e8f0; font-size: 16px; }

/* Search */
.search-form { display:flex; gap:10px; margin: 16px 0 24px; }
.search-form input { flex:1; padding:12px 14px; border:1px solid var(--border); border-radius:12px; font-size:15px; background:#fff; }
.search-form button { padding:12px 16px; border:none; background: var(--brand); color:#fff; border-radius:12px; font-weight:700; cursor:pointer; }
.search-form button:hover { background: var(--brand-600); }

.search-hero { margin-bottom: 24px; }
.search-hero-inner { border-radius: 18px; background: linear-gradient(135deg, #6366f1, #0ea5e9); padding: 28px; box-shadow: var(--shadow); color:#eef2ff; }
.search-hero h1 { margin:0 0 10px; font-size:30px; }
.search-form.big input { padding: 16px 18px; font-size: 16px; }
.search-form.big button { padding: 16px 18px; font-size: 16px; }
.search-tip { color:#e2e8f0; margin-top:8px; }

@media (max-width: 640px){
  .search-form { flex-direction: column; }
  .search-form button { width: 100%; }
}


