:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --ink: #15171c;
  --muted: #6b7280;
  --line: #e7e9ee;
  --accent: #c8342b;
  --accent-soft: #fdecea;
  --gold: #c99a2e;
  --silver: #8a94a6;
  --bronze: #b4703f;
  --up: #0b7a45;
  --down: #c02a20;
  --new: #b25b00;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- hero ---------- */
.hero {
  background: radial-gradient(900px 360px at 12% -20%, rgba(200, 52, 43, 0.55), transparent 62%),
    linear-gradient(135deg, #14161b 0%, #1d1412 55%, #2b1613 100%);
  color: #fff;
  padding: 18px 0 30px;
}

.hero .topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 26px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.5px;
}

.brand span {
  font-weight: 500;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 1px;
}

.nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.nav a {
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.72);
  transition: 0.15s;
}

.nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: 1px;
  font-weight: 800;
}

.hero-meta {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13.5px;
}

.hero-meta b {
  color: #fff;
  font-weight: 600;
}

.hero-meta .dot {
  margin: 0 8px;
  opacity: 0.45;
}

/* ---------- stat bar ---------- */
.statbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: -18px 0 20px;
  position: relative;
  z-index: 2;
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 16px;
  box-shadow: 0 10px 24px -18px rgba(16, 24, 40, 0.4);
}

.stat b {
  display: block;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: 0.3px;
}

.stat span {
  color: var(--muted);
  font-size: 12px;
}

/* ---------- board ---------- */
.weekly-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, #fff7f6, #ffffff);
  border: 1px solid #f3d9d6;
  border-radius: 14px;
  padding: 12px 18px;
  margin: 0 0 18px;
  font-size: 13.5px;
  color: #7c2a24;
  transition: 0.15s;
}

.weekly-banner:hover {
  border-color: #e8b9b4;
}

.weekly-banner b {
  color: #a8322a;
}

.weekly-banner span {
  margin-left: auto;
  color: #a8322a;
  font-weight: 600;
  white-space: nowrap;
}

.jump {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}

.jump a {
  padding: 7px 15px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13.5px;
  color: #3a4150;
  transition: 0.15s;
}

.jump a:hover {
  border-color: #c9ccd4;
  color: var(--accent);
}

.board {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 4px 20px 8px;
  margin: 0 0 24px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 18px 40px -32px rgba(16, 24, 40, 0.5);
  scroll-margin-top: 16px;
}

.board-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0 13px;
  border-bottom: 1px solid #eef0f4;
}

.board-head h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: 0.6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.board-head h2::before {
  content: "";
  width: 4px;
  height: 19px;
  border-radius: 2px;
  background: var(--accent);
  display: inline-block;
}

.board-head h2 small {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.4px;
}

.board-note {
  font-size: 12.5px;
  color: var(--muted);
}

.board-note.warn {
  color: var(--new);
}

.book {
  display: grid;
  grid-template-columns: 52px 60px minmax(0, 1fr) 128px;
  gap: 16px;
  align-items: start;
  padding: 16px 2px;
  border-bottom: 1px dashed #edeff3;
  transition: background 0.15s;
}

.book:last-child {
  border-bottom: 0;
}

.book:hover {
  background: #fcfcfd;
}

.rank {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 2px;
}

.rank .num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15.5px;
  background: #f1f2f5;
  color: #5b6472;
}

.book:nth-of-type(1) .num {
  background: linear-gradient(145deg, #f7dd94, #c99a2e);
  color: #3a2905;
}

.book:nth-of-type(2) .num {
  background: linear-gradient(145deg, #eef1f5, #b7bfcc);
  color: #333a46;
}

.book:nth-of-type(3) .num {
  background: linear-gradient(145deg, #e6c1a4, #b4703f);
  color: #3d2110;
}

.cover img {
  width: 60px;
  height: 80px;
  border-radius: 9px;
  object-fit: cover;
  background: #eceef2;
  display: block;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.12);
}

.cover-ph {
  width: 60px;
  height: 80px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #fdecea, #f3d9d6);
  color: #a8322a;
  font-size: 22px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.12);
}

.info {
  min-width: 0;
}

.info h3 {
  margin: 0;
  font-size: 17.5px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.info h3 a:hover {
  color: var(--accent);
}

.info h3 .status {
  font-size: 11px;
  font-weight: 500;
  color: #7a8394;
  border: 1px solid #e3e6ec;
  border-radius: 4px;
  padding: 0 5px;
  vertical-align: 2px;
  margin-left: 4px;
}

.byline {
  margin-top: 5px;
  font-size: 13px;
  color: #4a5262;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.byline .author {
  font-weight: 600;
  color: #333a48;
}

.byline .sep {
  color: #c3c8d2;
}

.cat {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  background: #eef1f5;
  color: #41506a;
  font-size: 12px;
}

.cat.sub {
  background: #f3f5f8;
  color: #6b7486;
}

.tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: #a8322a;
  font-size: 12px;
}

.intro {
  margin: 7px 0 0;
  font-size: 13.5px;
  color: #5b6472;
  line-height: 1.72;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book.open .intro {
  display: block;
  -webkit-line-clamp: unset;
}

.more {
  margin-top: 4px;
  border: 0;
  background: none;
  color: #a8322a;
  font-size: 12.5px;
  cursor: pointer;
  padding: 0;
}

.more:hover {
  text-decoration: underline;
}

.nums {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  font-size: 12.5px;
  color: #7a8394;
  text-align: right;
  padding-top: 2px;
}

.nums .metric {
  font-weight: 700;
  color: var(--accent);
  font-size: 14px;
}

.spark {
  width: 76px;
  height: 26px;
  margin-top: 2px;
  overflow: visible;
}

.chg {
  font-size: 11.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 5px;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.chg.up {
  color: var(--up);
  background: #e6f4ec;
}

.chg.down {
  color: var(--down);
  background: var(--accent-soft);
}

.chg.new {
  color: var(--new);
  background: #fff1e0;
}

.chg.same {
  color: #8a94a6;
  background: #f2f3f6;
}

.empty {
  padding: 34px 0;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
}

/* ---------- article / report ---------- */
.article {
  max-width: 1080px;
  margin: 0 auto;
}

.report-head {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 32px;
  margin: 0 0 22px;
  box-shadow: 0 18px 40px -34px rgba(16, 24, 40, 0.55);
}

.kicker {
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.report-head h1 {
  margin: 8px 0 10px;
  font-size: 30px;
  letter-spacing: 0.5px;
  line-height: 1.25;
}

.lede {
  margin: 0;
  color: #4a5262;
  font-size: 15px;
  line-height: 1.85;
}

.report-body {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px 32px 30px;
  margin: 0 0 24px;
}

.report-body h2 {
  font-size: 20px;
  margin: 30px 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
  line-height: 1.4;
}

.report-body p {
  color: #343a45;
  line-height: 1.9;
  margin: 0 0 12px;
}

.report-body ul {
  margin: 0 0 14px;
  padding-left: 20px;
}

.report-body li {
  margin: 5px 0;
  color: #343a45;
  line-height: 1.8;
}

.report-body .note {
  background: #fafafa;
  border: 1px solid #eef0f3;
  border-radius: 10px;
  padding: 12px 16px;
  color: #6b7280;
  font-size: 13px;
}

.report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  color: #4a5262;
  font-size: 13.5px;
}

.report-meta span {
  display: inline-block;
  min-width: 66px;
  color: #8a94a6;
}

.report-note {
  color: #8a94a6;
  font-size: 12.5px;
  text-align: center;
  margin: 4px 0 24px;
}

.report-section h2:first-child {
  margin-top: 26px;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 10px 0 6px;
}

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

.rt th {
  background: #f7f8fa;
  color: #5b6472;
  font-weight: 600;
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
  font-size: 12.5px;
}

.rt td {
  padding: 8px 10px;
  border-bottom: 1px solid #f0f1f3;
  color: #3d4450;
  white-space: nowrap;
}

.rt tr:last-child td {
  border-bottom: 0;
}

.rt th.num,
.rt td.num {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.rt td.dim {
  color: #ccd1d9;
}

.rt th.sun,
.rt td.sun {
  background: #fbfbfd;
}

.rt .name {
  white-space: nowrap;
}

.rt .name .bk {
  display: inline-block;
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.rt .name b {
  font-weight: 600;
}

.r-author {
  color: #98a1ae;
  font-size: 12px;
}

.r-tag {
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 5px;
  background: #eef1f5;
  color: #5b6472;
  font-size: 11.5px;
}

.r-out {
  margin-left: 8px;
  padding: 0 5px;
  border: 1px solid #e3e6ec;
  border-radius: 4px;
  color: #98a1ae;
  font-size: 11px;
}

.rt tr.is-out td {
  color: #8a94a6;
}

.rt tr.is-out .name b {
  font-weight: 500;
}

.rt .name a:hover {
  color: var(--accent);
}

.col-tag {
  font-weight: 400;
  color: #b3b9c4;
  font-size: 11.5px;
  margin-left: 4px;
}

.rt td.delta {
  font-weight: 600;
}

.rt td.up {
  color: var(--up);
}

.rt td.down {
  color: var(--down);
}

.rt td.same {
  color: #8a94a6;
}

.rt .bar {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0;
}

.rt th.pct,
.rt td.pct {
  text-align: left;
  padding-left: 30px;
}

.rt .pctv {
  margin-left: 6px;
}

.rt-tags {
  min-width: 560px;
  max-width: 880px;
}

.scroll-tip {
  display: none;
  margin: 2px 0 6px;
  color: #98a1ae;
  font-size: 12px;
}

.report-list {
  display: grid;
  gap: 10px;
}

.report-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  transition: 0.15s;
}

.report-item:hover {
  border-color: #d5d9e0;
  transform: translateY(-1px);
}

.report-item b {
  font-size: 15px;
}

.report-item span {
  color: var(--muted);
  font-size: 12.5px;
}

/* ---------- archive ---------- */
.archive {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 8px 22px 18px;
  margin: 0 0 24px;
}

.archive-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px dashed #edeff3;
}

.archive-row:last-child {
  border-bottom: 0;
}

.archive-row a {
  font-weight: 600;
}

.archive-row a:hover {
  color: var(--accent);
}

.archive-row .sub {
  color: var(--muted);
  font-size: 12.5px;
}

/* ---------- footer ---------- */
footer {
  padding: 12px 0 40px;
  color: #8a94a6;
  font-size: 12.5px;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- responsive ---------- */
/* ---------- sticky board tabs ---------- */
.board-tabs {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #f4f5f7;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 16px -14px rgba(16, 24, 40, 0.5);
}

.tab-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 54px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-inner::-webkit-scrollbar {
  display: none;
}

.tab-inner a {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: #4a5262;
  white-space: nowrap;
  transition: 0.15s;
}

.tab-inner a:hover {
  background: #eceef2;
}

.tab-inner a.active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.tab-date {
  margin-left: auto;
  padding-left: 12px;
  color: #8a94a6;
  font-size: 12.5px;
  white-space: nowrap;
}

/* ---------- board page ---------- */
.board-main {
  padding-top: 18px;
}

.board-main .board-head {
  padding: 4px 2px 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

.board-main .booklist {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 4px 20px 8px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 18px 40px -32px rgba(16, 24, 40, 0.5);
}

/* ---------- overview cards ---------- */
.board-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0 10px;
}

.board-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 18px 40px -34px rgba(16, 24, 40, 0.5);
  transition: 0.18s;
}

.board-card:hover {
  transform: translateY(-2px);
  border-color: #d5d9e0;
  box-shadow: 0 16px 34px -22px rgba(16, 24, 40, 0.4);
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef0f4;
}

.card-head h2 {
  margin: 0;
  font-size: 18px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.card-head h2 small {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
}

.card-more {
  font-size: 12px;
  color: var(--accent);
  white-space: nowrap;
}

.card-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}

.card-list li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed #f0f1f3;
  font-size: 13.5px;
}

.card-list li:last-child {
  border-bottom: 0;
}

.c-rank {
  color: #8a94a6;
  font-weight: 700;
  font-size: 12.5px;
  text-align: center;
}

.c-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.c-author {
  color: #98a1ae;
  font-size: 12px;
  white-space: nowrap;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.c-cat {
  background: #eef1f5;
  color: #5b6472;
  font-size: 11.5px;
  padding: 1px 6px;
  border-radius: 5px;
  white-space: nowrap;
}

.card-foot {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- history ---------- */
.history-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  flex-wrap: wrap;
}

.hbtn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13.5px;
  cursor: pointer;
  color: #3d4450;
  font-family: inherit;
}

.hbtn:hover {
  border-color: #d5d9e0;
}

.hbtn:disabled {
  opacity: 0.45;
  cursor: default;
}

.date-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.caret {
  color: #98a1ae;
  font-size: 11px;
}

.history-count {
  margin-left: auto;
  color: #8a94a6;
  font-size: 12.5px;
}

.calendar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  margin: 0 0 16px;
  max-width: 360px;
  box-shadow: 0 18px 40px -32px rgba(16, 24, 40, 0.5);
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cal-head b {
  font-size: 14px;
}

.cal-nav {
  border: 0;
  background: none;
  font-size: 18px;
  cursor: pointer;
  color: #5b6472;
  padding: 2px 8px;
  border-radius: 8px;
}

.cal-nav:hover {
  background: #f2f4f7;
}

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

.cal-dow {
  text-align: center;
  font-size: 11.5px;
  color: #98a1ae;
  padding: 4px 0;
}

.cal-day {
  aspect-ratio: 1;
  border: 0;
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  color: #ccd1d9;
  cursor: default;
  font-family: inherit;
}

.cal-day.has {
  background: #f2f4f7;
  color: #15171c;
  cursor: pointer;
}

.cal-day.has:hover {
  background: #e6eaf0;
}

.cal-day.active {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.cal-empty {
  visibility: hidden;
}

@media (max-width: 760px) {
  .scroll-tip {
    display: block;
  }

  .board-cards {
    grid-template-columns: 1fr;
    margin-top: 18px;
  }

  .tab-inner {
    height: 50px;
  }

  .tab-date {
    font-size: 11.5px;
  }

  .board-main .booklist {
    padding: 4px 14px 8px;
  }

  .calendar {
    max-width: none;
  }

  .history-count {
    width: 100%;
    text-align: right;
    margin-left: 0;
  }

  .hero h1 {
    font-size: 25px;
  }

  .brand {
    font-size: 16px;
  }

  .brand span {
    display: none;
  }

  .hero .topline {
    padding-bottom: 20px;
  }

  .nav a {
    padding: 5px 10px;
    font-size: 12.5px;
  }

  .statbar {
    grid-template-columns: repeat(2, 1fr);
    margin-top: -14px;
  }

  .book {
    grid-template-columns: 40px 54px minmax(0, 1fr);
    gap: 11px;
  }

  .cover img {
    width: 54px;
    height: 72px;
  }

  .nums {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    padding-left: 51px;
  }

  .nums .spark {
    margin-left: auto;
  }

  .info h3 {
    font-size: 16px;
  }

  .report-head,
  .report-body {
    padding: 20px 18px;
  }

  .report-head h1 {
    font-size: 23px;
  }
}
