:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #101828;
  --muted: #667085;
  --line: #d9e2ec;
  --line-strong: #c5d0dc;
  --accent: #1769aa;
  --accent-dark: #0f4f82;
  --green: #3d8269;
  --gold: #a66e18;
  --shadow: 0 18px 48px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(16, 24, 40, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, rgba(16, 24, 40, 0.03) 1px, transparent 1px),
    var(--bg);
  background-size: 32px 32px;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

.site-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  min-width: 0;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  border-bottom: 1px solid rgba(197, 208, 220, 0.8);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--accent);
}

.brand-mark span {
  width: 3px;
  border-radius: 3px;
  background: #fff;
}

.brand-mark span:nth-child(1) {
  height: 12px;
}

.brand-mark span:nth-child(2) {
  height: 24px;
  background: #b9e2d3;
}

.brand-mark span:nth-child(3) {
  height: 30px;
}

.brand-mark span:nth-child(4) {
  height: 18px;
  background: #f1c76d;
}

.brand-mark span:nth-child(5) {
  height: 25px;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
}

.site-nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

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

.tool-link {
  padding: 9px 13px;
  border: 1px solid rgba(23, 105, 170, 0.28);
  border-radius: 7px;
  background: #fff;
  color: var(--accent-dark) !important;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.article {
  width: min(860px, 100%);
  margin: 0 auto;
  padding: 42px 0 70px;
}

.article-header {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 900;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  max-width: 800px;
  margin: 0;
  font-size: 42px;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.lead {
  max-width: 780px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

.article-section {
  padding: 32px 0;
  border-bottom: 1px solid rgba(217, 226, 236, 0.9);
}

.article-section h2 {
  margin: 0 0 14px;
  font-size: 27px;
  line-height: 1.3;
}

.article-section h3 {
  margin: 24px 0 10px;
  font-size: 19px;
  line-height: 1.4;
}

.article-section p,
.article-section li {
  color: #344054;
  font-size: 16px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

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

.article-section ul,
.article-section ol {
  margin: 12px 0 0;
  padding-left: 24px;
}

.answer {
  margin-top: 18px;
  padding: 18px 20px;
  border-left: 4px solid var(--accent);
  background: #eef6fc;
  color: #1d3448;
  font-size: 16px;
  line-height: 1.8;
}

.note {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: var(--surface-soft);
  color: #475467;
  font-size: 14px;
  line-height: 1.75;
}

.formula {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(61, 130, 105, 0.28);
  border-radius: 8px;
  background: #f1f8f5;
  color: #245b48;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 17px;
  font-weight: 800;
  text-align: center;
}

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

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  color: #344054;
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
}

th {
  background: var(--surface-soft);
  color: #475467;
  font-weight: 900;
}

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

.tool-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  margin-top: 34px;
  padding: 24px;
  border: 1px solid rgba(23, 105, 170, 0.28);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tool-cta h2 {
  margin: 0;
  font-size: 22px;
}

.tool-cta p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.related {
  margin-top: 34px;
}

.related h2 {
  margin: 0 0 14px;
  font-size: 21px;
}

.related-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.related-links a {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
  text-decoration: none;
}

.related-links a:hover {
  border-color: rgba(23, 105, 170, 0.42);
  color: var(--accent);
}

.site-footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 82px;
  color: var(--muted);
  font-size: 13px;
}

.footer-inner div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-inner a {
  color: var(--muted);
  text-decoration: none;
}

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

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

  .site-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .site-nav a {
    min-width: 0;
    padding: 8px 4px;
    border: 1px solid rgba(217, 226, 236, 0.9);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .tool-link {
    padding: 8px 4px;
  }

  .article {
    padding-top: 30px;
  }

  h1 {
    font-size: 32px;
  }

  .lead {
    font-size: 17px;
  }

  .tool-cta {
    grid-template-columns: 1fr;
  }

  .primary-button {
    width: 100%;
  }

  .related-links {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 20px 0;
  }
}
