:root {
  --bg: #f7f8f4;
  --surface: #ffffff;
  --surface-soft: #eef2ec;
  --ink: #17202a;
  --muted: #647074;
  --line: #d8ded6;
  --blue: #275f9f;
  --green: #1d6f5f;
  --amber: #d88922;
  --coral: #c94d4d;
  --shadow: none;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
  font-size: 16px;
}

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 2px solid var(--ink);
  background: rgba(247, 248, 244, 0.96);
  padding: 14px max(28px, calc((100vw - 1180px) / 2));
  backdrop-filter: blur(8px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
  line-height: 1.1;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-family: "Microsoft YaHei", "Noto Sans", sans-serif;
  font-size: 14px;
  font-weight: 800;
}

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

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 70px;
}

main,
.hero,
.hero > *,
.section-block,
.tool-card,
.application-panel > *,
.page-layout > * {
  min-width: 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: stretch;
  min-height: 0;
}

.hero-copy,
.editor-note,
.trust-strip,
.section-block,
.application-panel,
.site-footer {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 360px;
  padding: 40px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-family: "Microsoft YaHei", "Noto Sans", sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 680px;
  margin-bottom: 18px;
  font-size: clamp(38px, 5vw, 58px);
  letter-spacing: 0;
  line-height: 1.02;
}

.hero-copy p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.primary-action,
.secondary-action,
.tool-card a,
.site-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-family: "Microsoft YaHei", "Noto Sans", sans-serif;
  font-weight: 900;
}

.primary-action {
  background: var(--blue);
  color: #fff;
  padding: 13px 18px;
}

.secondary-action {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 12px 17px;
}

.editor-note {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-color: var(--ink);
  background: #fbfcf8;
  padding: 26px;
}

.editor-note h2 {
  margin: 0 0 18px;
  font-size: 28px;
  line-height: 1.08;
}

.editor-note ol {
  display: grid;
  gap: 13px;
  margin: 0;
  padding-left: 22px;
}

.editor-note li {
  color: #334047;
  line-height: 1.55;
}

.note-date,
.note-footer {
  color: var(--muted);
  font-family: "Microsoft YaHei", "Noto Sans", sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.note-footer {
  margin: 22px 0 0;
}

.tool-card img {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 6px;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 18px 0;
  overflow: hidden;
  background: var(--surface);
}

.trust-strip div {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 18px;
}

.trust-strip div:last-child {
  border-right: 0;
}

.trust-strip strong,
.trust-strip span {
  display: block;
}

.trust-strip strong {
  font-size: 20px;
}

.trust-strip span {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.5;
}

.section-block {
  margin-top: 18px;
  padding: 24px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.05;
}

.search-box {
  display: grid;
  gap: 7px;
  min-width: min(360px, 100%);
  color: var(--muted);
  font-family: "Microsoft YaHei", "Noto Sans", sans-serif;
  font-size: 12px;
  font-weight: 900;
}

.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--ink);
  outline: none;
  padding: 13px 14px;
}

.search-box input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(45, 108, 223, 0.12);
}

.tool-grid,
.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tool-card,
.guide-grid a {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 18px;
}

.tool-card[hidden] {
  display: none;
}

.tool-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.tool-card h3 {
  margin: 0;
  font-size: 23px;
  line-height: 1.1;
}

.tool-card-head span,
.guide-grid span {
  display: block;
  margin-top: 4px;
  color: var(--green);
  font-family: "Microsoft YaHei", "Noto Sans", sans-serif;
  font-size: 12px;
  font-weight: 900;
}

.tool-card p {
  min-height: 0;
  color: var(--muted);
  line-height: 1.6;
}

.tool-card dl {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-top: 14px;
}

.tool-card dl > div {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid #edf0eb;
  padding: 10px 0;
}

.tool-card dl > div:last-child {
  border-bottom: 0;
}

.tool-card dt {
  color: var(--ink);
  font-family: "Microsoft YaHei", "Noto Sans", sans-serif;
  font-size: 12px;
  font-weight: 900;
}

.tool-card dd {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.tool-card a {
  margin-top: 18px;
  border: 1px solid var(--line);
  padding: 9px 12px;
  width: max-content;
}

.tool-card a:hover,
.guide-grid a:hover,
.secondary-action:hover {
  border-color: rgba(39, 95, 159, 0.48);
  box-shadow: none;
}

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

.category-tab {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 12px;
  text-align: left;
}

.category-tab strong,
.category-tab span {
  display: block;
}

.category-tab strong {
  font-family: "Microsoft YaHei", "Noto Sans", sans-serif;
  font-size: 13px;
}

.category-tab span {
  display: none;
}

.category-tab.active {
  border-color: rgba(45, 108, 223, 0.72);
  background: #edf4ff;
}

.guide-grid a {
  min-height: 190px;
}

.guide-grid strong {
  display: block;
  margin-top: 18px;
  font-size: 24px;
  line-height: 1.14;
}

.guide-grid p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.application-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  margin-top: 24px;
  padding: 30px;
}

.application-panel p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.application-panel ul {
  margin: 0;
  border-left: 4px solid var(--green);
  padding-left: 24px;
  color: var(--ink);
  line-height: 1.9;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 32px;
  padding: 24px;
}

.site-footer p {
  margin: 6px 0 0;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.site-footer a {
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 8px 10px;
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.back-top.show {
  display: block;
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  padding: 24px;
  text-align: center;
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) 300px;
  gap: 28px;
  align-items: start;
}

.article,
.side-note {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.article {
  padding: 42px;
}

.article h1 {
  font-size: clamp(40px, 5vw, 62px);
}

.article h2 {
  margin-top: 34px;
  font-size: 30px;
  line-height: 1.1;
}

.article p,
.article li {
  color: var(--muted);
  line-height: 1.75;
}

.article a {
  color: var(--blue);
  font-weight: 800;
}

.article-list {
  display: grid;
  gap: 14px;
  margin: 22px 0;
}

.article-list li {
  border-left: 3px solid var(--green);
  background: var(--surface-soft);
  padding: 12px 14px;
}

.side-note {
  position: sticky;
  top: 92px;
  padding: 22px;
}

.side-note h2 {
  font-size: 24px;
}

.side-note nav {
  display: grid;
  gap: 10px;
}

.side-note a {
  color: var(--muted);
  font-weight: 800;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 18px;
}

@media (max-width: 980px) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    padding: 14px 18px;
  }

  .brand {
    min-width: 0;
  }

  .brand strong,
  .brand small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-nav {
    display: flex;
    grid-column: 1 / -1;
    flex-wrap: wrap;
    gap: 12px 18px;
  }

  .menu-button {
    display: none;
  }

  .hero,
  .application-panel,
  .page-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 34px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .tool-grid,
  .guide-grid,
  .trust-strip,
  .category-tabs {
    grid-template-columns: 1fr 1fr;
  }

  .side-note {
    position: static;
  }
}

@media (max-width: 620px) {
  main {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    overflow: hidden;
  }

  h1 {
    font-size: 38px;
    line-height: 1.05;
    max-width: 10ch;
    overflow-wrap: normal;
  }

  .hero-copy,
  .section-block,
  .application-panel,
  .article {
    width: 100%;
    max-width: 100%;
    padding: 24px;
  }

  .editor-note,
  .trust-strip {
    width: 100%;
    max-width: 100%;
  }

  .hero-copy p:not(.eyebrow) {
    font-size: 16px;
    max-width: 31ch;
  }

  .editor-note {
    padding: 18px;
  }

  .editor-note h2 {
    max-width: 12ch;
    font-size: 24px;
  }

  .tool-grid,
  .guide-grid,
  .trust-strip,
  .category-tabs,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    width: min(100% - 24px, 1180px);
  }

  .site-footer nav {
    justify-content: flex-start;
  }
}
