:root {
  --ink: #122033;
  --muted: #667085;
  --paper: #f4f7f8;
  --panel: #ffffff;
  --line: #d6e0eb;
  --blue: #1d5d9b;
  --navy: #102a48;
  --teal: #167e7a;
  --gold: #9a6700;
  --red: #b42318;
  --shadow: 0 18px 44px rgba(23, 50, 77, .11);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  background: var(--paper);
  color: var(--ink);
}
a { color: inherit; }
.hero {
  min-height: 92vh;
  display: grid;
  grid-template-columns: minmax(320px, .76fr) minmax(540px, 1.24fr);
  gap: 30px;
  align-items: center;
  padding: 46px min(5vw, 76px) 30px;
  background: #0f2742;
  color: #fff;
}
.hero h1 {
  font-size: clamp(40px, 6vw, 82px);
  line-height: 1.03;
  margin: 0 0 20px;
  letter-spacing: 0;
}
.hero p { color: #dbe8f4; font-size: 20px; line-height: 1.55; max-width: 720px; }
.hero-marks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; }
.mark { border: 1px solid rgba(255,255,255,.24); padding: 16px; min-height: 112px; background: rgba(255,255,255,.06); border-radius: 8px; }
.mark strong { display: block; font-size: 32px; color: #9be1dc; }
.mark span { color: #cfe0ee; font-size: 14px; line-height: 1.45; }
.hero-graphic {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.16);
  padding: 14px;
  box-shadow: 0 24px 70px rgba(0,0,0,.24);
  border-radius: 8px;
}
.hero-graphic img, .visual img { display: block; width: 100%; height: auto; }
.topnav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 8px;
  padding: 10px min(5vw, 76px);
  background: rgba(244,247,248,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.topnav a {
  text-decoration: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  padding: 8px 12px;
  white-space: nowrap;
  font-size: 14px;
}
main { padding: 30px min(5vw, 76px) 70px; }
.section-head { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin: 42px 0 16px; }
.section-head h2 { margin: 0; font-size: clamp(28px, 3vw, 42px); color: var(--navy); }
.section-head p { margin: 0; color: var(--muted); max-width: 560px; line-height: 1.55; }
.visual-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.visual {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 10px;
  border-radius: 8px;
}
.visual.wide { grid-column: 1 / -1; }
.mini-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.mini {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 18px;
  min-height: 140px;
  border-radius: 8px;
}
.mini b { color: var(--blue); font-size: 22px; display: block; margin-bottom: 8px; }
.mini span { color: var(--muted); line-height: 1.5; }
.tax-section {
  scroll-margin-top: 74px;
}
.tax-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.tax-kpi {
  min-height: 128px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  border-radius: 8px;
}
.tax-kpi span,
.tax-kpi small {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}
.tax-kpi strong {
  display: block;
  margin: 8px 0 4px;
  color: var(--navy);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
}
.tax-kpi.highlight {
  border-color: #f0b8b2;
  background: #fff4f2;
}
.tax-kpi.highlight strong {
  color: var(--red);
}
.tax-visuals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.tax-figure {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 10px;
  border-radius: 8px;
}
.tax-figure.primary {
  grid-column: span 1;
}
.tax-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.tax-figure figcaption {
  padding: 12px 4px 2px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}
.contract-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.contract-card {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 12px;
  min-height: 154px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 16px;
  text-decoration: none;
  transition: transform .16s ease, border-color .16s ease;
  border-radius: 8px;
}
.contract-card:hover { transform: translateY(-3px); border-color: #79b8d8; }
.contract-card .num { display: grid; place-items: center; width: 42px; height: 42px; background: #e8f4ff; color: var(--blue); font-weight: 800; border-radius: 8px; }
.contract-card h3 { margin: 0 0 8px; font-size: 18px; color: var(--navy); line-height: 1.35; }
.contract-card p { grid-column: 2; margin: 0; color: var(--muted); line-height: 1.45; font-size: 14px; }
.contract-card .open { grid-column: 2; color: var(--teal); font-weight: 700; margin-top: 12px; }
.downloads-strip {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid #efc36d;
  background: #fff8e6;
  color: #5f4100;
  border-radius: 8px;
}
.downloads-strip a { font-weight: 700; color: #7a4b00; }
.contract-body { background: #eef3f6; }
.contract-top {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 28px min(5vw, 72px);
  background: #102a48;
  color: #fff;
}
.contract-top h1 { margin: 6px 0; font-size: clamp(28px, 4vw, 48px); line-height: 1.15; }
.contract-top p { margin: 0; color: #cfe0ee; line-height: 1.5; }
.eyebrow { color: #9be1dc; font-weight: 800; }
.back, .download-actions a {
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.24);
  padding: 9px 12px;
  border-radius: 7px;
  background: rgba(255,255,255,.08);
}
.download-actions { display: flex; gap: 9px; }
.contract-main {
  display: grid;
  grid-template-columns: 250px minmax(0, 920px);
  gap: 24px;
  align-items: start;
}
.contract-side {
  position: sticky;
  top: 24px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 18px;
  box-shadow: var(--shadow);
  border-radius: 8px;
}
.contract-side strong { display: block; margin-bottom: 8px; color: var(--navy); }
.contract-side span { color: var(--muted); line-height: 1.55; }
.contract-doc {
  background: #fff;
  border: 1px solid var(--line);
  padding: 42px 52px;
  box-shadow: var(--shadow);
  line-height: 1.78;
  border-radius: 8px;
}
.contract-doc h1 { margin-top: 0; color: var(--navy); font-size: 34px; line-height: 1.25; }
.contract-doc h2 { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--navy); line-height: 1.35; }
.contract-doc h3 { color: #1f4d78; }
.contract-doc li { margin: 7px 0; }
.contract-table { width: 100%; border-collapse: collapse; margin: 18px 0; table-layout: fixed; }
.contract-table td { border: 1px solid var(--line); padding: 10px; vertical-align: top; word-break: break-word; }
.blank { color: #9a6700; font-weight: 700; }
footer { padding: 28px min(5vw, 76px); color: var(--muted); border-top: 1px solid var(--line); background: #fff; line-height: 1.55; }
@media (max-width: 980px) {
  .hero { min-height: auto; grid-template-columns: 1fr; }
  .hero-marks, .mini-board, .contract-grid, .visual-grid, .tax-hero, .tax-visuals { grid-template-columns: 1fr; }
  .contract-top { grid-template-columns: 1fr; }
  .contract-main { grid-template-columns: 1fr; padding: 20px; }
  main { padding-left: 18px; padding-right: 18px; }
  .contract-doc { padding: 24px 20px; }
  .download-actions { flex-wrap: wrap; }
}

/* Formal contract preview */
.formal-contract-body {
  background: #dfe3e8;
  color: #111;
}
.contract-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px min(4vw, 44px);
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid #cfd6df;
  box-shadow: 0 8px 24px rgba(18, 32, 51, .08);
}
.toolbar-back,
.contract-toolbar .download-actions a,
.contract-toolbar .download-actions button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid #b7c2cf;
  border-radius: 6px;
  background: #fff;
  color: #122033;
  padding: 7px 12px;
  text-decoration: none;
  font: 700 14px "Microsoft YaHei", "PingFang SC", sans-serif;
  cursor: pointer;
}
.contract-toolbar .download-actions a:first-child {
  border-color: #102a48;
  background: #102a48;
  color: #fff;
}
.toolbar-title {
  min-width: 0;
}
.toolbar-title span,
.toolbar-title em {
  display: block;
  color: #667085;
  font-style: normal;
  font-size: 13px;
  line-height: 1.35;
}
.toolbar-title strong {
  display: block;
  color: #111;
  font-size: 18px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.contract-viewer {
  display: flex;
  justify-content: center;
  padding: 34px 18px 80px;
}
.contract-doc.formal-paper {
  width: 210mm;
  min-height: 297mm;
  max-width: 100%;
  padding: 24mm 24mm 26mm;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 18px 55px rgba(18, 32, 51, .22);
  color: #111;
  font-family: SimSun, "Songti SC", STSong, "Noto Serif CJK SC", serif;
  font-size: 16px;
  line-height: 2;
}
.formal-paper .formal-title {
  margin: 0 0 16px;
  text-align: center;
  color: #000;
  font-family: SimHei, "Microsoft YaHei", sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
}
.formal-paper .formal-meta {
  margin: 0 0 18px;
  text-align: center;
  text-indent: 0;
  color: #333;
  font-size: 14px;
}
.formal-paper .formal-note,
.formal-paper .formal-purpose {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #333;
  background: #fafafa;
  text-indent: 0;
  color: #111;
  font-size: 14px;
  line-height: 1.8;
}
.formal-paper .formal-purpose {
  border-style: dashed;
}
.formal-paper .formal-section-title {
  margin: 22px 0 10px;
  padding: 0;
  border: 0;
  text-align: left;
  color: #000;
  font-family: SimHei, "Microsoft YaHei", sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.7;
}
.formal-paper .formal-clause-title {
  margin: 18px 0 6px;
  padding: 0;
  border: 0;
  color: #000;
  font-family: SimHei, "Microsoft YaHei", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.7;
}
.formal-paper p {
  margin: 0 0 7px;
  text-align: justify;
  text-justify: inter-ideograph;
  text-indent: 2em;
  color: #111;
}
.formal-paper .formal-party-line {
  margin: 7px 0;
  text-indent: 0;
  line-height: 2.1;
}
.formal-paper .blank {
  display: inline-block;
  min-width: 5.5em;
  height: 1.2em;
  border-bottom: 1px solid #111;
  color: transparent;
  vertical-align: baseline;
  margin: 0 .12em;
}
.formal-paper .contract-table {
  width: 100%;
  margin: 18px 0 8px;
  border-collapse: collapse;
  table-layout: fixed;
  color: #111;
  font-size: 15px;
}
.formal-paper .contract-table td {
  border: 1px solid #111;
  padding: 10px 12px;
  vertical-align: top;
  word-break: break-word;
  line-height: 1.9;
}
.formal-paper .formal-signature-table td {
  height: 72px;
  vertical-align: top;
}
@media (max-width: 980px) {
  .contract-toolbar {
    position: static;
    grid-template-columns: 1fr;
  }
  .toolbar-title strong {
    white-space: normal;
  }
  .contract-viewer {
    padding: 18px 10px 48px;
  }
  .contract-doc.formal-paper {
    width: 100%;
    min-height: auto;
    padding: 22px 18px;
    font-size: 15px;
    line-height: 1.9;
  }
  .formal-paper .formal-title {
    font-size: 23px;
  }
}
@media print {
  @page {
    size: A4;
    margin: 0;
  }
  body.formal-contract-body {
    background: #fff;
  }
  .contract-toolbar {
    display: none;
  }
  .contract-viewer {
    display: block;
    padding: 0;
  }
  .contract-doc.formal-paper {
    width: auto;
    min-height: auto;
    padding: 24mm 24mm 26mm;
    box-shadow: none;
  }
}
