:root {
  color-scheme: light;
  --bg: #f6f7f2;
  --panel: #fff;
  --ink: #142c25;
  --muted: #4c6258;
  --line: #d4ded2;
  --accent: #155a42;
  --pale: #e3f2d8;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.2; }
h1 { font-size: clamp(2.45rem, 5.7vw, 4.65rem); letter-spacing: -.045em; max-width: 16ch; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); letter-spacing: -.025em; }
h3 { font-size: 1.25rem; }
html[lang="zh-CN"] h1 { max-width: 13em; letter-spacing: -.035em; }
:focus-visible { outline: 3px solid #327056; outline-offset: 4px; }
.shell { width: min(72rem, calc(100% - 3rem)); margin-inline: auto; }
.skip { position: absolute; top: .5rem; left: .5rem; padding: .5rem 1rem; background: var(--panel); transform: translateY(-150%); }
.skip:focus { transform: none; z-index: 2; }
header { border-bottom: 1px solid var(--line); }
.topbar { min-height: 4.75rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; font-weight: 800; letter-spacing: -.025em; }
.brand > span:last-child { color: var(--accent); }
.mark { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .45rem; color: #fff; background: var(--accent); }
.topbar a { text-decoration: none; }
.topbar nav { display: flex; gap: clamp(.65rem, 3vw, 2.1rem); flex-wrap: wrap; }
.topbar nav a { color: var(--muted); text-underline-offset: .4em; }
.topbar nav a:hover, .topbar nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; }
.language { color: var(--accent); border: 1px solid var(--line); border-radius: .4rem; padding: .3rem .65rem; white-space: nowrap; }
.language:hover { background: var(--pale); }
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; padding-block: clamp(3rem, 8vw, 7.5rem); }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .1em; font-size: .79rem; font-weight: 750; margin-bottom: .9rem; }
.lede { margin-top: 1.25rem; max-width: 66ch; color: var(--muted); font-size: clamp(1.04rem, 2vw, 1.2rem); }
.actions { display: flex; align-items: center; gap: 1.15rem; flex-wrap: wrap; margin-top: 1.75rem; }
.button { display: inline-flex; gap: .7rem; align-items: center; padding: .65rem 1rem; background: var(--accent); border: 1px solid transparent; border-radius: .45rem; color: #fff; text-decoration: none; font: inherit; font-weight: 700; cursor: pointer; }
.button:hover { background: #0a4732; }
.text-link { font-weight: 650; color: var(--accent); text-underline-offset: .22em; }
.diagram { background: #14362c; color: #eef6ef; padding: clamp(1.15rem, 4vw, 2.25rem); border-radius: .85rem; box-shadow: 0 15px 35px #15362c24; }
.diagram-label { font-size: .77rem; font-weight: 750; letter-spacing: .14em; display: flex; justify-content: space-between; margin-bottom: 1.4rem; color: #c7dfd1; }
.nodes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.nodes div, .profile, .foundation { border: 1px solid #81a898; border-radius: .4rem; text-align: center; padding: .65rem .35rem; font-weight: 650; }
.connectors { height: 1.7rem; margin-inline: 24%; border: solid #81a898; border-width: 0 1px 1px; position: relative; }
.connectors::after { content: ""; position: absolute; left: 50%; top: 100%; height: .7rem; border-left: 1px solid #81a898; }
.profile { margin: .7rem 0 .65rem; background: var(--pale); border-color: var(--pale); color: var(--ink); }
.foundation { border-style: dashed; color: #c7dfd1; }
.why { border-top: 1px solid var(--line); padding-block: 2.4rem 4rem; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.2rem; }
.cards article, .form-panel { background: var(--panel); border: 1px solid var(--line); border-radius: .65rem; padding: 1.4rem; }
.cards article p:last-child { margin-top: .65rem; color: var(--muted); }
.page-intro { padding-block: clamp(2.8rem, 7vw, 5rem) 2rem; }
.page-intro a { display: inline-block; margin-top: 1rem; }
.spec-layout { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: clamp(1rem, 5vw, 4rem); margin-bottom: 4rem; }
.toc { display: flex; flex-direction: column; align-self: start; gap: .5rem; padding: 1rem; border: 1px solid var(--line); border-radius: .55rem; }
.toc a { color: var(--accent); text-underline-offset: .2em; }
.prose { max-width: 72ch; }
.prose section { padding-block: 1.65rem; border-bottom: 1px solid var(--line); }
.prose section p { margin: .75rem 0; }
.notice { padding: .85rem 1rem; background: var(--pale); border-left: 3px solid var(--accent); border-radius: .2rem; }
.notice.error { background: #fff0ec; color: #6d261a; border-color: #a53d2b; margin-bottom: 1rem; }
pre { overflow: auto; padding: 1rem; border-radius: .45rem; background: #14362c; color: #fff; }
code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
.form-panel { max-width: 47rem; padding: clamp(1rem, 4vw, 2rem); margin-bottom: 4rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
label { display: block; font-weight: 650; }
input, select, textarea { display: block; width: 100%; margin-top: .35rem; padding: .6rem .7rem; border: 1px solid #798d82; border-radius: .35rem; background: var(--panel); color: var(--ink); font: inherit; }
textarea { resize: vertical; }
.privacy { color: var(--muted); font-size: .9rem; margin-block: .8rem 1rem; }
footer { border-top: 1px solid var(--line); }
.footer { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1.2rem; padding-block: 1.25rem; font-size: .89rem; }
.footer p { flex: 1 1 22rem; color: var(--muted); }

@media (max-width: 48rem) {
  .hero, .spec-layout { grid-template-columns: 1fr; }
  .diagram { max-width: 31rem; }
  .cards { grid-template-columns: 1fr; }
}

@media (max-width: 34rem) {
  .shell { width: calc(100% - 2rem); }
  .topbar { padding-block: .7rem; flex-wrap: wrap; }
  .topbar nav { order: 1; width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
}
