/* ============================================================
   clashsg.com · 设计系统 基础层
   「Google 式搜索瞬间」纯白方向:纯白打底、慷慨留白、
   药丸与超大圆角、轻海拔投影分层、四色签名点。
   所有颜色/字体/圆角/投影一律取自 :root 设计令牌。
   ============================================================ */

:root{
  /* —— 色彩令牌 —— */
  --bg:#FFFFFF;
  --bg-panel:#F8F9FB;
  --bg-panel-2:#F1F3F6;
  --border:#DFE1E5;
  --accent:#4285F4;
  --accent-dark:#1A56C8;
  --text:#202124;
  --text-muted:#5F6368;
  --success:#34A853;
  --warn:#F9AB00;
  --error:#EA4335;

  /* —— 四色签名(蓝/红/黄/绿) —— */
  --g-blue:#4285F4;
  --g-red:#EA4335;
  --g-yellow:#FBBC05;
  --g-green:#34A853;

  /* —— 氛围与辅助 —— */
  --grid-dot:#E7EAF0;
  --veil:rgba(32,33,36,.35);

  /* —— 字体令牌 —— */
  --font-display:'Inter','Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,sans-serif;
  --font-body:'Inter','Noto Sans SC','PingFang SC','Microsoft YaHei',-apple-system,sans-serif;
  --font-mono:'JetBrains Mono',ui-monospace,'SF Mono',Menlo,Consolas,monospace;

  /* —— 圆角令牌 —— */
  --radius-pill:28px;
  --radius-card:24px;
  --radius-panel:16px;
  --radius-chip:999px;

  /* —— 投影令牌(只用轻海拔两档,零发光零渐变) —— */
  --shadow-1:0 2px 8px rgba(32,33,36,.08);
  --shadow-2:0 8px 24px rgba(32,33,36,.12);

  /* —— 版心留白 —— */
  --gutter:40px;
  --head-h:64px;
}

/* ---------- Reset ---------- */
*,*::before,*::after{box-sizing:border-box;}
html,body,h1,h2,h3,h4,h5,h6,p,ul,ol,li,figure,blockquote,dl,dd{margin:0;padding:0;}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%;}
body{
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.7;
}
img,svg,video{display:block;max-width:100%;}
img{height:auto;}
a{color:inherit;text-decoration:none;}
ul,ol{list-style:none;}
button{font-family:inherit;font-size:inherit;background:none;border:none;cursor:pointer;color:inherit;}
[hidden]{display:none !important;}
pre,code,kbd,samp{font-family:var(--font-mono);}
table{border-collapse:collapse;}

a:focus-visible,
button:focus-visible,
summary:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
}

html.nav-open{overflow:hidden;}

/* ---------- 版心与区块节奏 ---------- */
.wrap{
  max-width:1120px;
  margin-inline:auto;
  padding-inline:var(--gutter);
}
.wrap-narrow{
  max-width:840px;
  margin-inline:auto;
  padding-inline:var(--gutter);
}
.wrap > *,
.wrap-narrow > *{min-width:0;}

/* 区块节奏:只声明纵向 padding,严禁 padding: Y 0 简写覆盖版心横向留白 */
.sec{
  padding-top:72px;
  padding-bottom:72px;
}
.sec-tight{
  padding-top:44px;
  padding-bottom:44px;
}
.sec-alt{background:var(--bg-panel);}
.sec-line{border-top:1px solid var(--bg-panel-2);}

.sec-title{
  margin-top:8px;
  font-family:var(--font-display);
  font-size:24px;
  font-weight:700;
  letter-spacing:-.01em;
  color:var(--text);
}
.sec-lead{
  margin-top:10px;
  max-width:70ch;
  font-size:15px;
  line-height:1.7;
  color:var(--text-muted);
}

/* ---------- 排版层级 ---------- */
h1,h2,h3,h4{font-family:var(--font-display);color:var(--text);line-height:1.3;}
h2{font-size:24px;font-weight:700;letter-spacing:-.01em;}
h3{font-size:18px;font-weight:700;}
h4{font-size:15.5px;font-weight:600;}

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

/* 四色签名工具类(描边/文字染色) */
.c-blue{color:var(--g-blue);}
.c-red{color:var(--g-red);}
.c-yellow{color:var(--g-yellow);}
.c-green{color:var(--g-green);}

/* ---------- 药丸按钮 ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  height:46px;
  padding:0 30px;
  border-radius:var(--radius-chip);
  font-family:var(--font-display);
  font-size:15px;
  font-weight:600;
  line-height:1;
  white-space:nowrap;
  transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease,transform .15s ease,color .15s ease;
}
.btn-primary{
  background:var(--accent);
  color:var(--bg);
  box-shadow:var(--shadow-1);
}
.btn-primary:hover{
  background:var(--accent-dark);
  box-shadow:var(--shadow-2);
  transform:translateY(-1px);
}
.btn-ghost{
  border:1px solid var(--border);
  background:var(--bg);
  color:var(--text);
}
.btn-ghost:hover{
  border-color:var(--text-muted);
  background:var(--bg-panel);
}
.btn-sm{
  height:38px;
  padding:0 22px;
  font-size:13.5px;
}
.btn .btn-ico{
  width:16px;
  height:16px;
  flex-shrink:0;
}

/* ---------- 通用白卡与面板 ---------- */
.card{
  background:var(--bg);
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  box-shadow:var(--shadow-1);
  padding:24px;
}
.panel{
  background:var(--bg-panel);
  border:1px solid var(--border);
  border-radius:var(--radius-panel);
  padding:20px 22px;
}

/* ---------- 通用网格 ---------- */
.grid-2{display:grid;grid-template-columns:repeat(2,1fr);gap:20px;}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;}
.grid-2 > *,.grid-3 > *{min-width:0;}

/* ============================================================
   头部导航(header.js 注入)
   形态:纯文字,靠间距与字重区分,无编号无图标
   ============================================================ */
.site-mast{
  position:relative;
  z-index:60;
  background:var(--bg);
}
.site-head{
  position:relative;
  z-index:3;
  display:flex;
  align-items:center;
  gap:28px;
  height:var(--head-h);
  padding-inline:var(--gutter);
  max-width:1360px;
  margin-inline:auto;
  background:var(--bg);
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  flex-shrink:0;
}
.brand-mark{
  width:32px;
  height:32px;
  flex-shrink:0;
}
.brand-name{
  font-family:var(--font-display);
  font-size:16px;
  font-weight:700;
  letter-spacing:.01em;
  color:var(--text);
  white-space:nowrap;
}
.mast-nav{
  display:flex;
  align-items:center;
  gap:32px;
  margin-left:auto;
}
.mast-nav a{
  font-size:14px;
  font-weight:400;
  color:var(--text-muted);
  transition:color .15s ease;
}
.mast-nav a:hover{color:var(--text);}
.mast-nav a.is-active{
  color:var(--text);
  font-weight:600;
}
.mast-tools{
  display:flex;
  align-items:center;
  gap:12px;
  flex-shrink:0;
}

/* 语言切换 */
.lang-box{position:relative;}
.lang-pick{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:7px 14px;
  min-height:34px;
  border:1px solid var(--border);
  border-radius:var(--radius-chip);
  font-size:13px;
  color:var(--text-muted);
  background:var(--bg);
  transition:border-color .15s ease,color .15s ease;
}
.lang-pick:hover{border-color:var(--text-muted);color:var(--text);}
.lang-caret{font-size:10px;}
.lang-menu{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  z-index:65;
  min-width:150px;
  padding:6px;
  background:var(--bg);
  border:1px solid var(--border);
  border-radius:var(--radius-panel);
  box-shadow:var(--shadow-2);
}
.lang-menu a{
  display:block;
  padding:9px 14px;
  border-radius:10px;
  font-size:13.5px;
  color:var(--text-muted);
}
.lang-menu a:hover{
  background:var(--bg-panel);
  color:var(--text);
}
.lang-menu a.is-now{
  color:var(--accent-dark);
  font-weight:600;
}

/* 汉堡按钮(桌面隐藏) */
.mast-burger{
  display:none;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:5px;
  min-width:44px;
  min-height:44px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--bg);
}
.mast-burger span{
  display:block;
  width:18px;
  height:2px;
  border-radius:2px;
  background:var(--text);
  transition:transform .2s ease,opacity .2s ease;
}
.mast-burger[aria-expanded="true"] span:nth-child(1){transform:translateY(7px) rotate(45deg);}
.mast-burger[aria-expanded="true"] span:nth-child(2){opacity:0;}
.mast-burger[aria-expanded="true"] span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}

/* 移动端遮罩(层级低于抽屉,同在 header 层叠上下文内) */
.mast-veil{
  position:fixed;
  inset:0;
  z-index:1;
  background:var(--veil);
}

/* ============================================================
   页脚(footer.js 注入)
   ============================================================ */
.site-foot{
  display:block;
  margin-top:88px;
  background:var(--bg-panel);
  border-top:1px solid var(--border);
}
.foot-grid{
  display:grid;
  grid-template-columns:1.4fr 1fr 1.3fr 1fr;
  gap:40px;
  padding-top:56px;
  padding-bottom:40px;
}
.foot-grid > *{min-width:0;}
.foot-desc{
  margin-top:14px;
  font-size:13.5px;
  line-height:1.75;
  color:var(--text-muted);
  max-width:34em;
}
.foot-dots{
  display:flex;
  gap:6px;
  margin-top:16px;
}
.fd{
  width:8px;
  height:8px;
  border-radius:50%;
  flex-shrink:0;
}
.fd-blue{background:var(--g-blue);}
.fd-red{background:var(--g-red);}
.fd-yellow{background:var(--g-yellow);}
.fd-green{background:var(--g-green);}

.foot-h{
  font-family:var(--font-display);
  font-size:13px;
  font-weight:700;
  color:var(--text);
  margin-bottom:14px;
}
.foot-col a{
  display:block;
  padding:5px 0;
  font-size:13.5px;
  color:var(--text-muted);
  transition:color .15s ease;
}
.foot-col a:hover{color:var(--text);}

.foot-hot{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.foot-hot a{
  display:inline-block;
  padding:6px 13px;
  border:1px solid var(--border);
  border-radius:var(--radius-chip);
  background:var(--bg);
  font-size:12.5px;
  color:var(--text-muted);
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  transition:border-color .15s ease,color .15s ease;
}
.foot-hot a:hover{
  border-color:var(--accent);
  color:var(--accent-dark);
}

.foot-base{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  padding-top:18px;
  padding-bottom:26px;
  border-top:1px solid var(--border);
  font-size:12.5px;
  color:var(--text-muted);
}
.foot-domain{
  font-family:var(--font-mono);
  font-size:12px;
  color:var(--text-muted);
}
.foot-domain .crumb-site{color:var(--success);}

/* ============================================================
   滚动淡入(.reveal → .shown 由 reveal.js 控制)
   ============================================================ */
.reveal{
  opacity:0;
  transform:translateY(16px);
  transition:opacity .6s ease,transform .6s ease;
}
.reveal.shown{
  opacity:1;
  transform:none;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width:1024px){
  .mast-nav{gap:22px;}
}

@media (max-width:900px){
  /* —— 导航收进抽屉 —— */
  .mast-nav{
    position:fixed;
    top:var(--head-h);
    left:0;
    right:0;
    z-index:2;
    display:none;
    flex-direction:column;
    align-items:stretch;
    gap:0;
    margin-left:0;
    padding:8px 0 12px;
    background:var(--bg);            /* 抽屉面板:完全不透明实色 */
    border-bottom:1px solid var(--border);
    box-shadow:var(--shadow-2);
    max-height:calc(100dvh - var(--head-h));
    overflow-y:auto;
    overscroll-behavior:contain;
  }
  .mast-nav.open{display:flex;}
  .mast-nav a{
    display:block;
    width:100%;
    padding:14px 24px;
    font-size:15px;
    border-bottom:1px solid var(--bg-panel-2);
  }
  .mast-nav a:last-child{border-bottom:none;}
  .mast-nav a.is-active{background:var(--bg-panel);}

  /* —— 工具区在窄屏必须仍贴最右(auto 边距随抽屉失效,自己补) —— */
  .mast-tools{margin-left:auto;}
  .mast-burger{display:inline-flex;}

  .foot-grid{grid-template-columns:1fr 1fr;gap:32px;}
}

@media (max-width:860px){
  .grid-3{grid-template-columns:repeat(2,1fr);}
}

@media (max-width:760px){
  :root{--gutter:24px;}
  .sec{padding-top:56px;padding-bottom:56px;}
}

@media (max-width:600px){
  .grid-2,.grid-3{grid-template-columns:1fr;}
  .foot-grid{grid-template-columns:1fr;gap:30px;}
}

@media (max-width:480px){
  :root{--gutter:16px;}
  .site-head{gap:14px;}
  .brand-name{font-size:15px;}
  .lang-pick{padding:7px 11px;}
  .btn{padding:0 24px;}
}

/* ---------- 减少动效偏好 ---------- */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto;}
  .reveal{opacity:1;transform:none;transition:none;}
  .btn,.btn-primary:hover{transform:none;transition:none;}
  .mast-burger span{transition:none;}
}