/* 第二階段：內頁新版版面（對照 design-prototype/ 各頁原型的頁面樣式） */
.rd-page #main { display: block; }
.rd-page .rd-extra { margin-top: var(--section); }

/* ===== 網站設計與架設：四項服務 2×2 卡片（編號為裝飾，不唸出） ===== */
.rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.row-card { border: 1px solid var(--ink); border-radius: 20px; padding: clamp(24px, 3vw, 40px); display: grid; gap: 14px; align-content: start; transition: color .25s; }
.row-card .num { font: 800 56px/1 var(--font); letter-spacing: -.04em; -webkit-text-stroke: 1.5px var(--ink); color: transparent; transition: -webkit-text-stroke-color .25s; }
.row-card h2 { margin: 0; font: 900 clamp(22px, 2.2vw, 30px)/1.3 var(--zh); }
.row-card p { margin: 0; }
.row-card.is-on { color: var(--paper); }
.row-card.is-on .num { -webkit-text-stroke-color: var(--lime); }
@media (max-width: 700px) { .rows { grid-template-columns: 1fr; } .row-card .num { font-size: 44px; } }

/* ===== 服務流程：捲動時時間軸填滿萊姆綠，走到哪一步那一步就亮起來 ===== */
.process { --prog: 0; scroll-margin-top: 80px; }
.steps { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; position: relative; }
.steps::before, .steps::after { content: ""; position: absolute; left: 0; right: 0; top: 34px; height: 2px; }
.steps::before { background: #d6d6d0; }
.steps::after { background: var(--ink); transform-origin: left; transform: scaleX(var(--prog)); }
.step { position: relative; z-index: 1; }
.step .num { display: inline-grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: var(--soft); border: 2px solid var(--ink);
             font: 800 22px/1 var(--font); transition: background .35s, color .35s, transform .35s cubic-bezier(.2,.7,.2,1); }
.step.lit .num { background: var(--lime); transform: scale(1.08); }
.step h3 { margin: 22px 0 10px; font: 900 clamp(18px, 1.5vw, 22px)/1.4 var(--zh); }
.step p { margin: 0; font-size: 15px; line-height: 1.75; color: #3a3a3a; }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps::before, .steps::after { left: 33px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .steps::after { transform-origin: top; transform: scaleY(var(--prog)); }
  .step { display: grid; grid-template-columns: 68px 1fr; column-gap: 20px; padding-bottom: 32px; }
  .step h3 { margin: 14px 0 6px; }
  .step p { grid-column: 2; }
}
.actions, .more, .row-link { display: flex; gap: 14px; flex-wrap: wrap; }
.actions { margin-top: 48px; }
.more { margin-top: 32px; }
@media (prefers-reduced-motion: reduce) { .process { --prog: 1 !important; } .step .num { background: var(--lime); } }

/* ===== 服務內容（品牌能見度分析、網站設計與架設、系統開發、外掛服務頁）：一列一個面向，左大字右說明 ===== */
.rd-page[data-content-page="visibility"] .page-head,
.rd-page[data-content-page="faq"] .page-head { padding-bottom: 32px; }
.aspects { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.aspect { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 12px 40px; align-items: baseline; padding: 32px 16px; border-bottom: 1px solid var(--line); transition: color .25s, padding .3s; }
.aspect h2 { margin: 0; font: 900 clamp(24px, 2.6vw, 38px)/1.3 var(--zh); }
.aspect p { margin: 0; font-size: 17px; }
.aspect.is-on { color: var(--paper); padding-left: 28px; }
.aspects + .actions, .aspects + .more + .actions { margin-top: 32px; }
.aspects-more { margin-top: clamp(48px, 6vw, 80px); }
@media (max-width: 760px) { .aspect { grid-template-columns: minmax(0, 1fr); padding: 24px 4px; } }

/* ===== FAQ：標題右側大字聚光＋編號題目 ===== */
.faq-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; }
.faq-head h1 { font-family: var(--font); letter-spacing: -.035em; }
.cover { margin: 0; text-align: right; line-height: 1; }
.cover small { display: block; font: 900 14px/1 var(--zh); letter-spacing: .12em; margin-bottom: 10px; }
@property --sr { syntax: "<length>"; inherits: true; initial-value: 0px; }
.fq { position: relative; display: inline-block; cursor: default; pointer-events: auto; }
.fq .f, .fq .spot { position: absolute; left: 0; top: 0; pointer-events: none; }
.fq .f { color: var(--ink); -webkit-text-stroke-color: var(--ink); clip-path: inset(-10% calc((1 - var(--fill, 0)) * 100%) -10% 0); }
.fq .spot { color: var(--lime); transition: --sr .35s cubic-bezier(.2,.7,.2,1);
  -webkit-mask-image: radial-gradient(circle var(--sr) at var(--mx, 50%) var(--my, 50%), #000 97%, transparent 100%);
          mask-image: radial-gradient(circle var(--sr) at var(--mx, 50%) var(--my, 50%), #000 97%, transparent 100%); }
.fq:hover { --sr: clamp(60px, 7vw, 120px); }
.cover[aria-hidden] { pointer-events: none; }
.cover b { display: inline-block; padding-right: .12em; font: italic 700 clamp(72px, 11vw, 170px)/.8 var(--font); letter-spacing: -.05em; -webkit-text-stroke: 2px var(--ink); color: transparent; }
.qa { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.qa li { border-bottom: 1px solid var(--line); }
.qa summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 56px 1fr 44px; align-items: center; gap: 12px; padding: 24px 8px;
              font: 900 clamp(19px, 1.9vw, 26px)/1.45 var(--zh); transition: background .25s, padding .25s; border-radius: 12px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary .n { font: 500 13px/1 var(--font); color: var(--mute); }
.qa summary .pm { justify-self: end; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--ink); display: grid; place-items: center; font: 500 20px/1 var(--font); transition: transform .3s, background .25s; }
.qa details[open] summary .pm { transform: rotate(45deg); background: var(--lime); border-color: var(--lime); }
.qa details.pinned summary .pm { background: var(--ink); color: var(--lime); border-color: var(--ink); }
.qa summary:hover { background: var(--soft); padding-left: 16px; }
.qa .a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s cubic-bezier(.2,.7,.2,1); }
.qa details[open] .a { grid-template-rows: 1fr; }
.qa .a > div { overflow: hidden; padding: 0 52px 0 76px; }
.qa .a p { margin: 0 0 24px; max-width: 40em; font-size: 17px; }
.qa .a .btn { margin: -8px 0 24px; }
@media (max-width: 700px) {
  .faq-head { grid-template-columns: minmax(0, 1fr); }
  .cover { text-align: left; }
  .fq .f, .fq .spot { display: none; }  /* 手機只留單純的空心字 */
  .qa summary { grid-template-columns: 32px 1fr 40px; padding: 20px 2px; }
  .qa .a > div { padding: 0 8px 0 46px; }
}

/* ===== 表單頁：ad 標誌背景＋霧面玻璃（正式表單為 Fluent Forms，只改外觀） ===== */
.rd-page[data-content-page="apply"] .page-head, .rd-page[data-content-page="contact"] .page-head { padding-bottom: 32px; }
.immersive { width: 100vw; margin-left: calc(50% - 50vw); padding: clamp(40px, 7vw, 110px) var(--gutter); }
.immersive.admark { position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 90% at 80% 15%, #232321 0%, #0c0c0c 55%, #050505 100%); }
.admark-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.admark-svg { position: absolute; width: min(1800px, 112vw); height: auto; left: -22%; top: 52%; transform: translateY(-50%) rotate(-9deg); }
.adm-shadow { fill: #000; opacity: .75; }
.admark-glow { position: absolute; width: 70vw; height: 70vw; right: -18vw; top: -30vw; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(216,243,106,.3), rgba(216,243,106,0) 70%); }
.form-page { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.form-page:has(.form-side) { grid-template-columns: minmax(0, .5fr) minmax(0, 1.5fr); }
.form-page:not(:has(.form-side)) { max-width: 880px; }
.form-side { position: sticky; top: 100px; display: grid; gap: 20px; }
.form-side .note { display: grid; gap: 14px; padding: 24px; border-radius: 20px; color: var(--paper);
  background: rgba(10,10,10,.35); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.form-side .note p { margin: 0; font: 900 19px/1.5 var(--zh); }
.form-side .note .btn { justify-self: start; background: var(--lime); color: var(--ink); border-color: var(--lime); box-shadow: none; }
.form-side .note .btn:hover { background: var(--paper); border-color: var(--paper); }
.form-panel { background: rgba(255,255,255,.8); border: 1px solid rgba(255,255,255,.6); border-radius: 26px; padding: clamp(22px, 4vw, 52px);
  backdrop-filter: blur(22px) saturate(1.2); -webkit-backdrop-filter: blur(22px) saturate(1.2); box-shadow: 0 30px 80px -40px rgba(0,0,0,.6); }
@media (max-width: 860px) { .form-page:has(.form-side) { grid-template-columns: minmax(0, 1fr); } .form-side { position: static; } }
@media (max-width: 600px) {
  .immersive.admark { padding: 96px 12px 300px; }
  .admark-svg { width: 200vw; left: -38vw; top: auto; bottom: -150px; transform: rotate(-9deg); }
  .form-panel { background: rgba(255,255,255,.7); }
  .admark-glow { width: 140vw; height: 140vw; right: -60vw; top: -60vw; }
}

/* Fluent Forms 欄位外觀（覆蓋外掛預設樣式） */
body.rd-page #main .form-panel .avf-form { max-width: none; color: var(--ink); }
body.rd-page #main .form-panel .avf-form fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
body.rd-page #main .form-panel .avf-form .ff-el-group { margin: 0; display: grid; gap: 8px; align-content: start; }
body.rd-page #main .form-panel .avf-form .ff-el-group:has(textarea),
body.rd-page #main .form-panel .avf-form .ff-el-group:has(input[type=checkbox]),
body.rd-page #main .form-panel .avf-form .ff-el-group:has([name=contact_time]),
body.rd-page #main .form-panel .avf-form .ff_submit_btn_wrapper { grid-column: 1 / -1; }
body.rd-page[data-content-page="contact"] #main .form-panel .avf-form .ff-el-group:has([name=name]),
body.rd-page[data-content-page="apply"] #main .form-panel .avf-form .ff-el-group:has([name=url]) { grid-column: 1 / -1; }
body.rd-page #main .form-panel .avf-form label, body.rd-page #main .form-panel .avf-form .ff-el-input--label label { margin: 0; font: 700 15px/1.4 var(--zh); color: var(--ink); }
body.rd-page #main .form-panel .avf-form .ff-el-input--label { margin: 0; }
body.rd-page #main .form-panel .avf-form .ff-el-is-required.asterisk-right label::after { content: "*"; color: var(--ink); background: var(--lime); border-radius: 4px; padding: 0 4px; margin-left: 6px; font-size: 12px; }
body.rd-page #main .form-panel .avf-form .ff-el-form-control { width: 100%; height: auto; min-height: 50px; font: 400 16px/1.5 var(--zh); color: var(--ink); background: rgba(255,255,255,.9);
  border: 1px solid #cfcfc8; border-radius: 12px; padding: 13px 14px; box-shadow: none; transition: border-color .2s, box-shadow .2s; }
body.rd-page #main .form-panel .avf-form textarea.ff-el-form-control { min-height: 150px; height: 150px; resize: vertical; }
body.rd-page #main .form-panel .avf-form .ff-el-form-control:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--lime); }
body.rd-page #main .form-panel .avf-form .avf-plan-help { margin: 0; font-size: 13px; color: var(--mute); }
body.rd-page #main .form-panel .avf-form .ff-el-form-check-label { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font: 400 15px/1.6 var(--zh); }
body.rd-page #main .form-panel .avf-form input[type=checkbox] { width: 20px; height: 20px; min-height: 20px; margin: 2px 0 0; accent-color: var(--ink); }
body.rd-page #main .form-panel .avf-form .ff-btn-submit { display: inline-flex; align-items: center; gap: 10px; min-height: 0; padding: 15px 26px !important; border-radius: 999px !important;
  font: 500 16px/1 var(--font) !important; background: var(--ink) !important; color: var(--paper) !important; border: 1px solid var(--ink) !important; box-shadow: 0 0 0 1px var(--lime); cursor: pointer; transition: background .25s, color .25s; }
body.rd-page #main .form-panel .avf-form .ff-btn-submit:hover, body.rd-page #main .form-panel .avf-form .ff-btn-submit:focus-visible { background: var(--lime) !important; color: var(--ink) !important; }
body.rd-page #main .form-panel .avf-form .error, body.rd-page #main .form-panel .avf-form .text-danger { margin: 0; font-size: 13px; color: #b3261e; }
body.rd-page #main .form-panel .avf-form .ff-el-is-error .ff-el-form-control { border-color: #b3261e; }
body.rd-page #main .form-panel .avf-form .ff-message-success { border: 0; border-radius: 22px; padding: 32px; background: var(--ink); color: var(--paper); box-shadow: none; }
body.rd-page #main .form-panel .avf-policy { margin: 18px 0 0; font-size: 14px; }
body.rd-page #main .form-panel .avf-policy a { font-weight: 500; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: 2px; }
@media (max-width: 600px) { body.rd-page #main .form-panel .avf-form fieldset { grid-template-columns: minmax(0, 1fr); } body.rd-page #main .form-panel .avf-form .ff-el-group { grid-column: 1 / -1; } }

/* 表單外掛未啟用時的備用表單（主題內建） */
.form-panel #v2-intake { display: grid; gap: 18px; }
.form-panel #v2-intake label { display: grid; gap: 8px; font: 700 15px/1.4 var(--zh); }
.form-panel #v2-intake :is(input:not([type=checkbox]), select, textarea) { width: 100%; font: 400 16px/1.5 var(--zh); border: 1px solid #cfcfc8; border-radius: 12px; padding: 13px 14px; background: rgba(255,255,255,.9); }
.form-panel #v2-intake .v2-consent { grid-template-columns: 22px 1fr; font-weight: 400; }
.form-panel #v2-intake .v2-submit { justify-self: start; padding: 15px 26px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font: 500 16px/1 var(--font); cursor: pointer; }
.form-panel #v2-intake .v2-error { margin: 0; color: #b3261e; font-size: 14px; }
/* 送出按鈕依文字寬度（不撐滿）；左右並排欄位的標題列等高，下方輸入框才會對齊 */
body.rd-page #main .form-panel .avf-form .ff-btn-submit { justify-self: start; width: auto; }
body.rd-page #main .form-panel .avf-form .ff-el-group > label,
body.rd-page #main .form-panel .avf-form .ff-el-input--label { min-height: 24px; display: flex; align-items: center; }
@media (max-width: 600px) { body.rd-page #main .form-panel .avf-form .ff-btn-submit { width: 100%; justify-content: center; } }
/* 手電筒層：與標誌同位置、同角度，用標誌形狀當遮罩 */
.admark-light { aspect-ratio: 320 / 265; pointer-events: none; }
.admark-light canvas { display: block; width: 100%; height: 100%; }

/* ===== 服務項目：電腦版左邊清單、右邊大面板；手機版直列 ===== */
.explorer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 80px); align-items: start; margin-top: 8px; }
.svc-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.svc-link { display: grid; grid-template-columns: 64px 1fr 32px; align-items: center; gap: 16px; padding: 28px 12px; border-bottom: 1px solid var(--line);
            text-decoration: none; transition: padding .3s, color .25s; }
.svc-link .n { font: 500 13px/1 var(--font); color: var(--mute); transition: color .25s; }
.svc-link h2 { margin: 0; font: 900 clamp(22px, 2.4vw, 34px)/1.3 var(--zh); }
.svc-link .go { justify-self: end; font-size: 24px; transition: transform .3s; }
.svc-link p, .svc-link .more { display: none; }
.svc-link.is-on { color: var(--paper); padding-left: 24px; }
.svc-link.is-on .n { color: var(--lime); }
@media (min-width: 801px) {
  .svc-link.active:not(.is-on) { padding-left: 24px; }
  .svc-link.active:not(.is-on) .go { transform: translateX(6px); }
  .svc-link.active:not(.is-on)::after { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 6px; border-radius: 3px; background: var(--lime); z-index: 1; }
}
.svc-panel { position: sticky; top: 110px; background: var(--ink); color: var(--paper); border-radius: 28px; padding: clamp(32px, 4vw, 56px);
             min-height: 460px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.svc-panel .pn { font: 800 clamp(120px, 14vw, 220px)/.8 var(--font); letter-spacing: -.05em; -webkit-text-stroke: 2px var(--lime); color: transparent; }
.svc-panel h3 { margin: 24px 0 12px; font: 900 clamp(28px, 3vw, 44px)/1.2 var(--zh); }
.svc-panel p { margin: 0 0 28px; color: #d6d6d6; max-width: 26em; }
.svc-panel .btn { align-self: flex-start; background: var(--lime); color: var(--ink); border-color: var(--lime); box-shadow: none; }
.svc-panel .btn:hover { background: var(--paper); border-color: var(--paper); }
.svc-panel .swap { transition: opacity .25s, transform .35s cubic-bezier(.2,.7,.2,1); }
.svc-panel.changing .swap { opacity: 0; transform: translateY(10px); }
@media (max-width: 800px) {
  .explorer { grid-template-columns: 1fr; }
  .svc-panel { display: none; }
  .svc-link { grid-template-columns: 44px 1fr; align-items: start; padding: 24px 4px; row-gap: 8px; }
  .svc-link .go { display: none; }
  .svc-link p { display: block; grid-column: 2; margin: 0; font-size: 15px; line-height: 1.7; }
  .svc-link .more { display: inline-flex; grid-column: 2; justify-self: start; margin-top: 8px; gap: 8px; padding: 10px 16px;
                    border-radius: 999px; background: var(--ink); color: var(--paper); font: 500 14px/1 var(--font); }
  .svc-link .n { padding-top: 8px; }
}

/* ===== 系統開發：卡片（前四項做什麼、後面的項目怎麼合作） ===== */
.rd-page .cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rd-page .card { border: 1px solid var(--ink); border-radius: 20px; padding: clamp(22px, 2.6vw, 36px); display: grid; gap: 12px; align-content: start; transition: color .25s; }
.rd-page .card h2 { margin: 0; font: 900 clamp(21px, 2vw, 28px)/1.3 var(--zh); }
.rd-page .card p { margin: 0; }
.rd-page .card .btn { justify-self: start; margin-top: 8px; }
.rd-page .card.is-on { color: var(--paper); }
.rd-page .card.is-on .btn { background: var(--lime); color: var(--ink); border-color: var(--lime); box-shadow: none; }
.rd-page .band .cards .card { background: var(--paper); }
@media (max-width: 700px) { .rd-page .cards { grid-template-columns: minmax(0, 1fr); } }

/* ===== 品牌故事：左肖像固定、右文章捲動 ===== */
.story { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: start; border-top: 2px solid var(--ink); padding-top: 40px; }
.portrait { position: sticky; top: 100px; margin: 0; }
.portrait img { width: 100%; border-radius: 24px; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(1); }
.portrait figcaption { margin-top: 12px; font-size: 14px; color: var(--mute); }
.story .text { max-width: 36em; }
.story .text h2 { margin: 0 0 28px; font: 900 clamp(30px, 3.6vw, 52px)/1.25 var(--zh); letter-spacing: -.01em; }
.story .text p { margin: 0 0 1.4em; font-size: 18px; line-height: 1.95; }
.story .text p:first-of-type { font: 500 clamp(19px, 1.7vw, 23px)/1.8 var(--zh); }
.story .text a { text-decoration-color: var(--lime); text-decoration-thickness: 4px; text-underline-offset: 4px; transition: background .2s; }
.story .text a:hover { background: var(--lime); }
.rd-page[data-content-page="about"] .page-head, .rd-page[data-content-page="privacy"] .page-head { padding-bottom: 32px; }
@media (max-width: 800px) { .story { grid-template-columns: minmax(0, 1fr); } .portrait { position: static; max-width: 420px; } }

/* ===== 隱私權政策：左側目錄＋內文；手機版快速查閱列 ===== */
.quick { position: sticky; top: 0; z-index: 5; background: var(--paper); box-shadow: 0 0 0 100vmax var(--paper); clip-path: inset(0 -100vmax -2px);
         padding: 14px 0; border-bottom: 2px solid var(--ink); }
.quick p { margin: 0; display: flex; gap: 8px; align-items: center; font-size: 14px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter); }
.quick p::-webkit-scrollbar { display: none; }
.quick a { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--ink); text-decoration: none; background: var(--paper); white-space: nowrap; flex: none; transition: background .2s; }
.quick a:hover, .quick a.here { background: var(--lime); }
.policy { max-width: 720px; margin-top: 24px; }
.policy section, .policy h2 { scroll-margin-top: 90px; }
.policy h2 { margin: 44px 0 12px; padding-top: 18px; border-top: 1px solid var(--line); font: 900 clamp(20px, 1.8vw, 24px)/1.4 var(--zh); }
.policy section:first-child h2 { border-top: 0; margin-top: 12px; }
.policy p { margin: 0; font-size: 16px; line-height: 1.95; }
.policy a { text-decoration-color: var(--lime); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.policy-wrap { display: grid; grid-template-columns: 260px minmax(0, 720px); gap: clamp(40px, 6vw, 96px); align-items: start; }
.toc { position: sticky; top: 90px; max-height: calc(100vh - 120px); overflow: auto; padding-top: 24px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: t; display: grid; gap: 2px; border-left: 2px solid var(--line); }
.toc li { counter-increment: t; }
.toc a { display: grid; grid-template-columns: 26px 1fr; gap: 4px; padding: 7px 10px 7px 14px; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; font-size: 14px; line-height: 1.5; color: var(--mute); transition: color .2s, border-color .2s, background .2s; }
.toc a::before { content: counter(t, decimal-leading-zero); font: 500 11px/2 var(--font); }
.toc a:hover { color: var(--ink); }
.toc a.here { color: var(--ink); border-left-color: var(--ink); background: var(--lime); }
@media (min-width: 1001px) { .quick { display: none; } }
@media (max-width: 1000px) { .policy-wrap { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } }
/* 快速查閱列：頂部列出現時往下讓位，不會被蓋住 */
/* 品牌故事內文連結：斷詞後的詞是 inline-block，底線畫不到，改用背景畫萊姆綠底線 */
.story .text a { text-decoration: none; background: linear-gradient(var(--lime), var(--lime)) 0 100% / 100% 4px no-repeat; padding-bottom: 1px; }
.story .text a:hover { background-size: 100% 100%; }
/* 品牌故事：內文全部用同一套中文字體與粗細（第一段只放大，不換字型）；電腦版文字與照片上下置中對齊 */
.story .text p { font-family: var(--zh); font-weight: 500; }
.story .text p:first-of-type { font-size: clamp(19px, 1.5vw, 21px); line-height: 1.85; }
@media (min-width: 801px) {
  .story { align-items: center; }
  .portrait { position: static; }
  .story .text h2 { margin-top: 0; }
  .story .text > :last-child { margin-bottom: 0; }
}

/* ===== 方案與價格：分類按鈕黏在上方＋每組兩欄方案卡 ===== */
.rd-page[data-content-page="plans"] .page-head { padding-bottom: 24px; }
.cats { position: sticky; top: 0; z-index: 5; display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 0; background: var(--paper);
        box-shadow: 0 0 0 100vmax var(--paper); clip-path: inset(0 -100vmax -2px); border-bottom: 2px solid var(--ink); }
.cats button { font: 500 15px/1 var(--zh); padding: 11px 18px; border-radius: 999px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; transition: background .25s, color .25s; }
.cats button[aria-current="true"] { background: var(--ink); color: var(--paper); }
.cats button:hover { background: var(--lime); color: var(--ink); }
.group { padding-top: clamp(48px, 6vw, 88px); scroll-margin-top: 150px; }
.group-name { margin: 0 0 20px; font: 500 13px/1 var(--zh); letter-spacing: .14em; color: var(--mute); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.plan { border: 1px solid var(--ink); border-radius: 24px; padding: clamp(26px, 3vw, 40px); display: flex; flex-direction: column; gap: 18px; transition: color .25s; }
.plan .idx { font: 500 13px/1 var(--font); color: var(--mute); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.plan .idx .hot-badge { flex: none; padding: 6px 12px; border-radius: 999px; background: #d92d20; color: #fff; font: 700 13px/1 var(--zh); letter-spacing: .08em; }
.plan .sub { margin: 0; font: 500 15px/1.4 var(--zh); }
.plan h2 { margin: -8px 0 0; font: 900 clamp(26px, 2.6vw, 36px)/1.25 var(--zh); }
.plan .idx + h2 { margin-top: 0; }
.plan h2 .tag { display: inline-block; vertical-align: middle; margin-left: 10px; padding: 5px 12px; border-radius: 999px; background: var(--lime); color: var(--ink); font: 700 14px/1.2 var(--zh); }
.price { margin: 4px 0 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; font: 800 clamp(40px, 4.4vw, 60px)/1 var(--font); letter-spacing: -.03em; }
.price.quote { font: 900 clamp(30px, 3vw, 40px)/1.1 var(--zh); letter-spacing: 0; }
.price small { font: 400 15px/1.4 var(--zh); letter-spacing: 0; color: var(--mute); }
/* 限時優惠（campaigns.js 產生的內容） */
.price { flex-direction: row; }
.price .pricing-promo-label { flex-basis: 100%; font: 700 13px/1 var(--zh); letter-spacing: .08em; color: var(--ink); background: var(--lime); border-radius: 999px; padding: 6px 10px; justify-self: start; width: max-content; }
.price del { flex-basis: 100%; font: 500 18px/1 var(--font); color: var(--mute); }
.price .pricing-promo-note { flex-basis: 100%; margin: 6px 0 0; font: 400 13px/1.6 var(--zh); letter-spacing: 0; color: var(--mute); }
.price .pricing-promo-note span { display: block; }
.plan ul { margin: 0; padding: 18px 0 0; border-top: 1px solid var(--line); list-style: none; display: grid; gap: 10px; font-size: 15px; line-height: 1.6; }
.plan li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; }
.plan li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 1px var(--ink); margin-top: 8px; }
.plan .note { margin: 0; font-size: 13px; color: var(--mute); text-align: left; }
.plan .btn { align-self: flex-start; margin-top: auto; }
/* 方案按鈕開官方 LINE：前面加 LINE 圖示 */
.plan .btn.line-ask .line-ico { width: 18px; height: 18px; flex: none; margin-right: -2px; }
.plan.is-on { color: var(--paper); }
.plan.is-on .idx, .plan.is-on .price small, .plan.is-on .note, .plan.is-on .price del, .plan.is-on .pricing-promo-note { color: #bdbdbd; }
.plan.is-on ul { border-top-color: #ffffff30; }
.plan.is-on li::before { box-shadow: none; }
.plan.is-on .btn { background: var(--lime); color: var(--ink); border-color: var(--lime); box-shadow: none; }
.grid.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid.n3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.plan .demos { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.plan .demos p { margin: 0; width: 100%; font: 500 13px/1 var(--zh); color: var(--mute); }
@media (max-width: 760px) { .grid, .grid.n3 { grid-template-columns: 1fr; } }
.foot-note { margin-top: clamp(48px, 6vw, 80px); padding-top: 24px; border-top: 2px solid var(--ink); display: grid; gap: 12px; justify-items: start; }
.foot-note p { margin: 0; font-size: 14px; color: var(--mute); max-width: 48em; }

/* ===== 作品總覽（原型 examples.html） ===== */


  /* ===== 類型篩選 ===== */
  .filters { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 24px; border-bottom: 2px solid var(--ink); }
  .filters button { font: 500 15px/1 var(--zh); padding: 11px 18px; border-radius: 999px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; transition: background .25s, color .25s; }
  .filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
  .filters button:hover { background: var(--lime); color: var(--ink); }

  /* ===== 作品卡：第一件滿版，其餘兩件並排 ===== */
  .works { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 4vw, 56px) 24px; margin-top: 40px; }
  .work { display: grid; gap: 18px; text-decoration: none; transition: opacity .4s, transform .5s cubic-bezier(.2,.7,.2,1); }
  .work.first { grid-column: 1 / -1; }
  /* 件數是奇數時，最後一件改滿版，不會留一個空格 */
  .work.last-full { grid-column: 1 / -1; }
  .work[hidden] { display: none; }
  .work.fade { opacity: 0; transform: translateY(24px); }

  .work .cover { position: relative; overflow: hidden; border-radius: 24px; aspect-ratio: 16 / 10; background: #1a1a1a; }  /* 只套作品卡，不要影響 FAQ 頁的 .cover 大字 */
  .work.first .cover { aspect-ratio: 21 / 9; }
  .work .cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.02);
               transition: transform .8s cubic-bezier(.2,.7,.2,1); }
  .work:hover .cover img { transform: scale(1.06); }
  .work .cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 30%, rgba(0,0,0,.55)); pointer-events: none; }

  /* 封面上的疊字（沿用網站原本的封面文字） */
  .overlay { position: absolute; z-index: 2; left: clamp(20px, 3vw, 44px); right: clamp(20px, 3vw, 44px); bottom: clamp(20px, 3vw, 40px); color: #fff; pointer-events: none; }
  .overlay .big { display: block; font: 900 clamp(26px, 3.4vw, 56px)/1.15 var(--zh); letter-spacing: -.01em; }
  .overlay .brand-word { display: block; font: 800 clamp(40px, 7vw, 120px)/.9 var(--font); letter-spacing: -.04em; }
  .overlay .en { display: block; margin-top: 12px; font: italic 700 clamp(15px, 1.4vw, 22px)/1.2 var(--font); letter-spacing: -.01em; opacity: .9; }
  .overlay .en.caps { font: 500 12px/1.4 var(--font); font-style: normal; letter-spacing: .14em; }

  .info { display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; align-items: end; }
  .info .idx { grid-column: 1 / -1; font: 500 13px/1 var(--zh); color: var(--mute); }
  .info h2 { margin: 0; font: 900 clamp(24px, 2.6vw, 38px)/1.25 var(--zh); }
  .info .ext { font: 500 26px/1 var(--font); transition: transform .3s; }
  .work:hover .info .ext { transform: translate(4px, -4px); }
  .info .for { grid-column: 1 / -1; margin: 0; color: #3a3a3a; font-size: 15px; }

  .list-end { margin-top: clamp(56px, 7vw, 96px); padding-top: 28px; border-top: 2px solid var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
  .list-end p { margin: 0; font: 900 clamp(22px, 2.4vw, 32px)/1.35 var(--zh); }

  @media (max-width: 760px) {
    .works { grid-template-columns: minmax(0, 1fr); }
    .work.first .cover, .work .cover { aspect-ratio: 4 / 3; }
    .filters button { padding: 10px 14px; font-size: 14px; }
  }
  @media (prefers-reduced-motion: reduce) { .work, .work .cover img { transition: none; } }

/* ===== 作品內頁（原型 case-copass.html） ===== */


  /* 作品內頁用較緊的段落間距 */
  .rd-case { --gap: clamp(56px, 7vw, 96px); }

  /* ===== 一、第一個畫面：左邊重點資訊、右邊首頁展示 ===== */
  .case-hero { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 4vw, 64px); align-items: center;
               padding-top: clamp(96px, 10vw, 128px); min-height: min(100svh, 860px); padding-bottom: 32px; }
  .case-hero h1 { margin: 0; font: 900 clamp(44px, 6vw, 96px)/1 var(--font); letter-spacing: -.03em; }
  .case-hero .intro { margin: 14px 0 0; font-size: clamp(17px, 1.4vw, 20px); }
  .facts { margin: 28px 0 0; padding-top: 22px; border-top: 2px solid var(--ink); display: grid; gap: 16px; }
  .facts dt { font: 500 12px/1 var(--zh); letter-spacing: .12em; color: var(--mute); }
  .facts dd { margin: 6px 0 0; font: 700 17px/1.6 var(--zh); }
  .showcase { margin: 0; }
  .browser { border-radius: 20px; overflow: hidden; background: var(--ink); box-shadow: 0 30px 70px -30px rgba(0,0,0,.45); }
  .browser .bar { display: flex; gap: 7px; padding: 11px 14px; }
  .browser .bar i { width: 9px; height: 9px; border-radius: 50%; background: #3a3a3a; }
  .browser .bar i:first-child { background: var(--lime); }
  .browser .screen { position: relative; aspect-ratio: 16 / 10; background: #111; }
  .browser iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
  .browser .screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
  .browser .screen:has(> img) { aspect-ratio: 16 / 10; }  /* 截圖比例 16:10，整張放進去不裁切 */
  .showcase figcaption { margin-top: 10px; font-size: 13px; color: var(--mute); }

  /* ===== 二、章節索引（電腦版左側固定） ===== */
  .case-body { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: clamp(32px, 4vw, 64px); margin-top: var(--gap); }
  .case-index { position: sticky; top: 110px; align-self: start; z-index: 10; }   /* 疊在灰色滿版區塊上面，不會被蓋住 */
  .case-index ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
  .case-index a { display: block; padding: 9px 0 9px 16px; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none;
                  font: 500 12px/1.3 var(--font); letter-spacing: .1em; color: var(--mute); transition: color .2s, border-color .2s, padding .2s; }
  .case-index a:hover { color: var(--ink); }
  .case-index a.here { color: var(--ink); border-left-color: var(--ink); padding-left: 20px; }
  .case-index a.here::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 1px var(--ink); margin-right: 8px; vertical-align: 1px; }

  /* ===== 三、段落收緊：PROJECT 與 DESIGN 並排 ===== */
  .rd-case .chapter { scroll-margin-top: 100px; }
  .rd-case .chapter + .chapter, .rd-case section.band { margin-top: var(--gap); }
  .rd-case .label { display: inline-block; font: 500 12px/1 var(--font); letter-spacing: .14em; padding: 7px 12px; border-radius: 999px; background: var(--lime); }
  .rd-case .chapter h2, .rd-case .band h2 { margin: 14px 0 0; font: 900 clamp(26px, 2.8vw, 42px)/1.25 var(--zh); letter-spacing: -.01em; }
  .pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 56px); padding-top: 24px; border-top: 2px solid var(--ink); }
  .pair p { margin: 16px 0 0; }
  .pair > .chapter { margin-top: 0; }                    /* 並排的兩欄上緣對齊 */
  .pair .lead { font: 500 clamp(18px, 1.5vw, 21px)/1.75 var(--zh); }
  .rd-case section.band { padding-top: var(--gap); padding-bottom: var(--gap); }
  .rd-case .band > p { margin: 10px 0 0; }
  .devices { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr); gap: clamp(16px, 2.4vw, 36px); align-items: end; margin-top: 28px; max-width: 980px; }
  .device { margin: 0; }
  .device .frame { background: var(--ink); padding: 10px; border-radius: 22px; }
  .device.phone .frame { border-radius: 30px; padding: 8px; max-width: 230px; margin-left: auto; }
  .device img { width: 100%; border-radius: 14px; }
  .device.phone img { border-radius: 24px; }
  .device figcaption { margin-top: 10px; font-size: 13px; }
  .device.phone figcaption { text-align: right; }

  .steps3 { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .steps3 li { border: 1px solid var(--ink); border-radius: 18px; padding: clamp(18px, 2vw, 28px); display: grid; gap: 8px; transition: color .25s; }
  .steps3 .n { font: 800 44px/1 var(--font); letter-spacing: -.04em; -webkit-text-stroke: 1.5px var(--ink); color: transparent; transition: -webkit-text-stroke-color .25s; }
  .steps3 h3 { margin: 0; font: 900 20px/1.3 var(--zh); }
  .steps3 p { margin: 0; font-size: 15px; }
  .steps3 li.is-on { color: var(--paper); }
  .steps3 li.is-on .n { -webkit-text-stroke-color: var(--lime); }

  .tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 20px 0 0; padding: 0; }
  .tags li { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--ink); font: 500 15px/1 var(--zh); }
  .scope-row { display: flex; justify-content: space-between; align-items: end; gap: 16px 32px; flex-wrap: wrap; }
  .scope-note { margin: 16px 0 0; font-size: 14px; color: var(--mute); }

  .case-nav { margin-top: var(--gap); display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .case-nav a.big { display: grid; gap: 8px; padding: clamp(20px, 2.4vw, 32px); border-radius: 20px; border: 1px solid var(--ink); text-decoration: none; transition: color .25s; }
  .case-nav a.big small { font: 500 13px/1 var(--zh); color: var(--mute); }
  .case-nav a.big b { font: 900 clamp(20px, 2vw, 28px)/1.3 var(--zh); }
  .case-nav a.big.is-on { color: var(--paper); }
  .case-nav a.big.is-on small { color: #bdbdbd; }
  .rd-case .case-actions { margin-top: 20px; display: flex; gap: 12px; flex-wrap: wrap; }

  @media (max-width: 1100px) {
    .case-body { grid-template-columns: minmax(0, 1fr); }
    .case-index { display: none; }
  }
  /* 平板：兩項資訊並排、展示框改矮，第一個畫面放得下 */
  @media (min-width: 601px) and (max-width: 860px) {
    .facts { grid-template-columns: 1fr 1fr; gap: 20px; }
    .case-hero .browser .screen { aspect-ratio: 16 / 10 !important; }
  }
  /* 手機：響應式區只留手機畫面；體驗步驟改左右滑 */
  @media (max-width: 600px) {
    .device:not(.phone) { display: none; }
    .device.phone .frame { max-width: 170px; }
    .steps3 { display: flex !important; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter); scrollbar-width: none; }
    .steps3::-webkit-scrollbar { display: none; }
    .steps3 li { flex: 0 0 72%; scroll-snap-align: start; }
    .steps3 .n { font-size: 36px; }
  }
  @media (max-width: 860px) {
    .case-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 92px; gap: 24px; }
    .browser .screen { aspect-ratio: 4 / 3; }
    .pair, .devices, .case-nav { grid-template-columns: minmax(0, 1fr); }
    .steps3 { grid-template-columns: minmax(0, 1fr); }
    .device.phone .frame { margin: 0 auto; max-width: 200px; }
    .device.phone figcaption { text-align: center; }
  }
/* alvisdigital 官網封面是首頁截圖：保留畫面中段（大字 alvisdigital），不加暗化漸層 */
.work[href$="case=digital"] .cover img { object-position: center 42%; }
.work[href$="case=digital"] .cover::after { background: none; }

/* ===== 知識與觀察（原型 insights.html） ===== */



  /* 最新一篇大張，其餘三欄 */
  .posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3vw, 44px) 20px; margin-top: 36px; }
  .post { display: grid; gap: 12px; align-content: start; text-decoration: none; }
  .post[hidden] { display: none; }
  .post .img { position: relative; overflow: hidden; border-radius: 18px; aspect-ratio: 16 / 10; background: var(--soft); }
  .post img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
  .post:hover img { transform: scale(1.05); }
  .post .cat { justify-self: start; padding: 5px 12px; border-radius: 999px; background: var(--lime); font: 500 12px/1.3 var(--zh); }
  .post h2 { margin: 0; font: 900 clamp(18px, 1.5vw, 21px)/1.45 var(--zh); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 5px; text-decoration-thickness: 2px; transition: text-decoration-color .25s; }
  .post:hover h2 { text-decoration-color: var(--ink); }
  .post.lead { grid-column: 1 / -1; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px clamp(24px, 3vw, 48px); align-items: center; }
  .post.lead .img { grid-row: 1 / 3; }
  .post.lead h2 { font-size: clamp(26px, 2.8vw, 42px); line-height: 1.3; align-self: start; }
  .post.lead .cat { align-self: end; }
  @media (max-width: 1000px) { .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 700px) {
    .posts { grid-template-columns: minmax(0, 1fr); }
    .post.lead { grid-template-columns: minmax(0, 1fr); }
    .post.lead .img { grid-row: auto; }
    .post.lead h2 { font-size: 24px; }
  }

/* ===== 文章頁（原型 article.html） ===== */


  /* ===== 閱讀進度 ===== */
  .progress { position: fixed; left: 0; top: 0; height: 4px; width: 100%; z-index: 820; background: var(--lime); transform-origin: left; transform: scaleX(var(--read, 0)); }

  /* ===== 文章標題區 ===== */
  .art-head { padding: clamp(110px, 14vw, 170px) 0 clamp(32px, 4vw, 48px); max-width: 1176px; margin-inline: auto; }
  .art-head h1 { max-width: 980px; }
  .art-head .cat { display: inline-block; margin: 0 0 18px; padding: 6px 14px; border-radius: 999px; background: var(--lime); font: 500 13px/1.2 var(--zh); text-decoration: none; }
  .art-head h1 { margin: 0; font: 900 clamp(32px, 5vw, 68px)/1.2 var(--zh); letter-spacing: -.01em; }
  .art-head .meta { margin: 20px 0 0; font-size: 14px; color: var(--mute); }
  .art-head .meta a { color: var(--ink); }

  /* ===== 版面：電腦版左邊目錄固定、右邊內文 840px；標題區和內文整塊置中（最寬 1176px），左右留白一樣多 ===== */
  .art-layout { max-width: 1176px; margin-inline: auto; display: grid; grid-template-columns: 240px minmax(0, 840px); gap: clamp(40px, 6vw, 96px); align-items: start; border-top: 2px solid var(--ink); padding-top: 40px; }
  .story-index { position: sticky; top: 100px; font-size: 14px; }
  .story-index summary { font: 700 15px/1.4 var(--zh); list-style: none; cursor: pointer; padding-bottom: 12px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }
  .story-index summary::-webkit-details-marker { display: none; }
  .story-index summary::after { content: "＋"; }
  .story-index details[open] summary::after { content: "－"; }
  .story-index ol { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 4px; counter-reset: toc; }
  .story-index li { counter-increment: toc; }
  .story-index a { display: grid; grid-template-columns: 28px 1fr; gap: 6px; padding: 8px 8px 8px 0; text-decoration: none; line-height: 1.5; color: var(--mute); border-radius: 8px; transition: color .2s, background .2s, padding .2s; }
  .story-index a::before { content: counter(toc, decimal-leading-zero); font: 500 12px/1.9 var(--font); }
  .story-index a:hover { color: var(--ink); }
  .story-index a.here { color: var(--ink); background: var(--lime); padding-left: 8px; }

  /* ===== 內文排版 ===== */
  .body { font-size: 17px; line-height: 1.95; }
  .body .editorial-lead { margin: 0 0 36px; font: 500 clamp(20px, 1.8vw, 24px)/1.75 var(--zh); }
  .body figure { margin: 36px 0; }
  .body figure img { width: 100%; border-radius: 16px; }
  .body figcaption, .body .caption { margin-top: 10px; font-size: 13px; line-height: 1.6; color: var(--mute); }
  .article-table { background: var(--soft); border-radius: 20px; padding: clamp(18px, 2.4vw, 28px); }
  .article-table > figcaption { margin: 0 0 14px; font: 700 16px/1.5 var(--zh); color: var(--ink); }
  .table-scroll { overflow-x: auto; }
  .table-scroll:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 8px; }
  .rd-art table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; line-height: 1.6; }
  .rd-art th, .rd-art td { text-align: left; padding: 12px 14px; border-bottom: 1px solid #dcdcd6; vertical-align: top; }
  .rd-art thead th { font-weight: 700; border-bottom: 2px solid var(--ink); }
  .rd-art tbody th { font-weight: 700; white-space: nowrap; }
  .story-section { scroll-margin-top: 100px; }
  .story-section h2 { margin: 56px 0 16px; padding-top: 20px; border-top: 2px solid var(--ink); font: 900 clamp(24px, 2.2vw, 30px)/1.4 var(--zh); scroll-margin-top: 100px; }
  .story-section p { margin: 0 0 1.2em; }
  .story-section ul { padding-left: 1.2em; }
  .story-section a { text-decoration-color: var(--lime); text-decoration-thickness: 3px; text-underline-offset: 3px; }

  /* ===== 相關文章 ===== */
  .related { margin-top: 72px; padding: clamp(24px, 3vw, 40px); border-radius: 24px; background: var(--ink); color: var(--paper); }
  .related h2 { margin: 0 0 16px; font: 900 24px/1.3 var(--zh); }
  .related ul { list-style: none; margin: 0 0 24px; padding: 0; }
  .related li a { display: grid; grid-template-columns: 1fr 28px; gap: 12px; align-items: center; padding: 16px 12px; border-bottom: 1px solid #ffffff26;
                  text-decoration: none; font: 700 17px/1.5 var(--zh); border-radius: 0; }
  .related li a.is-on { color: var(--ink); }
  .related .btn { background: var(--lime); color: var(--ink); border-color: var(--lime); box-shadow: none; }
  .related .btn:hover { background: var(--paper); border-color: var(--paper); }

  /* 內文欄一定不能被表格撐寬（表格只在自己的框裡左右滑） */
  .body, .art-layout > * { min-width: 0; }
  .article-table { max-width: 100%; }
  /* 手機：表格改成「一列一張卡」，完整放進螢幕，不用左右滑 */
  @media (max-width: 600px) {
    .article-table table, .article-table tbody, .article-table tr, .article-table th, .article-table td { display: block; min-width: 0; width: auto; }
    .article-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .article-table tr { background: var(--paper); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
    .article-table tbody th { white-space: normal; padding: 0 0 8px; border-bottom: 1px solid var(--line); font-size: 16px; }
    .article-table td { padding: 8px 0 0; border: 0; }
    .article-table td::before { content: attr(data-label) "："; display: block; font-size: 12px; color: var(--mute); }
    /* 只有排成卡片的表格不用滑；其他表格（舊版文章的 .table-scroll）維持在框內左右滑，不能被切掉 */
    .article-table .table-scroll { overflow: visible; }
    /* 編輯外掛的 .ds-reviewed-guide table 有 min-width:560px，會把卡片撐寬；卡片模式一律跟著螢幕寬 */
    .rd-art .article-table table { min-width: 0; }
  }
  @media (max-width: 900px) {
    .art-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .story-index { position: static; background: var(--soft); border-radius: 16px; padding: 16px 18px; }
    /* 平板直放：目錄預設展開，項目排兩欄，不會把內文推得太下面 */
    .story-index details[open] ol { display: block; columns: 2; column-gap: 24px; }
    .story-index details[open] li { break-inside: avoid; margin-bottom: 4px; }
  }
  @media (max-width: 600px) {
    .story-index details[open] ol { display: grid; columns: auto; }
  }

  /* ===== 手機浮動目錄：捲過文章目錄後，右下角出現「目錄」按鈕，點開從下方滑出 ===== */
  .toc-fab { display: none; }
  @media (max-width: 600px) {
    .toc-fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 810; display: inline-flex; align-items: center; gap: 8px;
               padding: 12px 18px; border: 0; border-radius: 999px; background: var(--ink); color: var(--paper); font: 700 15px/1 var(--zh); cursor: pointer;
               box-shadow: 0 6px 18px rgba(0, 0, 0, .18); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s, transform .2s; }
    .toc-fab::before { content: ""; width: 14px; height: 10px; background: linear-gradient(currentColor 0 0) top / 100% 2px no-repeat, linear-gradient(currentColor 0 0) center / 100% 2px no-repeat, linear-gradient(currentColor 0 0) bottom / 100% 2px no-repeat; }
    .toc-fab.show { opacity: 1; transform: none; pointer-events: auto; }
    .toc-fab:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
    html.toc-open .toc-fab { opacity: 0; pointer-events: none; }
  }
  .toc-sheet { position: fixed; inset: 0; z-index: 840; display: flex; align-items: flex-end; background: rgba(0, 0, 0, .4); }
  .toc-sheet[hidden] { display: none; }
  .toc-sheet-panel { width: 100%; max-height: 75svh; overflow: auto; overscroll-behavior: contain; background: var(--paper); color: var(--ink); border-radius: 20px 20px 0 0;
                     padding: 18px 20px calc(20px + env(safe-area-inset-bottom)); animation: toc-up .22s ease-out; }
  .toc-sheet-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); font: 700 16px/1.4 var(--zh); }
  .toc-close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--soft); color: var(--ink); font: 400 24px/1 var(--font); cursor: pointer; }
  .toc-sheet ol { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 2px; counter-reset: toc; }
  .toc-sheet li { counter-increment: toc; }
  .toc-sheet a { display: grid; grid-template-columns: 28px 1fr; gap: 6px; padding: 10px 8px; border-radius: 8px; text-decoration: none; color: var(--ink); font: 500 15px/1.5 var(--zh); }
  .toc-sheet a::before { content: counter(toc, decimal-leading-zero); font: 500 12px/2 var(--font); color: var(--mute); }
  .toc-sheet a.here { background: var(--lime); }
  .toc-sheet a:focus-visible, .toc-close:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
  @keyframes toc-up { from { transform: translateY(24px); opacity: .6; } }
  @media (prefers-reduced-motion: reduce) { .toc-fab, .toc-sheet-panel { transition: none; animation: none; } }
  html.toc-open, html.toc-open body { overflow: hidden; }

/* 文章頁：內文來自編輯外掛的舊版樣式（深色版型等），在新版面裡一律回到白底黑字 */
.rd-art .alvis-edition, .rd-art .alvis-edition * { background-color: transparent; }
.rd-art .alvis-edition, .rd-art .article-body, .rd-art .decision-opening, .rd-art .story-section { color: var(--ink); max-width: none; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
.rd-art .body img { max-width: 100%; height: auto; border-radius: 16px; }
.rd-art .body figure { margin: 36px 0; }
.rd-art .body .hero a { display: block; }
.rd-art .body .article-table { background: var(--soft); }
.rd-art .body h3 { font: 900 clamp(19px, 1.7vw, 22px)/1.5 var(--zh); margin: 32px 0 10px; }
.rd-art .art-cover img { width: 100%; border-radius: 16px; }
.art-layout.no-index { grid-template-columns: minmax(0, 840px); }
/* 手機文章：字小一點、兩側多留白、靠左不左右拉齊，讀起來不會太滿 */
@media (max-width: 600px) {
  .rd-art .art-layout .body { font-size: 16px; line-height: 1.85; padding-inline: 8px; }
  .rd-art .article-reading p { text-align: start; }
  .rd-art .art-layout .body :is(p, li):not(.meta, .caption, .editorial-lead) { font-size: 16px; line-height: 1.85; }
  .rd-art .body .editorial-lead { font-size: 18px; line-height: 1.75; margin-bottom: 28px; }
  .rd-art .story-section h2 { font-size: 22px; margin-top: 44px; }
  .rd-art .story-section p { margin-bottom: 1.1em; }
}
.related li a > :not(.dir-fill) { position: relative; z-index: 1; }
.insight-pagination { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 40px; }
.insight-pagination button { font: 500 14px/1 var(--font); padding: 10px 14px; border-radius: 999px; border: 1px solid var(--ink); background: var(--paper); cursor: pointer; }
.insight-pagination button[aria-current="page"] { background: var(--ink); color: var(--paper); }
.insight-pagination button:disabled { opacity: .35; cursor: default; }
.rd-page[data-content-page="insights"] .page-head { padding-bottom: 32px; }

/* 沒有封面圖的文章：不留空白圖框 */
.post .img:empty { display: none; }
.post.lead:has(.img:empty) { grid-template-columns: minmax(0, 1fr); }

/* ===== 表單頁：一個畫面放完（標題在左、表單在右，欄位緊湊） ===== */
.immersive.one-screen { min-height: 100svh; display: flex; align-items: center; padding: 88px var(--gutter) 28px; }
.one-screen .form-page, .one-screen .form-page:has(.form-side), .one-screen .form-page:not(:has(.form-side)) { width: 100%; max-width: 1280px; grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.one-screen .form-intro { display: grid; gap: 22px; align-content: center; color: var(--paper); }
.one-screen .form-intro .page-head { padding: 0; }
.one-screen .form-intro .back { margin-bottom: 14px; color: #cfcfcf; }
.one-screen .form-intro h1 { font-size: clamp(40px, 5vw, 76px); color: var(--paper); }
.one-screen .form-intro .intro { margin-top: 12px; color: #d6d6d6; }
.one-screen .form-side { position: static; }
.one-screen .form-panel { padding: clamp(20px, 2.2vw, 30px); border-radius: 22px; }
body.rd-page #main .one-screen .form-panel .avf-form fieldset { gap: 12px 16px; }
body.rd-page #main .one-screen .form-panel .avf-form .ff-el-group { gap: 5px; }
body.rd-page #main .one-screen .form-panel .avf-form label,
body.rd-page #main .one-screen .form-panel .avf-form .ff-el-input--label label { font-size: 13.5px; }
body.rd-page #main .one-screen .form-panel .avf-form .ff-el-form-control { min-height: 42px; height: 42px; padding: 8px 12px; font-size: 15px; border-radius: 10px; }
body.rd-page #main .one-screen .form-panel .avf-form textarea.ff-el-form-control { height: 84px; min-height: 84px; }
body.rd-page #main .one-screen .form-panel .avf-form .avf-plan-help { font-size: 12px; }
body.rd-page #main .one-screen .form-panel .avf-form .ff-el-form-check-label { font-size: 13.5px; line-height: 1.5; }
body.rd-page #main .one-screen .form-panel .avf-form .ff-btn-submit { padding: 12px 22px !important; font-size: 15px !important; }
body.rd-page #main .one-screen .form-panel .avf-policy { margin-top: 10px; font-size: 13px; }
/* 聯絡我們：稱呼不必整行；方便聯絡時間與方案並排 */
body.rd-page[data-content-page="contact"] #main .one-screen .form-panel .avf-form .ff-el-group:has([name=name]),
body.rd-page #main .one-screen .form-panel .avf-form .ff-el-group:has([name=contact_time]) { grid-column: auto; }
@media (max-width: 860px) {
  .immersive.one-screen { min-height: 0; display: block; padding: 88px 12px 40px; }
  .one-screen .form-page, .one-screen .form-page:has(.form-side), .one-screen .form-page:not(:has(.form-side)) { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .one-screen .form-intro { gap: 14px; }
  .one-screen .form-intro h1 { font-size: 40px; }
  .one-screen .form-side .note { padding: 14px 16px; gap: 10px; }
  .one-screen .form-side .note p { font-size: 16px; }
  .one-screen .admark-svg { bottom: -200px; }
}
@media (max-height: 820px) and (min-width: 861px) {
  body.rd-page #main .one-screen .form-panel .avf-form textarea.ff-el-form-control { height: 64px; min-height: 64px; }
  .immersive.one-screen { padding-top: 80px; }
}
/* 聯絡我們排列：稱呼｜信箱、電話｜品牌、網址｜聯絡時間、服務｜方案，需求說明與同意整行，送出與隱私連結同一行 */
body.rd-page #main .one-screen .avf-form .ff-el-group:has([name=name]) { order: 1; }
body.rd-page #main .one-screen .avf-form .ff-el-group:has([name=email]) { order: 2; }
body.rd-page #main .one-screen .avf-form .ff-el-group:has([name=phone]) { order: 3; }
body.rd-page #main .one-screen .avf-form .ff-el-group:has([name=brand]) { order: 4; }
body.rd-page #main .one-screen .avf-form .ff-el-group:has([name=url]) { order: 5; }
body.rd-page #main .one-screen .avf-form .ff-el-group:has([name=contact_time]) { order: 6; }
body.rd-page #main .one-screen .avf-form .ff-el-group:has([name=requested_service]) { order: 7; }
body.rd-page #main .one-screen .avf-form .ff-el-group:has(.avf-plan-help) { order: 8; position: relative; }
body.rd-page #main .one-screen .avf-form .ff-el-group:has(textarea) { order: 9; }
body.rd-page #main .one-screen .avf-form .ff-el-group:has(input[type=checkbox]) { order: 10; }
body.rd-page #main .one-screen .avf-form .ff_submit_btn_wrapper { order: 11; }
body.rd-page #main .one-screen .avf-form .avf-plan-help { position: absolute; left: 0; right: 0; top: 100%; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.rd-page[data-content-page="apply"] #main .one-screen .form-panel .avf-form .ff-el-group:has([name=url]) { grid-column: auto; }
.one-screen .form-panel { position: relative; }
body.rd-page #main .one-screen .form-panel .avf-policy { position: absolute; right: clamp(20px, 2.2vw, 30px); bottom: clamp(20px, 2.2vw, 30px); margin: 0; line-height: 44px; }
.immersive.one-screen { padding-top: 78px; padding-bottom: 18px; }
@media (max-width: 860px) { body.rd-page #main .one-screen .form-panel .avf-policy { position: static; line-height: 1.6; margin-top: 10px; } body.rd-page #main .one-screen .avf-form .avf-plan-help { position: static; white-space: normal; } }
/* 表單頁頂部是深色：左上 ad 標誌與 ☰ 改白色（捲動後出現白底時恢復黑色） */
.rd-page:is([data-content-page="apply"],[data-content-page="contact"]) .topbar:not(.solid) { color: var(--paper); }

/* ===== 一般頁面與 404 ===== */
.rd-simple .simple-body { margin-top: 0; padding-top: 32px; border-top: 2px solid var(--ink); }
.rd-simple .simple-body p { margin: 0 0 1.2em; }
.rd-simple .simple-body .btn { margin: 0 8px 8px 0; }
.rd-simple .simple-body blockquote { margin: 0 0 1.2em; padding-left: 18px; border-left: 3px solid var(--lime); }

/* ===== 網站體檢報告示範（/report） ===== */
.rd-report .page-head .eyebrow { margin: 0 0 14px; color: var(--mute); }
.rd-report .page-head .rp-note { margin: 10px 0 24px; font-size: 14px; color: var(--mute); }
.rp-band { margin-top: 0; }
.rp-paper { max-width: 860px; margin: 0 auto; background: var(--paper); border-radius: 24px; padding: clamp(24px, 4vw, 56px); box-shadow: 0 30px 70px -40px rgba(0,0,0,.35); }
.rp-top { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 2px solid var(--ink); font: 700 14px/1.4 var(--zh); }
.rp-top small { font-weight: 500; color: var(--mute); }
.rp-paper h2 { margin: 28px 0 8px; font: 900 clamp(28px, 3.4vw, 46px)/1.25 var(--zh); }
.rp-scope { margin: 0 0 24px; font-size: 14px; color: var(--mute); }
.rp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rp-item { display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: start; padding: 20px; border: 1px solid var(--ink); border-radius: 18px; transition: color .25s; }
.rp-n { font: 800 44px/1 var(--font); letter-spacing: -.04em; -webkit-text-stroke: 1.5px var(--ink); color: transparent; transition: -webkit-text-stroke-color .25s; }
.rp-item small { font: 500 12px/1 var(--zh); letter-spacing: .12em; color: var(--mute); }
.rp-item h3 { margin: 8px 0 6px; font: 900 clamp(19px, 1.8vw, 24px)/1.35 var(--zh); }
.rp-item p { margin: 0; }
.rp-item.is-on { color: var(--paper); }
.rp-item.is-on .rp-n { -webkit-text-stroke-color: var(--lime); }
.rp-item.is-on small { color: #bdbdbd; }
.rp-foot { margin: 20px 0 0; font-size: 13px; color: var(--mute); }
.rp-end .sec-head p + p { margin-top: 10px; }
.rp-end .actions { margin-top: 32px; }
@media (max-width: 600px) { .rp-item { grid-template-columns: 1fr; gap: 6px; padding: 16px; } .rp-n { font-size: 34px; } }
/* 服務頁補充段落（適合誰／進行方式／交付內容／常見問題）：左標題、右內容；內容來自後台頁面 */
.svc-more { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px clamp(32px, 5vw, 80px); padding-top: clamp(24px, 3vw, 36px); border-top: 2px solid var(--ink); }
.svc-more + .svc-more { margin-top: clamp(56px, 7vw, 96px); }
.svc-more .svc-h .eyebrow { margin: 0; }
.svc-more .svc-h h2 { margin: 8px 0 0; font: 900 clamp(26px, 3vw, 40px)/1.25 var(--zh); letter-spacing: -.01em; }
.svc-more .svc-b { font-size: 17px; line-height: 1.85; }
.svc-more .svc-b ul, .svc-more .svc-b ol { margin: 0; padding-left: 1.3em; display: grid; gap: 12px; }
.svc-more .svc-b p { margin: 16px 0 0; color: var(--mute); font-size: 15px; }
.svc-more .qa { grid-column: 1 / -1; margin-top: 8px; }
.svc-more .qa a { text-decoration-color: var(--lime); text-decoration-thickness: 3px; text-underline-offset: 3px; }
@media (max-width: 760px) { .svc-more { grid-template-columns: minmax(0, 1fr); } .svc-more .svc-b { font-size: 16px; } }
/* 文章裡自帶編號（01、02…）的橫排清單：不要再出現瀏覽器預設的 1. 2. 3. */
.rd-art .body ol[style*="display:flex"], .rd-art .body ol[style*="display: flex"], .rd-art .body ol[style*="display:grid"] { list-style: none; padding-left: 0; }
.foot-note .text-link + .text-link { margin-left: 0; }
/* 手機：文章底部「延伸閱讀」黑框裡的按鈕不要擠在一起——整排寬、上下拉開、長標題正常換行 */
@media (max-width: 600px) {
  .related { padding: 24px 18px; }
  .related li a { padding: 16px 8px; gap: 10px; font-size: 16px; }
  .related ul { margin-bottom: 20px; }
  .related .btn { display: flex; width: 100%; justify-content: space-between; gap: 12px; white-space: normal; line-height: 1.5; padding: 14px 18px; text-align: left; }
  .related .btn + .btn { margin-top: 12px; }
}
