:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #17202a;
  --muted: #5d6872;
  --line: #e2e5e9;
  --accent: #0f766e;
  --accent-soft: #e6f2f0;
  --warm: #b45309;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC",
    "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

a {
  color: inherit;
}

.container {
  width: min(1280px, 100% - 40px);
  margin: 0 auto;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px 0 18px;
}

.site-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}

.site-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.site-nav a {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent);
}

.site-nav .nav-primary {
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
}

.site-nav .nav-primary:hover {
  background: #0b5f59;
  color: #fff;
}

.header-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.stat-pill {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 12px 0;
  background: rgba(244, 245, 247, 0.94);
  border-bottom: 1px solid var(--line);
}

.toolbar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.segmented button {
  border: 0;
  background: transparent;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}

.segmented button.active {
  background: var(--accent);
  color: #fff;
}

input,
select {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--accent);
}

#search {
  flex: 1 1 240px;
  min-width: 200px;
}

.summary-row {
  padding: 14px 0 0;
}

.summary {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 16px 0 40px;
}

.featured-hero {
  position: relative;
  height: min(72vh, 680px);
  min-height: 420px;
  overflow: hidden;
  background: #111827;
}

.featured-track,
.featured-slide {
  position: absolute;
  inset: 0;
}

.featured-slide {
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.featured-slide.active {
  opacity: 1;
}

.featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(9, 12, 18, 0.82) 0%,
    rgba(9, 12, 18, 0.45) 55%,
    rgba(9, 12, 18, 0.1) 100%
  );
}

.featured-content {
  position: relative;
  z-index: 2;
  width: min(1280px, 100% - 40px);
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 76px;
  color: #fff;
}

.featured-kicker {
  display: inline-block;
  width: fit-content;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 12px;
}

.featured-content h2 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(24px, 4vw, 44px);
  line-height: 1.2;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.featured-zh {
  margin: 10px 0 0;
  max-width: 720px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
}

.featured-excerpt {
  margin: 10px 0 0;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-rationale {
  margin: 10px 0 0;
  max-width: 720px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-rationale strong {
  color: rgba(255, 255, 255, 0.94);
  font-weight: 600;
}

.featured-analysis {
  margin: 10px 0 0;
  max-width: 720px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-content .btn {
  width: fit-content;
  margin-top: 18px;
}

.featured-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.featured-actions .btn {
  margin-top: 0;
}

.featured-analysis-btn {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  backdrop-filter: blur(6px);
}

.featured-analysis-btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

.btn-light {
  border-color: #fff;
  background: #fff;
  color: #111827;
}

.btn-light:hover {
  background: rgba(255, 255, 255, 0.86);
}

.featured-nav {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  background: rgba(9, 12, 18, 0.4);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.featured-nav.prev {
  left: 18px;
}

.featured-nav.next {
  right: 18px;
}

.featured-dots {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.featured-dots .dot {
  width: 26px;
  height: 4px;
  border: 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.featured-dots .dot.active {
  background: #fff;
}

.recommendation-section {
  padding: 26px 0 10px;
}

.tutor-banner {
  background: linear-gradient(120deg, #12343b 0%, #1f4d4a 55%, #2f5d50 100%);
  color: #fff;
}

.tutor-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 28px 0;
}

.tutor-copy {
  max-width: 720px;
}

.tutor-kicker {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 12px;
}

.tutor-copy h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.25;
}

.tutor-copy p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.tutor-modes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.tutor-modes span {
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  font-size: 11px;
}

.btn-tutor {
  border-color: #fff;
  background: #fff;
  color: #12343b;
  font-weight: 600;
}

.btn-tutor:hover {
  background: rgba(255, 255, 255, 0.88);
}

.rec-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.rec-title-row h2 {
  margin: 0;
  font-size: 20px;
}

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

.rec-block {
  padding: 16px 0 20px;
  border-top: 1px solid var(--line);
}

.rec-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.rec-head h3 {
  margin: 0;
  font-size: 16px;
}

.rec-type {
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
}

.rec-period {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.rec-summary {
  margin: 10px 0 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.rec-rationale {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.rec-analysis {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.rec-points {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.8;
}

.rec-points li {
  margin: 2px 0;
}

.rec-actions {
  margin-top: 10px;
}

.rec-actions .btn-analysis {
  border-color: var(--line);
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
}

.rec-actions .btn-analysis:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.rec-works {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.rec-work {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  text-decoration: none;
}

.rec-work img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #e7eaee;
}

.rec-work-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
}

.rec-work-title {
  display: block;
  color: var(--text);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 600;
}

.rec-work-note {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.rec-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.rec-tags span {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--muted);
  font-size: 11px;
}

.work-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.work-card:hover {
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.work-card[hidden] {
  display: none;
}

.work-media {
  display: block;
  aspect-ratio: 16 / 10;
  background: #e7eaee;
  overflow: hidden;
}

.work-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-media.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-media.no-image::after {
  content: "图片暂不可用";
  color: #8a939c;
  font-size: 13px;
}

.work-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  flex: 1;
}

.work-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.source-badge {
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.country-badge {
  padding: 3px 8px;
  border-radius: 6px;
  background: #fff4e6;
  color: var(--warm);
  font-size: 11px;
}

.work-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
}

.work-title a {
  text-decoration: none;
}

.work-title a:hover {
  color: var(--accent);
}

.work-title-zh {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.work-excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work-excerpt-zh {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip,
.tag {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--muted);
  font-size: 11px;
}

.chip-en {
  color: #87909a;
}

.work-footer {
  margin-top: auto;
  padding-top: 6px;
}

.btn {
  display: inline-block;
  padding: 7px 12px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  text-decoration: none;
}

.btn:hover {
  background: #0b5f59;
}

.btn-ghost {
  border-color: var(--accent);
  background: transparent;
  color: var(--accent);
}

.btn-ghost:hover {
  background: var(--accent-soft);
}

.btn-similar {
  border-color: var(--line);
  background: var(--bg);
  color: var(--muted);
}

.btn-fav.active {
  border-color: var(--warm);
  background: var(--warm);
  color: #fff;
}

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

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

.footer-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--accent);
  text-decoration: none;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.report-table th,
.report-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
}

.report-table th {
  background: var(--bg);
  color: var(--muted);
  font-weight: 600;
}

.legal-content {
  padding: 28px 0 60px;
  max-width: 760px;
}

.legal-content p {
  margin: 0 0 14px;
  color: var(--text);
  line-height: 1.8;
}

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

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 4px 0 40px;
}

.pagination[hidden] {
  display: none;
}

.page-info {
  color: var(--muted);
  font-size: 13px;
}

.page-jump {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.page-jump input {
  width: 70px;
}

.analysis-modal[hidden] {
  display: none;
}

.analysis-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.analysis-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(3px);
}

.analysis-panel {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(78vh, 760px);
  overflow: auto;
  border: 1px solid rgba(226, 229, 233, 0.8);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 60px rgba(15, 23, 42, 0.16);
  padding: 22px 24px 24px;
}

.analysis-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.analysis-close:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.analysis-type {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
}

.analysis-panel h3 {
  margin: 8px 0 0;
  padding-right: 36px;
  font-size: 20px;
  line-height: 1.4;
}

.analysis-summary {
  margin: 10px 0 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
}

.analysis-rationale {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.analysis-rationale strong {
  color: var(--text);
  font-weight: 600;
}

.analysis-body {
  margin-top: 14px;
}

.analysis-body p {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.9;
}

.analysis-panel h4 {
  margin: 18px 0 8px;
  font-size: 13px;
  color: var(--muted);
}

.analysis-extended {
  border-left: 2px solid var(--accent);
  padding-left: 12px;
}

.analysis-extended p {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.9;
}

.analysis-points {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.9;
}

.analysis-works {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.analysis-work {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.analysis-work img {
  width: 96px;
  height: 64px;
  flex: none;
  border-radius: 6px;
  object-fit: cover;
  background: #e7eaee;
}

.analysis-work-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.analysis-work-body strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
}

.analysis-work-body span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.analysis-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.analysis-tags span {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--muted);
  font-size: 11px;
}

body.modal-open {
  overflow: hidden;
}

.site-footer {
  padding: 16px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, 1280px);
  }

  .header-inner {
    align-items: flex-start;
  }

  .featured-hero {
    height: 56vh;
    min-height: 360px;
  }

  .featured-content {
    width: min(100% - 24px, 1280px);
    padding-bottom: 66px;
  }

  .featured-content h2 {
    font-size: 24px;
  }

  .featured-nav {
    display: none;
  }

  .works-grid {
    grid-template-columns: 1fr;
  }

  .tutor-banner-inner {
    padding: 20px 0;
  }

  .tutor-copy h2 {
    font-size: 22px;
  }

  .tutor-copy p {
    font-size: 13px;
  }

  .btn-tutor {
    padding: 7px 12px;
    font-size: 12px;
  }

  .toolbar-inner {
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .toolbar {
    padding: 8px 0;
  }

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

  .segmented {
    flex: none;
  }

  .segmented button {
    padding: 7px 10px;
  }

  #search {
    flex: 1 1 160px;
    min-width: 150px;
    width: auto;
  }

  .toolbar select {
    flex: none;
    min-width: 108px;
  }

  .analysis-modal {
    padding: 12px;
    align-items: flex-end;
  }

  .analysis-panel {
    max-height: 86vh;
    padding: 18px 16px 20px;
  }

  .analysis-work img {
    width: 84px;
    height: 60px;
  }
}
