/* ══════════════════════════════════════════════════════
   健檢頁（geo-health-check/index.html）專屬版面
   - 原頁內嵌 <style> 1455 行搬到這裡，卡片／徽章／玻璃／漸層／陰影改由 deck.css 元件取代
   - 只用九個 deck token；scripts/check-deck-palette.mjs 會掃這支檔
   - Google 登入按鈕原色只寫在 #heroGoogleSignInBtn／#checkoutGoogleBtn 選擇器下（守衛豁免）
   - #heroScanForm 與 #checkoutModal 的 markup 凍結（geo-health-check.js 綁 id 與 data-auth），
     下面標「行為」的規則是 JS 切換顯示狀態的一部分，刪掉會讓登入門檻或 modal 靜默失效
   ══════════════════════════════════════════════════════ */

/* 此頁 <html lang="zh-TW">（geo-health-check.js 讀 documentElement.lang 判斷語系，不改），
   variables.css 的中文字型覆寫只對 zh-Hant 生效，所以在這裡補同一組堆疊 */
html[lang="zh-TW"] {
  --font-heading: "Noto Sans TC", sans-serif;
  --font-body: "Noto Sans TC", sans-serif;
}

body {
  background: var(--paper);
  color: var(--ink);
}

main {
  padding-top: var(--navbar-height);
}

/* 從其他頁連到 #heroScanForm、或收尾 CTA 跳回輸入框時，不被固定表頭蓋住 */
#heroScanForm,
.slide {
  scroll-margin-top: calc(var(--navbar-height) + 16px);
}

/* 結論句只在空格與標點斷行，放不下才硬斷 */
.slide__a {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.slide__body > .lead {
  margin-top: 0;
  margin-bottom: 32px;
}

/* 同一頁第二個 exhibit 前的引言 */
.slide__body > .lead--section {
  max-width: 720px;
  margin-top: 56px;
}

.slide__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

.hint {
  margin-top: 12px;
  max-width: 560px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-2);
}

.hint strong {
  color: var(--ink);
  font-weight: 700;
}

/* ── exhibit 右側留標註欄（同首頁） ── */
.exhibit--annotated {
  padding-right: 316px;
}

.exhibit--annotated > .callout {
  --callout-right: 28px;
  --callout-bottom: auto;
  transform: translateY(-50%);
}

.callout--at-mid { --callout-top: 50%; }
.callout--at-low { --callout-top: 70%; }
.callout--at-key { --callout-top: 40%; }

/* ══════════════════════════════════
   01 首屏
   ══════════════════════════════════ */
.slide--cover {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto auto auto auto 1fr auto;
  grid-template-areas:
    "kicker kicker"
    "title  exhibit"
    "lead   exhibit"
    "scan   exhibit"
    ".      exhibit"
    "foot   foot";
  column-gap: var(--deck-gap);
  min-height: calc(100svh - var(--navbar-height) - 64px);
  padding-block: 56px 40px;
}

.cover__kicker { grid-area: kicker; }

.cover__title {
  grid-area: title;
  margin-top: 16px;
  max-width: 600px;
  font-size: clamp(2.25rem, 3.75vw, 3.375rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink);
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.cover__title .hl {
  white-space: nowrap;
}

.cover__lead {
  grid-area: lead;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.cover__scan { grid-area: scan; margin-top: 36px; }
.cover__exhibit { grid-area: exhibit; align-self: start; margin-top: 16px; }
.cover__foot { grid-area: foot; align-self: end; }

.cover__scan .hint { margin-top: 16px; }

/* 首屏 exhibit：免費預覽的樣子 */
.preview__total {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}

.preview__total-num {
  font-family: var(--font-latin);
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 800;
  font-stretch: 110%;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.preview__total-max,
.preview__total-label {
  font-family: var(--font-latin);
  font-size: 13px;
  color: var(--ink-2);
}

.preview__total-label {
  margin-left: auto;
}

.preview__rows {
  position: relative;
  margin-top: 8px;
}

.preview__row {
  display: grid;
  grid-template-columns: 7em minmax(0, 1fr) 4.5em;
  align-items: center;
  gap: 12px;
  height: 40px;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
  color: var(--ink);
}

/* 英文維度名（Professional Credibility）與日文「コンテンツの裏付け」比中文長，7em 會折成兩行、擠出 40px 列高 */
.preview__row:lang(en) {
  grid-template-columns: 12em minmax(0, 1fr) 4.5em;
}

.preview__row:lang(ja) {
  grid-template-columns: 9em minmax(0, 1fr) 4.5em;
}

.preview__row b {
  font-family: var(--font-latin);
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.preview__row--hl {
  background: var(--highlight);
  font-weight: 700;
}

.preview__row--hl .bar {
  background: var(--white);
}

.preview__locked {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 16px;
}

/* ══════════════════════════════════
   凍結的免費掃描表單（#heroScanForm）
   ══════════════════════════════════ */
.hero__scan-form {
  width: 100%;
  max-width: 600px;
}

.hero__scan-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
}

.hero__scan-row {
  display: flex;
  flex: 1 1 360px;
  align-items: stretch;
  min-width: 0;
}

.hero__scan-input-wrap {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 56px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-right: 0;
  border-radius: 0;
  background: var(--white);
}

.hero__scan-input-wrap:focus-within {
  outline: 2px solid var(--highlight-deep);
  outline-offset: 2px;
}

.hero__scan-icon {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--ink-2);
}

.hero__scan-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
}

.hero__scan-input::placeholder {
  color: var(--ink-2);
  opacity: 1;
}

/* 外框由 .hero__scan-input-wrap:focus-within 畫，輸入框本身不重複畫 */
.hero__scan-input:focus-visible {
  outline: none;
}

/* 表單裡的兩顆按鈕在凍結 markup 上是 .btn.btn--primary；deck.css 的 .btn 已覆寫底色與陰影，
   這裡補上 components.css .btn--primary 留下的 glow 與 hover 位移，並定尺寸 */
#heroScanForm .btn--primary {
  height: 56px;
  box-shadow:none;
  transform: none;
}

#heroScanForm .btn--primary:hover {
  box-shadow:none;
  transform: none;
}

#heroScanForm .hero__scan-btn {
  flex: none;
  min-width: 120px;
  border-radius: 0 2px 2px 0;
}

#heroScanForm .hero__scan-btn:disabled {
  border-color: var(--ink-2);
  background: var(--ink-2);
  color: var(--on-ink);
}

/* 未登入：按鈕停用，除了降低不透明度，再以前置鎖形記號表示「需先登入」（狀態用記號不用顏色） */
#heroScanForm[data-auth="unauthenticated"] .hero__scan-btn::before {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: none;
  margin-right: 0.4em;
  background-color: currentColor;
  -webkit-mask: var(--mk-lock) center / contain no-repeat;
  mask: var(--mk-lock) center / contain no-repeat;
}

/* 「了解更多」是次要動作：外框樣式 */
#heroScanForm .hero__more-btn {
  flex: none;
  min-width: 120px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
}

#heroScanForm .hero__more-btn:hover {
  background: var(--paper-2);
  color: var(--ink);
}

/* 錯誤：框不變色，墨藍文字加「✕」記號（狀態用記號不用顏色） */
.hero__scan-error {
  display: none; /* 行為：JS 以 style.display 切換 */
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
}

.hero__scan-error::before {
  content: "";
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-right: 0.4em;
  vertical-align: -0.1em;
  background-color: currentColor;
  -webkit-mask: var(--mk-cross) center / contain no-repeat;
  mask: var(--mk-cross) center / contain no-repeat;
}

/* 行為：登入狀態（geo-health-check.js 設 data-auth = pending／unauthenticated／authenticated） */
.hero__scan-form[data-auth="pending"] .hero__scan-row,
.hero__scan-form[data-auth="unauthenticated"] .hero__scan-row {
  opacity: 0.35;
  pointer-events: none;
  user-select: none;
}

.hero__scan-auth-notice {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--ink);
  background: var(--white);
}

.hero__scan-form[data-auth="unauthenticated"] .hero__scan-auth-notice {
  display: flex;
}

.hero__scan-auth-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
}

.hero__scan-user-info {
  display: none;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-2);
}

.hero__scan-form[data-auth="authenticated"] .hero__scan-user-info {
  display: flex;
}

.hero__scan-user-info strong {
  color: var(--ink);
  font-weight: 700;
}

/* JS 產生：<button class="hero__scan-signout" id="heroSignOut"> */
.hero__scan-signout {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 13px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  cursor: pointer;
}

.hero__scan-signout:focus-visible {
  outline: 2px solid var(--highlight-deep);
  outline-offset: 2px;
  border-radius: 2px;
}

/* JS 產生：數字動畫（[data-count]）的單位字；此頁目前沒有 [data-count]，保留以防重新使用 */
.stat-accent {
  color: var(--ink);
}

/* Google 登入按鈕：Google 品牌原色（守衛豁免選擇器），兩顆共用凍結 class .hero__scan-google-btn */
#heroGoogleSignInBtn,
#checkoutGoogleBtn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border: 1px solid #dadce0;
  border-radius: 100px;
  background: #fff;
  color: #3c4043;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: box-shadow 0.15s;
}

#heroGoogleSignInBtn:hover,
#checkoutGoogleBtn:hover {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

#heroGoogleSignInBtn svg,
#checkoutGoogleBtn svg {
  flex: none;
  width: 18px;
  height: 18px;
}

/* ── 掃描進度（凍結 markup，在表單之外） ── */
.hero__scan-progress {
  display: none; /* 行為：JS 設 data-visible="true" 才顯示 */
  max-width: 600px;
  margin-top: 16px;
  padding: 16px 20px;
  border: 1px solid var(--ink);
  background: var(--white);
}

.hero__scan-progress[data-visible="true"] {
  display: block;
}

.hero__scan-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 10px;
}

.hero__scan-progress-step {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.hero__scan-progress-pct {
  flex: none;
  font-family: var(--font-latin);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

/* 1px 軌、--ink 填色；寬度由 JS 寫 style.width */
.hero__scan-progress-bar {
  height: 6px;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: var(--white);
}

.hero__scan-progress-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--ink);
  transition: width 0.4s ease-out;
}

.hero__scan-progress-hint {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--ink-2);
}

/* ══════════════════════════════════
   02 你會拿到什麼
   ══════════════════════════════════ */
.deck-table .num {
  font-family: var(--font-latin);
  text-align: right;
}

.deck-table tbody th {
  padding: 12px 8px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ink);
  vertical-align: top;
}

.deck-table td .mark {
  font-size: 14px;
}

.plan-compare th[scope="col"]:not(:first-child),
.plan-compare td {
  width: 32%;
}

/* 五個維度：保留 report-dimensions 契約測試鎖住的 .dim-card__subs 結構，只換樣式 */
.dims-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 16px;
  border: 1px solid var(--ink);
}

.dim-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.dim-card + .dim-card {
  border-left: 1px solid var(--ink);
}

.dim-card__head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}

.dim-card__max {
  display: block;
  font-family: var(--font-latin);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-2);
}

.dim-card__max strong {
  font-size: 28px;
  font-weight: 800;
  font-stretch: 110%;
  color: var(--ink);
  letter-spacing: 0;
}

.dim-card__title {
  margin-top: 4px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.4;
  color: var(--ink);
}

.dim-card__desc {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
}

.dim-card__subs {
  margin-top: auto;
  padding-top: 16px;
}

.dim-card__sub {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
}

.dim-card__sub-pts {
  flex: none;
  font-family: var(--font-latin);
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}

/* ══════════════════════════════════
   03 報告長什麼樣
   ══════════════════════════════════ */
.shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 16px;
}

.shot {
  margin: 0;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  background: var(--white);
}

.shot figcaption {
  margin-top: 8px;
  font-family: var(--font-latin);
  font-size: 12px;
  font-stretch: 85%;
  line-height: 1.5;
  color: var(--ink-2);
}

.report-toc__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
  border-top: 1px solid var(--ink);
}

.report-toc__card {
  padding: 16px 20px 20px 0;
  border-bottom: 1px solid var(--rule);
}

.report-toc__card:not(:nth-child(3n + 1)) {
  padding-left: 20px;
  border-left: 1px solid var(--rule);
}

.report-toc__card--key {
  background: var(--highlight);
}

.report-toc__card--key:nth-child(3n + 1) {
  padding-left: 12px;
}

.report-toc__no {
  display: block;
  font-family: var(--font-latin);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink-2);
}

.report-toc__card--key .report-toc__no {
  color: var(--ink);
}

.report-toc__card-title {
  margin-top: 6px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.4;
  color: var(--ink);
}

.report-toc__desc {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
}

.report-toc__desc strong {
  font-weight: 700;
}

.three-things {
  margin-top: 40px;
  max-width: 880px;
  counter-reset: thing;
}

.three-things h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.three-things ol {
  margin-top: 12px;
  border-top: 1px solid var(--ink);
}

.three-things li {
  display: grid;
  grid-template-columns: 3em minmax(0, 1fr);
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  counter-increment: thing;
}

.three-things li::before {
  content: counter(thing, decimal-leading-zero);
  font-family: var(--font-latin);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.7rem;
  color: var(--ink-2);
}

/* ══════════════════════════════════
   04 誰適合／06 購買流程：分欄步驟
   ══════════════════════════════════ */
.steps {
  display: grid;
  grid-template-columns: repeat(var(--steps, 3), minmax(0, 1fr));
  margin-top: 20px;
  border: 1px solid var(--ink);
  counter-reset: step;
}

.steps--4 {
  --steps: 4;
}

.steps > li {
  padding: 20px;
  counter-increment: step;
}

.steps > li + li {
  border-left: 1px solid var(--ink);
}

.steps > li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-latin);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink-2);
}

.steps h3 {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
  color: var(--ink);
}

.steps p {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
}

.steps .steps__label {
  margin-top: 14px;
  font-family: var(--font-latin);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-2);
}

.steps .steps__label + p {
  margin-top: 4px;
}

.steps .is-key {
  background: var(--highlight);
}

.steps .is-key .steps__label {
  color: var(--ink);
}

.steps .is-key::before {
  color: var(--ink);
}

.refund-line {
  margin-top: 20px;
  max-width: 720px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
}

.refund-line a,
.faq-group a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* ══════════════════════════════════
   05 證據：三個數字
   ══════════════════════════════════ */
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: 20px;
}

.stats p {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
}

/* ══════════════════════════════════
   08 收尾
   ══════════════════════════════════ */
.exhibit--form .slide__actions {
  margin-top: 16px;
}

/* ══════════════════════════════════
   凍結的結帳 modal（#checkoutModal）
   ══════════════════════════════════ */
/* 行為：inline script 加 .is-open 才顯示 */
.checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 16px 32px;
  overflow-y: auto;
}

.checkout-modal.is-open {
  display: flex;
}

.checkout-modal__backdrop {
  position: fixed;
  inset: 0;
  background: color-mix(in oklch, var(--ink) 72%, transparent);
}

.checkout-modal__dialog {
  position: relative;
  width: min(100%, 940px);
  margin: auto;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
}

.checkout-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 80ms linear;
}

.checkout-modal__close:hover {
  background: var(--paper-2);
}

.checkout-modal__close:focus-visible {
  outline: 2px solid var(--highlight-deep);
  outline-offset: 2px;
  border-radius: 2px;
}

.checkout-modal__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-family: var(--font-latin);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink-2);
}

.checkout-modal__label::before {
  content: "";
  width: 20px;
  border-top: 1px solid var(--ink);
}

.checkout-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.checkout-summary__headline {
  margin-bottom: 16px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.3;
  color: var(--ink);
}

.checkout-summary__price {
  font-family: var(--font-latin);
  font-size: 44px;
  font-weight: 800;
  font-stretch: 110%;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.checkout-summary__price-note {
  margin: 8px 0 28px;
  font-size: 13px;
  color: var(--ink-2);
}

.checkout-includes {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--ink);
}

.checkout-includes li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
  color: var(--ink);
}

.ci-check {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--ink);
}

.checkout-form-wrap {
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid var(--rule);
  background: var(--paper);
}

.checkout-auth-gate {
  margin-bottom: 24px;
}

.checkout-auth-status {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-2);
}

#checkoutForm .form-group {
  margin-bottom: 18px;
}

#checkoutForm fieldset.form-group legend,
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.form-group label .req,
fieldset.form-group legend .req {
  margin-left: 2px;
  color: var(--ink);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="url"] {
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
}

.form-group input::placeholder {
  color: var(--ink-2);
  opacity: 1;
}

.form-group input:focus-visible {
  outline: 2px solid var(--highlight-deep);
  outline-offset: 2px;
  border-radius: 2px;
}

.form-group input[readonly] {
  border-color: var(--rule);
  background: var(--paper-2);
  color: var(--ink-2);
  cursor: not-allowed;
}

.invoice-toggle {
  display: flex;
  gap: 8px;
}

/* 視覺隱藏但仍可用鍵盤操作（原本是 display:none） */
.invoice-toggle input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.invoice-toggle label {
  flex: 1;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background-color 80ms linear, color 80ms linear;
}

.invoice-toggle input[type="radio"]:checked + label {
  background: var(--ink);
  color: var(--on-ink);
}

.invoice-toggle input[type="radio"]:checked + label::before {
  content: "";
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-right: 0.4em;
  vertical-align: -0.1em;
  background-color: currentColor;
  -webkit-mask: var(--mk-check) center / contain no-repeat;
  mask: var(--mk-check) center / contain no-repeat;
}

.invoice-toggle input[type="radio"]:focus-visible + label {
  outline: 2px solid var(--highlight-deep);
  outline-offset: 2px;
}

/* 行為：統編欄位預設隱藏，選「公司」時 JS 改 style.display */
#taxIdGroup {
  display: none;
}

/* 行為：錯誤訊息預設隱藏，showErr() 以 style.display 切換 */
.error-msg {
  display: none;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
}

.error-msg::before {
  content: "";
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-right: 0.4em;
  vertical-align: -0.1em;
  background-color: currentColor;
  -webkit-mask: var(--mk-cross) center / contain no-repeat;
  mask: var(--mk-cross) center / contain no-repeat;
}

.form-divider {
  margin: 20px 0;
  border-top: 1px solid var(--rule);
}

.agree-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  cursor: pointer;
}

.agree-row input[type="checkbox"] {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  accent-color: var(--ink);
  cursor: pointer;
}

.agree-row label {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
  cursor: pointer;
}

#refundAgreeError {
  margin-bottom: 12px;
}

/* 付款按鈕：凍結 class .pay-btn，比照 deck.css .btn */
.pay-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 56px;
  margin-top: 20px;
  padding: 0 28px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--on-ink);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 80ms linear;
}

.pay-btn:hover:not(:disabled) {
  border-color: color-mix(in oklch, var(--ink), black 12%);
  background: color-mix(in oklch, var(--ink), black 12%);
}

.pay-btn:focus-visible {
  outline: 2px solid var(--highlight-deep);
  outline-offset: 2px;
}

.pay-btn:disabled {
  border-color: var(--ink-2);
  background: var(--ink-2);
  cursor: not-allowed;
}

/* ══════════════════════════════════
   斷點
   ══════════════════════════════════ */
@media (max-width: 1100px) {
  .dims-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dim-card + .dim-card {
    border-left: 0;
  }

  .dim-card {
    border-bottom: 1px solid var(--ink);
  }

  .dim-card:nth-child(2n) {
    border-left: 1px solid var(--ink);
  }

  .dim-card:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 1024px) {
  .slide--cover {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas: "kicker" "title" "scan" "exhibit" "lead" "foot";
    min-height: 0;
    padding-block: 32px 40px;
  }

  .cover__scan { margin-top: 24px; }
  .cover__exhibit { margin-top: 32px; }
  .cover__foot { margin-top: 32px; }

  .exhibit--annotated { padding-right: 28px; }
  .exhibit--annotated > .callout { transform: none; }

  .steps--4 {
    --steps: 2;
  }

  .steps--4 > li:nth-child(3) {
    border-left: 0;
  }

  .steps--4 > li:nth-child(n + 3) {
    border-top: 1px solid var(--ink);
  }

  .report-toc__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-toc__card:not(:nth-child(3n + 1)) {
    padding-left: 0;
    border-left: 0;
  }

  .report-toc__card:nth-child(2n) {
    padding-left: 20px;
    border-left: 1px solid var(--rule);
  }

  .report-toc__card--key:nth-child(3n + 1) {
    padding-left: 0;
  }

  .report-toc__card--key {
    padding-left: 12px;
  }
}

@media (max-width: 860px) {
  .checkout-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .exhibit--annotated { padding-right: 20px; }

  .stats,
  .shots,
  .steps,
  .steps--4,
  .report-toc__grid,
  .dims-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps > li + li,
  .steps--4 > li:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--ink);
  }

  .dim-card:nth-child(2n) {
    border-left: 0;
  }

  .report-toc__card,
  .report-toc__card:nth-child(2n),
  .report-toc__card:not(:nth-child(3n + 1)) {
    padding-left: 0;
    border-left: 0;
  }

  .report-toc__card--key,
  .report-toc__card--key:nth-child(2n),
  .report-toc__card--key:not(:nth-child(3n + 1)) {
    padding-left: 12px;
  }

  /* 對照表在手機上三欄擠不下：縮小字級、允許換行 */
  .plan-compare {
    font-size: 14px;
  }

  .plan-compare th,
  .plan-compare td {
    padding-inline: 4px;
  }

  .plan-compare td .mark {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .hero__scan-row {
    flex-direction: column;
    flex-basis: 100%;
  }

  .hero__scan-input-wrap {
    border-right: 1px solid var(--ink);
    border-bottom: 0;
  }

  #heroScanForm .hero__scan-btn,
  #heroScanForm .hero__more-btn {
    width: 100%;
  }

  #heroScanForm .hero__scan-btn {
    border-radius: 0 0 2px 2px;
  }

  .preview__row {
    grid-template-columns: 6.5em minmax(0, 1fr) 4em;
    gap: 8px;
  }

  .preview__row:lang(en) {
    grid-template-columns: 11.5em minmax(0, 1fr) 4em;
  }

  .preview__row:lang(ja) {
    grid-template-columns: 9em minmax(0, 1fr) 4em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__scan-progress-bar-fill,
  .pay-btn,
  .invoice-toggle label,
  .checkout-modal__close,
  #heroGoogleSignInBtn,
  #checkoutGoogleBtn {
    transition: none;
  }
}
