:root {
  color-scheme: light;
  --bg: #f5f6f1;
  --panel: #ffffff;
  --panel-soft: #fdfbf4;
  --ink: #171717;
  --muted: #626861;
  --line: #d8ddd2;
  --line-strong: #bfc8b8;
  --green: #2f6f4e;
  --blue: #315f8f;
  --red: #9b4238;
  --gold: #8a6a25;
  --shadow: 0 18px 60px rgba(30, 40, 30, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0) 280px),
    var(--bg);
  font-family: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

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

.shell {
  width: min(1180px, calc(100% - 32px));
  max-width: 100%;
  margin: 0 auto;
  padding: 28px 0 42px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0 22px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  color: #fff;
  background: #1f2b25;
  font-size: 14px;
  font-weight: 800;
}

.brand h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.06;
}

.brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.nav a,
.back-link,
.small-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255,255,255,0.72);
  color: #30352f;
  font-size: 13px;
  font-weight: 750;
}

.nav a:hover,
.nav a:focus-visible,
.back-link:hover,
.back-link:focus-visible,
.small-link:hover,
.small-link:focus-visible {
  outline: none;
  border-color: var(--line-strong);
  background: #eef3ea;
}

.hero {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 18px;
  margin-top: 22px;
  max-width: 100%;
}

.panel {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-pad {
  padding: 20px;
}

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

.panel-head h2,
.panel-head h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.22;
}

.panel-head span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.hero h2 {
  margin: 0 0 12px;
  max-width: 820px;
  font-size: 40px;
  line-height: 1.08;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.entry-grid,
.status-grid,
.topic-grid,
.paper-grid,
.detail-grid,
.route-grid,
.weekly-grid {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.entry-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
  padding: 0;
}

.status-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.paper-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-grid,
.route-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.entry-card,
.status-card,
.topic-card,
.paper-card,
.detail-card,
.route-card,
.weekly-card,
.note-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
}

.entry-card {
  min-height: 170px;
  display: grid;
  align-content: space-between;
}

.entry-card:hover,
.entry-card:focus-visible,
.paper-card:hover,
.paper-card:focus-visible,
.topic-card:hover,
.topic-card:focus-visible {
  outline: none;
  border-color: var(--line-strong);
  background: #f5f8f0;
}

.entry-card b,
.status-card b,
.topic-card b,
.paper-card b,
.detail-card b,
.route-card b,
.weekly-card b,
.note-card b {
  display: block;
  font-size: 15px;
  line-height: 1.35;
}

.entry-card p,
.status-card p,
.topic-card p,
.paper-card p,
.detail-card p,
.route-card p,
.weekly-card p,
.note-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.arrow {
  margin-top: 16px;
  color: #264d78;
  font-size: 13px;
  font-weight: 800;
}

.meta-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eef3ea;
  color: #2c3b31;
  font-size: 12px;
  font-weight: 800;
}

.tag-blue {
  background: #edf4fb;
  color: #294f78;
}

.tag-red {
  background: #fbefed;
  color: #7f332b;
}

.tag-gold {
  background: #fff6df;
  color: #70520d;
}

.content {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  min-width: 0;
}

.content > * {
  min-width: 0;
}

.page-title {
  margin-top: 22px;
}

.page-title h2 {
  margin: 0;
  font-size: 36px;
  line-height: 1.12;
}

.page-title p {
  max-width: 860px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.section {
  padding: 18px 20px;
  border-top: 1px solid var(--line);
  min-width: 0;
}

.section:first-child {
  border-top: 0;
}

.section h2,
.section h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.3;
}

.section p,
.section li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.section p {
  margin: 0 0 10px;
}

.section ul,
.section ol {
  margin: 8px 0 0;
  padding-left: 22px;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.55;
}

th {
  color: #30352f;
  background: #f8faf4;
  font-weight: 800;
}

td {
  color: var(--muted);
}

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

.source-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.note-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.note-image {
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
}

.route-card img {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 180px;
  margin: 0 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf4;
  object-fit: contain;
}

.note-image img {
  display: block;
  width: 100%;
  max-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf4;
  object-fit: contain;
}

.note-image figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.check-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
}

.check-card b {
  display: block;
  color: #30352f;
  font-size: 14px;
  line-height: 1.35;
}

.check-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .topbar,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .hero,
  .entry-grid,
  .status-grid,
  .paper-grid,
  .detail-grid,
  .route-grid,
  .note-image-grid,
  .check-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .shell {
    width: 370px;
    max-width: calc(100% - 20px);
    margin-left: 10px;
    margin-right: 0;
    padding: 16px 0 34px;
  }

  .topbar {
    padding-bottom: 18px;
  }

  .brand {
    align-items: flex-start;
  }

  .mark {
    width: 36px;
    height: 36px;
  }

  .brand h1 {
    font-size: 28px;
  }

  .hero h2,
  .page-title h2 {
    font-size: 26px;
    line-height: 1.18;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    padding: 13px 16px;
  }

  .panel-head span {
    white-space: normal;
  }

  .panel-pad,
  .section {
    padding: 16px;
  }

  .entry-card {
    min-height: 126px;
  }

  table {
    min-width: 620px;
  }

  .note-image img {
    max-height: 380px;
  }
}
