
:root{
  --bg-grad-1:#fff7f0;
  --bg-grad-2:#ffffff;
  --bg-grad-3:#fffaf6;
}
html[data-theme="dark"]{
  color-scheme:dark;
  --primary:#ff8a33;
  --primary-dark:#ff6b00;
  --accent:#2a1a10;
  --ink:#f8fafc;
  --text:#d6dde8;
  --muted:#94a3b8;
  --line:#263244;
  --surface:#0f172a;
  --surface-2:#111827;
  --shadow:0 20px 50px rgba(0,0,0,.35);
  --bg-grad-1:#0b1220;
  --bg-grad-2:#0f172a;
  --bg-grad-3:#111827;
}


:root{
  --bg-grad-1:#fff7f0;
  --bg-grad-2:#ffffff;
  --bg-grad-3:#fffaf6;
  --primary:#ff6b00;
  --primary-dark:#d14f00;
  --accent:#fff1e8;
  --ink:#111827;
  --text:#243041;
  --muted:#667085;
  --line:#e8edf3;
  --surface:#ffffff;
  --surface-2:#fff8f3;
  --shadow:0 18px 50px rgba(17,24,39,.08);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color:var(--text);background:radial-gradient(circle at top,var(--bg-grad-1) 0,var(--bg-grad-2) 36%,var(--bg-grad-3) 100%);text-rendering:optimizeLegibility;transition:background-color .25s ease,color .25s ease,background .25s ease}
a{text-decoration:none}img{max-width:100%;display:block}

.site-header{background:rgba(255,255,255,.9);backdrop-filter:blur(14px);border-bottom:1px solid rgba(232,237,243,.9)}
.brand-mark{height:38px;width:auto;display:block}
.brand-word{display:flex;flex-direction:column;line-height:1}
.brand-title{font-size:1.02rem;font-weight:800;letter-spacing:-.03em;color:var(--ink)}
.brand-sub{font-size:.72rem;color:var(--muted);font-weight:600;letter-spacing:.02em}
.navbar{padding:.85rem 0}
.nav-link{font-weight:700;color:#374151!important;padding:.7rem .9rem!important;border-radius:999px}
.nav-link:hover,.nav-link.active{color:var(--primary)!important;background:var(--accent)}
.dropdown-menu{border:1px solid var(--line);box-shadow:var(--shadow);border-radius:18px;padding:.5rem}
.dropdown-item{border-radius:12px;padding:.6rem .8rem;font-weight:600}
.dropdown-item:hover{background:var(--accent);color:var(--primary-dark)}
.btn-brand{background:linear-gradient(135deg,var(--primary),var(--primary-dark));border:none;color:#fff;box-shadow:0 14px 34px rgba(255,107,0,.22)}
.btn-brand:hover{color:#fff;opacity:.96}
.btn-soft{border:1px solid #ffd1b3;background:#fff;color:var(--primary-dark)}
.btn-soft:hover{background:var(--accent);color:var(--primary-dark);border-color:#ffbf94}

.hero{padding:4.7rem 0 2.4rem}
.eyebrow{display:inline-flex;align-items:center;gap:.45rem;background:#fff3e8;color:var(--primary-dark);border:1px solid #ffd1b3;border-radius:999px;padding:.48rem .85rem;font-size:.88rem;font-weight:800;margin-bottom:1rem}
.hero h1{letter-spacing:-.04em;color:var(--ink)}
.hero-visual,.panel,.card-clean,.article,.sidebar,.empty{background:rgba(255,255,255,.96);border:1px solid rgba(232,237,243,.95);box-shadow:var(--shadow);border-radius:28px}
.hero-visual{padding:1.4rem;position:relative;overflow:hidden}
.hero-visual::before{content:"";position:absolute;inset:auto -40px -40px auto;width:160px;height:160px;background:radial-gradient(circle,var(--accent),transparent 70%)}
.stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.stat{padding:1.05rem;border:1px solid #ffd9c1;border-radius:22px;background:linear-gradient(180deg,#fff,#fff7f1)}
.stat strong{display:block;font-size:1.5rem;line-height:1.1;color:var(--ink)}
.stat span{display:block;margin-top:.28rem;color:var(--muted);font-size:.92rem}

.panel{padding:1rem 1rem 1.1rem}
.section-head{display:flex;justify-content:space-between;gap:1rem;align-items:end;margin-bottom:1rem}
.chips{display:flex;gap:.7rem;flex-wrap:wrap}
.chip{display:inline-flex;align-items:center;border:1px solid #ffd1b3;background:#fff;color:var(--primary-dark);border-radius:999px;padding:.52rem .9rem;font-size:.92rem;font-weight:700;transition:.2s ease}
.chip.active,.chip:hover{background:var(--primary);border-color:var(--primary);color:#fff;transform:translateY(-1px)}

.post-card{overflow:hidden;height:100%;transition:transform .22s ease,box-shadow .22s ease}
.post-card:hover{transform:translateY(-6px);box-shadow:0 22px 52px rgba(17,24,39,.11)}
.post-thumb{aspect-ratio:16/10;background:#f8fafc}
.post-thumb img{width:100%;height:100%;object-fit:cover}
.post-body{padding:1.15rem 1.15rem 1.2rem}
.meta{display:flex;gap:.5rem;flex-wrap:wrap;color:var(--muted);font-size:.9rem;margin-bottom:.75rem}
.post-title{font-size:1.2rem;line-height:1.35;font-weight:800;margin-bottom:.65rem}
.post-title a{color:var(--ink)}
.post-title a:hover{color:var(--primary)}
.excerpt{color:#4b5563;line-height:1.72}
.search-input,.form-select{border-radius:18px!important;padding:1rem 1.05rem!important;border:1px solid var(--line)!important}
.search-input:focus,.form-select:focus{box-shadow:0 0 0 .25rem rgba(255,107,0,.14)!important;border-color:#ffbf94!important}
.empty{padding:2.5rem 1rem;text-align:center}
.pagination{gap:.5rem;flex-wrap:wrap}.pagination .page-link{border:none;border-radius:12px;color:var(--ink)}.pagination .active .page-link{background:var(--primary);color:#fff}

.article-wrap{padding:2rem 0 4rem}
.article{padding:1.7rem}
.article h1{font-size:clamp(2rem,4vw,3.25rem);line-height:1.06;font-weight:800;letter-spacing:-.045em;margin-bottom:1.2rem;color:var(--ink)}
.article .featured{width:100%;max-height:500px;object-fit:cover;border-radius:24px;margin:1rem 0 1.5rem}
.article-content{color:#1f2937;line-height:1.88;font-size:1.04rem}
.article-content h2,.article-content h3,.article-content h4{margin-top:2rem;margin-bottom:1rem;font-weight:800;line-height:1.2;color:var(--ink)}
.article-content iframe{width:100%;min-height:320px;border:0;border-radius:18px;margin:1rem 0}
.article-content img{border-radius:18px;margin:1rem auto;box-shadow:0 10px 30px rgba(15,23,42,.08)}
.article-content a{color:var(--primary-dark);text-decoration:underline}
.sidebar{padding:1.2rem}.sidebar h2{color:var(--ink)}
.related-item{display:grid;grid-template-columns:92px 1fr;gap:.85rem;align-items:center;color:var(--ink)}
.related-item img{width:92px;height:72px;object-fit:cover;border-radius:14px}.related-item strong{line-height:1.35;display:block}

.site-footer{margin-top:4rem;background:#111827;color:#f9fafb;border-top:1px solid rgba(255,255,255,.08)}
.footer-top{padding:3rem 0 1.2rem}
.footer-brand{display:flex;align-items:center;gap:.9rem;margin-bottom:1rem}
.footer-brand img{height:40px}
.footer-title{font-weight:800;font-size:1.1rem;letter-spacing:-.02em}
.footer-copy{color:#d1d5db;max-width:420px;line-height:1.7}
.footer-head{font-size:.95rem;font-weight:800;letter-spacing:.03em;text-transform:uppercase;color:#fff;margin-bottom:.9rem}
.footer-links{display:grid;gap:.6rem}
.footer-links a{color:#d1d5db;font-weight:600}
.footer-links a:hover{color:#fff}
.footer-bottom{padding:1rem 0 2rem;border-top:1px solid rgba(255,255,255,.08);color:#9ca3af;font-size:.95rem}
.small-muted{color:var(--muted);font-size:.92rem}

@media (max-width:991px){
  .hero{padding-top:2.2rem}
  .hero-visual{margin-top:1rem}
  .article{padding:1.15rem}
}

.site-header{background:color-mix(in srgb, var(--surface) 88%, transparent)}
.navbar-toggler{border-color:var(--line)!important}
.navbar-toggler-icon{filter:var(--navicon-filter, none)}
html[data-theme="dark"] .navbar-toggler-icon{filter:invert(1) brightness(1.7)}
.hero-visual,.panel,.card-clean,.article,.sidebar,.empty,.post-card{background:color-mix(in srgb, var(--surface) 96%, transparent);border-color:var(--line)}
.nav-link{color:var(--text)!important}
.brand-title,.post-title a,.article h1,.article-content h2,.article-content h3,.article-content h4,.sidebar h2,.stat strong{color:var(--ink)}
.dropdown-menu{background:var(--surface);border-color:var(--line)}
.dropdown-item{color:var(--text)}
.dropdown-item:hover{background:var(--accent);color:var(--primary)}
.btn-soft{background:var(--surface);border-color:color-mix(in srgb, var(--primary) 40%, var(--line));color:var(--ink)}
.btn-soft:hover{background:var(--accent);color:var(--ink)}
.excerpt,.article-content,.footer-copy{color:var(--text)}
.search-input,.form-select{background:var(--surface)!important;color:var(--text)!important}
.form-select option{background:var(--surface);color:var(--text)}
.search-input::placeholder{color:var(--muted)}
.chip{background:var(--surface)}
.post-thumb{background:color-mix(in srgb, var(--surface-2) 80%, black)}
.article-content table{color:var(--text)}
.article-content blockquote{border-left:4px solid var(--primary);padding-left:1rem;color:var(--muted)}
.theme-toggle{
  display:inline-flex;align-items:center;gap:.55rem;
  border:1px solid var(--line);background:var(--surface);color:var(--text);
  border-radius:999px;padding:.68rem 1rem;font-weight:700;line-height:1;
  transition:all .2s ease;
}
.theme-toggle:hover{transform:translateY(-1px);border-color:color-mix(in srgb, var(--primary) 45%, var(--line));color:var(--ink)}
.theme-toggle-icon{font-size:1rem}
html[data-theme="dark"] .site-footer{background:#020617}
html[data-theme="dark"] .footer-links a{color:#cbd5e1}
html[data-theme="dark"] .footer-bottom{color:#94a3b8}


.ad-slot{margin-inline:auto}
.ad-slot-inner{background:var(--surface);border:1px dashed color-mix(in srgb, var(--primary) 40%, var(--line));border-radius:22px;overflow:hidden}
.ad-slot-label{font-size:.78rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin:0 0 .65rem .2rem}
.ad-placeholder-box{padding:1.1rem 1rem;display:grid;gap:.3rem;text-align:center;min-height:120px;place-items:center;color:var(--text)}
.ad-placeholder-box strong{color:var(--ink);font-size:1rem}
.ad-placeholder-box code{font-size:.9em}
.ad-slot-home{padding-inline:0}
.ad-slot-home .ad-slot-inner{min-height:140px;padding:1rem}
.ad-slot-feed .ad-slot-inner,.article .ad-slot .ad-slot-inner,.sidebar .ad-slot .ad-slot-inner{min-height:120px;padding:1rem}
.ad-slot[data-ad-position="sidebar"] .ad-slot-inner{min-height:260px;position:sticky;top:104px}
@media (max-width:991px){.ad-slot[data-ad-position="sidebar"] .ad-slot-inner{position:static;min-height:120px}}


.welcome-strip{padding:1.35rem 1.4rem;display:flex;justify-content:space-between;gap:1.5rem;align-items:center}
.welcome-points{display:flex;gap:.65rem;flex-wrap:wrap;justify-content:flex-end}
.welcome-points span,.search-kicker,.section-link{display:inline-flex;align-items:center;border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:999px;padding:.52rem .9rem;font-size:.9rem;font-weight:700}
.search-panel{padding:1.2rem}
.featured-grid{display:grid;grid-template-columns:1.45fr .95fr;gap:1rem}
.featured-side{display:grid;gap:1rem}
.featured-card{overflow:hidden;height:100%}
.featured-thumb{display:block;aspect-ratio:16/9;background:var(--surface-2)}
.featured-thumb img{width:100%;height:100%;object-fit:cover}
.featured-body{padding:1.1rem 1.15rem 1.2rem}
.featured-card-large .featured-thumb{aspect-ratio:16/10}
.featured-card-large .featured-title{font-size:1.6rem}
.featured-title{font-size:1.18rem;line-height:1.3;font-weight:800;margin-bottom:.7rem}
.featured-title a{color:var(--ink)}
.read-more{font-weight:800;color:var(--primary-dark)}
.topic-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem}
.topic-card{display:flex;flex-direction:column;overflow:hidden;color:inherit;height:100%;transition:transform .2s ease, box-shadow .2s ease}
.topic-card:hover{transform:translateY(-4px);box-shadow:0 22px 46px rgba(17,24,39,.12)}
.topic-card-image{aspect-ratio:16/9;background:var(--surface-2)}
.topic-card-image img{width:100%;height:100%;object-fit:cover}
.topic-card-body{padding:1rem 1.05rem 1.15rem}
.topic-card-body h3{font-size:1.08rem;font-weight:800;margin:.25rem 0 .45rem;color:var(--ink)}
.topic-card-body p{margin:0;color:var(--muted);line-height:1.6}
.topic-count{display:inline-flex;font-size:.8rem;font-weight:800;color:var(--primary-dark);background:var(--accent);padding:.35rem .55rem;border-radius:999px}
.section-link{text-decoration:none}
.section-link:hover{border-color:color-mix(in srgb, var(--primary) 45%, var(--line));color:var(--primary-dark)}
@media (max-width:991px){
  .featured-grid,.topic-grid{grid-template-columns:1fr}
  .welcome-strip{flex-direction:column;align-items:flex-start}
}


/* Content cleanup pass */
.article-content{font-size:1.06rem;line-height:1.85;word-break:break-word}
.article-content p{margin:0 0 1.1rem}
.article-content h2,.article-content h3,.article-content h4{margin-top:2rem;margin-bottom:.8rem;line-height:1.3}
.article-content img.article-image{display:block;margin:1.25rem auto;max-width:100%;height:auto}
.article-content figure{margin:1.5rem 0;text-align:center}
.article-content figcaption{font-size:.95rem;opacity:.78;margin-top:.5rem}
.article-content blockquote{border-left:4px solid var(--brand,#ff6b00);padding:.75rem 1rem;margin:1.25rem 0;background:rgba(255,107,0,.06);border-radius:.75rem}
.article-content pre{padding:1rem;border-radius:1rem;overflow:auto;background:var(--surface-2,#111827);color:#e5e7eb}
.article-content .table-responsive{border-radius:1rem;overflow:hidden}
.article-content iframe{border:0;border-radius:1rem}
.article-content ul,.article-content ol{padding-left:1.4rem;margin-bottom:1rem}
.article-content > :first-child{margin-top:0!important}


/* Logo + global search pass */
.brand-mark{width:56px;height:56px;object-fit:contain;border-radius:14px;background:#000;padding:4px;box-shadow:0 10px 28px rgba(0,0,0,.12)}
.brand-word{line-height:1.1}
.site-search-wrap{display:flex;align-items:center}
.site-search-form{display:flex;align-items:center;gap:.45rem;background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:.32rem .38rem .32rem .9rem;min-width:min(100%,320px);box-shadow:0 8px 24px rgba(15,23,42,.06)}
.site-search-input{border:0;background:transparent;outline:none;color:var(--ink);width:220px;max-width:100%;font-size:.95rem}
.site-search-input::placeholder{color:var(--muted)}
.site-search-btn{border:0;border-radius:999px;background:var(--primary);color:white;font-weight:800;width:2.2rem;height:2.2rem;display:inline-flex;align-items:center;justify-content:center;box-shadow:0 10px 20px rgba(255,107,0,.22)}
.site-search-btn:hover{background:var(--primary-dark)}
html[data-theme="dark"] .site-search-form{background:#0f172a;border-color:#334155;box-shadow:none}
html[data-theme="dark"] .site-search-input{color:#e5e7eb}
@media (max-width: 991px){
  .site-search-wrap{width:100%;margin:0 0 .35rem}
  .site-search-form{width:100%;min-width:0}
  .site-search-input{width:100%}
  .brand-mark{width:48px;height:48px}
}


.ad-slot{width:100%}
.ad-slot .adsbygoogle{width:100%}
.ad-slot-home,.ad-slot-feed{max-width:100%}
.article .ad-slot,.sidebar .ad-slot{width:100%}
.ad-slot-inner{display:block}
.ad-slot[data-ad-position="sidebar"] .ad-slot-inner{padding:1rem;min-height:280px}
@media (max-width:991px){.ad-slot[data-ad-position="sidebar"] .ad-slot-inner{min-height:140px}}


/* AdSense visibility fixes */
.ad-slot-inner{padding:.5rem;min-height:auto !important}
.article .ad-slot .ad-slot-inner,.sidebar .ad-slot .ad-slot-inner,.ad-slot-feed .ad-slot-inner,.ad-slot-home .ad-slot-inner{min-height:auto !important}
.ad-slot[data-ad-position="sidebar"] .ad-slot-inner{position:static;min-height:auto !important}
.ad-slot .adsbygoogle{display:block;min-height:0 !important}
.ad-slot-unfilled{display:none !important}
ins.adsbygoogle[data-ad-status="unfilled"]{display:none !important}

/* Keep sidebar ads visually tidy when they do fill */
.ad-slot[data-ad-position="sidebar"]{max-width:100%}
.ad-slot[data-ad-position="sidebar"] .adsbygoogle{width:100%}
