:root {
  --ink: #232323;
  --muted: #6f6f6f;
  --line: #e5e2df;
  --soft: #f7f5f3;
  --accent: #b32631;
  --accent-soft: #f8e9eb;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font: 16px/1.7 Inter, "Segoe UI", Arial, "Microsoft YaHei", sans-serif;
}

.legacy-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 1rem;
  padding: .7rem clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
}

.legacy-brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: inherit;
  text-decoration: none;
}

.legacy-brand img { width: 42px; height: 42px; object-fit: contain; }
.legacy-brand span { display: flex; flex-direction: column; line-height: 1.2; }
.legacy-brand small { color: var(--muted); font-size: .72rem; }
.legacy-header nav { display: flex; gap: .65rem; margin-left: auto; }

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: .5rem 1rem;
  border: 1px solid #cfcfca;
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
}
.button-primary { border-color: #111; color: #fff; background: #111; }
.button:hover, .button:focus-visible { border-color: var(--accent); color: var(--accent); }
.button-primary:hover, .button-primary:focus-visible { color: #fff; background: var(--accent); }

main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 2rem 0 5rem; }
.archive-warning {
  margin-bottom: 2.2rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid #e0bd80;
  border-left: 5px solid #c89228;
  border-radius: 9px;
  background: #fff8e8;
}
.archive-warning div { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.archive-warning div span { color: #6c5730; font-weight: 700; }
.archive-warning p { margin: .55rem 0 0; color: #57451f; }
.archive-warning a { display: inline-block; margin-top: .8rem; color: #7d1d25; font-weight: 750; }

.legacy-content h1 { margin: 2.8rem 0 1rem; font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.2; }
.legacy-content h2 { margin: 2.5rem 0 .85rem; padding-bottom: .45rem; border-bottom: 1px solid var(--line); font-size: 1.45rem; line-height: 1.3; }
.legacy-content h3 { margin: 2rem 0 .65rem; font-size: 1.15rem; }
.legacy-content h4 { margin: 1.6rem 0 .55rem; }
.legacy-content a { color: #9c1e28; }
.legacy-content img { display: block; max-width: 100%; height: auto; margin: .8rem auto; border: 1px solid #ebe8e5; border-radius: 8px; }
.legacy-content figure { margin: 1.5rem 0; }
.legacy-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1.4rem 0; }
.legacy-content th, .legacy-content td { padding: .65rem; border: 1px solid var(--line); vertical-align: top; }
.legacy-content th { background: var(--soft); }
.legacy-content code { padding: .1rem .3rem; border-radius: 4px; background: #f1efed; }
.loading-message, .load-error { padding: 1rem; border: 1px solid var(--line); background: var(--soft); }

@media (max-width: 720px) {
  .legacy-header { position: static; align-items: flex-start; flex-direction: column; }
  .legacy-header nav { width: 100%; margin-left: 0; }
  .legacy-header .button { flex: 1; }
}

@media (max-width: 480px) {
  .legacy-header nav { flex-direction: column; }
  main { width: min(100% - 20px, 1180px); }
}
