:root {
  --paper: #f5f1e8;
  --ink: #151515;
  --muted: #66604f;
  --rule: #cfc6b6;
  --card: #fbf8f1;
  --max: 1280px;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }

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

.block {
  background: rgba(255,255,255,0.28);
  border: 1px solid var(--rule);
}

.masthead {
  border-top: 3px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 10px 0 18px;
  margin-bottom: 22px;
}
.masthead-top, .masthead-bottom, .story-header, .article-meta, .article-topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}

.language-switcher {
  position: relative;
  display: inline-flex;
  justify-content: flex-end;
}

.language-toggle {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
  border-radius: 999px;
  transition: all 0.2s;
}

.language-toggle:hover,
.language-switcher.open .language-toggle {
  background: var(--card);
  color: var(--ink);
}

.language-icon {
  width: 18px;
  height: 18px;
}

.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  display: none;
  flex-direction: column;
  padding: 8px;
  border: 1px solid var(--rule);
  background: rgba(251, 248, 241, 0.98);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  z-index: 20;
}

.language-switcher.open .language-menu {
  display: flex;
}

.lang-btn {
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}

.lang-btn:hover {
  background: var(--paper);
  color: var(--ink);
}

.lang-btn.active {
  background: var(--ink);
  color: var(--paper);
}
.masthead h1 {
  margin: 8px 0 10px;
  font-weight: 700;
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  line-height: 0.92;
  color: #111;
  text-wrap: balance;
}

#siteName {
  display: inline-block;
  text-shadow: 0.02em 0.02em 0 rgba(0,0,0,0.12);
}

html[lang="zh-CN"] #siteName,
html[lang="zh-TW"] #siteName {
  font-family: 'ZCOOL XiaoWei', 'STKaiti', 'KaiTi', 'Songti SC', serif;
  font-weight: 400;
  font-size: clamp(3.8rem, 7vw, 6.2rem);
  letter-spacing: 0.06em;
}

html[lang="en"] #siteName,
html[lang="ja"] #siteName,
html[lang="ko"] #siteName,
html[lang="ru"] #siteName,
html[lang="fr"] #siteName,
html[lang="es"] #siteName {
  font-family: 'Cinzel', Georgia, 'Times New Roman', serif;
  font-size: clamp(3.1rem, 6vw, 5.2rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.masthead-meta, #tagline, #editorNote, .story-category, .story-kicker, .article-reading, .back-link, #articleDate, .footer-note {
  color: var(--muted);
  font-size: 0.92rem;
}
#editorNote { text-align: right; }

.newspaper-layout {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  grid-template-rows: auto auto;
  gap: 18px;
}
.paper-lead { grid-column: 1 / span 6; grid-row: 1; padding: 24px; min-height: 360px; }
.paper-secondary { grid-column: 7 / span 4; grid-row: 1; padding: 18px; min-height: 360px; }
.paper-info { grid-column: 1 / span 3; grid-row: 2; padding: 16px; min-height: 200px; }
.paper-observe { grid-column: 4 / span 4; grid-row: 2; padding: 16px; min-height: 240px; }
.paper-notes { grid-column: 8 / span 3; grid-row: 2; padding: 16px; min-height: 200px; }

.lead-link { display: block; height: 100%; }
.lead-article {
  height: 100%;
}
.lead-story h2, .story-title, .article-title, .article-main h2, .paper-lead h2 {
  font-family: Georgia, 'Times New Roman', serif;
}
.paper-lead h2 {
  margin: 8px 0 16px;
  font-size: 3.2rem;
  line-height: 1.04;
}
.lead-body p {
  margin: 0 0 14px;
  font-size: 1.1rem;
  line-height: 1.72;
  color: #2a2a2a;
}
.lead-body p:last-child {
  margin-bottom: 0;
}

.section-label {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.secondary-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 14px;
}
.secondary-story {
  min-height: 140px;
  border-top: 1px solid var(--rule);
  padding-top: 10px;
}
.secondary-link { display: block; height: 100%; }
.story-title {
  margin: 6px 0 8px;
  font-size: 1.5rem;
  line-height: 1.15;
}
.story-body p,
.story-summary {
  margin: 0 0 12px;
  font-size: 0.95rem;
  color: #262626;
}
.story-body p:last-child {
  margin-bottom: 0;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 12px;
}
.info-item {
  border-top: 1px solid var(--rule);
  padding-top: 8px;
}
.info-link {
  display: block;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
}
.info-body p {
  margin: 0 0 8px;
  color: #333;
  font-size: 0.88rem;
  line-height: 1.55;
}
.info-body p:last-child { margin-bottom: 0; }

.observe-list {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 12px;
}
.observe-item {
  border-top: 1px solid var(--rule);
  padding-top: 8px;
}
.observe-link {
  display: block;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 6px;
}
.observe-body p {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: #333;
  line-height: 1.55;
}
.observe-body p:last-child { margin-bottom: 0; }

.editor-project {
  border-top: 1px solid var(--rule);
  padding-top: 8px;
  margin-top: 8px;
}
.editor-project-name {
  margin: 0 0 4px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.98rem;
  font-weight: 700;
}
.editor-project-link {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.editor-project-note {
  margin: 0;
  font-size: 0.85rem;
  color: #333;
  line-height: 1.5;
}

.footer-note {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.site-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.rss-action {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: #d96f00;
  cursor: pointer;
  border-radius: 999px;
  transition: all 0.2s;
}

.rss-action:hover {
  background: var(--card);
  color: #b85e00;
}

.rss-icon {
  width: 20px;
  height: 20px;
}

.article-shell { max-width: 900px; }
.article-topbar { border-bottom: 1px solid var(--ink); padding-bottom: 12px; margin-bottom: 18px; }
.back-link {
  text-decoration: none;
  font-size: 1.6rem;
  line-height: 1;
  font-weight: 600;
}
.article-main { padding: 24px; }
.article-title {
  margin: 8px 0 6px;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.1;
}
.article-reading-inline {
  margin: 0 0 12px;
}
.article-summary p { margin: 0 0 16px; font-size: 1.05rem; }
.article-body p {
  font-size: 1.06rem;
}
.article-main section { margin-top: 28px; }
.article-sources { margin: 0; padding-left: 18px; }
.article-sources li { margin-bottom: 8px; }
.article-sources a { text-decoration: underline; text-underline-offset: 2px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag { display: inline-flex; align-items: center; padding: 4px 8px; border: 1px solid var(--rule); color: var(--muted); font-size: 0.85rem; }
.not-found { padding: 24px; }

@media (max-width: 980px) {
  .masthead-top, .masthead-bottom, .story-header, .article-meta, .article-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .lead-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  #editorNote { text-align: left; }
}

@media print {
  body { background: #fff; }
  .page-shell { width: 100%; padding: 0; }
  .block { border-color: #999; background: transparent; }
}
