/* ============================================================
   家乐瑞官网 · 国际化排版与视觉增强层
   ------------------------------------------------------------
   在 app.css 之后加载。承载三件事：
   1. 中英对照排版（英文副行 / 区块英文标 / 双语切换器）
   2. 版面对齐（基线网格、栅格收口、标题左对齐基准）
   3. 科技感强化（等宽数字、网格底纹、发光描边、微光扫过）
   ============================================================ */

/* ------------------------------------------------------------
   0. 令牌补充
   ------------------------------------------------------------ */
:root{
  /* 英文用字体栈：西文优先，避免中文回退字体渲染拉丁字形 */
  --font-en:"Inter","Helvetica Neue","Segoe UI",Roboto,"Noto Sans",Arial,sans-serif;
  --font-en-serif:"Source Serif 4","Noto Serif",Georgia,"Times New Roman",serif;
  --font-num:"SF Mono","Cascadia Mono","JetBrains Mono",Consolas,Menlo,monospace;

  /* 科技感色：青瓷高光 + 砂金信号 */
  --glow-celadon:rgba(143,192,178,.30);
  --glow-gold:rgba(190,144,64,.26);
  --hairline:rgba(143,192,178,.22);
  --hairline-gold:rgba(190,144,64,.34);

  /* 统一的间距节奏（8pt 栅格） */
  --sp-1:4px;  --sp-2:8px;  --sp-3:12px; --sp-4:16px;
  --sp-5:24px; --sp-6:32px; --sp-7:48px; --sp-8:64px;

  /* 栏宽：国际化标准下正文行长更窄，提升可读性 */
  --measure:62ch;
  --measure-wide:78ch;
}

/* ------------------------------------------------------------
   1. 英文排版基线
   ------------------------------------------------------------ */
/* 英文正文字号略小、行距更紧，符合西文排版惯例 */
.theme__en,
.coopcard__en{
  display:block;
  margin-top:7px;
  font-family:var(--font-en);
  font-size:12.6px;
  line-height:1.72;
  font-weight:400;
  letter-spacing:.004em;
  color:var(--muted);
  font-style:normal;
}
/* 英文块与上一行中文之间不额外加空隙，避免双语行距失衡 */
.coopcard__desc > .theme__en:first-child,
.theme__d > .theme__en:first-child,
.cap p > .theme__en:first-child{margin-top:6px}

/* 区块标题下的英文标：与中文标题同一左基线 */
.h2-en{
  display:block;
  margin-top:10px;
  font-family:var(--font-en);
  font-size:12.2px;
  font-weight:600;
  letter-spacing:.14em;
  text-transform:uppercase;
  line-height:1.6;
  color:var(--celadon-deep);
  opacity:.9;
  font-style:normal;
}
.head h2 .h2-en,
.section--ink h2 .h2-en{color:var(--celadon)}

/* 卡内小标题的英文（.cap__t 内） */
.cap__en{
  display:block;
  margin-top:5px;
  font-family:var(--font-en);
  font-size:10.4px;
  font-weight:600;
  letter-spacing:.14em;
  text-transform:uppercase;
  line-height:1.5;
  color:var(--muted);
  font-style:normal;
}

/* theme 标题内的英文 */
.theme__t .theme__en,
.theme__d .theme__en{
  margin-top:6px;
  font-size:11.8px;
  letter-spacing:.05em;
}
.theme__t .theme__en{
  text-transform:none;
  letter-spacing:.03em;
  font-weight:600;
  color:var(--celadon-deep);
}

/* 英文一律另起一行（不与中文挤在同一行） */
.cap__en,.theme__t .theme__en,.theme__d .theme__en,.h2-en{
  display:block;
  width:auto;
}

/* 英文列表项：与中文条目同序但视觉更轻 */
.coopcard__list li .theme__en,
.coopcard__list li .coopcard__en{
  margin-top:4px;
  font-size:12.2px;
  line-height:1.66;
  padding-left:0;
}

/* 列表项内的英文：另起一行并与中文正文左对齐（不吃悬挂缩进） */
.sol__list li .theme__en,
.matrix__list li .theme__en,
.biz__list li .theme__en,
.adv__list li .theme__en{
  margin-top:4px;
  font-size:12px;
  line-height:1.66;
  padding-left:0;
  text-indent:0;
  color:var(--muted);
}
/* 列表项英文与下一条中文之间留出呼吸 */
.sol__list li:has(.theme__en),
.matrix__list li:has(.theme__en){margin-bottom:5px}
@supports not selector(:has(*)){
  .sol__list li .theme__en,
  .matrix__list li .theme__en{margin-bottom:0}
}

/* 深底区块中的英文 */
.section--ink .theme__en,
.entryband .theme__en,
.ctaband .theme__en,
.dbsband .theme__en{color:#9DB4AD}
.section--ink .h2-en{color:var(--celadon)}

/* ------------------------------------------------------------
   2. 双语区域切换器
   ------------------------------------------------------------ */
.regswitch{
  display:flex;
  padding:5px;
  gap:4px;
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:14px;
  width:100%;
  overflow-x:auto;
  scrollbar-width:none;
}
.regswitch::-webkit-scrollbar{display:none}

.regswitch button{
  flex:1 1 0;
  min-width:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  padding:10px 14px;
  border:1px solid transparent;
  border-radius:10px;
  background:transparent;
  font-family:var(--font-sans);
  text-align:center;
  cursor:pointer;
  transition:background .25s var(--ease),color .25s var(--ease),
             border-color .25s var(--ease),box-shadow .25s var(--ease);
  white-space:nowrap;
}
.regswitch__zh{
  font-size:13.6px;
  font-weight:600;
  line-height:1.25;
  letter-spacing:.01em;
  color:var(--text-body);
  transition:color .25s var(--ease);
}
.regswitch__en{
  font-family:var(--font-en);
  font-size:9.4px;
  font-weight:600;
  letter-spacing:.16em;
  text-transform:uppercase;
  line-height:1.3;
  color:var(--muted);
  opacity:.72;
  transition:color .25s var(--ease),opacity .25s var(--ease);
}
.regswitch button:hover{border-color:var(--celadon);background:var(--celadon-tint)}
.regswitch button:hover .regswitch__zh{color:var(--ink-900)}
.regswitch button.is-on{
  background:var(--ink-900);
  border-color:var(--ink-900);
  box-shadow:var(--shadow-sm);
}
.regswitch button.is-on .regswitch__zh{color:#fff}
.regswitch button.is-on .regswitch__en{color:var(--celadon);opacity:1}

/* ------------------------------------------------------------
   3. 版面对齐
   ------------------------------------------------------------ */
/* 3.1 中文正文行长收口：国际化标准下中文一行约 30–40 字为佳 */
.wrap > .head p,
.cooprow .head p{max-width:var(--measure)}

/* 3.2 区块标题左对齐基准：英文副行与中文标题共用同一左边界 */
.head h2{padding-left:20px}
.head p{padding-left:24px}

/* 3.3 卡片内文字基线统一：同层卡片的标题间距、条目间距一致 */
.coopcard__desc{margin-top:var(--sp-4);padding-top:var(--sp-4)}
.coopcard__list{gap:11px}
.theme{gap:var(--sp-3)}
.theme__hd{padding-bottom:var(--sp-3)}

/* 3.4 栅格收口：标题列与内容列的视觉重量更均衡 */
.cooprow{
  grid-template-columns:minmax(0,0.78fr) minmax(0,1.22fr);
  gap:clamp(26px,3.6vw,56px);
}

/* 3.5 列表标记与文字的悬挂对齐（国际排版：标点/符号悬挂） */
.coopcard__list li{padding-left:20px}
.coopcard__list li::before{top:9px;width:6px;height:6px}

/* 3.6 表格数字对齐（科技感 + 可核对） */
.rsp td,.rsp th,
.apply__text,
.tokenote{font-variant-numeric:tabular-nums}
.rsp td.num,.rsp th.num,
td[style*="text-align:right"]{font-variant-numeric:tabular-nums;font-family:var(--font-num);letter-spacing:-.01em}

/* ------------------------------------------------------------
   4. 科技感强化
   ------------------------------------------------------------ */
/* 4.1 细网格底纹（浅底区块，极低透明度） */
.section--tech{
  position:relative;
  isolation:isolate;
}
.section--tech::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background-image:
    linear-gradient(to right,rgba(47,122,105,.045) 1px,transparent 1px),
    linear-gradient(to bottom,rgba(47,122,105,.045) 1px,transparent 1px);
  background-size:72px 72px;
  mask-image:radial-gradient(ellipse 130% 85% at 50% 0%,#000 30%,transparent 88%);
  -webkit-mask-image:radial-gradient(ellipse 130% 85% at 50% 0%,#000 30%,transparent 88%);
}

/* 4.2 卡片微光扫过（hover 时一道青色高光横扫） */
.scanfx{
  position:relative;
  overflow:hidden;
}
.scanfx::after{
  content:"";
  position:absolute;
  top:0;
  left:-60%;
  width:45%;
  height:100%;
  pointer-events:none;
  background:linear-gradient(100deg,transparent,rgba(143,192,178,.13),transparent);
  transform:skewX(-16deg);
  opacity:0;
  transition:opacity .2s var(--ease);
}
.scanfx:hover::after{opacity:1;animation:scanfxSweep 1.05s var(--ease) forwards}
@keyframes scanfxSweep{
  0%{left:-60%;opacity:0}
  18%{opacity:1}
  100%{left:118%;opacity:0}
}
@media (prefers-reduced-motion:reduce){
  .scanfx:hover::after{animation:none;opacity:0}
}

/* 4.3 等宽角标：编号类元素用等宽数字，强化系统感 */
.theme__n,
.s3__n,
.model__t,
.stat__v,
.apply__badge{
  font-family:var(--font-num);
  font-variant-numeric:tabular-nums;
}
.theme__n{letter-spacing:.02em}

/* 4.4 卡片聚焦描边（科技感的「激活态」提示） */
.cap:hover,
.coopcard:hover,
.s3:hover{
  border-color:var(--celadon);
  box-shadow:0 0 0 1px rgba(143,192,178,.30),var(--shadow-md);
}

/* 4.5 深底区块的科技感边线 */
.entryband,
.ctaband,
.dbsband{
  position:relative;
  isolation:isolate;
}
.entryband::before,
.ctaband::before,
.dbsband::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
  background-image:
    linear-gradient(to right,rgba(143,192,178,.05) 1px,transparent 1px),
    linear-gradient(to bottom,rgba(143,192,178,.05) 1px,transparent 1px);
  background-size:56px 56px;
  mask-image:linear-gradient(105deg,#000 0%,transparent 46%);
  -webkit-mask-image:linear-gradient(105deg,#000 0%,transparent 46%);
}

/* 4.6 焦点可见性（国际化与无障碍标准） */
:focus-visible{
  outline:2px solid var(--cinnabar);
  outline-offset:3px;
  border-radius:2px;
}
.regswitch button:focus-visible,
.btn:focus-visible,
a:focus-visible{outline-offset:4px}

/* ------------------------------------------------------------
   4.7 侧栏结算时序：纵向单列导轨
   ------------------------------------------------------------
   侧栏宽度仅约 1fr（≈380px），三列横向网格会把中文压成碎行。
   改为纵向七步导轨：编号在左、导轨贯穿、阶段标签分组。
   ------------------------------------------------------------ */
.timeline--rail{
  padding:26px 26px 22px;
  background:
    linear-gradient(160deg,rgba(126,170,158,.14),rgba(255,255,255,.03));
  border-color:rgba(126,170,158,.30);
}
.timeline--rail .timeline__hd h2,
.timeline--rail .timeline__hd h3{
  font-size:19px;
  line-height:1.4;
  margin-top:11px;
}
.timeline--rail .timeline__hd p{
  font-size:13px;
  line-height:1.85;
  margin-top:11px;
}

/* ---- 三段分组：阶段标题一次，组内步骤用导轨串起 ---- */
.tline__stages{
  display:flex;
  flex-direction:column;
  gap:0;
  margin-top:20px;
}
.tstage{
  position:relative;
  padding:0 0 0 42px;
}
/* 阶段之间的细分隔 */
.tstage + .tstage{
  margin-top:16px;
  padding-top:16px;
  border-top:1px solid rgba(126,170,158,.18);
}

/* 阶段标题 */
.tstage__h{
  display:flex;
  align-items:baseline;
  flex-wrap:wrap;
  gap:9px;
  margin:0 0 11px;
  font-weight:700;
}
.tstage__n{
  font-family:var(--font-sans);
  font-size:11px;
  font-weight:600;
  letter-spacing:.14em;
  color:var(--cinnabar);
}
.tstage__t{
  font-family:var(--font-serif);
  font-size:15px;
  font-weight:700;
  color:#fff;
  letter-spacing:.02em;
}
.tstage__en{
  font-family:var(--font-en);
  font-size:9.2px;
  font-weight:600;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--celadon);
  opacity:.8;
  font-style:normal;
}

/* 组内步骤：编号方块 + 向下居中的连接线 */
.tstage__list{
  list-style:none;
  margin:0;
  padding:0;
  position:relative;
}
/* 连接线：从编号框底部向下延伸，串联同阶段各步 */
.tstage__list::before{
  content:"";
  position:absolute;
  left:11px;
  top:29px;
  bottom:6px;
  width:1px;
  background:rgba(126,170,158,.38);
}
.tstage:last-child .tstage__list::before{display:none}

.tstage__list li{
  position:relative;
  display:grid;
  grid-template-columns:23px minmax(0,1fr);
  gap:11px;
  align-items:start;
  padding:6px 0 13px;
}
.tstage__list li:last-child{padding-bottom:0}
.tstage__list li b{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  justify-content:center;
  width:23px;
  height:23px;
  border:1px solid var(--celadon);
  background:var(--ink-900);
  color:var(--celadon);
  font-family:var(--font-num);
  font-size:10px;
  font-weight:700;
  font-variant-numeric:tabular-nums;
  letter-spacing:.02em;
}
.tstage__list li span{
  font-size:13.2px;
  line-height:1.62;
  color:#BCCFC9;
  padding-top:3px;
}
/* 末步（核销完成）用砂金强调 —— 仅全局最后一步 */
.tstage:last-child .tstage__list li:last-child b{
  background:var(--cinnabar);
  border-color:var(--cinnabar);
  color:var(--ink-950);
}
.tstage:last-child .tstage__list li:last-child span{color:#fff}

/* 末步落底说明 */
.timeline--rail .timeline__foot{
  margin-top:20px;
  padding-top:15px;
  border-top:1px solid rgba(126,170,158,.20);
  font-size:11.8px;
  line-height:1.8;
  color:rgba(185,203,197,.72);
}

@media (max-width:1080px){
  .timeline--rail{padding:22px 20px 18px}
}

/* ------------------------------------------------------------
   5. 繁体与港澳台专属微调
   ------------------------------------------------------------ */
/* 繁体字形在等宽数字与西文混排下的基线补偿 */
[lang="zh-Hant"] .coopcard__list li::before{top:10px}
/* 港澳台区域卡：与境外卡区分的标识色（青瓷细边） */
.coopcard--hmt{
  background:linear-gradient(180deg,#fff 0%,#FBFAF6 100%);
  border-left:3px solid var(--celadon);
}
.coopcard--hmt .coopcard__badge--wip{
  background:rgba(47,122,105,.14);
  color:var(--celadon-deep);
}

/* ------------------------------------------------------------
   6. 页脚国际化对齐
   ------------------------------------------------------------ *//* 栏标题：中文与英文栏标共用左基线，砂金短线对齐 */
.footer__title{
  letter-spacing:.18em;
  font-family:var(--font-en);
  font-size:11px;
}
/* 链接列表：行高统一，中文与英文条目基线一致 */
.footer__links{
  gap:10px;
  font-size:13.8px;
  line-height:1.9;
}
/* 页脚简介的英文对照行 */
.footer__blurb-en{
  display:block;
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid rgba(126,170,158,.16);
  font-family:var(--font-en);
  font-size:12.4px;
  line-height:1.8;
  font-weight:400;
  letter-spacing:.004em;
  color:rgba(160,186,177,.86);
}
/* 底部版权行：等宽数字，便于核对 */
.footer__bottom{font-variant-numeric:tabular-nums}

/* ------------------------------------------------------------
   7. 响应式
   ------------------------------------------------------------ */
@media (max-width:1080px){
  .cooprow{grid-template-columns:1fr;gap:clamp(18px,2.2vw,26px)}
}
@media (max-width:720px){
  .regswitch{padding:4px;gap:3px;border-radius:12px}
  .regswitch button{padding:9px 8px;gap:2px}
  .regswitch__zh{font-size:12.4px}
  .regswitch__en{font-size:8.6px;letter-spacing:.12em}
  .theme__en,.coopcard__en{font-size:12px;line-height:1.68}
  .h2-en{font-size:11.4px;letter-spacing:.14em;margin-top:7px}
  .head h2{padding-left:16px}
  .head p{padding-left:20px}
  .wrap > .head p,.cooprow .head p{max-width:none}
}
@media (max-width:420px){
  .regswitch__en{display:none}
  .regswitch button{padding:10px 6px}
}
