:root {
  color-scheme: light;
  --ink: #142732;
  --muted: #52636d;
  --line: #d9e4e6;
  --surface: #ffffff;
  --wash: #f4f8f8;
  --teal: #0c6d70;
  --teal-dark: #084f53;
  --warm: #e7a971;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  line-height: 1.7;
}

a { color: var(--teal-dark); text-underline-offset: 0.18em; }
a:hover { color: #063b3e; }
a:focus-visible { outline: 3px solid var(--warm); outline-offset: 4px; border-radius: 2px; }

.skip-link {
  position: absolute;
  z-index: 10;
  top: -5rem;
  left: 1rem;
  padding: 0.5rem 0.9rem;
  background: var(--ink);
  color: white;
}
.skip-link:focus { top: 1rem; }

.shell { width: min(100% - 2rem, 1120px); margin-inline: auto; }

.site-header {
  background: rgba(255,255,255,0.95);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  width: 33px;
  height: 33px;
  border-radius: 10px;
  background: var(--teal);
  display: inline-grid;
  place-items: center;
  color: #fff;
  font: 700 1.1rem/1 ui-monospace, monospace;
}

.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.site-nav a {
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 650;
  text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { background: #e7f1f1; color: var(--teal-dark); }

.hero {
  position: relative;
  overflow: hidden;
  margin-block: 2.1rem 2.5rem;
  padding: clamp(2rem, 5vw, 4.5rem);
  border-radius: 22px;
  background: linear-gradient(125deg, #12353e 0%, #0c595c 72%, #177174 100%);
  color: #fff;
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 50%;
}
.hero::before { width: 330px; height: 330px; right: -95px; top: -165px; }
.hero::after { width: 480px; height: 480px; right: -130px; top: -210px; }
.eyebrow {
  margin: 0 0 0.85rem;
  color: #acd9d5;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hero h1 {
  position: relative;
  max-width: 750px;
  margin: 0;
  font-size: clamp(2rem, 4.3vw, 3.75rem);
  line-height: 1.2;
  letter-spacing: -0.035em;
}
.hero p:not(.eyebrow) {
  position: relative;
  max-width: 625px;
  margin: 1.2rem 0 0;
  color: #d7eeee;
  font-size: clamp(1rem, 1.6vw, 1.13rem);
}
.topic-list {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 2rem;
}
.topic-list span {
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 100px;
  padding: 0.3rem 0.8rem;
  color: #edf8f7;
  font-size: 0.86rem;
}

.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.1rem; }
.section-heading h2 { margin: 0; font-size: clamp(1.45rem, 2.6vw, 2rem); line-height: 1.25; }
.section-heading p { margin: 0; color: var(--muted); font-size: 0.94rem; }

.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.card {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  padding: clamp(1.35rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 8px 30px rgba(14,49,57,0.035);
}
.card .label { margin: 0; color: var(--teal); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; }
.card h3 { margin: 0.75rem 0 0.65rem; font-size: clamp(1.25rem, 2.4vw, 1.65rem); line-height: 1.35; }
.card p:not(.label) { margin: 0; color: var(--muted); }
.card a { align-self: flex-start; margin-top: auto; padding-top: 1.5rem; font-weight: 750; text-decoration: none; }
.card a::after { content: " →"; }
.card a:hover { text-decoration: underline; }

.method {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  margin-block: 2rem 4rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #eaf3f2;
}
.method h2 { margin: 0; font-size: 1.35rem; line-height: 1.35; }
.method p { margin: 0; color: #38545b; }

.article-wrap { max-width: 800px; margin-block: 2.5rem 4.5rem; }
.breadcrumbs { margin-bottom: 1.3rem; color: var(--muted); font-size: 0.88rem; }
.breadcrumbs a { color: var(--muted); }
.article-header { padding-bottom: 1.6rem; border-bottom: 1px solid var(--line); }
.article-header .eyebrow { color: var(--teal); }
.article-header h1 { margin: 0; font-size: clamp(2rem, 4.5vw, 3.1rem); line-height: 1.23; letter-spacing: -0.025em; }
.article-header .intro { max-width: 700px; margin: 1rem 0 0; color: var(--muted); font-size: 1.08rem; }
.article-meta { margin: 1.15rem 0 0; color: var(--muted); font-size: 0.86rem; }
.article-body { padding-top: 0.6rem; font-size: 1.04rem; }
.article-body h2 { margin: 2.1rem 0 0.65rem; font-size: 1.55rem; line-height: 1.3; }
.article-body h3 { margin: 1.6rem 0 0.5rem; font-size: 1.19rem; }
.article-body p { margin: 0.7rem 0 1rem; }
.article-body li { margin-block: 0.4rem; }
.article-body ul, .article-body ol { padding-left: 1.45rem; }
.article-body code {
  padding: 0.1em 0.35em;
  border-radius: 5px;
  background: #e5edee;
  color: #123d45;
  font: 0.9em ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
}
.article-body .note {
  margin-top: 1.6rem;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--teal);
  border-radius: 0 10px 10px 0;
  background: #eaf3f2;
}
.article-body .note p { margin: 0; }
.article-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 2.6rem; padding-top: 1.3rem; border-top: 1px solid var(--line); font-weight: 650; }

.site-footer { border-top: 1px solid var(--line); background: #fff; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.8rem; padding-block: 1.5rem; color: var(--muted); font-size: 0.86rem; }
.footer-inner p { margin: 0; }
.footer-inner a { color: var(--muted); }

@media (max-width: 700px) {
  .header-inner { align-items: flex-start; flex-direction: column; gap: 0.45rem; padding-block: 0.8rem; }
  .site-nav { margin-left: -0.8rem; }
  .hero { margin-top: 1rem; padding: 2rem 1.4rem; }
  .hero::before { right: -230px; }
  .hero::after { right: -300px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 0.35rem; }
  .card-grid, .method { grid-template-columns: 1fr; }
  .card { min-height: 235px; }
  .method { gap: 0.7rem; }
  .article-wrap { margin-top: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
