/* 免費網站體檢 check.html
   主線：五道關卡。首屏是五道還沒測的空關卡 → 快問快答裡一道道填 → 一關一列講清楚 → 報告 → Ditto 五關一道道灌滿紅色。
   動態跟首頁同一套：由下往上灌滿、紅方塊彈出、clip-path 由左寫出。預設就是最終狀態，.fx-on 且還沒捲到（:not(.in)）才藏起來。 */

.ck-hero, .ck-gl, .ck-rp, .ck-end { flex-direction: column; align-items: stretch; justify-content: center; }
.ck-gl p, .ck-rp p, .ck-end p, .ck-hero .lead { text-wrap: pretty; }
.gl li[id] { scroll-margin-top: 90px; }

/* ---------- 首屏 ---------- */
.ck-hero { padding: clamp(120px, 15vh, 150px) 0 clamp(56px, 8vh, 88px); }
.ck-hero .col-l { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 0 clamp(40px, 5vw, 88px); align-items: end; }
.ck-hero .hero-k { grid-column: 1 / -1; }
.ck-hero h1 { margin-bottom: 0; font-size: clamp(48px, 6.3vw, 106px); }
.ck-hero h1 .ln:nth-child(2) { --dx: 70px; }
.ck-side { padding-bottom: .5em; }
.ck-side .lead { font-size: clamp(16px, 1.2vw, 18px); }
.ck-hero .more { margin-top: 28px; grid-template-columns: minmax(0, 1fr); max-width: 340px; }
.ck-hero .gates { pointer-events: auto; transform: translate3d(0, calc(var(--hp, 0) * -40px), 0); }

/* ---------- 五道關卡（首屏＝空的，可點；收尾＝灌滿） ---------- */
.gates { list-style: none; margin: clamp(48px, 8vh, 84px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.gates li { animation: gt-up 1.1s var(--ease) both; }
.gates li:nth-child(1) { animation-delay: .45s; } .gates li:nth-child(2) { animation-delay: .53s; } .gates li:nth-child(3) { animation-delay: .61s; } .gates li:nth-child(4) { animation-delay: .69s; } .gates li:nth-child(5) { animation-delay: .77s; }
@keyframes gt-up { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
.gates li > a, .gates li > div {
  position: relative; overflow: hidden; isolation: isolate; height: clamp(150px, 22vh, 210px); padding: 18px 20px;
  display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line-2); color: var(--ink); text-decoration: none;
  transition: border-color .4s var(--ease), color .4s var(--ease);
}
.gates b { font: 400 12px/1 var(--mono); letter-spacing: .12em; color: var(--mute); transition: color .4s var(--ease); }
.gates span { display: block; font-size: clamp(17px, 1.5vw, 22px); font-weight: 700; line-height: 1.3; }
.gates em { display: block; margin-top: 8px; font: 400 11px/1.4 var(--mono); font-style: normal; letter-spacing: .08em; color: var(--mute); transition: color .4s var(--ease); }
.gates li > a::before, .gates li > div::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #D3141B; transform: scaleY(0); transform-origin: bottom; transition: transform .7s cubic-bezier(.7, 0, .2, 1); }
.gates li > a::after, .gates li > div::after { position: absolute; top: 16px; right: 18px; font: 400 11px/1 var(--mono); letter-spacing: .12em; color: var(--mute); }
.ck-hero .gates a::after { content: "未測"; }
.ck-hero .gates a:hover, .ck-hero .gates a:focus-visible { border-color: #D3141B; color: #fff; }
.ck-hero .gates a:hover::before, .ck-hero .gates a:focus-visible::before { transform: scaleY(1); }
.ck-hero .gates a:hover b, .ck-hero .gates a:hover em, .ck-hero .gates a:hover::after,
.ck-hero .gates a:focus-visible b, .ck-hero .gates a:focus-visible em, .ck-hero .gates a:focus-visible::after { color: rgba(255, 255, 255, .82); }
.ck-hero .gates a:hover::after, .ck-hero .gates a:focus-visible::after { content: "看說明 ↓"; }
.ck-hero .gates a:focus-visible { outline: 2px solid #FF4A4F; outline-offset: 3px; }

/* 收尾：五道全部灌滿紅色，一道接一道 */
.gates-w { margin-top: clamp(8px, 2vh, 20px); }
.gates.done { margin-top: 0; }
.gates.done li { animation: none; }
.gates.done li > div { height: clamp(170px, 24vh, 230px); border-color: #D3141B; color: #fff; background: rgba(255, 255, 255, .5); }
.gates.done li > div::before { transform: scaleY(1); }
.gates.done li > div::after { content: "通過"; color: #fff; }
.gates.done b, .gates.done em { color: rgba(255, 255, 255, .86); }
.gates.done em { font-family: var(--zh); font-size: 14px; letter-spacing: .02em; line-height: 1.5; }
/* 每一道晚 .18s；字等紅色漫到一半才轉白 */
.gates.done li { --d: 0s; }
.gates.done li:nth-child(2) { --d: .18s; } .gates.done li:nth-child(3) { --d: .36s; } .gates.done li:nth-child(4) { --d: .54s; } .gates.done li:nth-child(5) { --d: .72s; }
.gates.done li > div { transition: border-color .3s var(--ease) var(--d), color .3s var(--ease) calc(var(--d) + .4s); }
.gates.done li > div::before { transition-delay: var(--d); }
.gates.done b, .gates.done em { transition: color .3s var(--ease) calc(var(--d) + .4s); }
.gates.done li > div::after { transition: opacity .3s var(--ease) calc(var(--d) + .6s); }
.fx-on .gates.done:not(.in) li > div { border-color: var(--line-2); color: var(--ink); }
.fx-on .gates.done:not(.in) li > div::before { transform: scaleY(0); }
.fx-on .gates.done:not(.in) li > div::after { opacity: 0; }
.fx-on .gates.done:not(.in) b, .fx-on .gates.done:not(.in) em { color: var(--mute); }
.ck-end-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 300px)); gap: 12px; margin-top: clamp(40px, 6vh, 56px); }
.ck-end-acts .btn { width: 100%; }

/* ---------- 遊戲段 ---------- */
.ck-game .vs-head .h2 { font-size: clamp(36px, 4.2vw, 66px); }

/* ---------- 五關一列列 ---------- */
.gl { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.gl-row { display: grid; grid-template-columns: clamp(84px, 9vw, 140px) minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding: clamp(44px, 7vh, 72px) 0; border-bottom: 1px solid var(--line); }
.gl-n { align-self: start; font-family: var(--wide); font-stretch: 125%; font-variation-settings: "wdth" 125; font-weight: 800; font-size: clamp(56px, 6vw, 96px); line-height: .8; letter-spacing: -.04em; color: var(--ink); -webkit-text-stroke: 1.5px rgba(242, 240, 236, .3); transition: color .9s var(--ease); }
.fx-on .gl-row:not(.in) .gl-n { color: transparent; }
.gl-k { font: 400 12px/1.4 var(--mono); letter-spacing: .14em; color: var(--red-text); margin-bottom: 14px; }
.gl-txt h3 { font-size: clamp(28px, 2.8vw, 44px); line-height: 1.25; font-weight: 900; }
.gl-txt h3::after { content: ""; display: inline-block; width: .2em; height: .2em; margin-left: .08em; background: var(--red); vertical-align: baseline; }
.gl-txt > p:last-child { margin-top: 18px; font-size: 16.5px; line-height: 1.85; color: var(--ink-2); max-width: 30em; }

/* 每一關的示意：深色玻璃小畫面 */
.gl-vis { position: relative; min-width: 0; padding: 22px 26px 28px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, .09); background: linear-gradient(180deg, #151518, #0E0E11); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); color: #F2F1EE; }
.vk { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 22px; font: 400 11px/1.4 var(--mono); letter-spacing: .12em; color: rgba(242, 241, 238, .55); }
.vk em { font-style: normal; color: rgba(242, 241, 238, .4); }

/* 01 資安評分：紅方塊從 F 滑到 A+ */
.grade-w { position: relative; padding-bottom: 20px; border-bottom: 1px solid rgba(255, 255, 255, .16); }
.grade { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grade li { font-family: var(--wide); font-stretch: 125%; font-variation-settings: "wdth" 125; font-weight: 800; font-size: clamp(26px, 2.6vw, 42px); line-height: 1; color: rgba(242, 241, 238, .2); }
.grade li.top { color: #FF4A4F; transition: color .4s var(--ease) 1.5s; }
.grade-mk { position: absolute; bottom: -6px; left: calc(100% / 6 * 5); width: 12px; height: 12px; background: var(--red); transition: left 1.5s cubic-bezier(.65, 0, .35, 1) .2s; }
.fx-on .gl-row:not(.in) .grade-mk { left: 0; }
.fx-on .gl-row:not(.in) .grade li.top { color: rgba(242, 241, 238, .2); }
.hdrs { list-style: none; margin: 18px 0 0; padding: 0; }
.hdrs li { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 6px 14px; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.hdrs li::before { content: ""; width: 9px; height: 9px; background: var(--red); transition: transform .45s cubic-bezier(.3, 1.6, .5, 1) 1.6s; }
.hdrs li:nth-child(2)::before { transition-delay: 1.8s; }
.fx-on .gl-row:not(.in) .hdrs li::before { transform: scale(0); }
.hdrs code { font: 400 13.5px/1.4 var(--mono); color: #F2F1EE; overflow-wrap: anywhere; }
.hdrs span { font-size: 13.5px; color: rgba(242, 241, 238, .6); }

/* 02 JSON-LD：一行行寫出來 */
.code { margin: 0; font: 400 14px/1.85 var(--mono); color: rgba(242, 241, 238, .55); white-space: pre; overflow: hidden; }
.code > span { display: block; clip-path: inset(-2px -2px -2px 0); transition: clip-path .7s cubic-bezier(.65, 0, .35, 1); }
.code b { font-weight: 400; color: #F2F1EE; }
.code i { font-style: normal; color: #FF7A7D; }
.code > span:nth-child(2) { transition-delay: .12s; } .code > span:nth-child(3) { transition-delay: .24s; } .code > span:nth-child(4) { transition-delay: .36s; }
.code > span:nth-child(5) { transition-delay: .48s; } .code > span:nth-child(6) { transition-delay: .6s; } .code > span:nth-child(7) { transition-delay: .72s; }
.fx-on .gl-row:not(.in) .code > span { clip-path: inset(-2px 100% -2px 0); }

/* 03 搜尋結果：加長版面多長出三列 */
.serp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.res { padding: 14px 0 4px; border-top: 1px solid rgba(255, 255, 255, .16); }
.res.rich { border-top-color: var(--red); }
.res-k { font: 400 11px/1 var(--mono); letter-spacing: .1em; color: rgba(242, 241, 238, .5); margin-bottom: 14px; }
.res.rich .res-k { color: #FF7A7D; }
.res > i { display: block; height: 6px; border-radius: 3px; background: rgba(242, 241, 238, .16); margin-top: 9px; }
.res > i.u { width: 46%; height: 5px; margin-top: 0; }
.res > i.t { width: 82%; height: 10px; background: rgba(242, 241, 238, .5); margin-top: 10px; }
.res.rich > i.t { background: #F2F1EE; }
.res > i.l { width: 94%; }
.res > i.l.s { width: 64%; }
.res-x { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .8s cubic-bezier(.65, 0, .35, 1) .3s; }
.res-x > div { overflow: hidden; min-height: 0; }
.res-x span { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 34px; margin-top: 8px; padding: 0 10px 0 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.res-x span:first-child { margin-top: 14px; }
.res-x span i { flex: 1; height: 6px; max-width: 70%; border-radius: 3px; background: rgba(242, 241, 238, .28); }
.res-x span::after { content: ""; flex: none; width: 6px; height: 6px; border-right: 1.5px solid #FF7A7D; border-bottom: 1.5px solid #FF7A7D; transform: translateY(-2px) rotate(45deg); }
.fx-on .gl-row:not(.in) .res-x { grid-template-rows: 0fr; }

/* 04 hreflang：兩頁之間的雙向箭頭畫出來 */
.hl { display: grid; grid-template-columns: minmax(0, 1fr) clamp(60px, 8vw, 120px) minmax(0, 1fr); align-items: center; gap: 12px; }
.hl-pg { padding: 16px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; background: rgba(255, 255, 255, .025); }
.hl-pg b { display: block; font-size: 17px; font-weight: 700; }
.hl-pg code { display: inline-block; margin: 6px 0 12px; font: 400 12px/1 var(--mono); letter-spacing: .06em; color: #FF7A7D; }
.hl-pg i { display: block; height: 6px; border-radius: 3px; background: rgba(242, 241, 238, .16); margin-top: 8px; }
.hl-pg i.s { width: 60%; }
/* 兩條紅線：上面往右指、下面往左指，箭頭用兩條邊框 */
.hl-ar { display: grid; gap: 14px; }
.hl-ar span { position: relative; display: block; height: 1.5px; background: #FF4A4F; transition: transform .9s cubic-bezier(.65, 0, .35, 1) .2s; }
.hl-ar .to { transform-origin: left; }
.hl-ar .back { transform-origin: right; transition-delay: .8s; }
.hl-ar span::after { content: ""; position: absolute; top: -4px; width: 8px; height: 8px; border-top: 1.5px solid #FF4A4F; }
.hl-ar .to::after { right: 0; border-right: 1.5px solid #FF4A4F; transform: rotate(45deg); }
.hl-ar .back::after { left: 0; border-left: 1.5px solid #FF4A4F; transform: rotate(-45deg); }
.fx-on .gl-row:not(.in) .hl-ar span { transform: scaleX(0); }
.hl-code { margin-top: 20px; }
.hl-code code { font: 400 13px/1.5 var(--mono); color: rgba(242, 241, 238, .6); overflow-wrap: anywhere; }

/* 05 速度：兩條量條，遠的那條越過 3 秒線 */
.spd { position: relative; }
.spd-ax { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-left: 9.5em; padding-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, .14); font: 400 11px/1 var(--mono); letter-spacing: .06em; color: rgba(242, 241, 238, .5); }
.spd-ax .lim { position: relative; color: #FF7A7D; }
.spd-ax .lim::after { content: ""; position: absolute; left: 0; top: 18px; height: 102px; border-left: 1px dashed rgba(255, 90, 94, .7); }
.spd-l { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); align-items: center; height: 50px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.spd-l em { font-style: normal; font-size: 13.5px; color: rgba(242, 241, 238, .7); }
.spd-l .tr { position: relative; height: 10px; }
.spd-l .tr i { position: absolute; left: 0; top: 0; height: 10px; border-radius: 2px; transform-origin: left; transition: transform 1.6s cubic-bezier(.45, 0, .2, 1) .2s; }
.spd-l .near { width: 26%; background: rgba(242, 241, 238, .8); transition-duration: .8s; }
.spd-l .far { width: 100%; background: var(--red); transition-duration: 2.6s; }
.fx-on .gl-row:not(.in) .spd-l .tr i { transform: scaleX(0); }

/* ---------- 報告 ---------- */
.rp-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 100px); align-items: center; }
.rp-copy .h2 { font-size: clamp(36px, 4vw, 64px); }
.rp-list { list-style: none; margin: 40px 0 0; padding: 0; border-top: 1px solid var(--line-2); }
.rp-list li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.rp-list b { font: 400 12px/2.2 var(--mono); letter-spacing: .1em; color: var(--red-text); }
.rp-list h3 { font-size: clamp(20px, 1.7vw, 24px); line-height: 1.4; }
.rp-list p { margin-top: 6px; font-size: 16px; line-height: 1.75; color: var(--ink-2); }
.rp-fine { display: flex; align-items: center; gap: 12px; margin-top: 24px; font-size: 15px; color: var(--ink-2); }
.rp-copy .more { margin-top: 32px; }

.rp { border-radius: 22px; overflow: hidden; background: linear-gradient(180deg, #17171B, #0F0F12); color: #F2F1EE; border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 60px 110px -60px rgba(20, 8, 8, .55), inset 0 1px 0 rgba(255, 255, 255, .07); }
.rp-bar { display: flex; align-items: center; gap: 7px; padding: 14px 18px; border-bottom: 1px solid rgba(255, 255, 255, .07); font: 400 12px/1 var(--mono); letter-spacing: .12em; color: rgba(242, 241, 238, .75); }
.rp-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.rp-bar span { margin-left: 10px; }
.rp-bar em { margin-left: auto; font-style: normal; color: rgba(242, 241, 238, .4); }
.rp-body { padding: clamp(20px, 2.4vw, 30px); }
.rp-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 18px; }
.rp-url { font: 400 14px/1.4 var(--mono); color: rgba(242, 241, 238, .7); overflow-wrap: anywhere; }
.rp-to { flex: none; font: 400 11px/1 var(--mono); letter-spacing: .1em; color: #FF7A7D; padding: 7px 10px; border: 1px solid rgba(255, 90, 94, .45); border-radius: 999px; }
.rp-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.rp-rows > li { border-bottom: 1px solid rgba(255, 255, 255, .07); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.rp-r { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 15px 4px; }
.rp-r b { font: 400 12px/1 var(--mono); color: rgba(242, 241, 238, .45); }
.rp-r span { font-size: 16px; font-weight: 700; }
.rp-r em { font: 400 11px/1 var(--mono); font-style: normal; letter-spacing: .1em; padding: 7px 11px; border-radius: 999px; }
.rp-rows .no em { color: #FF7A7D; border: 1px solid rgba(255, 90, 94, .4); background: repeating-linear-gradient(-45deg, rgba(237, 28, 36, .16) 0 2px, transparent 2px 8px); }
.rp-rows .ok em { color: #fff; background: #D3141B; }
.rp-rows .open { background: rgba(237, 28, 36, .06); }
.rp-x { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .8s cubic-bezier(.65, 0, .35, 1) .9s; }
.rp-x > dl { overflow: hidden; min-height: 0; margin: 0; padding: 0 4px 0 56px; }
.rp-x dl > div { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px dashed rgba(255, 255, 255, .1); }
.rp-x dl > div:last-child { margin-bottom: 14px; }
.rp-x dt { font: 400 12px/1.7 var(--mono); letter-spacing: .06em; color: #FF7A7D; }
.rp-x dd { margin: 0; font-size: 14.5px; line-height: 1.6; color: rgba(242, 241, 238, .86); }
.rp-rows > li:nth-child(2) { transition-delay: .1s; } .rp-rows > li:nth-child(3) { transition-delay: .2s; } .rp-rows > li:nth-child(4) { transition-delay: .3s; } .rp-rows > li:nth-child(5) { transition-delay: .4s; }
.fx-on .rp:not(.in) .rp-rows > li { opacity: 0; transform: translateY(10px); }
.fx-on .rp:not(.in) .rp-x { grid-template-rows: 0fr; }

/* ---------- 平板與手機 ---------- */
@media (max-width: 1080px) {
  .ck-hero .col-l, .gl-row, .rp-grid { grid-template-columns: minmax(0, 1fr); }
  .ck-side { margin-top: 28px; padding-bottom: 0; }
  .gl-row { gap: 22px; }
  .gl-n { font-size: 56px; }
  .ck-hero .gates a::after { display: none; }
  .gates.done li > div::after { display: none; }
}
@media (max-width: 760px) {
  .ck-hero { padding: 104px 0 56px; min-height: 0; }
  .ck-hero h1 { font-size: clamp(38px, 10.6vw, 52px); }
  .ck-hero .more { max-width: none; }
  /* 首屏五道關卡：窄而高，關卡名直寫 */
  .ck-hero .gates { gap: 6px; margin-top: 40px; }
  .ck-hero .gates a { height: 190px; padding: 12px 0 12px; align-items: center; }
  .ck-hero .gates span { writing-mode: vertical-rl; font-size: 16px; letter-spacing: .12em; }
  .ck-hero .gates em { display: none; }
  /* 收尾：改成一列列 */
  .gates.done { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .gates.done li > div { height: auto; flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 14px; padding: 16px 18px; flex-wrap: wrap; }
  .gates.done span { font-size: 18px; }
  .gates.done em { margin-top: 0; }
  .ck-end-acts { grid-template-columns: minmax(0, 1fr); }
  .gl-vis { padding: 18px 16px 22px; }
  .code { font-size: 12px; }
  .serp { gap: 12px; }
  .res { padding-left: 10px; }
  .hl { grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); gap: 8px; }
  .hdrs li { grid-template-columns: 9px minmax(0, 1fr); }
  .hdrs span { grid-column: 2; }
  .hl-pg { padding: 12px; }
  .spd-ax { margin-left: 6.8em; }
  .spd-l { grid-template-columns: 6.8em minmax(0, 1fr); height: 56px; }
  .spd-l em { font-size: 12.5px; line-height: 1.4; padding-right: 8px; }
  .rp-r { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .rp-x > dl { padding-left: 4px; }
  .rp-x dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
