/* Design Tokens */
:root {
  --primary: #b41924;
  --primary-hover: #921419;
  --primary-light: #fff0f0;
  --text-main: #0f172b;
  --text-muted: #717182;
  --border: #e4e4e7;
  --bg-subtle: #fafafa;
  --card-radius: 14px;
  --card-shadow: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.06);
  --card-shadow-hover: 0 10px 25px -3px rgba(0,0,0,0.12), 0 4px 10px -4px rgba(0,0,0,0.08);
}

html {
  margin: 0;
  padding: 0;
  background-color: #f0f0f0; /* 超宽屏两侧背景 */
}

body {
  margin: 0;
  padding: 0;
  background-color: #fff;
}

body {
  font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, 'Microsoft Yahei', sans-serif;
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

/* 超宽屏时 html 背景填满，page-wrap 居中 */
#page-wrap {
  background-color: #fff;
}

/* Brand */
.brand-logo {
  background-color: var(--primary);
  color: #fff;
}

.brand-text {
  color: var(--primary);
}

/* Nav active state */
.nav-link-active {
  color: var(--primary) !important;
  font-weight: 600;
}

a.nav-link:hover {
  color: var(--primary);
}

/* Primary button */
.btn-primary-red {
  background-color: var(--primary);
  color: #fff;
  transition: background-color 0.2s;
}
.btn-primary-red:hover {
  background-color: var(--primary-hover);
}

/* Card */
.mag-card {
  background: #fff;
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.3s, transform 0.3s;
}
.mag-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
}

/* Latest issues page (Figma node 1523:2167) */
.latest-issues-page {
  background: #fff;
  overflow-x: hidden;
}

.latest-issues-canvas,
.latest-issues-inner {
  max-width: 1920px;
  margin: 0 auto;
  position: relative;
}

.latest-issues-breadcrumb {
  position: relative;
  left: auto;
  top: auto;
  padding: 28px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 18px;
  color: #969696;
  z-index: 3;
}
.latest-issues-breadcrumb a:hover { color: var(--primary); }
.latest-issues-breadcrumb span:last-child { color: var(--text-main); }

.latest-issues-header {
  height: auto;
  background: #fff;
  padding-bottom: 40px;
}

.latest-issues-hero {
  position: relative;
  height: 210px;
  overflow: hidden;
}

.latest-issues-deco {
  position: absolute;
  left: 0;
  top: 0;
  width: 1114px;
  height: 210px;
  opacity: 0.1;
  pointer-events: none;
  user-select: none;
}

.latest-issues-title-row {
  position: absolute;
  top: auto;
  bottom: 10px;
  left: 0;
  right: 0;
  z-index: 2;
}

.latest-issues-title-inner {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: flex-start;
  gap: 43px;
}

.latest-issues-title {
  margin: 0;
  width: 256px;
  height: 40px;
  font-family: 'Microsoft YaHei', 'Microsoft Yahei', sans-serif;
  font-size: 64px;
  font-weight: 400;
  line-height: 40px;
  color: var(--text-main);
  white-space: nowrap;
}

.latest-issues-tabs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding-top: 0;
}

.latest-issues-decade-tabs,
.latest-issues-year-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.latest-issues-decade-tabs { gap: 20px; min-height: 24px; }
.latest-issues-year-tabs { gap: 34px; min-height: 32px; }

.latest-issues-decade-link {
  font-size: 16px;
  line-height: 24px;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
.latest-issues-decade-link:hover,
.latest-issues-decade-link.is-active { color: #000; }
.latest-issues-decade-link.is-active { font-weight: 700; }

.latest-issues-year-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 28px;
  font-size: 24px;
  line-height: 24px;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
.latest-issues-year-link:hover { color: var(--primary); }
.latest-issues-year-link.is-active {
  color: var(--primary);
  font-weight: 700;
}
.latest-issues-year-link.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 61px;
  height: 1px;
  background: var(--primary);
  transform: translateX(-50%);
}

.latest-issues-content {
  background: #f6f6f8;
  padding-bottom: 96px;
}

.latest-issues-inner {
  min-height: 0;
  padding-top: 50px;
}

.latest-issues-year-heading {
  margin: 0 0 0 210px;
  width: 1500px;
  height: 50px;
  font-family: 'Microsoft YaHei', 'Microsoft Yahei', sans-serif;
  font-size: 30px;
  font-weight: 300;
  line-height: 50px;
  color: #000;
}

.latest-issues-grid {
  display: grid;
  grid-template-columns: repeat(4, 319px);
  column-gap: 75px;
  row-gap: 80px;
  width: 1500px;
  margin-left: 210px;
}

.magazine-list-card {
  display: block;
  position: relative;
  width: 319px;
  height: 488px;
  color: inherit;
  text-decoration: none;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.1);
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}
.magazine-list-card:hover {
  border-color: rgba(180,25,36,0.28);
  box-shadow: 0 10px 28px rgba(15,23,43,0.12);
  transform: translateY(-2px);
}

.magazine-list-card__cover {
  position: absolute;
  left: 1px;
  top: 1px;
  width: 317px;
  height: 358.6px;
  overflow: hidden;
  background: #f4f4f5;
}

.magazine-list-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.magazine-list-card:hover .magazine-list-card__image { transform: scale(1.05); }

.magazine-list-card__content {
  position: absolute;
  left: 1px;
  top: 359.6px;
  width: 317px;
  height: 80px;
  background: #fff;
}

.magazine-list-card__meta {
  position: absolute;
  left: 24px;
  top: 24px;
  width: 269px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  line-height: 16px;
  color: #969696;
}

.magazine-list-card__issue {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  white-space: nowrap;
}

.magazine-list-card__calendar {
  flex: 0 0 auto;
  color: #969696;
}

.magazine-list-card__total {
  flex: 0 0 auto;
  max-width: 86px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
  white-space: nowrap;
}

.magazine-list-card__title {
  position: absolute;
  left: 24px;
  top: 52px;
  width: 269px;
  height: 28px;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: 'Microsoft YaHei', 'Microsoft Yahei', sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
  color: var(--text-main);
  transition: color 0.2s;
}
.magazine-list-card:hover .magazine-list-card__title { color: var(--primary); }

.magazine-list-card__footer {
  position: absolute;
  left: 1px;
  top: 439.6px;
  width: 317px;
  height: 60px;
  background: #fff;
}

.magazine-list-card__button {
  position: absolute;
  left: 24px;
  top: 0;
  width: 269px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  line-height: 20px;
  color: var(--primary);
}

.magazine-list-card__arrow {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}
.magazine-list-card:hover .magazine-list-card__arrow { transform: translateX(3px); }

.latest-issues-year-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 1500px;
  margin: 60px 0 0 210px;
  font-size: 22px;
  font-weight: 300;
  color: var(--text-main);
}

.latest-issues-year-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.latest-issues-year-nav__link:hover { color: var(--primary); }

@media (max-width: 1700px) {
  .latest-issues-year-heading,
  .latest-issues-grid,
  .latest-issues-year-nav {
    margin-left: 60px;
    width: calc(100% - 120px);
  }
  .latest-issues-title-row {
    left: 60px;
    width: calc(100% - 120px);
  }
  .latest-issues-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 24px;
  }
  .magazine-list-card {
    width: 100%;
    height: auto;
    aspect-ratio: 319 / 488;
  }
  .magazine-list-card__cover {
    width: calc(100% - 2px);
    height: 73.4836%;
  }
  .magazine-list-card__content {
    width: calc(100% - 2px);
    top: 73.6885%;
    height: 16.3934%;
  }
  .magazine-list-card__footer {
    width: calc(100% - 2px);
    top: 90.082%;
    height: 12.2951%;
  }
  .magazine-list-card__meta,
  .magazine-list-card__title,
  .magazine-list-card__button {
    width: calc(100% - 48px);
  }
}

@media (max-width: 1199px) {
  .latest-issues-hero { height: 210px; }
  .latest-issues-deco { left: 0; width: 900px; max-width: 90vw; }
  .latest-issues-title-row { top: auto; bottom: 10px; }
  .latest-issues-title-inner {
    flex-direction: column;
    gap: 26px;
    padding: 0 24px;
  }
  .latest-issues-title {
    font-size: 52px;
    line-height: 52px;
    height: auto;
  }
  .latest-issues-tabs { gap: 10px; }
  .latest-issues-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .latest-issues-breadcrumb { padding-left: 16px; }
  .latest-issues-title-inner { padding: 0 16px; }
  .latest-issues-year-heading,
  .latest-issues-grid,
  .latest-issues-year-nav {
    width: calc(100% - 48px);
    margin-left: 24px;
  }
  .latest-issues-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
    row-gap: 36px;
  }
  .latest-issues-year-tabs { gap: 22px; }
}

@media (max-width: 560px) {
  /* ===== Header: PC hero 已通过 hidden md:block 隐藏，移动端由独立 HTML 块处理 ===== */
  .latest-issues-header { height: auto; padding-bottom: 0px;}

  .latest-issues-breadcrumb {
    position: static;
    left: auto; top: auto;
    padding: 12px 16px 0;
  }

  .latest-issues-tabs { gap: 8px; }

  .latest-issues-decade-tabs,
  .latest-issues-year-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 16px;
  }
  .latest-issues-decade-tabs::-webkit-scrollbar,
  .latest-issues-year-tabs::-webkit-scrollbar { display: none; }

  .latest-issues-year-link { font-size: 18px; }
  .latest-issues-decade-link { font-size: 14px; }

  /* ===== 内容区 ===== */
  .latest-issues-inner { padding-top: 0; min-height: 0; }

  .latest-issues-year-heading {
    margin: 0;
    width: auto;
    padding: 12px 16px 4px;
    font-size: 22px;
    height: auto;
    line-height: 36px;
  }

  /* ===== 2列网格 ===== */
  .latest-issues-grid {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 14px;
    row-gap: 20px;
    width: auto;
    margin-left: 0;
    padding: 8px 16px 16px;
  }

  /* ===== 卡片：从绝对定位改为 flex 流式布局 ===== */
  .magazine-list-card {
    width: 100%;
    height: auto;
    aspect-ratio: unset;
    display: flex;
    flex-direction: column;
  }

  .magazine-list-card__cover {
    position: static;
    width: 100%;
    height: auto;
    aspect-ratio: 180 / 204;  /* Figma: 180×204 */
  }

  .magazine-list-card__content {
    position: static;
    width: 100%;
    height: auto;
    padding: 8px 8px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .magazine-list-card__meta {
    position: static;
    width: 100%;
    height: auto;
    font-size: 10px;
    gap: 4px;
  }

  .magazine-list-card__title {
    position: static;
    width: 100%;
    height: auto;
    font-size: 13px;
    line-height: 18px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .magazine-list-card__footer {
    position: static;
    width: 100%;
    height: auto;
    padding: 4px 8px 8px;
  }

  .magazine-list-card__button {
    position: static;
    width: 100%;
    height: auto;
    font-size: 12px;
  }

  /* ===== 翻年导航 ===== */
  .latest-issues-year-nav {
    width: auto;
    margin: 16px 0 0;
    padding: 0 16px;
    font-size: 18px;
  }
}

/* Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid transparent;
}

/* Status colors */
.status-submitted   { background:#eff6ff; color:#1d4ed8; border-color:#bfdbfe; }
.status-reviewing   { background:#fefce8; color:#a16207; border-color:#fde68a; }
.status-revision    { background:#fff7ed; color:#c2410c; border-color:#fed7aa; }
.status-accepted    { background:#f0fdf4; color:#15803d; border-color:#bbf7d0; }
.status-rejected    { background:#fef2f2; color:#b91c1c; border-color:#fecaca; }
.status-withdrawn   { background:#f4f4f5; color:#71717a; border-color:#e4e4e7; }
.status-published   { background:#f0fdf4; color:#15803d; border-color:#bbf7d0; }

/* Section heading style */
.section-heading {
  font-weight: 700;
  font-size: 1.875rem;
  line-height: 1.2;
  color: var(--text-main);
}
.section-subheading {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* Pagination */
.pagination {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
}
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-main);
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
}
.page-btn:hover   { border-color: var(--primary); color: var(--primary); }
.page-btn.active  { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Article list item */
.article-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 24px;
  transition: box-shadow 0.2s;
}
.article-item:hover {
  box-shadow: var(--card-shadow);
}

/* Timeline */
.timeline-line {
  position: absolute;
  left: 7px; top: 20px; bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--primary);
  flex-shrink: 0;
}
.timeline-dot.inactive {
  background: #d1d5db;
  box-shadow: 0 0 0 2px #d1d5db;
}

/* Steps */
.step-item { display: flex; flex-direction: column; align-items: center; flex: 1; }
.step-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
  color: var(--text-muted);
  position: relative; z-index: 1;
}
.step-circle.active  { background: var(--primary); border-color: var(--primary); color: #fff; }
.step-circle.done    { background: #15803d; border-color: #15803d; color: #fff; }
.step-line { height: 2px; flex: 1; background: var(--border); margin-top: -18px; }
.step-line.done { background: #15803d; }

/* Forms */
.form-input {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(180,25,36,0.08);
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-main);
}

/* Alert / notice bar */
.notice-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid;
  font-size: 14px;
}
.notice-bar.warning {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}
.notice-bar.info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

/* Legacy compat – pages that still use old class names */
.header { display: none; }
.footer-old { display: none; }
