﻿:root {
  --bg: #f6f7fb;
  --ink: #111827;
  --muted: #6b7280;
  --brand: #1d4ed8;
  --accent: #f59e0b;
  --line: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 18px 40px rgba(17,24,39,.08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  background: var(--bg);
  color: var(--ink);
}
img { max-width: 100%; display: block; }

.topbar { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 4vw; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand .logo { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #1d4ed8, #60a5fa); }
.brand strong { font-size: 18px; }
.nav { display: flex; gap: 10px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink); padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; }
.nav a.active { background: var(--brand); color: #fff; border-color: transparent; }

.hero { padding: 24px 4vw; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 20px; }
.hero-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); }
.hero-card h1 { margin: 8px 0 10px; font-size: 28px; }
.hero-card p { color: var(--muted); line-height: 1.7; }
.hero-list { display: grid; gap: 10px; margin-top: 12px; }
.hero-list a { text-decoration: none; color: var(--ink); font-weight: 600; }
.hero-side { display: grid; gap: 12px; }
.hero-side .stat { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px; }

.layout { display: grid; grid-template-columns: 1.4fr 0.6fr; gap: 20px; padding: 0 4vw 60px; }
.section { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; box-shadow: var(--shadow); }
.section h2 { margin: 6px 0 12px; font-size: 18px; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.card { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; display: grid; grid-template-rows: auto 1fr; }
.card img { height: 140px; object-fit: cover; }
.card-body { padding: 12px; }
.card-body h3 { margin: 6px 0; font-size: 15px; }
.card-body p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.meta { font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }

.sidebar { display: grid; gap: 16px; }
.list { display: grid; gap: 10px; }
.list a { text-decoration: none; color: var(--ink); font-size: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; background: #fff; }

.footer { border-top: 1px solid var(--line); padding: 24px 4vw 40px; color: var(--muted); font-size: 12px; }

@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
}
.grid-10 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.grid-10 .card img { height: 120px; object-fit: cover; }
@media (max-width: 1200px) { .grid-10 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px) { .grid-10 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .grid-10 { grid-template-columns: 1fr; } }

/* compact news grid + stronger hover */
.brand img.logo{width:34px;height:34px;object-fit:cover;border-radius:8px;background:transparent;}
.topbar-inner{padding:10px 3.2vw;}
.hero{padding:18px 3.2vw;gap:16px;}
.hero-card{padding:14px;border-radius:16px;}
.hero-card h1{font-size:24px;}
.hero-list{gap:8px;}
.section{padding:12px;border-radius:16px;}
.section h2{margin:4px 0 8px;font-size:17px;}
.grid-10{gap:10px;}
.card{border-radius:14px;transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;}
.card:hover{transform:translateY(-4px);box-shadow:0 18px 40px rgba(17,24,39,.18);border-color:#cbd5f5;}
.card img{height:110px;}
.card-body{padding:10px;}
.card-body h3{font-size:14px;}
.card-body p{font-size:12px;line-height:1.55;}
.meta{font-size:11px;}
.nav a:hover{border-color:#c7d2fe;color:#1d4ed8;}
.stat{transition:transform .25s ease, box-shadow .25s ease;}
.stat:hover{transform:translateY(-3px);box-shadow:0 12px 26px rgba(17,24,39,.14);}
@media (max-width: 820px){
  .hero-card h1{font-size:20px;}
  .card img{height:120px;}
}

/* news hero banner + recommended */
.hero.hero-news{padding:18px 3.2vw;display:grid;grid-template-columns:1.3fr .7fr;gap:16px;}
.hero-banner{position:relative;border-radius:18px;overflow:hidden;border:1px solid var(--line);background:#0f172a;min-height:260px;box-shadow:var(--shadow);}
.hero-banner img{width:100%;height:100%;object-fit:cover;display:block;filter:saturate(1.1) contrast(1.05);}
.banner-info{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:flex-end;padding:18px;color:#fff;background:linear-gradient(180deg,rgba(15,23,42,.15),rgba(15,23,42,.75));}
.banner-info h1{margin:6px 0 8px;font-size:26px;}
.banner-info p{margin:0 0 10px;line-height:1.6;opacity:.92;}
.banner-meta{font-size:12px;opacity:.85;display:flex;gap:10px;flex-wrap:wrap;}
.tag{display:inline-flex;align-items:center;gap:6px;background:#f59e0b;color:#111827;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:700;}
.hero-side .side-block{background:#fff;border:1px solid var(--line);border-radius:16px;padding:12px;box-shadow:var(--shadow);}
.hero-side .side-block h3{margin:4px 0 10px;font-size:14px;}
.side-list{display:grid;gap:8px;}
.side-item{display:flex;gap:10px;align-items:center;text-decoration:none;color:var(--ink);border:1px solid var(--line);border-radius:12px;padding:8px 10px;background:#fff;transition:transform .2s ease, border-color .2s ease, box-shadow .2s ease;}
.side-item:hover{transform:translateY(-2px);border-color:#c7d2fe;box-shadow:0 10px 22px rgba(15,23,42,.12);} 
.side-item img{width:56px;height:42px;object-fit:cover;border-radius:8px;flex:0 0 auto;}
.side-item .title{font-size:12px;font-weight:700;line-height:1.3;}

/* list page layout */
.page-hero{padding:20px 3.2vw 10px;display:grid;grid-template-columns:1.1fr .9fr;gap:16px;align-items:center;}
.page-hero .hero-card{box-shadow:var(--shadow);} 
.list-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;}
.article-card{display:grid;grid-template-columns:160px 1fr;gap:12px;padding:12px;border:1px solid var(--line);border-radius:16px;background:#fff;transition:transform .2s ease, box-shadow .2s ease;}
.article-card:hover{transform:translateY(-3px);box-shadow:0 16px 36px rgba(17,24,39,.14);} 
.article-card img{width:160px;height:110px;object-fit:cover;border-radius:12px;}
.article-card h3{margin:2px 0 6px;font-size:15px;}
.article-card p{margin:0;color:var(--muted);font-size:13px;line-height:1.6;}

/* article detail */
.article-wrap{padding:20px 3.2vw 50px;display:grid;grid-template-columns:1.2fr .8fr;gap:18px;}
.article-body{background:#fff;border:1px solid var(--line);border-radius:18px;padding:18px;box-shadow:var(--shadow);} 
.article-body h1{margin:6px 0 10px;font-size:24px;}
.article-body .cover{width:100%;height:260px;object-fit:cover;border-radius:14px;margin:10px 0 14px;}
.article-body p{line-height:1.8;color:#374151;}
.article-nav{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px;}
.article-nav a{display:block;border:1px solid var(--line);border-radius:12px;padding:10px;text-decoration:none;color:var(--ink);background:#f8fafc;}
.related-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;}

/* compact tweaks */
@media (max-width: 1100px){
  .hero.hero-news,.page-hero,.article-wrap{grid-template-columns:1fr;}
  .list-grid{grid-template-columns:1fr;}
}
@media (max-width: 720px){
  .article-card{grid-template-columns:1fr;}
  .article-card img{width:100%;height:140px;}
  .related-grid{grid-template-columns:1fr;}
}

.card-link{display:block;color:inherit;text-decoration:none;}
.card-link:hover h3{text-decoration:underline;}

.footer{background:#fff;border-top:1px solid var(--line);}
.footer-grid{display:grid;grid-template-columns:1.2fr .9fr .9fr;gap:18px;padding:24px 3.2vw 30px;}
.footer-col h4{margin:0 0 8px;font-size:14px;}
.footer-col .meta{margin:6px 0;}
.footer-links{display:grid;gap:6px;}
.footer-links a{text-decoration:none;color:var(--ink);font-size:13px;}
.footer-links a:hover{color:var(--brand);}
.footer-tags{display:flex;flex-wrap:wrap;gap:8px;}
.footer-tags span{border:1px solid var(--line);background:#f8fafc;border-radius:999px;padding:6px 10px;font-size:12px;}
@media (max-width: 900px){.footer-grid{grid-template-columns:1fr;}}

/* ensure logo images render everywhere */
img.logo{display:block;background:none !important;object-fit:contain;}
.footer .brand img.logo{background:none !important;}

/* footer polish + logo visibility */
.brand img.logo{background:#fff;border:1px solid var(--line);border-radius:8px;}
.footer{background:#fff;}
.footer-grid{align-items:flex-start;}
.footer-col{min-width:0;}

/* list cards links */
.article-card{color:inherit;text-decoration:none;}
.article-card:hover h3{text-decoration:underline;}
.article-card img{display:block;}

/* featured badges + pagination + read progress */
.card,.article-card{position:relative;}
.grid-10 .card:nth-child(-n+3)::before{content:"精选";position:absolute;top:10px;left:10px;background:var(--accent);color:#111827;font-size:11px;font-weight:700;padding:4px 8px;border-radius:999px;z-index:2;box-shadow:0 6px 16px rgba(245,158,11,.35);} 
.list-grid .article-card:nth-child(-n+2)::before{content:"置顶";position:absolute;top:10px;left:10px;background:#22c55e;color:#fff;font-size:11px;font-weight:700;padding:4px 8px;border-radius:999px;z-index:2;box-shadow:0 6px 16px rgba(34,197,94,.3);} 

.pager{display:flex;gap:8px;justify-content:center;margin-top:14px;}
.pager a{border:1px solid var(--line);padding:8px 12px;border-radius:10px;text-decoration:none;color:var(--ink);background:#fff;font-size:13px;}
.pager a.active{background:var(--brand);color:#fff;border-color:transparent;}

.read-progress{position:fixed;top:0;left:0;width:100%;height:3px;background:rgba(15,23,42,.12);z-index:999;}
.read-progress span{display:block;height:100%;width:0;background:linear-gradient(90deg,#2563eb,#22c55e,#f59e0b);}
.toc{border:1px solid var(--line);border-radius:12px;padding:10px;background:#fff;margin:12px 0;}
.toc a{display:block;color:var(--ink);text-decoration:none;font-size:13px;padding:6px 0;border-bottom:1px dashed #e5e7eb;}
.toc a:last-child{border-bottom:none;}

/* tighter aggregation layout */
.grid-10{gap:8px;}
.card-body{padding:8px;}
.card-body h3{font-size:13px;}
.card-body p{font-size:12px;line-height:1.5;}
.section{padding:10px;}
.hero.hero-news{gap:12px;}
.hero-banner{min-height:220px;}
.side-item{padding:6px 8px;}
.side-item img{width:52px;height:38px;}
.list-grid{gap:10px;}
.article-card{padding:10px;grid-template-columns:140px 1fr;}
.article-card img{width:140px;height:96px;}


/* logo sizing for bitpie.com logo */
.brand img.logo{width:96px;height:auto;border-radius:6px;background:transparent;border:0;}
.footer .brand img.logo{width:96px;height:auto;}

