/* ReWeb 官网 —— 纸面 + 深青墨色，品牌色取自应用图标 */

:root {
  --paper: #f3efe6;
  --paper-2: #ebe5d8;
  --card: #fbf9f4;
  --ink: #0d2a29;
  --ink-2: #4a5f5d;
  --ink-3: #7f8e8b;
  --line: #d9d1c1;
  --teal: #0e7f76;
  --teal-deep: #0b4f4b;
  --mint: #43cfa6;
  --stop: #c2553f;
  --code-bg: #0c2524;
  --code-ink: #d6e7e3;
  --shadow: 0 1px 0 rgba(13, 42, 41, .04), 0 18px 40px -18px rgba(13, 42, 41, .28);

  --serif-zh: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --serif-lat: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 5vw, 72px);
  --max: 1200px;
  /* 顶栏、页脚通栏铺满，但内容边缘与正文对齐 */
  --edge: max(var(--gutter), calc((100vw - var(--max)) / 2));
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0a1f1e;
    --paper-2: #0e2826;
    --card: #10302e;
    --ink: #e7efec;
    --ink-2: #a7bab6;
    --ink-3: #6f8783;
    --line: #21413e;
    --teal: #3cc0ad;
    --teal-deep: #7fe0cc;
    --mint: #43cfa6;
    --stop: #e67a62;
    --code-bg: #061413;
    --shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 22px 44px -20px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
/* 只在页内点击时平滑滚动；带锚点打开页面（如切换语言后）直接落到位置 */
html:focus-within { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  /* 细网格底纹：呼应「边界 / 围栏」 */
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: -1px -1px;
  background-attachment: fixed;
}
body::before {
  /* 让网格只在顶部隐约可见，往下渐隐成纯纸面 */
  content: "";
  position: fixed; inset: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--paper) 55%, transparent) 0%, var(--paper) 70%);
  pointer-events: none;
  z-index: -1;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:not([href]) { color: var(--ink); text-decoration: none; }  /* App 内移除了 mailto 的邮箱 */
code {
  font-family: var(--mono);
  font-size: .86em;
  background: color-mix(in srgb, var(--teal) 10%, transparent);
  color: var(--teal-deep);
  padding: .08em .38em;
  border-radius: 4px;
  word-break: break-all;
}
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--edge);
  padding-top: max(14px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 8px; display: block; }
.brand span { font-family: var(--serif-lat); font-size: 26px; letter-spacing: .01em; line-height: 1; }
.nav { display: flex; align-items: center; gap: 26px; font-size: 14.5px; }
.nav a { color: var(--ink-2); }
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav .nav-cta {
  color: var(--paper); background: var(--ink);
  padding: 7px 14px; border-radius: 999px;
}
.nav .nav-cta:hover { color: var(--paper); background: var(--teal-deep); }
.nav .lang-switch {
  margin-left: -12px;
  min-width: 44px; text-align: center;
  padding: 6px 10px; border-radius: 999px;
  border: 1px solid var(--line);
  font: 500 12.5px/1.2 var(--mono); letter-spacing: .04em;
}
.nav .lang-switch:lang(zh) { font-family: var(--sans); letter-spacing: 0; }
.nav .lang-switch:hover { border-color: var(--ink-2); }
@media (max-width: 760px) {
  .nav { gap: 20px; }
  .nav a:not(.nav-cta):not(.lang-switch) { display: none; }
}

/* ---------------- 通用 ---------------- */
main > section { position: relative; padding-inline: var(--gutter); max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; }
/* 区块分隔线只画在内容宽度内，不延伸到两侧边距 */
.ruled::before, .ruled-bottom::after {
  content: ""; position: absolute; left: var(--gutter); right: var(--gutter);
  border-top: var(--rule, 1px solid var(--line));
}
.ruled::before { top: 0; }
.ruled-bottom::after { bottom: 0; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 15px/1 var(--sans);
  padding: 14px 22px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-deep); color: #fff; }
@media (prefers-color-scheme: dark) {
  .btn-primary { color: #04201d; }
  .btn-primary:hover { background: var(--mint); color: #04201d; }
}
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-2); }

.section-title {
  font-family: var(--serif-zh);
  font-weight: 900;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.2;
  letter-spacing: -.01em;
  margin: 0 0 12px;
}
.section-sub { color: var(--ink-2); margin: 0 0 40px; }

.dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--mint) 25%, transparent);
}

/* ---------------- HERO ---------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  padding-top: clamp(48px, 9vw, 120px);
  padding-bottom: clamp(56px, 8vw, 110px);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em;
  color: var(--ink-2); margin: 0 0 26px;
}
.hero h1 {
  font-family: var(--serif-zh);
  font-weight: 900;
  font-size: clamp(40px, 6.2vw, 88px);
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: 0 0 28px;
}
.hero h1 > span { display: block; white-space: nowrap; }
.hero h1 em {
  font-style: normal;
  color: var(--teal);
  position: relative;
  white-space: nowrap;
}
.hero h1 em::after {
  /* 虚线「围栏」下划线 */
  content: "";
  position: absolute; left: 0; right: 0; bottom: .02em; height: .09em;
  background: repeating-linear-gradient(90deg, var(--mint) 0 .22em, transparent .22em .34em);
  border-radius: 2px;
}
.lede { font-size: clamp(16px, 1.5vw, 18.5px); color: var(--ink-2); max-width: 34em; margin: 0 0 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.in-app-note {
  margin: 22px 0 0; display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; color: var(--ink-2);
}

.hero-copy > * { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3) { animation-delay: .16s; }
.hero-copy > :nth-child(4) { animation-delay: .24s; }
.fence { animation: rise .9s .3s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* 白名单实时日志 */
.fence {
  margin: 0;
  position: relative;
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 22px 22px 18px;
  /* 虚线围栏边框 */
  outline: 1.5px dashed color-mix(in srgb, var(--teal) 55%, transparent);
  outline-offset: 10px;
}
.fence::before {
  content: "ALLOWLIST";
  position: absolute; top: -21px; left: 26px;
  font: 500 10.5px/1 var(--mono); letter-spacing: .18em;
  color: var(--teal);
  background: var(--paper);
  padding: 4px 8px;
}
.fence-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding-bottom: 14px; margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.fence-title { font-weight: 600; font-size: 15px; }
.fence-meta { font: 11.5px var(--mono); color: var(--ink-3); }
.fence-log {
  list-style: none; margin: 0; padding: 0;
  height: calc(6 * 44px);
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(180deg, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
}
.fence-log li {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  height: 44px;
  font: 13.5px var(--mono);
  border-bottom: 1px dashed color-mix(in srgb, var(--line) 80%, transparent);
}
.fence-log li.enter { animation: logIn .5s cubic-bezier(.2, .7, .2, 1); }
@keyframes logIn { from { opacity: 0; transform: translateY(-12px); } }
.fence-log .mark {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.fence-log .host { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fence-log .why { font-size: 11.5px; color: var(--ink-3); font-family: var(--sans); }
.fence-log .ok .mark { background: color-mix(in srgb, var(--mint) 22%, transparent); color: var(--teal); }
.fence-log .no .mark { background: color-mix(in srgb, var(--stop) 14%, transparent); color: var(--stop); }
.fence-log .no .host { color: var(--ink-3); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--stop) 60%, transparent); }
.fence-foot {
  display: flex; justify-content: space-between; gap: 12px;
  padding-top: 12px;
  font: 11.5px var(--mono); color: var(--ink-3);
}

/* ---------------- 论点 ---------------- */
.thesis {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 16px 48px;
  padding-block: 56px !important;
}
.thesis-kicker {
  margin: 6px 0 0;
  font: 500 12.5px var(--mono); letter-spacing: .08em; color: var(--teal);
}
.thesis-body {
  margin: 0;
  font-family: var(--serif-zh); font-weight: 600;
  font-size: clamp(20px, 2.4vw, 28px); line-height: 1.6;
}
.platforms {
  grid-column: 2;
  list-style: none; margin: 12px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.platforms li {
  font: 12.5px var(--mono);
  padding: 5px 12px; border-radius: 999px;
  border: 1px dashed var(--line); color: var(--ink-3);
}
.platforms li.live { border-style: solid; border-color: color-mix(in srgb, var(--teal) 45%, transparent); color: var(--teal); }
@media (max-width: 760px) {
  .fence { outline-offset: 6px; }
  .thesis { grid-template-columns: 1fr; }
  .platforms { grid-column: 1; }
}

/* ---------------- 场景 ---------------- */
.scenes { padding-block: clamp(40px, 6vw, 80px); }
.scene {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  padding-block: clamp(48px, 7vw, 96px);
  scroll-margin-top: 60px;
}
.scene + .scene { border-top: 1px dashed var(--line); }
.scene.flip .scene-copy { order: 2; }
.scene-no {
  margin: 0 0 18px;
  font-family: var(--serif-lat); font-style: italic;
  font-size: 64px; line-height: 1; color: var(--teal);
  display: flex; align-items: baseline; gap: 14px;
}
.scene-no span {
  font: 500 12.5px var(--mono); font-style: normal; letter-spacing: .12em;
  color: var(--ink-2);
  padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px;
  transform: translateY(-10px);
}
.scene h2 {
  font-family: var(--serif-zh); font-weight: 900;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.3; letter-spacing: -.01em;
  margin: 0 0 20px;
}
.scene-copy > p { color: var(--ink-2); margin: 0 0 28px; max-width: 32em; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.facts li {
  display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 14.5px; color: var(--ink-2);
}
.facts b { color: var(--ink); font-weight: 600; }
@media (max-width: 520px) {
  .facts li { grid-template-columns: 1fr; gap: 2px; }
}

.scene-art { display: grid; place-items: center; min-width: 0; }
.js .scene-copy, .js .scene-art { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.js .scene.seen .scene-copy, .js .scene.seen .scene-art { opacity: 1; transform: none; }
.js .scene.seen .scene-art { transition-delay: .12s; }

@media (max-width: 900px) {
  .hero, .scene { grid-template-columns: 1fr; }
  .scene.flip .scene-copy { order: 0; }
}

/* 设备外形 */
.device {
  background: #16211f;
  border-radius: 28px;
  padding: 12px;
  box-shadow: var(--shadow), inset 0 0 0 1.5px #2c3a37;
}
.screen {
  position: relative; overflow: hidden;
  border-radius: 18px;
  background: #fbfaf7;
  color: #1a2826;
}

/* 01 平板 */
.tablet { width: min(100%, 460px); aspect-ratio: 4 / 3.1; transform: rotate(-2deg); }
.kids-screen { height: 100%; padding: 16px 22px; background: linear-gradient(180deg, #fff8ec, #fdf2e2); }
.kids-bar { display: flex; justify-content: flex-end; height: 22px; }
.gear { font-size: 16px; color: #9a8f7e; }
.tiles {
  display: grid; grid-template-columns: repeat(3, 1fr);
  grid-auto-flow: row dense;
  gap: 4px 12px;
  margin-top: 6px;
}
.tiles i, .portal-grid i {
  font-style: normal;
  display: grid; place-items: center;
  aspect-ratio: 1; width: 62%; justify-self: center;
  border-radius: 22%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 82%, #fff), var(--c));
  color: #fff; font-weight: 700; font-size: clamp(14px, 2.2vw, 22px);
  box-shadow: 0 6px 12px -8px var(--c);
}
.tiles b, .portal-grid b {
  font-weight: 500; font-size: 11px; color: #6c655a;
  text-align: center; margin-bottom: 8px;
}
/* 图标与名称是兄弟节点：3 列 × 2 组，每组图标一行、名称一行 */
.tiles i:nth-of-type(1) { grid-area: 1 / 1; } .tiles b:nth-of-type(1) { grid-area: 2 / 1; }
.tiles i:nth-of-type(2) { grid-area: 1 / 2; } .tiles b:nth-of-type(2) { grid-area: 2 / 2; }
.tiles i:nth-of-type(3) { grid-area: 1 / 3; } .tiles b:nth-of-type(3) { grid-area: 2 / 3; }
.tiles i:nth-of-type(4) { grid-area: 3 / 1; } .tiles b:nth-of-type(4) { grid-area: 4 / 1; }
.tiles i:nth-of-type(5) { grid-area: 3 / 2; } .tiles b:nth-of-type(5) { grid-area: 4 / 2; }
.tiles i:nth-of-type(6) { grid-area: 3 / 3; } .tiles b:nth-of-type(6) { grid-area: 4 / 3; }

.blocked-card {
  position: absolute; right: 16px; bottom: 16px;
  width: 54%;
  display: grid; justify-items: center; gap: 2px; text-align: center;
  padding: 16px 14px 14px;
  background: #fff; border-radius: 16px;
  box-shadow: 0 20px 40px -16px rgba(40, 30, 10, .35), 0 0 0 1px rgba(0, 0, 0, .04);
  font-size: 11px; color: #8a8378;
  transform: rotate(3deg);
  animation: nudge 5s ease-in-out infinite;
}
.blocked-card strong { font-size: 13px; color: #2a2620; }
.blocked-icon { font-size: 26px; line-height: 1; color: var(--stop); margin-bottom: 4px; }
.blocked-btn {
  margin-top: 8px; padding: 5px 14px; border-radius: 999px;
  background: #0e7f76; color: #fff; font-size: 11px;
}
@keyframes nudge { 50% { transform: rotate(3deg) translateY(-6px); } }

/* 02 桌面窗口 */
.desktop { width: min(100%, 520px); border-radius: 14px; padding: 0; overflow: hidden; background: #e9e6df; }
.win-bar {
  display: flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 14px;
  background: #ded9cf; color: #6b665d; font-size: 12px;
}
.win-bar i { width: 11px; height: 11px; border-radius: 50%; background: #c9c2b6; }
.win-bar i:nth-child(1) { background: #e36a5d; }
.win-bar i:nth-child(2) { background: #e9b64b; }
.win-bar i:nth-child(3) { background: #5dbb63; }
.win-bar span { margin-inline: auto; transform: translateX(-24px); }
.portal-screen { border-radius: 0; padding: 22px 28px 26px; background: #f6f5f1; }
.search {
  height: 36px; border-radius: 10px; background: #e8e6e0;
  display: flex; align-items: center; padding-inline: 12px 0;
  font-size: 12.5px; color: #9a968d;
  margin-bottom: 22px;
}
.search::before { content: "⌕"; margin-right: 8px; font-size: 15px; }
.portal-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.portal-grid div { display: grid; gap: 6px; }
.portal-grid i { width: 78%; font-size: 13px; }
.portal-grid b { margin: 0; }
.rule-chip {
  margin-top: 24px;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  padding: 10px 12px;
  border: 1.5px dashed #0e7f76;
  border-radius: 10px;
  font: 11.5px var(--mono);
  background: rgba(14, 127, 118, .05);
}
.rule-chip .k { color: #0b4f4b; font-weight: 500; margin-right: auto; }
.rule-chip .v { color: #0e7f76; background: rgba(67, 207, 166, .18); padding: 2px 8px; border-radius: 999px; }

/* 03 展示屏 */
.kiosk { width: min(100%, 520px); display: grid; justify-items: center; }
.signage { width: 100%; aspect-ratio: 16 / 9.6; padding: 10px; border-radius: 12px; }
.signage-screen {
  height: 100%; border-radius: 4px;
  background:
    radial-gradient(120% 90% at 85% 10%, #43cfa6 0%, transparent 55%),
    radial-gradient(90% 90% at 0% 100%, #0b4f4b 0%, transparent 60%),
    #0e7f76;
  color: #fff;
}
.slide {
  position: absolute; left: 7%; bottom: 16%;
  display: grid; gap: 4px;
  animation: slide 8s ease-in-out infinite;
}
.slide-tag { font: 500 10px var(--mono); letter-spacing: .2em; opacity: .8; }
.slide-title { font-family: var(--serif-zh); font-weight: 900; font-size: clamp(22px, 4vw, 38px); line-height: 1.15; }
.slide-sub { font-size: 11.5px; opacity: .85; }
@keyframes slide {
  0%, 8% { opacity: 0; transform: translateX(-16px); }
  16%, 84% { opacity: 1; transform: none; }
  92%, 100% { opacity: 0; transform: translateX(16px); }
}
.refresh-bar {
  position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: rgba(255, 255, 255, .85);
  transform-origin: left;
  animation: refresh 8s linear infinite;
}
@keyframes refresh { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.corner-hold { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; }
.corner-hold svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.corner-hold circle {
  fill: rgba(255, 255, 255, .12);
  stroke: #fff; stroke-width: 2.5; stroke-linecap: round;
  stroke-dasharray: 94.3; stroke-dashoffset: 94.3;
  animation: hold 8s ease-in-out infinite;
}
@keyframes hold {
  0%, 30% { stroke-dashoffset: 94.3; opacity: 0; }
  35% { opacity: 1; }
  85% { stroke-dashoffset: 0; opacity: 1; }
  95%, 100% { stroke-dashoffset: 0; opacity: 0; }
}
.stand { width: 18%; height: 40px; background: linear-gradient(90deg, #1b2826, #2c3a37, #1b2826); }
.stand::after {
  content: ""; display: block; position: relative; top: 40px; left: -60%;
  width: 220%; height: 8px; border-radius: 8px 8px 2px 2px; background: #1b2826;
}
.kiosk-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 28px; }
.kiosk-chips span {
  font: 12px var(--mono);
  padding: 4px 10px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); color: var(--ink-2);
}

/* 04 扫码 */
.wms { position: relative; width: min(100%, 500px); display: flex; align-items: center; justify-content: flex-start; padding: 0 0 56px 6%; }
.phone { width: 230px; flex: none; border-radius: 34px; padding: 10px; transform: rotate(2deg); }
.scan-screen { border-radius: 26px; aspect-ratio: 9 / 18; background: #0f1817; color: #fff; display: flex; flex-direction: column; }
.scan-head { font-size: 11px; padding: 18px 16px 10px; opacity: .85; }
.viewfinder {
  position: relative;
  margin: 6px 16px;
  aspect-ratio: 1.15;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 50%, #33403d, #1b2624);
  display: grid; place-items: center;
  overflow: hidden;
}
.viewfinder::before {
  /* 取景框四角 */
  content: ""; position: absolute; inset: 14px;
  background:
    linear-gradient(#43cfa6, #43cfa6) top left / 18px 2.5px,
    linear-gradient(#43cfa6, #43cfa6) top left / 2.5px 18px,
    linear-gradient(#43cfa6, #43cfa6) top right / 18px 2.5px,
    linear-gradient(#43cfa6, #43cfa6) top right / 2.5px 18px,
    linear-gradient(#43cfa6, #43cfa6) bottom left / 18px 2.5px,
    linear-gradient(#43cfa6, #43cfa6) bottom left / 2.5px 18px,
    linear-gradient(#43cfa6, #43cfa6) bottom right / 18px 2.5px,
    linear-gradient(#43cfa6, #43cfa6) bottom right / 2.5px 18px;
  background-repeat: no-repeat;
}
.barcode {
  width: 62%; height: 38%;
  background: #f4f1ea;
  border-radius: 3px;
  background-image: repeating-linear-gradient(90deg,
    #111 0 2px, transparent 2px 4px, #111 4px 5px, transparent 5px 8px,
    #111 8px 11px, transparent 11px 12px, #111 12px 13px, transparent 13px 16px);
  background-size: 100% 76%;
  background-position: center 30%;
  background-repeat: no-repeat;
  transform: rotate(-4deg);
}
.laser {
  position: absolute; left: 12%; right: 12%; height: 2px;
  background: #ff5a4a;
  box-shadow: 0 0 10px 2px rgba(255, 90, 74, .7);
  animation: laser 2.4s ease-in-out infinite;
}
@keyframes laser { 0%, 100% { top: 22%; } 50% { top: 76%; } }
.scan-list { list-style: none; margin: 12px 0 0; padding: 0 12px; display: grid; gap: 6px; }
.scan-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; border-radius: 9px;
  background: rgba(255, 255, 255, .06);
  font: 10.5px var(--mono);
}
.scan-list li em { font-style: normal; color: #43cfa6; }
.scan-list li.enter { animation: scanIn .6s cubic-bezier(.2, .7, .2, 1); background: rgba(67, 207, 166, .2); }
@keyframes scanIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } }

.code-card {
  margin: 0;
  background: var(--code-bg);
  color: var(--code-ink);
  border-radius: 14px;
  padding: 18px 20px;
  font: 12.5px/1.75 var(--mono);
  font-variant-ligatures: none;  /* 否则 => 会被画成 ⇒ */
  overflow-x: auto;
  box-shadow: var(--shadow);
}
.code-card code { background: none; color: inherit; padding: 0; font-size: inherit; word-break: normal; }
.code-card .c { color: #6f8d88; }
.code-card .k { color: #f0a36b; }
.code-card .f { color: #7fe0cc; }
.code-card .s { color: #e8d48a; }
.code-card .n { color: #d69be8; }
.wms .code-card {
  position: absolute; right: -8px; bottom: 0;
  width: min(300px, 62%);
  font-size: 11px;
  transform: rotate(-1.5deg);
}
@media (max-width: 560px) {
  .wms { flex-direction: column; gap: 20px; padding: 0; align-items: center; }
  .wms .code-card { position: static; width: 100%; transform: none; }
}

/* ---------------- 原则 ---------------- */
.principles { padding-block: clamp(64px, 9vw, 120px); }
.principle code { white-space: nowrap; word-break: normal; }
.principle-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
}
.principle { padding: 22px 22px 8px 0; }
.principle + .principle { padding-left: 22px; border-left: 1px solid var(--line); }
.p-no { font-family: var(--serif-lat); font-style: italic; font-size: 28px; color: var(--teal); line-height: 1; }
.principle h3 { font-size: 17px; margin: 14px 0 8px; }
.principle p { margin: 0; font-size: 14.5px; color: var(--ink-2); }
@media (max-width: 900px) {
  .principle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .principle:nth-child(3) { padding-left: 0; border-left: 0; }
  .principle:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 16px; }
}
@media (max-width: 520px) {
  .principle-grid { grid-template-columns: 1fr; }
  .principle, .principle + .principle { padding-left: 0; border-left: 0; }
  .principle + .principle { border-top: 1px solid var(--line); margin-top: 8px; }
}

/* ---------------- 开发者 ---------------- */
.developers {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
  padding-block: clamp(64px, 9vw, 120px);
}
.dev-copy > p { color: var(--ink-2); }
.dev-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; font-size: 14.5px; color: var(--ink-2); }
.dev-list code { margin-right: 8px; }
.dev-labs { margin: 22px 0 0; font-size: 14.5px; }
.code-card.wide { font-size: 13px; }
@media (max-width: 900px) { .developers { grid-template-columns: 1fr; } }

/* ---------------- 下载 ---------------- */
.download { padding-block: clamp(64px, 9vw, 110px); }
.dl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
.dl {
  display: grid; gap: 6px;
  padding: 22px;
  border-radius: 16px;
  border: 1.5px dashed var(--line);
  color: var(--ink-3);
}
.dl.live { border-style: solid; border-color: color-mix(in srgb, var(--teal) 35%, var(--line)); background: var(--card); color: var(--ink); }
.dl-os { font-family: var(--serif-zh); font-weight: 600; font-size: 20px; }
.dl-state { font: 12.5px var(--mono); color: var(--ink-3); }
.dl.live .dl-state { color: var(--teal); }
.dl-note { color: var(--ink-2); margin: 22px 0 0; }
@media (max-width: 760px) { .dl-grid { grid-template-columns: 1fr; } }

/* ---------------- 反馈 ---------------- */
.feedback {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 88px);
  padding-block: clamp(64px, 9vw, 120px);
  --rule: 2px solid var(--ink);
  scroll-margin-top: 40px;
}
.fb-intro > p { color: var(--ink-2); }
.fb-mail { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 28px; }
.fb-mail span { font-size: 13.5px; color: var(--ink-3); width: 100%; }
.fb-mail a { font-family: var(--mono); font-size: 17px; }
.copy-mini {
  font: 12px var(--sans); cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--ink-2);
  border-radius: 999px; padding: 3px 10px;
}
.copy-mini:hover { border-color: var(--ink-2); }

.fb-form {
  background: var(--card);
  border-radius: 20px;
  padding: clamp(20px, 3vw, 32px);
  box-shadow: var(--shadow);
  display: grid; gap: 20px;
}
.fb-types { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.fb-types legend { font-size: 13.5px; color: var(--ink-2); margin-bottom: 10px; padding: 0; }
.fb-types label { cursor: pointer; }
.fb-types input { position: absolute; opacity: 0; pointer-events: none; }
.fb-types span {
  display: inline-block;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 14px; color: var(--ink-2);
  transition: all .15s ease;
}
.fb-types label:hover span { border-color: var(--ink-3); }
.fb-types input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.fb-types input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }

.field { display: grid; gap: 8px; position: relative; }
.field > span, .check > span { font-size: 13.5px; color: var(--ink-2); }
.field em, .check em { font-style: normal; color: var(--ink-3); font-size: 12px; margin-left: 4px; }
.field textarea, .field input {
  width: 100%;
  font: 15px/1.6 var(--sans);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  resize: vertical;
  transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-user-select: text; user-select: text;
}
.field textarea::placeholder, .field input::placeholder { color: var(--ink-3); }
.field textarea:focus, .field input:focus {
  outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 18%, transparent);
}
.field.invalid textarea { border-color: var(--stop); }
.counter { position: absolute; right: 12px; bottom: 10px; font: 11px var(--mono); color: var(--ink-3); pointer-events: none; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check input { margin: 5px 0 0; accent-color: var(--teal); width: 16px; height: 16px; flex: none; }
.check em { display: block; margin: 2px 0 0; font-family: var(--mono); font-size: 11.5px; word-break: break-all; }
.fb-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.fb-status { margin: 0; min-height: 1.7em; font-size: 14px; color: var(--teal); }
.fb-status.warn { color: var(--stop); }
@media (max-width: 900px) { .feedback { grid-template-columns: 1fr; } }

/* ---------------- 页脚 ---------------- */
.footer {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px;
  padding: 28px var(--edge);
  padding-bottom: max(28px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--ink-3);
  background: var(--paper-2);
}
.foot-brand { display: flex; align-items: center; gap: 10px; color: var(--ink-2); }
.foot-brand img { border-radius: 6px; }
.foot-links { display: flex; gap: 20px; }
.foot-copy { margin: 0 0 0 auto; }
@media (max-width: 560px) { .foot-copy { margin-left: 0; width: 100%; } }

/* ---------------- 英文版 ----------------
   Instrument Serif 只有常规字重，加粗会被浏览器伪造得很难看；
   它本身偏窄、字面小，字号整体放大一档，行高收紧。 */
html[lang="en"] {
  --serif-zh: "Instrument Serif", "Iowan Old Style", Georgia, serif;
}
html[lang="en"] .hero h1,
html[lang="en"] .scene h2,
html[lang="en"] .section-title,
html[lang="en"] .thesis-body,
html[lang="en"] .dl-os,
html[lang="en"] .slide-title { font-weight: 400; }
html[lang="en"] .hero h1 { font-size: clamp(52px, 7.8vw, 112px); line-height: 1; letter-spacing: -.015em; }
html[lang="en"] .hero h1 em { font-style: italic; }
html[lang="en"] .scene h2 { font-size: clamp(32px, 3.9vw, 50px); line-height: 1.08; letter-spacing: -.01em; }
html[lang="en"] .section-title { font-size: clamp(36px, 4.8vw, 58px); line-height: 1.05; }
html[lang="en"] .thesis-body { font-size: clamp(23px, 2.6vw, 32px); line-height: 1.3; }
html[lang="en"] .dl-os { font-size: 24px; }
html[lang="en"] .slide-title { font-size: clamp(28px, 5vw, 48px); }
html[lang="en"] .facts li { grid-template-columns: 11em minmax(0, 1fr); }
html[lang="en"] .lede { max-width: 36em; }
@media (max-width: 520px) {
  html[lang="en"] .facts li { grid-template-columns: 1fr; }
}
