:root {
  --paper: #f4efe4;
  --paper-deep: #ebe2d2;
  --ink: #17212b;
  --soft-ink: #3d4954;
  --muted: #6e756f;
  --line: #d6cbbb;
  --line-strong: #b9aa96;
  --green: #245f50;
  --green-soft: #dce8df;
  --amber: #a9651a;
  --amber-soft: #f0dfc5;
  --red: #9b3e37;
  --red-soft: #f0d9d4;
  --surface: #fffaf0;
  --shadow: 0 18px 45px rgba(62, 45, 22, .12);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--paper);
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(23, 33, 43, .035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(23, 33, 43, .03) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  line-height: 1.76;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .32;
  background:
    repeating-linear-gradient(0deg, transparent 0 5px, rgba(82, 65, 42, .035) 5px 6px),
    linear-gradient(180deg, rgba(255,255,255,.55), rgba(244,239,228,.05));
}

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

img {
  max-width: 100%;
  display: block;
}

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

p {
  margin-bottom: 0;
  color: var(--soft-ink);
}

.appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 10px max(16px, env(safe-area-inset-left)) 10px max(16px, env(safe-area-inset-right));
  width: min(100%, 430px);
  margin: 0 auto;
  background: rgba(244, 239, 228, .9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  box-shadow: 0 5px 14px rgba(23, 33, 43, .14);
}

.ghost-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border: 1px solid var(--green);
  border-radius: 6px;
  color: var(--green);
  font-size: 14px;
  font-weight: 800;
  background: rgba(255, 250, 240, .46);
}

.ghost-link:focus-visible,
.quick-nav a:focus-visible,
.checklist label:focus-within {
  outline: 3px solid rgba(36, 95, 80, .28);
  outline-offset: 3px;
}

main {
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 0 18px 42px;
}

.hero {
  display: grid;
  gap: 22px;
  padding: 34px 0 26px;
  border-bottom: 2px solid var(--ink);
}

.hero-copy {
  position: relative;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 16px;
  max-width: 7em;
  color: var(--ink);
  font-family: "Songti SC", SimSun, "Noto Serif SC", serif;
  font-size: 46px;
  line-height: 1.03;
  letter-spacing: 0;
}

.lead {
  max-width: 35rem;
  color: #27333d;
  font-size: 18px;
  line-height: 1.78;
}

.stamp {
  width: fit-content;
  margin-top: 18px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 250, 240, .56);
}

.hero-diagram {
  padding: 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.vault {
  position: relative;
  min-height: 252px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px dashed var(--line-strong);
  background:
    linear-gradient(90deg, rgba(36, 95, 80, .08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(36, 95, 80, .08) 1px, transparent 1px),
    #fbf6eb;
  background-size: 34px 34px;
}

.shield-mark {
  width: 96px;
  height: 96px;
  border-radius: 22px;
}

.shield-mark img {
  width: 100%;
  height: 100%;
}

.vault p {
  position: absolute;
  right: 18px;
  bottom: 50px;
  margin: 0;
  color: var(--amber);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 46px;
  line-height: 1;
  font-weight: 800;
}

.vault strong {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 7px 10px;
  border-radius: 4px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 13px;
  line-height: 1.2;
}

.key {
  position: absolute;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  background: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 800;
  box-shadow: 3px 3px 0 rgba(23, 33, 43, .18);
}

.key-a { left: 18px; top: 22px; }
.key-b { right: 18px; top: 22px; }
.key-c {
  left: calc(50% - 23px);
  bottom: 70px;
  color: var(--muted);
  border-color: var(--line-strong);
  box-shadow: none;
}

.quick-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.quick-nav a {
  min-height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--ink);
  background: rgba(255, 250, 240, .62);
  font-size: 14px;
  font-weight: 800;
}

.section {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.section-title {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 16px;
}

.section-title span {
  min-width: 42px;
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  border: 1px solid currentColor;
  border-radius: 4px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.section-title h2 {
  margin: 0;
  color: var(--ink);
  font-family: "Songti SC", SimSun, "Noto Serif SC", serif;
  font-size: 27px;
  line-height: 1.22;
  letter-spacing: 0;
}

.flow {
  display: grid;
  gap: 0;
  margin: 22px 0;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.node,
.join,
.execute {
  position: relative;
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: 13px 15px 13px 44px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 800;
}

.node::before,
.join::before,
.execute::before {
  content: "";
  position: absolute;
  left: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
}

.node.muted {
  color: var(--muted);
}

.node.muted::before {
  background: var(--line-strong);
}

.join {
  color: var(--amber);
  background: var(--amber-soft);
}

.join::before {
  background: var(--amber);
}

.execute {
  border-bottom: 0;
  color: var(--green);
  background: var(--green-soft);
}

.note,
.quote {
  margin: 18px 0 0;
  padding: 14px 0 0 15px;
  border-left: 4px solid var(--green);
  color: var(--soft-ink);
}

.note strong {
  color: var(--green);
}

.compare,
.cards,
.thresholds,
.split {
  display: grid;
  gap: 12px;
}

.compare article,
.card,
.thresholds article,
.split div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 250, 240, .66);
}

.compare h3,
.thresholds h3,
.split h3 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
}

ul {
  padding-left: 20px;
  margin: 0;
  color: var(--soft-ink);
}

li + li {
  margin-top: 7px;
}

.card b {
  color: var(--green);
  font-size: 17px;
}

.card p {
  margin-top: 8px;
}

.warning {
  margin: 30px -18px 0;
  padding: 28px 18px;
  border-top: 1px solid rgba(155, 62, 55, .35);
  border-bottom: 1px solid rgba(155, 62, 55, .35);
  background: linear-gradient(180deg, rgba(240, 217, 212, .62), rgba(244, 239, 228, .18));
}

.warning .section-title span {
  color: var(--red);
  background: var(--red-soft);
}

.risk-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.risk-list div {
  display: grid;
  gap: 3px;
  padding: 13px 0 13px 15px;
  border-left: 3px solid rgba(155, 62, 55, .58);
}

.risk-list strong {
  color: var(--red);
}

.risk-list span {
  color: #55302d;
}

.thresholds article span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin-bottom: 10px;
  padding: 0 10px;
  border-radius: 4px;
  color: var(--amber);
  background: var(--amber-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 800;
}

.case ul {
  display: grid;
  gap: 8px;
  padding-left: 0;
  list-style: none;
}

.case li {
  position: relative;
  padding: 10px 0 10px 22px;
  border-bottom: 1px solid var(--line);
}

.case li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 19px;
  width: 8px;
  height: 8px;
  background: var(--green);
}

.checklist label {
  min-height: 52px;
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
}

.checklist input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 5px;
  accent-color: var(--green);
}

.meter {
  margin-top: 18px;
}

.meter span {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 800;
}

.meter div {
  height: 10px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--paper-deep);
}

.meter i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width .22s ease;
}

.summary {
  margin-top: 30px;
  padding: 24px 0 34px;
  text-align: left;
  border-bottom: 2px solid var(--ink);
}

.summary img {
  width: 52px;
  height: 52px;
  margin-bottom: 13px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(23, 33, 43, .14);
}

.summary h2 {
  margin-bottom: 10px;
  font-family: "Songti SC", SimSun, "Noto Serif SC", serif;
  font-size: 29px;
  line-height: 1.2;
}

.summary p {
  color: #27333d;
}

.summary small {
  display: block;
  margin-top: 15px;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .meter i { transition: none; }
}

@media (max-width: 380px) {
  main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .appbar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .brand {
    gap: 8px;
  }

  .ghost-link {
    padding-left: 10px;
    padding-right: 10px;
  }

  h1 {
    font-size: 42px;
  }

  .hero-diagram {
    padding: 10px;
  }

  .vault {
    min-height: 236px;
  }

  .warning {
    margin-left: -14px;
    margin-right: -14px;
  }

  .vault p {
    right: 10px;
    bottom: 50px;
    font-size: 34px;
  }

  .shield-mark {
    width: 88px;
    height: 88px;
  }

  .key {
    width: 40px;
    height: 40px;
  }

  .key-a { left: 14px; }
  .key-b { right: 14px; }
  .key-c {
    left: calc(50% - 20px);
    bottom: 68px;
  }
}
