:root {
  --ink: #151d22;
  --muted: #586673;
  --line: #d8e0e5;
  --teal: #16786e;
  --orange: #d6632d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f4f6f7;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.72;
}

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

.article-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1120px;
  min-height: 64px;
  margin: 0 auto;
  padding: 0 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #132724;
  font-weight: 900;
}

.brand img {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
  background: white;
}

.top-actions,
.article-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.top-actions {
  justify-content: flex-end;
}

.top-actions a,
.article-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(22, 120, 110, 0.25);
  border-radius: 6px;
  color: var(--teal);
  background: white;
  font-size: 13px;
  font-weight: 900;
}

.top-actions a.primary,
.article-cta a.primary {
  color: white;
  background: var(--teal);
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 18px 42px;
}

article {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  box-shadow: 0 16px 42px rgba(22, 29, 35, 0.08);
  overflow: hidden;
}

.article-hero {
  padding: clamp(22px, 4vw, 42px);
  border-bottom: 1px solid #e5ecef;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 900;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.18;
  letter-spacing: 0;
}

.lead {
  max-width: 860px;
  margin: 18px 0 0;
  color: #40505a;
  font-size: 18px;
  line-height: 1.8;
}

.meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.meta-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--teal);
  background: #eef8f6;
  font-size: 13px;
  font-weight: 900;
}

.article-body {
  padding: clamp(22px, 4vw, 42px);
}

.article-body p,
.article-body li {
  color: #33444e;
  font-size: 16px;
}

.article-body p {
  margin: 12px 0;
}

h2 {
  margin: 30px 0 10px;
  color: #14201f;
  font-size: 24px;
  line-height: 1.35;
}

h3 {
  margin: 20px 0 8px;
  color: #1a2928;
  font-size: 18px;
}

ul,
ol {
  margin: 12px 0 0;
  padding-left: 22px;
}

li + li {
  margin-top: 6px;
}

.summary-box,
.note {
  border-radius: 8px;
  background: #f2f8f7;
}

.summary-box {
  margin: 0 0 22px;
  padding: 16px 18px;
  border: 1px solid #d6e8e4;
}

.summary-box strong {
  color: #0e5e56;
}

.note {
  margin: 18px 0;
  padding: 14px 16px;
  border-left: 4px solid var(--teal);
}

.warning {
  margin: 18px 0;
  padding: 14px 16px;
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  background: #fff7f1;
}

.formula {
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid #dce7e5;
  border-radius: 8px;
  background: #fbfdfc;
  color: #1d312f;
  font-size: 16px;
  font-weight: 900;
}

.table-wrap {
  margin: 18px 0 24px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: white;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid #e5ecef;
  text-align: left;
  vertical-align: top;
}

th {
  color: #243836;
  background: #f2f7f6;
  font-size: 14px;
  font-weight: 900;
}

td {
  color: #33444e;
  font-size: 15px;
}

tr:last-child td {
  border-bottom: 0;
}

code {
  border-radius: 4px;
  padding: 1px 5px;
  background: #edf4f3;
  color: #0f5f57;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

pre {
  margin: 16px 0 22px;
  overflow-x: auto;
  border: 1px solid #d7e2e0;
  border-radius: 8px;
  background: #f8fbfa;
  box-shadow: none;
}

pre code {
  display: block;
  min-width: max-content;
  padding: 16px 18px;
  background: transparent;
  color: #22333b;
  font-size: 14px;
  line-height: 1.62;
  white-space: pre;
}

.article-figure {
  margin: 22px 0 28px;
}

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #d8e0e5;
  border-radius: 8px;
  background: #f7faf9;
}

.article-figure figcaption {
  margin-top: 8px;
  color: #586673;
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
}

.step-list {
  counter-reset: step;
  display: grid;
  gap: 12px;
  margin: 18px 0 24px;
  padding: 0;
  list-style: none;
}

.step-list li {
  counter-increment: step;
  position: relative;
  margin: 0;
  padding: 14px 16px 14px 54px;
  border: 1px solid #dce7e5;
  border-radius: 8px;
  background: #fbfdfc;
}

.step-list li::before {
  content: counter(step);
  position: absolute;
  top: 14px;
  left: 16px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: white;
  background: var(--teal);
  font-size: 13px;
  font-weight: 900;
}

.article-footer {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid #e5ecef;
}

@media (max-width: 720px) {
  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 16px;
  }

  .top-actions {
    justify-content: flex-start;
  }

  main {
    padding: 16px 12px 32px;
  }

  h1 {
    font-size: 28px;
  }

  .lead {
    font-size: 16px;
  }

  h2 {
    font-size: 21px;
  }

  .article-body p,
  .article-body li {
    font-size: 15px;
  }
}
