:root {
  --ink: #17202a;
  --ink-soft: #33404d;
  --muted: #6a7784;
  --line: #d5dbe1;
  --line-soft: #e7ebef;
  --paper: #f4f6f8;
  --surface: #fbfcfd;
  --slate: #1d2733;
  --slate-2: #263241;
  --accent: #b5382c;
  --accent-soft: #f2e2df;
  --radius: 2px;
  --rail: 254px;
  --maxw: 1180px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.72;
  letter-spacing: .01em;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--slate);
  border-bottom: 2px solid var(--accent);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 62px;
  padding: 8px 0;
}
.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand img { width: 34px; height: 34px; border-radius: var(--radius); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { color: #f6f8fa; font-size: 17px; font-weight: 700; letter-spacing: .06em; }
.brand-sub { color: #93a1b0; font-size: 11px; letter-spacing: .14em; font-family: var(--mono); }

.nav { margin-left: auto; }
.nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}
.nav a {
  display: block;
  padding: 8px 11px;
  color: #cfd8e1;
  font-size: 14.5px;
  border-radius: var(--radius);
  white-space: nowrap;
}
.nav a:hover { color: #fff; background: var(--slate-2); }
.nav a.is-active { color: #fff; background: var(--accent); }
.nav a.is-active:hover { color: #fff; }

.menu-btn {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 38px;
  border: 1px solid #465565;
  background: transparent;
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.menu-btn span { display: block; width: 18px; height: 2px; background: #dbe3ea; position: relative; }
.menu-btn span::before, .menu-btn span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: #dbe3ea;
}
.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }

/* ---------- shell: rail + main ---------- */
.shell {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  padding: 30px 0 44px;
}

.rail { position: sticky; top: 78px; }
.rail-block {
  border-top: 2px solid var(--slate);
  padding: 12px 0 18px;
}
.rail-block + .rail-block { border-top: 1px solid var(--line); }
.rail-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--muted);
  font-family: var(--mono);
  text-transform: uppercase;
}
.rail-list { list-style: none; margin: 0; padding: 0; }
.rail-list li { border-bottom: 1px dotted var(--line); }
.rail-list li:last-child { border-bottom: 0; }
.rail-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 7px 0;
  font-size: 14.5px;
  color: var(--ink-soft);
}
.rail-list a:hover { color: var(--accent); }
.rail-list a.is-current { color: var(--accent); font-weight: 700; }
.rail-count { font-family: var(--mono); font-size: 12px; color: var(--muted); }

.rail-note {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.7;
}
.rail-note strong { display: block; margin-bottom: 4px; color: var(--ink); }

.main { min-width: 0; }

/* ---------- headings ---------- */
.page-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 26px;
}
h1 {
  margin: 0 0 10px;
  font-size: clamp(25px, 3.2vw, 34px);
  line-height: 1.28;
  letter-spacing: -.01em;
  font-weight: 800;
}
h1 .h1-mark {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--accent);
  margin-right: 10px;
  vertical-align: 4px;
}
.lead { margin: 0; color: var(--ink-soft); font-size: 16px; max-width: 68ch; }
h2 { font-size: clamp(20px, 2.2vw, 24px); margin: 34px 0 12px; line-height: 1.35; font-weight: 750; }
h3 { font-size: 17.5px; margin: 24px 0 8px; font-weight: 700; }
p { margin: 0 0 15px; }
.main p, .main li { color: var(--ink-soft); }

/* ---------- hero (asymmetric, image right, offset) ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 26px;
  align-items: stretch;
  border: 1px solid var(--line);
  background: var(--surface);
  margin-bottom: 30px;
}
.hero-copy { padding: 28px 26px 24px; }
.hero-kicker {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .18em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.hero-copy h1 { font-size: clamp(26px, 3.4vw, 36px); }
.hero-copy p { color: var(--ink-soft); margin-bottom: 18px; }
.hero-figure { position: relative; border-left: 1px solid var(--line); min-height: 260px; }
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }
.hero-figure figcaption {
  position: static;
  font-size: 12.5px;
  color: var(--muted);
  padding: 8px 6px 0;
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 650;
  border: 1px solid var(--accent);
}
.btn:hover { background: #9c2c22; color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink-soft);
  margin-left: 8px;
}
.btn-ghost:hover { background: var(--slate); border-color: var(--slate); color: #fff; }

/* ---------- draw strip ---------- */
.strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 32px;
}
.strip-cell { background: var(--surface); padding: 14px 16px; }
.strip-cell .label { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; color: var(--muted); }
.strip-cell .value { font-size: 20px; font-weight: 700; font-family: var(--mono); letter-spacing: .04em; }
.strip-cell .value.accent { color: var(--accent); }

/* ---------- section head / blocks ---------- */
.sec { margin-bottom: 34px; }
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 2px solid var(--slate);
  padding-bottom: 8px;
  margin-bottom: 16px;
}
.sec-head h2 { margin: 0; font-size: 19px; letter-spacing: .02em; }
.sec-head .more { font-size: 13px; color: var(--muted); font-family: var(--mono); }
.sec-head .more:hover { color: var(--accent); }

/* entry list (timeline rows) */
.entry-list { list-style: none; margin: 0; padding: 0; }
.entry {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 118px;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: center;
}
.entry:first-child { border-top: 1px solid var(--line-soft); }
.entry-date { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.entry-title { font-size: 15.5px; font-weight: 650; line-height: 1.5; }
.entry-desc { font-size: 13.5px; color: var(--muted); margin: 2px 0 0; }
.entry-cat { font-size: 12px; color: var(--ink-soft); text-align: right; font-family: var(--mono); }

/* number board */
.board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.board li {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 14.5px;
  color: var(--ink);
}
.board li.is-hot { border-color: var(--accent); color: var(--accent); font-weight: 700; }

/* two-col blocks */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.panel {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 18px 20px;
}
.panel h3 { margin-top: 0; }
.panel ul { margin: 0; padding-left: 18px; }
.panel li { margin-bottom: 7px; }

/* data table (grouped, not hairline-every-row) */
.table-group { margin-bottom: 22px; }
.table-group h3 { margin-bottom: 6px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line-soft); }
th { background: var(--slate); color: #e9eef3; font-weight: 600; font-size: 13px; letter-spacing: .04em; }
tbody tr:last-child td { border-bottom: 0; }
td.num { font-family: var(--mono); }

/* media figure */
.figure { margin: 22px 0 26px; }
.figure img { border: 1px solid var(--line); }
.figure figcaption { font-size: 12.5px; color: var(--muted); margin-top: 7px; }

/* ---------- article ---------- */
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs span.sep { margin: 0 6px; color: var(--line); }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
  margin: 14px 0 22px;
  font-family: var(--mono);
}
.article-meta .author { color: var(--ink); font-family: var(--font); font-weight: 650; }

.article-body { max-width: 100%; }
.article-body p { font-size: 16.5px; }
.article-body h2 { border-left: 3px solid var(--accent); padding-left: 11px; }
.article-body blockquote {
  margin: 20px 0;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--slate);
  color: var(--ink-soft);
  font-size: 15.5px;
}
.article-body ul, .article-body ol { padding-left: 20px; }
.article-body li { margin-bottom: 8px; font-size: 16px; }
.article-body a { color: var(--accent); border-bottom: 1px solid var(--accent-soft); }
.article-body a:hover { border-bottom-color: var(--accent); }

.aside-box {
  margin-top: 30px;
  border-top: 2px solid var(--slate);
  padding-top: 14px;
}
.aside-box h2 { font-size: 17px; margin: 0 0 10px; border-left: 0; padding-left: 0; }
.aside-box ul { list-style: none; padding: 0; margin: 0; }
.aside-box li { border-bottom: 1px dotted var(--line); padding: 9px 0; }
.aside-box li:last-child { border-bottom: 0; }
.aside-box a { font-weight: 600; }
.aside-box .aside-desc { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }

.back-cat { margin-top: 26px; font-size: 14px; }

/* ---------- footer ---------- */
.footer {
  background: var(--slate);
  color: #b9c4cf;
  margin-top: 20px;
  border-top: 3px solid var(--accent);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.2fr;
  gap: 30px;
  padding: 34px 0 26px;
}
.footer h3 { color: #eef2f6; font-size: 14px; letter-spacing: .08em; margin: 0 0 10px; }
.footer p { color: #b9c4cf; font-size: 13.5px; margin: 0 0 7px; line-height: 1.75; }
.footer a { color: #d5dee6; }
.footer a:hover { color: #fff; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 6px; font-size: 13.5px; }
.footer-legal {
  border-top: 1px solid #35434f;
  padding: 14px 0 22px;
  font-size: 12.5px;
  color: #8d9aa7;
  line-height: 1.9;
}
.footer-legal a, .footer-legal span { color: #8d9aa7; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .shell { grid-template-columns: 214px minmax(0, 1fr); gap: 24px; }
  .entry { grid-template-columns: 74px minmax(0, 1fr); }
  .entry-cat { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  body { font-size: 15.5px; }
  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--slate);
    border-bottom: 2px solid var(--accent);
    padding: 8px 14px 14px;
    max-height: 72vh;
    overflow-y: auto;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a { padding: 11px 6px; border-bottom: 1px solid #35434f; border-radius: 0; font-size: 15px; }
  .menu-btn { display: flex; }
  .topbar-inner { position: relative; flex-wrap: wrap; }
  .shell { grid-template-columns: 1fr; gap: 0; padding-top: 20px; }
  .rail { position: static; order: 2; margin-top: 30px; }
  .main { order: 1; }
  .hero { grid-template-columns: 1fr; }
  .hero-figure { border-left: 0; border-top: 1px solid var(--line); min-height: 0; }
  .split { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 22px; padding: 26px 0 18px; }
  .entry { grid-template-columns: 1fr; gap: 3px; }
  .entry-date { font-size: 12px; }
  .article-body p { font-size: 16px; }
  .btn-ghost { margin-left: 0; margin-top: 8px; }
  table { font-size: 13.5px; }
  th, td { padding: 8px 7px; }
  .board { grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); }
}

@media (prefers-reduced-motion: no-preference) {
  .entry, .rail-list a, .nav a, .btn { transition: color .18s ease, background-color .18s ease, border-color .18s ease; }
}
