* { box-sizing: border-box; }
:root {
  --brand-900:#0f2142;
  --brand-700:#1e3a6e;
  --brand-500:#3a6bc9;
  --text-900:#111827;
  --text-600:#4b5563;
  --line:#e5e7eb;
  --bg:#f4f6fb;
  --white:#ffffff;
}

html, body { margin:0; padding:0; }
body {
  font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif;
  color:var(--text-900);
  background:linear-gradient(180deg,#eef3fc 0%,var(--bg) 24%,var(--bg) 100%);
}

a { color:inherit; text-decoration:none; }

.site-shell { min-height:100vh; display:flex; flex-direction:column; }

.site-header {
  position:sticky;
  top:0;
  z-index:30;
  backdrop-filter: blur(10px);
  background:rgba(8,19,41,.9);
  border-bottom:1px solid rgba(255,255,255,.08);
}

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

.site-brand { display:flex; align-items:center; gap:10px; color:#fff; font-weight:700; min-width:0; }
.site-brand-mark {
  width:30px;
  height:30px;
  border-radius:8px;
  display:grid;
  place-items:center;
  background:linear-gradient(145deg,#4f7fe4,#2f5bb9);
  font-size:14px;
  flex:0 0 auto;
}
.site-brand-text { letter-spacing:.2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.site-nav { display:flex; gap:12px; }
.site-nav a {
  color:#dbeafe;
  padding:7px 12px;
  border-radius:999px;
  font-size:14px;
}
.site-nav a:hover { background:rgba(255,255,255,.12); color:#fff; }

.site-admin-link {
  font-size:12px;
  color:#b6c7e7;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(182,199,231,.35);
  flex:0 0 auto;
}
.site-admin-link:hover { color:#fff; border-color:rgba(255,255,255,.45); }

.container {
  flex:1;
  max-width:1180px;
  width:100%;
  margin:0 auto;
  padding:28px 18px 44px;
}

.hero {
  display:grid;
  grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);
  gap:20px;
  margin-bottom:18px;
}

.hero-main {
  padding:28px;
  border-radius:18px;
  background:linear-gradient(130deg,var(--brand-900),#153369 66%,#1f4690 100%);
  color:#fff;
  box-shadow:0 18px 44px rgba(9,19,40,.25);
}
.hero-kicker { margin:0 0 10px; font-size:12px; letter-spacing:1.2px; opacity:.82; }
.hero-main h1 { margin:0 0 10px; font-size:34px; line-height:1.2; }
.hero-subtitle { margin:0 0 20px; line-height:1.7; color:rgba(255,255,255,.9); max-width:700px; }

.hero-stats { display:grid; gap:12px; }
.stat-card {
  padding:18px;
  border-radius:14px;
  background:var(--white);
  border:1px solid var(--line);
  box-shadow:0 10px 24px rgba(17,24,39,.06);
}
.stat-card span { display:block; font-size:13px; color:var(--text-600); margin-bottom:8px; }
.stat-card strong { font-size:22px; color:#0f2142; }

.btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:none;
  border-radius:10px;
  padding:10px 16px;
  font-weight:600;
  cursor:pointer;
}
.btn.primary { background:#fff; color:#0f2142; }
.btn:not(.primary) { background:var(--brand-700); color:#fff; }

.showcase-strip {
  margin:0 0 22px;
  padding:14px;
  border-radius:16px;
  border:1px solid #d7e0ef;
  background:linear-gradient(180deg,#f7faff,#edf3fc);
  box-shadow:0 10px 28px rgba(17,24,39,.05);
  overflow:hidden;
}
.showcase-track {
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:120px;
  gap:12px;
  overflow-x:auto;
  padding:4px;
}
.showcase-item {
  height:160px;
  border-radius:10px;
  overflow:hidden;
  border:1px solid #d7dfed;
  background:#fff;
  box-shadow:0 6px 16px rgba(17,24,39,.09);
  transition:transform .18s ease, box-shadow .18s ease;
}
.showcase-item:hover {
  transform:translateY(-4px);
  box-shadow:0 14px 24px rgba(17,24,39,.16);
}
.showcase-item img {
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.showcase-fallback {
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
  font-weight:700;
  color:#c7d2fe;
  background:linear-gradient(145deg,#2f5bb9,#1d3973);
}

.featured-card {
  display:grid;
  grid-template-columns:minmax(0,320px) minmax(0,1fr);
  gap:18px;
  margin-bottom:24px;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:16px;
  padding:16px;
  box-shadow:0 8px 24px rgba(17,24,39,.06);
}

.featured-cover {
  display:block;
  width:100%;
  aspect-ratio:3/4;
  overflow:hidden;
  border-radius:12px;
  background:#e5e7eb;
}
.featured-cover img { width:100%; height:100%; object-fit:cover; display:block; }
.cover-fallback {
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
  background:linear-gradient(145deg,#2f5bb9,#1d3973);
  color:#dbeafe;
  font-size:34px;
  font-weight:700;
}

.featured-content { display:flex; flex-direction:column; min-width:0; }
.featured-label { margin:2px 0 8px; font-size:12px; color:#1d4ed8; font-weight:700; letter-spacing:.8px; }
.featured-content h2 { margin:0 0 10px; font-size:28px; line-height:1.3; }
.featured-content h2 a:hover { color:#1d4ed8; }
.featured-desc { margin:0 0 14px; color:var(--text-600); line-height:1.7; }
.featured-meta { margin:0 0 16px; display:flex; flex-wrap:wrap; gap:8px; color:#6b7280; font-size:13px; }

.section-head { margin:16px 0 14px; }
.section-head h3 { margin:0 0 6px; font-size:24px; }
.section-head p { margin:0; color:var(--text-600); }

.empty-card {
  background:#fff;
  border-radius:14px;
  padding:24px;
  border:1px solid var(--line);
  box-shadow:0 6px 18px rgba(17,24,39,.06);
}
.empty-card h2 { margin:0 0 8px; }
.empty-card p { margin:0; color:var(--text-600); }

.mag-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
}
.mag-card {
  display:flex;
  flex-direction:column;
  min-height:100%;
  background:#fff;
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 6px 18px rgba(17,24,39,.06);
  border:1px solid var(--line);
  transition:transform .18s ease, box-shadow .18s ease;
}
.mag-card:hover { transform:translateY(-3px); box-shadow:0 12px 26px rgba(17,24,39,.1); }

.cover-link { display:block; aspect-ratio:3/4; background:#e5e7eb; flex:0 0 auto; }
.cover { width:100%; height:100%; object-fit:cover; display:block; }
.cover.placeholder {
  display:grid;
  place-items:center;
  color:#c7d2fe;
  font-size:30px;
  font-weight:700;
  background:linear-gradient(135deg,var(--brand-700),var(--brand-900));
}

.mag-content {
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:8px;
  flex:1;
}
.mag-content h4 {
  margin:0;
  font-size:17px;
  line-height:1.4;
  min-height:48px;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.mag-content h4 a:hover { color:#1d4ed8; }
.meta { margin:0; display:flex; flex-wrap:wrap; gap:8px; color:#6b7280; font-size:12px; }
.tag {
  display:inline-flex;
  align-items:center;
  background:#eff6ff;
  color:#1e3a8a;
  border:1px solid #bfdbfe;
  border-radius:999px;
  padding:2px 8px;
}
.tag.lock { background:#fef3c7; color:#92400e; border-color:#fde68a; }
.card-link {
  margin-top:auto;
  font-size:13px;
  color:#1d4ed8;
  font-weight:600;
}
.card-link:hover { text-decoration:underline; }

.site-footer {
  margin-top:auto;
  border-top:1px solid #dde4f1;
  background:#fff;
}
.site-footer-inner {
  max-width:1180px;
  margin:0 auto;
  padding:16px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.site-footer-inner p { margin:0; color:#6b7280; font-size:13px; }
.site-footer-inner a { font-size:13px; color:#4b5563; }
.site-footer-inner a:hover { color:#1d4ed8; }

.reader-auth-shell {
  min-height:calc(100vh - 150px);
  display:grid;
  place-items:center;
  padding:20px 0;
}
.reader-auth-card {
  width:min(92vw,460px);
  background:#fff;
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow:0 14px 36px rgba(17,24,39,.1);
  padding:26px;
}
.reader-auth-kicker { margin:0 0 8px; font-size:12px; color:#1d4ed8; font-weight:700; }
.reader-auth-card h2 { margin:0 0 8px; font-size:28px; color:#0f2142; }
.reader-auth-desc { margin:0 0 14px; color:var(--text-600); line-height:1.6; }
.reader-auth-alert {
  margin-bottom:12px;
  padding:10px 12px;
  border-radius:10px;
  background:#fef2f2;
  border:1px solid #fecaca;
  color:#991b1b;
  font-size:14px;
}
.reader-auth-form label { display:block; margin-bottom:6px; font-weight:600; color:#374151; }
.reader-auth-form input {
  width:100%;
  padding:11px 12px;
  border-radius:10px;
  border:1px solid #d1d5db;
  margin-bottom:12px;
}
.reader-auth-form input:focus {
  outline:none;
  border-color:#3a6bc9;
  box-shadow:0 0 0 3px rgba(58,107,201,.15);
}
.reader-auth-form button {
  width:100%;
  border:0;
  border-radius:10px;
  padding:11px 14px;
  background:#1e3a6e;
  color:#fff;
  font-weight:700;
  cursor:pointer;
}

@media (max-width:1080px) {
  .hero { grid-template-columns:1fr; }
  .mag-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}

@media (max-width:820px) {
  .site-nav { display:none; }
  .featured-card { grid-template-columns:1fr; }
  .featured-cover { max-width:300px; }
  .mag-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .site-footer-inner { flex-direction:column; align-items:flex-start; }
}

@media (max-width:560px) {
  .container { padding:16px 12px 28px; }
  .site-header-inner { padding:12px; }
  .site-brand-text { max-width:120px; }
  .hero-main { padding:20px; }
  .hero-main h1 { font-size:28px; }
  .showcase-track { grid-auto-columns:104px; }
  .showcase-item { height:140px; }
  .mag-grid { grid-template-columns:1fr; }
}
