:root {
  color-scheme: light;
  --bg: #eef2f5;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --text: #172033;
  --muted: #64748b;
  --line: #dbe2ea;
  --ink: #0f172a;
  --blue: #1d4ed8;
  --teal: #0f766e;
  --green: #15803d;
  --amber: #b45309;
  --red: #b91c1c;
  --shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(29, 78, 216, .08), transparent 32rem),
    linear-gradient(225deg, rgba(15, 118, 110, .10), transparent 28rem),
    var(--bg);
  font-family: "Aptos", "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.55;
}

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

.shell { max-width: 1480px; margin: 0 auto; padding: 18px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand strong { font-size: 22px; letter-spacing: 0; }
.brand span { color: var(--muted); font-size: 13px; }

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

.nav a {
  padding: 8px 11px;
  border-radius: 7px;
  color: #334155;
  border: 1px solid transparent;
  font-size: 14px;
}

.nav a.active, .nav a:hover {
  background: #fff;
  border-color: var(--line);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(360px, .7fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}

.hero-main {
  min-height: 260px;
  border-radius: 8px;
  padding: 24px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, .92), rgba(15, 118, 110, .72)),
    radial-gradient(circle at 18% 28%, rgba(96, 165, 250, .6), transparent 28rem),
    #0f172a;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-main h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1.04;
  max-width: 920px;
  letter-spacing: 0;
}

.hero-main p {
  max-width: 820px;
  margin: 12px 0 0;
  color: rgba(255,255,255,.82);
  font-size: 15px;
}

.hero-aside {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.88);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.metric .value { font-size: 28px; font-weight: 800; line-height: 1; }
.metric .label { margin-top: 8px; color: var(--muted); font-size: 12px; }

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.panel {
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.panel-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-head h2 { margin: 0; font-size: 16px; }
.panel-head .hint { color: var(--muted); font-size: 12px; }
.panel-body { padding: 14px 16px; }

.toolbar {
  display: grid;
  grid-template-columns: 1.3fr repeat(5, minmax(120px, .55fr));
  gap: 8px;
  padding: 12px;
  margin-bottom: 14px;
}

input, select, button {
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 9px 10px;
  font: inherit;
  background: #fff;
  color: var(--text);
  min-width: 0;
}

button {
  cursor: pointer;
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
  font-weight: 700;
}

button.secondary {
  color: var(--blue);
  background: #eff6ff;
}

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}

th, td {
  border-top: 1px solid var(--line);
  padding: 10px;
  vertical-align: top;
}

th {
  background: #f8fafc;
  color: #475569;
  text-align: left;
  font-size: 12px;
  font-weight: 800;
}

tbody tr:hover { background: #f8fafc; }

.muted { color: var(--muted); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

.title-cn { font-weight: 800; color: #0f172a; }
.title-en { color: #475569; margin-top: 4px; }
.doi { color: var(--blue); font-size: 12px; margin-top: 5px; word-break: break-all; }

.badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border-radius: 999px;
  padding: 3px 8px;
  margin: 0 5px 5px 0;
  font-size: 11px;
  font-weight: 800;
  background: #e0f2fe;
  color: #075985;
  white-space: nowrap;
}

.badge.alt { background: #ecfdf5; color: #166534; }
.badge.warn { background: #fff7ed; color: #9a3412; }
.badge.gray { background: #f1f5f9; color: #475569; }

.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row {
  display: grid;
  grid-template-columns: minmax(160px, 260px) minmax(0, 1fr) 70px;
  gap: 10px;
  align-items: center;
}
.bar-label { font-size: 12px; color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 12px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #2563eb, #0f766e); border-radius: inherit; }
.bar-value { text-align: right; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

.cards-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mini-card {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: 8px;
  padding: 12px;
}
.mini-card strong { display: block; margin-bottom: 6px; }

.type-pie-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.pie {
  width: 180px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(#2563eb 0 70%, #0f766e 70% 85%, #f59e0b 85% 94%, #94a3b8 94% 100%);
  position: relative;
  margin: 0 auto;
}

.pie::after {
  content: "";
  position: absolute;
  inset: 46px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.legend {
  display: grid;
  gap: 8px;
  font-size: 13px;
}

.legend-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) 60px;
  gap: 8px;
  align-items: center;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.journal-gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.journal-card {
  min-width: 0;
}

.journal-card img {
  width: 100%;
  aspect-ratio: 480 / 620;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, .12);
  box-shadow: 0 8px 16px rgba(15, 23, 42, .08);
  display: block;
}

.journal-card .journal-name {
  display: block;
  margin-top: 8px;
  color: #0f172a;
  font-weight: 750;
  line-height: 1.25;
}

.journal-card .journal-count {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.journal-card .journal-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.metric-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 7px;
  color: #334155;
  background: #fff;
  font-size: 11px;
  font-weight: 800;
}

.footer-contact {
  max-width: 980px;
  margin: 20px auto 0;
  padding: 18px 0 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 236px;
  gap: 28px;
  align-items: center;
}

.footer-contact p {
  margin: 0;
  color: #111827;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.8;
  text-align: left;
}

.footer-contact p span {
  display: block;
}

.footer-contact img {
  width: 236px;
  max-width: 100%;
  display: block;
  justify-self: end;
}

.pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.empty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

.site-footer {
  text-align: center;
  padding: 20px 0 6px;
  font-size: 12px;
  color: #9ca3af;
}

.site-footer a {
  color: #9ca3af;
  text-decoration: none;
}

.site-footer span {
  margin: 0 8px;
  color: #9ca3af;
}

.site-footer span:last-child {
  margin-right: 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
}

.kv {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 8px 12px;
  font-size: 14px;
}
.kv .k { color: var(--muted); }
.kv .v { min-width: 0; overflow-wrap: anywhere; }

@media (max-width: 980px) {
  .topbar, .hero, .detail-layout { grid-template-columns: 1fr; display: grid; }
  .hero { grid-template-columns: 1fr; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .span-4, .span-5, .span-6, .span-7, .span-8, .span-12 { grid-column: span 12; }
  .cards-list { grid-template-columns: 1fr; }
  .journal-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .type-pie-layout { grid-template-columns: 1fr; }
  .footer-contact { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .footer-contact p { text-align: left; }
  .footer-contact img { justify-self: center; }
  table { min-width: 980px; }
}

@media (max-width: 620px) {
  .shell { padding: 12px; }
  .toolbar { grid-template-columns: 1fr; }
  .meta-grid { grid-template-columns: 1fr; }
  .journal-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-main { min-height: 220px; padding: 18px; }
}
