@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root{
  --paper:#f5e6c8;
  --paper2:#fbf2df;
  --card:#fff8ea;
  --tan:#d4a574;
  --tan-d:#a9743a;
  --ink:#262117;
  --ink2:#4b3f2c;
  --line:#cbb28b;
  --mono:'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --sans:'IBM Plex Sans',system-ui,-apple-system,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
  --r:28px;
}

*,*::before,*::after{box-sizing:border-box}

html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}

body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font:400 1.0625rem/1.75 var(--sans);
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

body::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:200;
  pointer-events:none;
  opacity:.22;
  mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-size:160px 160px;
}

h1,h2,h3{overflow-wrap:anywhere}

img{max-width:100%}

a{color:inherit}

menu{margin:0;padding:0;list-style:none}

section[id]{scroll-margin-top:136px}

.sr{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;
}

:focus-visible{outline:3px solid var(--tan-d);outline-offset:2px}

/* ---- 顶栏：磁带标签质感 ---- */
.top{
  position:sticky;
  top:0;
  z-index:50;
  background:var(--paper);
  border-bottom:2px solid var(--ink);
  box-shadow:0 6px 0 -4px rgba(38,33,23,.18);
}

.brandrow{
  max-width:1180px;
  margin:0 auto;
  padding:.7rem 1.1rem .45rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:.6rem;
  min-height:44px;
  padding:.3rem .2rem;
  text-decoration:none;
  font:600 1.05rem/1.2 var(--mono);
  letter-spacing:.01em;
}

.brand-mark{
  flex:none;
  width:38px;
  height:30px;
  display:grid;
  place-items:center;
  border:2px solid var(--ink);
  border-radius:7px;
  background:var(--tan);
  transition:transform .3s ease;
}

.brand-mark svg{width:22px;height:22px;display:block}

.brand:hover .brand-mark{transform:rotate(-5deg)}

.navrow{
  max-width:1180px;
  margin:0 auto;
  padding:0 1.1rem .6rem;
  display:flex;
  align-items:center;
  gap:1rem;
}

.navrow::before{
  content:"";
  flex:1 1 auto;
  height:2px;
  background:repeating-linear-gradient(90deg,var(--line) 0 9px,transparent 9px 16px);
}

.menu-btn{
  display:inline-flex;
  align-items:center;
  gap:.6rem;
  min-height:44px;
  padding:.55rem 1rem;
  border:2px solid var(--ink);
  border-radius:12px;
  background:var(--paper2);
  font:600 1rem/1 var(--mono);
  cursor:pointer;
  list-style:none;
  transition:background .25s ease,transform .25s ease;
}

.menu-btn::-webkit-details-marker{display:none}

.menu-btn:hover{background:var(--tan);transform:translateY(-1px)}

.bars{
  display:block;
  width:20px;
  height:12px;
  background:linear-gradient(var(--ink) 0 2px,transparent 2px 5px,var(--ink) 5px 7px,transparent 7px 10px,var(--ink) 10px 12px);
}

.menu-pop[open] .menu-btn{
  position:fixed;
  top:.85rem;
  right:.85rem;
  z-index:80;
  background:var(--tan);
}

/* ---- 全屏遮罩菜单 ---- */
.menu-pop[open] .menu-list{
  position:fixed;
  inset:0;
  z-index:70;
  display:grid;
  align-content:start;
  gap:.1rem;
  padding:4.9rem 1.1rem 6.5rem;
  overflow:auto;
  background:var(--ink);
  color:var(--paper2);
  counter-reset:m;
}

.menu-list li{counter-increment:m}

.menu-list li a{
  display:flex;
  align-items:baseline;
  gap:.9rem;
  min-height:50px;
  padding:.85rem .35rem;
  text-decoration:none;
  color:var(--paper2);
  font:600 1.1rem/1.4 var(--mono);
  border-bottom:1px solid #453b2a;
}

.menu-list li a::before{
  content:counter(m,decimal-leading-zero);
  font-size:.85rem;
  color:var(--tan);
}

.menu-list li a:hover,
.menu-list li a:focus-visible{background:#352d20;color:#fff}

.menu-list li[hidden]{display:none}

.find{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:71;
  padding:.8rem 1.1rem calc(.8rem + env(safe-area-inset-bottom));
  background:var(--ink);
  border-top:1px solid #453b2a;
}

.find input{
  width:100%;
  min-height:48px;
  padding:.55rem .9rem;
  border:2px solid var(--tan);
  border-radius:12px;
  background:#1b1710;
  color:var(--paper2);
  font:500 1rem/1.4 var(--mono);
}

.find input::placeholder{color:#a9977a}

/* ---- 首屏 ---- */
.hero{
  position:relative;
  overflow:hidden;
  border-bottom:2px solid var(--ink);
  background:linear-gradient(152deg,#f8eed6 0%,#efdfbc 58%,#e6d0a5 100%);
}

.hero::before{
  content:"";
  position:absolute;
  inset:-12% -12% auto -12%;
  height:130%;
  pointer-events:none;
  background:
    radial-gradient(50% 52% at 88% 6%,rgba(212,165,116,.8),rgba(212,165,116,0) 70%),
    radial-gradient(42% 42% at 4% 98%,rgba(255,247,224,.95),rgba(255,247,224,0) 72%);
  animation:leak 15s ease-in-out infinite alternate;
}

@keyframes leak{
  from{opacity:.5;transform:translate3d(0,0,0)}
  to{opacity:1;transform:translate3d(-3%,2%,0)}
}

.hero-box{
  position:relative;
  z-index:2;
  max-width:1180px;
  margin:0 auto;
  min-height:42vh;
  padding:2.2rem 1.25rem 3.2rem;
  display:flex;
  align-items:center;
  gap:1.1rem;
}

.reel{
  flex:none;
  width:70px;
  height:70px;
  opacity:.85;
  filter:sepia(.45) contrast(1.05) saturate(.85);
}

.reel svg{display:block;width:100%;height:100%}

h1{
  margin:0 0 .7rem;
  font:700 clamp(1.75rem,5.2vw,2.85rem)/1.22 var(--mono);
  letter-spacing:-.01em;
  animation:vhs 9s linear infinite;
}

@keyframes vhs{
  0%,95%,100%{transform:none}
  96%{transform:skewX(-2.4deg) translateX(2px)}
  97%{transform:translateX(-1px)}
}

.lead{
  margin:0;
  max-width:44ch;
  font-size:1rem;
  line-height:1.8;
  color:var(--ink2);
}

.cut{
  position:absolute;
  left:-2%;
  right:-2%;
  bottom:-1px;
  z-index:1;
  height:22px;
  background:var(--tan);
  clip-path:polygon(0 100%,0 42%,100% 0,100% 100%);
}

/* ---- 主体骨架 ---- */
.wrap{
  max-width:1180px;
  margin:0 auto;
  padding:2.2rem 1.25rem 4rem;
  display:grid;
  grid-template-columns:minmax(0,1fr) 292px;
  gap:2.2rem;
  align-items:start;
}

/* ---- 正文卡片 ---- */
.doc > article{
  margin:0 0 2rem;
  padding:1.5rem 1.35rem;
  background:var(--card);
  border:2px solid var(--line);
  border-bottom:6px solid var(--tan);
  border-radius:var(--r);
  transition:border-bottom-color .3s ease,transform .3s ease;
}

.doc > article:hover{border-bottom-color:var(--tan-d);transform:translateY(-2px)}

.doc > article.rv{opacity:0;transform:translateY(16px)}

.doc > article.in{
  opacity:1;
  transform:none;
  transition:opacity .6s ease,transform .6s ease,border-bottom-color .3s ease;
}

.doc h2{
  margin:0 0 .7rem;
  font:700 1.35rem/1.35 var(--mono);
  letter-spacing:-.005em;
}

.doc h3{
  margin:1.4rem 0 .55rem;
  font:600 1.1rem/1.45 var(--mono);
}

hr{
  border:0;
  height:4px;
  width:60px;
  margin:.2rem 0 1.2rem;
  border-radius:2px;
  background:var(--tan-d);
}

.doc p{margin:0 0 1rem;line-height:1.85}

.doc ul,.doc ol{margin:0 0 1.1rem;padding-left:1.2rem}

.doc li{margin:0 0 .5rem;line-height:1.75}

.doc a{
  color:#8a5718;
  text-decoration:underline;
  text-decoration-thickness:1.5px;
  text-underline-offset:3px;
}

.doc a:hover{background:rgba(212,165,116,.42)}

.doc img{display:block;margin:0 0 1rem;border-radius:14px;height:auto}

.doc blockquote{
  margin:0 0 1.1rem;
  padding:.65rem 1rem;
  background:#f7ecd6;
  border-left:4px solid var(--tan);
}

.doc table{width:100%;border-collapse:collapse;margin:0 0 1.1rem;font-size:1rem}

.doc th,.doc td{border:1px solid var(--line);padding:.5rem .6rem;text-align:left}

/* ---- 侧栏 ---- */
.rail{
  position:sticky;
  top:126px;
  padding:1.1rem 1rem 1.2rem;
  background:#efe0bd;
  border:2px dashed #a98f63;
  border-radius:20px;
}

.rail h2{
  margin:0 0 .45rem;
  font:600 1rem/1.3 var(--mono);
  letter-spacing:.12em;
}

.rail hr{width:44px;margin:0 0 .8rem}

.rail menu li a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:.4rem .3rem;
  text-decoration:none;
  color:var(--ink);
  font:500 1rem/1.4 var(--mono);
  border-bottom:1px solid #ddc9a3;
}

.rail menu li a:hover{background:var(--tan)}

.rail .shot{margin:1rem 0 0}

.rail .shot img{
  display:block;
  width:100%;
  height:auto;
  background:#fff;
  border:8px solid #fff;
  border-bottom-width:26px;
  box-shadow:0 9px 18px rgba(38,33,23,.22);
  transform:rotate(-1.6deg);
  transition:transform .35s ease;
}

.rail .shot:hover img{transform:rotate(0)}

/* ---- 页脚 ---- */
.foot{
  margin-top:1.5rem;
  padding:2.1rem 1.25rem 1.3rem;
  background:var(--ink);
  color:#e8dcc2;
  border-top:6px solid var(--tan);
}

.foot-top{
  max-width:1180px;
  margin:0 auto 1.5rem;
  padding-bottom:1rem;
  border-bottom:1px solid #453b2a;
}

.foot-brand a{
  display:inline-block;
  min-height:44px;
  padding:.4rem 0;
  text-decoration:none;
  color:var(--paper2);
  font:600 1.15rem/1.2 var(--mono);
}

.foot-brand a:hover{color:var(--tan)}

.foot-cols{
  max-width:1180px;
  margin:0 auto;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:1.4rem;
}

.foot dl{margin:0}

.foot dt{
  margin-bottom:.6rem;
  font:600 1rem/1 var(--mono);
  letter-spacing:.1em;
  color:var(--tan);
}

.foot dd{margin:0 0 .1rem;font-size:1rem;overflow-wrap:anywhere}

.foot dd a{
  display:inline-block;
  min-height:40px;
  padding:.35rem 0;
  text-decoration:none;
  color:#e8dcc2;
}

.foot dd a:hover{color:var(--tan);text-decoration:underline}

.sub{display:flex;flex-direction:column;gap:.55rem}

.sub input{
  min-height:44px;
  padding:.55rem .8rem;
  border:2px solid #6b5c42;
  border-radius:12px;
  background:#1b1710;
  color:var(--paper2);
  font:400 1rem/1.4 var(--mono);
}

.sub input::placeholder{color:#a9977a}

.sub button{
  min-height:44px;
  padding:.55rem 1rem;
  border:0;
  border-radius:12px;
  background:var(--tan);
  color:var(--ink);
  font:600 1rem/1 var(--mono);
  cursor:pointer;
  transition:background .25s ease;
}

.sub button:hover{background:var(--paper2)}

.copy{
  max-width:1180px;
  margin:1.6rem auto 0;
  padding-top:.9rem;
  border-top:1px solid #453b2a;
  font-size:1rem;
  color:#b6a68a;
}

/* ---- 断点 ---- */
@media (max-width:900px){
  .wrap{grid-template-columns:1fr;gap:1.6rem}
  .rail{position:static;order:2}
  .foot-cols{grid-template-columns:repeat(2,minmax(0,1fr));gap:1.2rem}
  .hero-box{min-height:38vh;padding:1.8rem 1.1rem 2.8rem}
  article[id]{scroll-margin-top:150px}
}

@media (max-width:560px){
  .reel{width:56px;height:56px}
  .hero-box{gap:.85rem;align-items:flex-start;flex-direction:column}
  .reel{margin-bottom:.2rem}
  .doc > article{padding:1.25rem 1.05rem;border-radius:22px}
  .brand-name{font-size:1rem}
  .foot-cols{grid-template-columns:1fr}
  .menu-list li a{font:600 1.05rem/1.4 var(--mono)}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation:none!important;transition:none!important}
  .doc > article.rv{opacity:1;transform:none}
}

button[aria-expanded]{min-width:44px;min-height:44px}
