:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --profit: #c2413b;
  --loss: #138a5b;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

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

a:hover {
  color: var(--accent);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  padding: 14px max(22px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid var(--border);
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 7px;
  background:
    linear-gradient(90deg, transparent 47%, var(--accent) 47%, var(--accent) 53%, transparent 53%),
    linear-gradient(0deg, transparent 42%, var(--profit) 42%, var(--profit) 57%, transparent 57%),
    var(--accent-soft);
}

nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.home {
  width: min(1120px, calc(100% - 44px));
  margin: 0 auto;
  padding: 34px 0 54px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 34px;
  align-items: center;
  min-height: 420px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.intro h1 {
  max-width: 650px;
  margin-bottom: 18px;
  font-size: 44px;
  line-height: 1.12;
  letter-spacing: 0;
}

.lead {
  max-width: 600px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.text-link,
.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--accent);
  font-weight: 700;
}

.lead-visual {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.lead-visual img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

.article-index {
  padding-top: 34px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.3;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.article-list {
  border-top: 1px solid var(--border);
}

.article-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}

.article-row time,
.article-title time {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.article-row h3 {
  margin-bottom: 8px;
  font-size: 21px;
  line-height: 1.35;
  letter-spacing: 0;
}

.article-row p {
  max-width: 760px;
  margin-bottom: 12px;
  color: var(--muted);
  line-height: 1.65;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
  line-height: 1.4;
}

.empty {
  margin: 24px 0 0;
  color: var(--muted);
}

.article-page {
  width: min(860px, calc(100% - 44px));
  margin: 0 auto;
  padding: 32px 0 60px;
}

.article {
  min-height: 66vh;
}

.article-title {
  padding: 22px 0 28px;
  border-bottom: 1px solid var(--border);
}

.article-title h1 {
  margin: 12px 0 12px;
  font-size: 38px;
  line-height: 1.18;
  letter-spacing: 0;
}

.article-title p {
  max-width: 720px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.article-body {
  padding-top: 26px;
  font-size: 17px;
  line-height: 1.85;
}

.article-body h2 {
  margin: 38px 0 12px;
  font-size: 24px;
  line-height: 1.35;
}

.article-body h3 {
  margin: 30px 0 10px;
  font-size: 20px;
  line-height: 1.4;
}

.article-body p,
.article-body ul,
.article-body blockquote,
.article-body pre {
  margin-bottom: 20px;
}

.article-body ul {
  padding-left: 24px;
}

.article-body li + li {
  margin-top: 8px;
}

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #f3f4f6;
  font-size: 0.92em;
}

.article-body pre {
  overflow-x: auto;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #111827;
  color: #f9fafb;
}

.article-body pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.article-body blockquote {
  margin-left: 0;
  padding: 2px 0 2px 18px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1120px, calc(100% - 44px));
  margin: 0 auto;
  padding: 22px 0 34px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    padding: 13px 18px;
  }

  nav {
    gap: 12px;
  }

  .home,
  .article-page,
  .site-footer {
    width: min(100% - 32px, 1120px);
  }

  .intro {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 24px;
    padding-top: 12px;
  }

  .intro h1 {
    font-size: 34px;
  }

  .lead {
    font-size: 16px;
  }

  .article-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 20px 0;
  }

  .article-title h1 {
    font-size: 31px;
  }

  .site-footer {
    flex-direction: column;
  }
}
