:root {
  --navy: #0a2540;
  --blue: #1a56db;
  --red: #b91c1c;
  --gold: #b8860b;
  --bg: #faf8f4;
  --card: #ffffff;
  --text: #1a1a1a;
  --muted: #6b7280;
  --line: #e5e0d8;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Georgia, serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}
.topbar {
  background: var(--navy);
  color: #fff;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-flag { font-size: 22px; }
.brand-title { font-weight: 700; font-size: 17px; letter-spacing: .5px; }
.lang-switch { display: flex; gap: 6px; }
.lang-btn {
  background: transparent;
  color: #cbd5e1;
  border: 1px solid #475569;
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: all .15s;
}
.lang-btn.active { background: #fff; color: var(--navy); border-color: #fff; font-weight: 700; }
.lang-btn:hover { color: #fff; }

.tabs {
  display: flex;
  gap: 4px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
  overflow-x: auto;
  position: sticky;
  top: 53px;
  z-index: 99;
}
.tab {
  padding: 12px 16px;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  font-weight: 500;
}
.tab.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 700; }

main { max-width: 960px; margin: 0 auto; padding: 26px 20px 60px; }
.footer {
  text-align: center;
  padding: 22px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
}

h1 { font-size: 26px; margin-bottom: 8px; }
h2 { font-size: 21px; margin: 26px 0 12px; color: var(--navy); border-left: 4px solid var(--red); padding-left: 12px; }
h3 { font-size: 17px; margin: 18px 0 8px; color: var(--navy); }
p { margin: 8px 0; }
.lead { color: var(--muted); font-size: 15px; margin-bottom: 18px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 12px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.tag {
  display: inline-block;
  background: #eef2ff;
  color: var(--blue);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  margin-right: 6px;
  font-weight: 500;
}
.tag.red { background: #fef2f2; color: var(--red); }
.tag.gold { background: #fffbeb; color: var(--gold); }

/* 总统卡片列表 */
.pres-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.pres-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all .15s;
}
.pres-item:hover { border-color: var(--blue); box-shadow: 0 2px 8px rgba(26,86,219,.12); }
.pres-num { font-size: 12px; color: var(--muted); }
.pres-name { font-weight: 700; font-size: 15px; margin: 2px 0; }
.pres-meta { font-size: 12px; color: var(--muted); }

/* 详情 */
.detail-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.detail-term { color: var(--muted); font-size: 14px; }
.section-label { font-weight: 700; color: var(--navy); margin-top: 14px; display: block; font-size: 14px; }
ul.detail-list { margin: 6px 0 6px 20px; }
ul.detail-list li { margin: 4px 0; }
.back-btn {
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 14px;
  cursor: pointer;
  color: var(--muted);
  margin-bottom: 14px;
  font-size: 13px;
}
.back-btn:hover { border-color: var(--blue); color: var(--blue); }

/* 时间轴 */
.timeline { position: relative; margin: 20px 0 20px 8px; padding-left: 24px; border-left: 3px solid var(--navy); }
.tl-item { position: relative; margin: 14px 0; }
.tl-item::before {
  content: '';
  position: absolute;
  left: -31px;
  top: 6px;
  width: 11px; height: 11px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--red);
}
.tl-year { font-weight: 700; color: var(--red); font-size: 15px; }
.tl-text { margin-top: 2px; }

table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--navy); color: #fff; font-weight: 600; }
tr:nth-child(even) td { background: #fbfaf7; }

@media (max-width: 600px) {
  .pres-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  h1 { font-size: 22px; }
}
