/* ==========================================================================
   Clash镜像站 · 「日光镜廊」设计系统 —— base.css
   暖纸白展厅:直角、1px 细描边、无投影无发光;
   湖水绿只允许出现在三处:核验圆章 / 同步状态圆点 / 骑缝下载按钮(含 dl-fab)。
   ========================================================================== */

:root{
  /* —— 底色 —— */
  --bg:#F6F4EF;
  --bg-panel:#FDFCF8;
  --bg-panel2:#EFECE4;

  /* —— 线 —— */
  --border:#C7CACC;
  --hairline:#DFDCD3;

  /* —— 湖水绿(限三处使用) —— */
  --accent:#128C6E;
  --accent-dark:#0C6852;
  --on-accent:#FFFFFF;

  /* —— 文字 —— */
  --text:#26282B;
  --text-muted:#6E7276;

  /* —— 语义 —— */
  --ok:#128C6E;
  --warn:#A87A14;
  --error:#B0452E;

  /* —— 镜缝(全站唯一光感) —— */
  --seam-core:#9FB5BE;
  --seam-edge:rgba(159,181,190,0);
  --seam-glow:rgba(167,188,196,0.16);
  --grid-line:rgba(110,114,118,0.07);

  /* —— 字体 —— */
  --font-display:'Noto Sans SC','Inter','PingFang SC','Microsoft YaHei',sans-serif;
  --font-body:'Inter','Noto Sans SC','PingFang SC','Microsoft YaHei',sans-serif;
  --font-mono:'JetBrains Mono','SFMono-Regular',Menlo,Consolas,monospace;

  /* —— 版式 —— */
  --radius:0px;
  --wrap:1260px;
  --gutter:32px;
  --head-h:64px;
}

@media (max-width:640px){
  :root{--gutter:18px;}
}

/* ==========================================================================
   Reset
   ========================================================================== */

*{margin:0;padding:0;box-sizing:border-box;}
html{scroll-behavior:smooth;}
html,body{height:100%;}
body{
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  font-size:15px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  overflow-x:clip;
}
img,svg{display:block;max-width:100%;}
img{height:auto;}
a{color:inherit;text-decoration:none;}
button{font-family:var(--font-body);}
a:focus-visible,button:focus-visible,summary:focus-visible{outline:1px solid var(--text);outline-offset:2px;}
::selection{background:var(--bg-panel2);color:var(--text);}

/* 抽屉展开时锁背景滚动 */
html.nav-open{overflow:hidden;}

/* ==========================================================================
   排版
   ========================================================================== */

h1{
  font-family:var(--font-display);
  font-weight:800;
  font-size:clamp(30px,4.4vw,54px);
  line-height:1.22;
  letter-spacing:.02em;
}
h2{
  font-family:var(--font-display);
  font-weight:700;
  font-size:clamp(21px,2.6vw,29px);
  line-height:1.3;
  letter-spacing:.02em;
}
h3{
  font-family:var(--font-display);
  font-weight:700;
  font-size:17px;
  line-height:1.4;
}
strong{font-weight:600;}

/* 行内长串(订阅 URL / 文件名)必须可断行 —— 窄屏防溢出铁律 */
code{
  font-family:var(--font-mono);
  overflow-wrap:anywhere;
  word-break:break-word;
}
:not(pre)>code{
  background:var(--bg-panel2);
  border:1px solid var(--hairline);
  border-radius:var(--radius);
  padding:1px 6px;
  font-size:.88em;
}
pre{
  background:var(--bg-panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:14px 16px;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  font-size:13px;
  line-height:1.7;
}
pre code{
  background:none;
  border:none;
  padding:0;
  white-space:pre;
  overflow-wrap:normal;
  word-break:normal;
}

.mono{font-family:var(--font-mono);}
.muted{color:var(--text-muted);}

/* ==========================================================================
   布局:版心 / 区块 / 网格
   ========================================================================== */

/* 版心:任何断点都保留左右内边距,严禁清零 */
.wrap{
  max-width:var(--wrap);
  margin-left:auto;
  margin-right:auto;
  padding-inline:var(--gutter);
}

/* 区块节奏:只声明纵向,禁止 padding 简写覆盖版心横向留白 */
.sec{
  padding-top:64px;
  padding-bottom:64px;
}
@media (max-width:640px){
  .sec{
    padding-top:44px;
    padding-bottom:44px;
  }
}

/* 区块页眉:细银线分区(展签系统),不用色块 */
.sec-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  padding-bottom:14px;
  border-bottom:1px solid var(--border);
  margin-bottom:28px;
}
.sec-title{
  font-family:var(--font-display);
  font-size:clamp(18px,2.2vw,24px);
  font-weight:700;
  letter-spacing:.03em;
}
.sec-note{
  font-family:var(--font-mono);
  font-size:11.5px;
  color:var(--text-muted);
  letter-spacing:.06em;
}

.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;}
.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;}
.grid-2>*,.grid-3>*{min-width:0;}
@media (max-width:900px){
  .grid-3{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width:640px){
  .grid-2,.grid-3{grid-template-columns:1fr;}
}

/* 通用面板 */
.panel{
  background:var(--bg-panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
}
.panel-inset{
  background:var(--bg-panel2);
  border:1px solid var(--border);
  border-radius:var(--radius);
}

/* ==========================================================================
   按钮
   ========================================================================== */

.btn-main{
  display:inline-block;
  background:var(--accent);
  color:var(--on-accent);
  border:1px solid var(--accent-dark);
  border-radius:var(--radius);
  font-family:var(--font-display);
  font-size:15.5px;
  font-weight:600;
  letter-spacing:.08em;
  padding:14px 42px;
  line-height:1.5;
  cursor:pointer;
}
.btn-main:hover{background:var(--accent-dark);}

.btn-sub{
  display:inline-block;
  background:var(--bg-panel);
  color:var(--text);
  border:1px solid var(--border);
  border-radius:var(--radius);
  font-size:13px;
  letter-spacing:.04em;
  padding:7px 22px;
  line-height:1.5;
  cursor:pointer;
}
.btn-sub:hover{border-color:var(--text-muted);}

/* ==========================================================================
   头部导航(header.js 注入)
   ========================================================================== */

.site-head{
  position:relative;
  z-index:90;
  height:var(--head-h);
  border-bottom:1px solid var(--border);
  background:var(--bg);
}
.site-head-in{
  max-width:var(--wrap);
  height:100%;
  margin-left:auto;
  margin-right:auto;
  padding-inline:var(--gutter);
  display:flex;
  align-items:center;
  gap:22px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.brand-mark{
  width:30px;
  height:30px;
  flex-shrink:0;
}
.brand-name{
  font-family:var(--font-display);
  font-size:17px;
  font-weight:700;
  letter-spacing:.03em;
  white-space:nowrap;
}
.brand-sub{
  font-family:var(--font-mono);
  font-size:11px;
  color:var(--text-muted);
  border-left:1px solid var(--border);
  padding-left:10px;
  margin-left:2px;
  white-space:nowrap;
}

.hd-nav{
  display:flex;
  align-items:center;
  gap:26px;
  margin-left:auto;
}
.hd-link{
  font-size:14px;
  color:var(--text-muted);
  padding-top:4px;
  padding-bottom:4px;
  line-height:1.4;
}
.hd-link:hover{color:var(--text);}
.hd-link[data-active="true"]{
  color:var(--text);
  border-bottom:1px solid var(--text);
  padding-bottom:3px;
}

.hd-more{position:relative;}
.hd-more-btn{
  font-size:14px;
  color:var(--text-muted);
  background:none;
  border:none;
  cursor:pointer;
  padding:4px 0;
  line-height:1.4;
}
.hd-more-btn:hover{color:var(--text);}
.hd-more.has-active .hd-more-btn{color:var(--text);}
.hd-more-list{
  display:none;
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  min-width:148px;
  background:var(--bg-panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding-top:6px;
  padding-bottom:6px;
  z-index:60;
}
.hd-more:hover .hd-more-list,
.hd-more:focus-within .hd-more-list,
.hd-more.open .hd-more-list{display:block;}
.hd-more-item{
  display:block;
  padding:8px 16px;
  font-size:13.5px;
  color:var(--text-muted);
}
.hd-more-item:hover{
  color:var(--text);
  background:var(--bg-panel2);
}
.hd-more-item[data-active="true"]{color:var(--text);}

.hd-tools{
  display:flex;
  align-items:center;
  gap:10px;
  flex-shrink:0;
}
.lang-box{position:relative;}
.lang-btn{
  font-size:13px;
  color:var(--text-muted);
  background:var(--bg-panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:6px 13px;
  cursor:pointer;
}
.lang-btn:hover{color:var(--text);border-color:var(--text-muted);}
.lang-menu{
  display:none;
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  min-width:132px;
  background:var(--bg-panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding-top:6px;
  padding-bottom:6px;
  z-index:60;
}
.lang-box.open .lang-menu{display:block;}
.lang-menu a{
  display:block;
  padding:8px 16px;
  font-size:13px;
  color:var(--text-muted);
}
.lang-menu a:hover{color:var(--text);background:var(--bg-panel2);}
.lang-menu a.is-now{color:var(--text);font-weight:600;}

/* 汉堡按钮:≥44×44,默认隐藏 */
.hd-burger{
  display:none;
  min-width:44px;
  min-height:44px;
  background:none;
  border:1px solid var(--border);
  border-radius:var(--radius);
  cursor:pointer;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:5px;
  padding:0;
}
.hd-burger-bar{
  display:block;
  width:18px;
  height:1px;
  background:var(--text);
  flex-shrink:0;
}

/* 抽屉:实色背景、整行可点、可滚动、不穿透 */
.hd-drawer{
  display:none;
  position:absolute;
  top:100%;
  left:0;
  right:0;
   background:var(--bg-panel);
  border-bottom:1px solid var(--border);
  z-index:85;
  max-height:calc(100dvh - var(--head-h));
  overflow-y:auto;
  overscroll-behavior:contain;
}
html.nav-open .hd-drawer{display:block;}
.hd-drawer a{
  display:block;
  width:100%;
  padding:14px var(--gutter);
  font-size:15px;
  color:var(--text);
  border-bottom:1px solid var(--hairline);
  line-height:1.4;
}
.hd-drawer a:hover{background:var(--bg-panel2);}
.hd-drawer a[data-active="true"]{
  font-weight:600;
  border-left:2px solid var(--text);
}
.hd-drawer-label{
  display:block;
  padding:14px var(--gutter) 6px;
  font-family:var(--font-mono);
  font-size:10.5px;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--text-muted);
}
.hd-drawer a.hd-drawer-lang.is-now{
  font-weight:600;
  color:var(--text);
}

@media (max-width:900px){
  .hd-nav{display:none;}
  .hd-tools{margin-left:auto;}
  .hd-burger{display:inline-flex;}
  .brand-sub{display:none;}
}

/* ==========================================================================
   Hero(首页镜缝装置)
   ========================================================================== */

.hero{
  position:relative;
  height:calc(100vh - 110px);
  min-height:760px;
  overflow:hidden;
  overflow-x:clip;
  /* 细网格用定宽贴片 + center 定位:以镜缝为轴左右对称,竖线永不贴屏幕边缘
     (repeating-gradient 会铺满定位区导致 position 失效,首线压在 x=0 贴左边) */
  background-image:linear-gradient(90deg,var(--grid-line) 0,var(--grid-line) 1px,transparent 1px);
  background-size:168px 100%;
  background-position:center top;
}

/* 镜缝:1px 垂直细缝 + 极淡冷银渐变(全站唯一光感) */
.seam{
  position:absolute;
  left:50%;
  top:0;
  bottom:0;
  width:1px;
  margin-left:-0.5px;
  z-index:2;
  background:linear-gradient(180deg,var(--seam-edge),var(--seam-core) 14%,var(--seam-core) 86%,var(--seam-edge));
}
.seam::before{
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  left:-32px;
  width:65px;
  background:linear-gradient(90deg,transparent,var(--seam-glow),transparent);
  pointer-events:none;
}

/* 核验圆章 */
.seal{
  position:relative;
  z-index:5;
  width:112px;
  height:112px;
  margin:30px auto 20px;
}
.seal svg{display:block;width:112px;height:112px;}
.seal-ring-text{
  font-family:var(--font-display);
  font-size:11.5px;
  font-weight:500;
  letter-spacing:2px;
  fill:var(--accent);
}

/* 双卡展台 */
.stage{
  position:relative;
  z-index:1;
  display:flex;
  justify-content:center;
  gap:118px;
  padding-inline:40px;
}
.rc{
  width:452px;
  min-width:0;
  background:var(--bg-panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:16px 22px 15px;
}
.rc-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-family:var(--font-mono);
  font-size:10.5px;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--text-muted);
  padding-bottom:11px;
  border-bottom:1px solid var(--hairline);
}
.rc-head{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:13px;
  margin-bottom:10px;
}
.rc-repo{
  font-family:var(--font-mono);
  font-size:13px;
  color:var(--text);
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.rc-tag{
  font-family:var(--font-mono);
  font-size:11.5px;
  color:var(--text);
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--bg-panel2);
  padding:1px 8px;
  margin-left:auto;
  flex-shrink:0;
  white-space:nowrap;
}
.assets{list-style:none;}
.asset{
  display:flex;
  align-items:center;
  gap:10px;
  padding-top:7px;
  padding-bottom:7px;
  border-bottom:1px solid var(--hairline);
}
.f-ico{
  position:relative;
  width:9px;
  height:12px;
  flex:none;
  flex-shrink:0;
  border:1px solid var(--text-muted);
  border-radius:1px;
}
.f-ico::after{
  content:"";
  position:absolute;
  left:2px;
  right:2px;
  top:4px;
  border-top:1px solid var(--text-muted);
}
.f-name{
  font-family:var(--font-mono);
  font-size:12px;
  color:var(--text);
  flex:1;
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  overflow-wrap:normal;
  word-break:normal;
  background:none;
  border:none;
  padding:0;
}
.f-plat{
  font-size:11px;
  color:var(--text-muted);
  white-space:nowrap;
  flex-shrink:0;
}
.rc-foot{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:11px;
  font-size:12px;
  color:var(--text-muted);
}
.sync-dot{
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--accent);
  flex:none;
  flex-shrink:0;
}
.rc-src{
  margin-left:auto;
  font-family:var(--font-mono);
  font-size:11px;
}

/* 镜中副本:位置沿缝翻转,文字保持正向 */
.rc--mirror{opacity:.5;}
.rc--mirror .rc-top,
.rc--mirror .rc-head,
.rc--mirror .asset,
.rc--mirror .rc-foot{flex-direction:row-reverse;}
.rc--mirror .rc-tag{margin-left:0;margin-right:auto;}
.rc--mirror .rc-src{margin-left:0;margin-right:auto;}
.rc--mirror .f-name{text-align:right;}

/* 「镜像站」display 大字横压镜缝 */
.hero-word{
  position:absolute;
  z-index:3;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  font-family:var(--font-display);
  font-weight:900;
  font-size:118px;
  line-height:1;
  letter-spacing:.30em;
  padding-left:.30em;
  color:var(--text);
  white-space:nowrap;
  pointer-events:none;
  user-select:none;
}

/* 骑缝按钮 + 文案 */
.cta{
  position:relative;
  z-index:5;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  margin-top:26px;
  padding-inline:var(--gutter);
}
/* 两段 hero 文案:靠自身左右留白撑开(严禁贴屏幕边),窄屏也保住 gutter */
.hero-h1{
  position:relative;
  z-index:5;
  margin-top:18px;
  margin-inline:auto;
  max-width:calc(100% - var(--gutter) * 2);
  text-align:center;
  font-family:var(--font-display);
  font-size:28px;
  font-weight:700;
  letter-spacing:.04em;
  line-height:1.3;
}
.hero-desc{
  position:relative;
  z-index:5;
  margin:9px auto 0;
  max-width:min(640px, calc(100% - var(--gutter) * 2));
  text-align:center;
  font-size:14.5px;
  color:var(--text-muted);
}
.hero-desc strong{
  color:var(--text);
  font-weight:600;
}

/* 胶囊标签行 */
.chips{
  position:relative;
  z-index:5;
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:10px;
  margin-top:17px;
  padding-inline:var(--gutter);
}
.chip{
  font-family:var(--font-mono);
  font-size:11.5px;
  color:var(--text-muted);
  background:var(--bg-panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:4px 13px;
  letter-spacing:.05em;
  max-width:100%;
  overflow:hidden;
  white-space:nowrap;
}

/* Hero 响应式:窄屏收起镜中副本与大字装置,保 H1 与按钮首屏 */
@media (max-width:1180px){
  .stage{gap:60px;}
  .hero-word{font-size:92px;}
}
@media (max-width:980px){
  .hero{height:auto;min-height:0;padding-bottom:48px;}
  .rc--mirror{display:none;}
  .stage{padding-inline:var(--gutter);}
  .rc{width:100%;max-width:452px;}
  .hero-word{
    position:static;
    transform:none;
    display:block;
    text-align:center;
    font-size:clamp(46px,13vw,80px);
    letter-spacing:.22em;
    padding-left:.22em;
    margin-top:26px;
  }
}
@media (max-width:640px){
  .seal{width:88px;height:88px;margin:22px auto 16px;}
  .seal svg{width:88px;height:88px;}
  .btn-main{padding:13px 30px;}
}

/* 内容页小页眉(非首页) */
.page-head{
  padding-top:52px;
  padding-bottom:34px;
  border-bottom:1px solid var(--border);
  position:relative;
  overflow-x:clip;
}
.page-head .wrap{position:relative;}
.page-kicker{
  font-family:var(--font-mono);
  font-size:11.5px;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--text-muted);
  margin-bottom:12px;
}
.page-title{
  font-family:var(--font-display);
  font-weight:800;
  font-size:clamp(26px,3.6vw,42px);
  letter-spacing:.02em;
}
.page-intro{
  margin-top:12px;
  max-width:720px;
  color:var(--text-muted);
  font-size:14.5px;
}

/* ==========================================================================
   页脚(footer.js 注入)
   ========================================================================== */

.site-foot{
  border-top:1px solid var(--border);
  background:var(--bg-panel);
  margin-top:64px;
}
.site-foot-in{
  max-width:var(--wrap);
  margin-left:auto;
  margin-right:auto;
  padding-inline:var(--gutter);
  padding-top:46px;
  padding-bottom:24px;
}
.ft-grid{
  display:grid;
  grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) minmax(0,1.4fr) minmax(0,1fr);
  gap:34px;
  padding-bottom:34px;
  border-bottom:1px solid var(--hairline);
}
.ft-grid>*{min-width:0;}
.ft-brand{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:12px;
}
.ft-brand img{width:28px;height:28px;flex-shrink:0;}
.ft-brand-name{
  font-family:var(--font-display);
  font-size:16px;
  font-weight:700;
}
.ft-about{
  font-size:13px;
  color:var(--text-muted);
  max-width:300px;
}
.ft-title{
  font-family:var(--font-mono);
  font-size:10.5px;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--text-muted);
  margin-bottom:14px;
}
.ft-list{list-style:none;}
.ft-list li{margin-bottom:9px;}
.ft-list a{
  font-size:13.5px;
  color:var(--text-muted);
}
.ft-list a:hover{color:var(--text);}
.ft-hot{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.ft-hot a{
  font-size:12px;
  color:var(--text-muted);
  border:1px solid var(--hairline);
  border-radius:var(--radius);
  background:var(--bg);
  padding:3px 10px;
  max-width:100%;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.ft-hot a:hover{color:var(--text);border-color:var(--border);}
.ft-langs{list-style:none;}
.ft-langs li{margin-bottom:9px;}
.ft-langs a{font-size:13.5px;color:var(--text-muted);}
.ft-langs a:hover{color:var(--text);}
.ft-langs a.is-now{color:var(--text);font-weight:600;}
.ft-bottom{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  padding-top:20px;
  font-size:12.5px;
  color:var(--text-muted);
}
.ft-legal{
  display:flex;
  gap:16px;
  flex-wrap:wrap;
}
.ft-legal a{color:var(--text-muted);}
.ft-legal a:hover{color:var(--text);}

@media (max-width:900px){
  .ft-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width:560px){
  .ft-grid{grid-template-columns:1fr;gap:28px;}
}

/* ==========================================================================
   滚动淡入
   ========================================================================== */

.reveal{
  opacity:0;
  transform:translateY(14px);
  transition:opacity .55s ease,transform .55s ease;
}
.reveal.shown{
  opacity:1;
  transform:none;
}

/* ==========================================================================
   全局防溢出与动效降级
   ========================================================================== */

/* 装饰性微倾斜类:窄屏一律回正,防包围盒撑破 */
@media (max-width:640px){
  .tilt,[class*="tilt-"]{transform:none !important;}
}

@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto;}
  *{animation:none !important;transition:none !important;}
  .reveal{opacity:1;transform:none;}
}