/* Editorial article system for ShuiYiYuan Resources. */

.cost-article-page {
  color: #293f50;
  background: #fff;
}

.cost-article-page .article-language-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  color: #154f83;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  background: #edf5fb;
  border: 1px solid #cbddea;
  border-radius: 5px;
}

.cost-hero {
  background:
    linear-gradient(rgba(26, 91, 139, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 91, 139, .055) 1px, transparent 1px),
    linear-gradient(135deg, #edf6fc 0%, #f8fbfd 64%, #fff 100%);
  background-size: 28px 28px, 28px 28px, auto;
  border-bottom: 1px solid #d5e3ed;
}

.cost-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 76px;
  align-items: end;
  width: min(calc(100% - 96px), 1280px);
  margin: 0 auto;
  padding: 74px 0 68px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  color: #6c8192;
  font-size: 13px;
  font-weight: 700;
}

.breadcrumb a { color: #46657c; text-decoration: none; }

.article-kicker {
  margin: 0 0 18px;
  color: #166ca5;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.cost-hero h1 {
  max-width: 860px;
  margin: 0;
  color: #0c2f4d;
  font-size: clamp(43px, 3vw, 57px);
  font-weight: 850;
  line-height: 1.14;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.article-deck {
  max-width: 810px;
  margin: 26px 0 0;
  color: #405d72;
  font-size: 20px;
  line-height: 1.72;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 28px;
  color: #718495;
  font-size: 14px;
}

.article-meta > * + *::before { content: "·"; margin-right: 22px; color: #9babb7; }

.hero-decision {
  padding: 28px;
  background: rgba(255,255,255,.86);
  border-top: 4px solid #1d78b5;
  box-shadow: 0 14px 34px rgba(13,55,88,.08);
}

.hero-decision span {
  display: block;
  margin-bottom: 13px;
  color: #1d78b5;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero-decision strong { display: block; color: #102f49; font-size: 25px; line-height: 1.35; }
.hero-decision p { margin: 15px 0 0; color: #506a7e; font-size: 16px; line-height: 1.7; }

.article-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 900px);
  gap: 0 76px;
  justify-content: center;
  width: min(calc(100% - 96px), 1280px);
  margin: 0 auto;
  padding: 78px 0 96px;
}

.article-toc {
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: calc(100vh - 118px);
  padding: 20px 0;
  overflow-y: auto;
  border-top: 2px solid #164f79;
  border-bottom: 1px solid #d7e3eb;
  scrollbar-width: thin;
}

.article-toc > span { display: block; margin-bottom: 15px; color: #123b5d; font-size: 13px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.article-toc nav { display: grid; gap: 3px; }
.article-toc a { padding: 7px 0; color: #5a7183; font-size: 14px; font-weight: 650; line-height: 1.45; text-decoration: none; }
.article-toc a:hover { color: #126da8; }

.cost-prose.markdown-body {
  min-width: 0;
  max-width: 900px;
  padding: 0;
  color: #334b5e;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.82;
  background: transparent;
}

.cost-prose.markdown-body > section + section,
.cost-prose.markdown-body > figure + section { margin-top: 68px; padding-top: 62px; border-top: 1px solid #dbe5ec; }
.cost-prose.markdown-body > section + figure,
.cost-prose.markdown-body > figure + figure { margin-top: 54px; }

.cost-prose.markdown-body h2 { margin: 0 0 26px; padding: 0; color: #102f49; font-size: 31px; font-weight: 800; line-height: 1.34; letter-spacing: -.02em; border: 0; }
.cost-prose.markdown-body h3 { margin: 0 0 12px; color: #163d5c; font-size: 21px; line-height: 1.45; }
.cost-prose.markdown-body section > h3:not(:first-child) { margin-top: 42px; }
.cost-prose.markdown-body p { margin-top: 0; margin-bottom: 1.25em; }
.cost-prose.markdown-body .lead { color: #243f53; font-size: 21px; line-height: 1.8; }
.cost-prose.markdown-body blockquote { margin: 34px 0 0; padding: 23px 26px; color: #143d5e; font-size: 20px; font-weight: 750; line-height: 1.7; background: #edf5fb; border-left: 4px solid #1d78b5; }

.cost-prose.markdown-body ul { margin-bottom: 1.4em; padding-left: 1.35em; }
.cost-prose.markdown-body li { margin: .55em 0; }

.article-figure { margin: 52px 0 0; }
.article-figure img { display: block; width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; background: #edf3f7; border: 1px solid #d1dee7; border-radius: 4px; }
.article-figure figcaption { margin-top: 14px; padding: 0 2px; color: #6a7d8c; font-size: 14px; line-height: 1.65; }
.article-figure figcaption strong { color: #3a5569; }

.cost-layers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 34px 0;
  border-top: 1px solid #b9ccda;
  border-bottom: 1px solid #b9ccda;
}

.cost-layers article { padding: 30px; }
.cost-layers article + article { border-left: 1px solid #b9ccda; }
.cost-layers article:first-child { padding-left: 0; }
.cost-layers article:last-child { padding-right: 0; }
.cost-layers span { display: block; margin-bottom: 16px; color: #1d78b5; font-size: 13px; font-weight: 900; letter-spacing: .12em; }
.cost-layers p { margin-bottom: 0 !important; color: #4a6477; font-size: 16px; line-height: 1.78; }

.engineering-note,
.scope-note {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  margin-top: 28px;
  padding: 22px 24px;
  background: #f1f6fa;
  border-left: 3px solid #1d78b5;
}

.engineering-note strong,
.scope-note strong { color: #154f83; font-size: 14px; letter-spacing: .04em; }
.engineering-note p,
.scope-note p { margin: 0 !important; color: #486175; font-size: 16px; line-height: 1.72; }

.table-scroll { width: 100%; margin-top: 28px; overflow-x: auto; border: 1px solid #c9d8e3; border-radius: 4px; }
.table-scroll:focus-visible { outline: 3px solid rgba(29,120,181,.25); outline-offset: 3px; }
.cost-prose.markdown-body table { width: 100%; min-width: 920px; margin: 0; table-layout: fixed; }
.cost-prose.markdown-body th,
.cost-prose.markdown-body td { padding: 17px 18px; vertical-align: top; border-color: #d6e2ea; }
.cost-prose.markdown-body th { color: #fff; font-size: 14px; font-weight: 800; background: #123f68; }
.cost-prose.markdown-body td { color: #40596d; font-size: 15px; line-height: 1.65; }
.cost-prose.markdown-body tbody tr:nth-child(even) td { background: #f5f9fc; }

.reference-list { margin: 25px 0 0 !important; padding: 0 !important; list-style: none; border-top: 1px solid #d7e3eb; }
.reference-list li { margin: 0 !important; padding: 14px 0; border-bottom: 1px solid #d7e3eb; }
.reference-list a { color: #126da8; font-weight: 700; text-underline-offset: 3px; }
.reference-boundary { margin-top: 20px; color: #6b7d8a; font-size: 14px; }

.article-rfq {
  grid-column: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 345px;
  gap: 52px;
  align-items: start;
  margin-top: 78px;
  padding: 42px 46px;
  color: #fff;
  background: linear-gradient(120deg, #092f50, #165f93);
  border-radius: 5px;
}

.article-rfq > div > span,
.rfq-package > strong { color: #bcdcf1; font-size: 13px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.article-rfq h2 { margin: 12px 0 16px; color: #fff; font-size: 30px; line-height: 1.3; }
.article-rfq p { margin: 0; color: #dcecf6; font-size: 17px; line-height: 1.75; }
.rfq-package ul { margin: 16px 0 22px; padding-left: 20px; color: #e7f2f9; font-size: 15px; line-height: 1.75; }
.article-rfq .button.primary {
  color: #154f83;
  background: #fff;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.article-rfq .button.primary:hover,
.article-rfq .button.primary:focus-visible {
  color: #fff;
  background: #0f5f99;
  border-color: rgba(255, 255, 255, .72);
  box-shadow: 0 12px 26px rgba(5, 28, 48, .26);
  transform: translateY(-2px);
}

@media (max-width: 767px) {
  .cost-article-page .article-language-badge { display: none; }
  .cost-hero__inner { grid-template-columns: minmax(0, 1fr); gap: 28px; width: calc(100% - 36px); padding: 42px 0 40px; }
  .breadcrumb { margin-bottom: 24px; }
  .cost-hero h1 { font-size: 35px; line-height: 1.19; }
  .article-deck { margin-top: 20px; font-size: 17px; line-height: 1.72; }
  .article-meta { gap: 8px 14px; margin-top: 22px; }
  .article-meta > * + *::before { margin-right: 14px; }
  .hero-decision { padding: 22px; }
  .hero-decision strong { font-size: 23px; }
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; width: calc(100% - 36px); padding: 38px 0 62px; }
  .article-toc { position: static; max-height: none; width: 100%; overflow: hidden; }
  .article-toc nav { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
  .article-toc a { flex: 0 0 auto; padding: 8px 12px; white-space: nowrap; background: #f0f5f8; border-radius: 4px; }
  .cost-prose.markdown-body { font-size: 17px; line-height: 1.8; }
  .cost-prose.markdown-body h2 { font-size: 27px; line-height: 1.38; }
  .cost-prose.markdown-body .lead { font-size: 19px; }
  .cost-prose.markdown-body blockquote { padding: 20px; font-size: 18px; }
  .cost-prose.markdown-body > section + section,
  .cost-prose.markdown-body > figure + section { margin-top: 48px; padding-top: 44px; }
  .cost-prose.markdown-body > section + figure,
  .cost-prose.markdown-body > figure + figure { margin-top: 42px; }
  .cost-layers { grid-template-columns: minmax(0, 1fr); }
  .cost-layers article,
  .cost-layers article + article { padding: 24px 0; border-left: 0; }
  .cost-layers article + article { border-top: 1px solid #b9ccda; }
  .engineering-note,
  .scope-note { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 20px; }
  .article-rfq { grid-column: 1; grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 20px; padding: 28px 24px; }
  .article-rfq h2 { font-size: 27px; }
}
