/* =========================================================
   IPNest 安巢 — 全站共用樣式
   8px 間距基準；圓角 8–12px；單一主色（靛藍）
   綠／黃／紅只用於狀態標籤與表單錯誤提示
   ========================================================= */

:root {
  /* 底色與文字 */
  --c-bg: #FFFFFF;
  --c-bg-soft: #F5F7FA;
  --c-bg-sunk: #ECEFF4;
  --c-ink: #121A2B;
  --c-ink-2: #3F4A5E;
  --c-ink-3: #667085;
  --c-ink-4: #98A2B3;
  --c-line: #E3E7EE;
  --c-line-strong: #CBD2DD;

  /* 主色：靛藍 */
  --c-brand: #2A45B4;
  --c-brand-hover: #22399A;
  --c-brand-press: #1C2F80;
  --c-brand-tint: #EEF1FC;
  --c-brand-line: #D3DBF5;
  --c-brand-ink: #1F358F;

  /* 狀態色（僅狀態標籤） */
  --c-ok: #0F7A4F;      --c-ok-bg: #E4F4EB;
  --c-warn: #8A5A00;    --c-warn-bg: #FFF2CC;
  --c-bad: #B42318;     --c-bad-bg: #FDE9E7;
  --c-mute: #556070;    --c-mute-bg: #EDEFF3;

  /* 圓角 */
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 12px;

  /* 字體 */
  --font: -apple-system, "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 1160px;
  --gutter: 24px;
  --header-h: 64px;
  --focus-ring: 0 0 0 3px rgba(42, 69, 180, .28);
}

/* ---------- 基礎 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.35; }
img, svg { display: block; max-width: 100%; }
a { color: var(--c-brand); text-decoration: none; }
a:hover { color: var(--c-brand-hover); text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
::selection { background: #D6DEFA; }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon--sm { width: 16px; height: 16px; }
.icon--lg { width: 24px; height: 24px; }
.mono { font-family: var(--mono); font-size: .9em; letter-spacing: 0; white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--c-ink-3); }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link { position: absolute; left: 16px; top: -48px; z-index: 100; padding: 8px 16px; background: var(--c-ink); color: #fff; border-radius: var(--r-sm); }
.skip-link:focus { top: 8px; color: #fff; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--c-ink); text-decoration: none; }
.logo:hover { color: var(--c-ink); text-decoration: none; }
.logo__mark { width: 28px; height: 28px; color: var(--c-brand); }
.logo__word { font-size: 19px; font-weight: 650; letter-spacing: .01em; }
.logo__cn { font-size: 15px; font-weight: 500; color: var(--c-ink-3); padding-left: 8px; border-left: 1px solid var(--c-line-strong); line-height: 1; }

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border: 1px solid transparent; border-radius: var(--r-sm);
  font-size: 15px; font-weight: 500; line-height: 1; white-space: nowrap;
  cursor: pointer; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn--primary { background: var(--c-brand); color: #fff; }
.btn--primary:hover { background: var(--c-brand-hover); color: #fff; }
.btn--primary:active { background: var(--c-brand-press); }
.btn--secondary { background: #fff; color: var(--c-ink); border-color: var(--c-line-strong); }
.btn--secondary:hover { background: var(--c-bg-soft); border-color: var(--c-ink-4); color: var(--c-ink); }
.btn--secondary:active { background: var(--c-bg-sunk); }
.btn--ghost { background: transparent; color: var(--c-ink-2); }
.btn--ghost:hover { background: var(--c-bg-soft); color: var(--c-ink); }
.btn--sm { height: 32px; padding: 0 12px; font-size: 14px; }
.btn--lg { height: 48px; padding: 0 24px; font-size: 16px; }
.btn--block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--c-bg-sunk); color: var(--c-ink-4); border-color: transparent; cursor: not-allowed; box-shadow: none;
}

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 32px; height: 32px; padding: 0 8px;
  border: 1px solid transparent; border-radius: var(--r-sm);
  background: transparent; color: var(--c-ink-3); cursor: pointer; font-size: 13px;
  transition: background-color .15s ease, color .15s ease;
}
.icon-btn:hover { background: var(--c-bg-sunk); color: var(--c-ink); }
.icon-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.text-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; }

/* ---------- 標籤 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 8px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--ok   { color: var(--c-ok);   background: var(--c-ok-bg); }
.badge--warn { color: var(--c-warn); background: var(--c-warn-bg); }
.badge--bad  { color: var(--c-bad);  background: var(--c-bad-bg); }
.badge--mute { color: var(--c-mute); background: var(--c-mute-bg); }

.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-sm);
  font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap; vertical-align: middle;
}
.tag--brand { color: var(--c-brand-ink); background: var(--c-brand-tint); }
.tag--neutral { color: var(--c-mute); background: var(--c-mute-bg); }
.tag--outline { color: var(--c-ink-2); border: 1px solid var(--c-line-strong); background: #fff; }

/* ---------- 定版文案佔位 ---------- */
.slot[data-empty] {
  display: block; padding: 8px 12px;
  border: 1px dashed var(--c-ink-4); border-radius: var(--r-sm);
  background: #fff; color: var(--c-ink-3); font-size: 14px; line-height: 1.6;
}
.slot--inline[data-empty] { display: inline; padding: 2px 8px; }

/* ---------- 表單 ---------- */
.field { display: grid; gap: 8px; align-content: start; min-width: 0; }
.field__label { font-size: 14px; font-weight: 500; color: var(--c-ink); }
.field__label .opt { font-weight: 400; color: var(--c-ink-3); }
.field__hint { font-size: 13px; line-height: 1.6; color: var(--c-ink-3); }
.field__error { display: none; font-size: 13px; line-height: 1.6; color: var(--c-bad); }
.field.is-invalid .field__error { display: block; }

.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1px solid var(--c-line-strong); border-radius: var(--r-sm);
  background: #fff; color: var(--c-ink);
  font: inherit; font-size: 15px; line-height: 1.4;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder, .textarea::placeholder { color: var(--c-ink-4); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--c-ink-4); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--c-brand); box-shadow: var(--focus-ring); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--c-bg-soft); color: var(--c-ink-3); border-color: var(--c-line); cursor: not-allowed; }
.textarea { height: auto; min-height: 104px; padding: 10px 12px; line-height: 1.6; resize: vertical; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.field.is-invalid .input, .field.is-invalid .select, .field.is-invalid .textarea { border-color: var(--c-bad); }
.field.is-invalid .input:focus, .field.is-invalid .textarea:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, .16); }

.input-group { position: relative; }
.input-group .input { padding-right: 72px; }
.input-group__btn { position: absolute; right: 4px; top: 4px; height: 32px; }

.input-affix { display: flex; align-items: stretch; }
.input-affix__pre {
  display: inline-flex; align-items: center; padding: 0 12px;
  border: 1px solid var(--c-line-strong); border-right: 0; border-radius: var(--r-sm) 0 0 var(--r-sm);
  background: var(--c-bg-soft); color: var(--c-ink-3); font-size: 14px;
}
.input-affix .input { border-radius: 0 var(--r-sm) var(--r-sm) 0; }

.check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: 15px; line-height: 1.6; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; flex: none; accent-color: var(--c-brand); cursor: pointer; }
.check input:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 32px; padding: 0 12px; border: 1px solid var(--c-line-strong); border-radius: var(--r-sm);
  background: #fff; color: var(--c-ink-2); font-size: 14px; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.chip:hover { border-color: var(--c-ink-4); color: var(--c-ink); }
.chip:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.chip[aria-pressed="true"] { border-color: var(--c-brand); background: var(--c-brand-tint); color: var(--c-brand-ink); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-stack { display: grid; gap: 20px; }

.alert {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 16px; border-radius: var(--r-sm); font-size: 14px; line-height: 1.6;
  border: 1px solid var(--c-line); background: var(--c-bg-soft); color: var(--c-ink-2);
}
.alert .icon { margin-top: 2px; }
.alert--error { border-color: #F4C7C2; background: var(--c-bad-bg); color: #7A1A12; }
.alert--info { border-color: var(--c-brand-line); background: var(--c-brand-tint); color: var(--c-brand-ink); }

/* ---------- 分頁籤 ---------- */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--c-bg-sunk); border-radius: var(--r-md); }
.tab {
  height: 36px; padding: 0 16px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--c-ink-2); font-size: 15px; font-weight: 500; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.tab:hover { color: var(--c-ink); background: rgba(255, 255, 255, .6); }
.tab:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.tab[aria-selected="true"] { background: #fff; color: var(--c-ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .08); }

/* ---------- 通用卡片／面板 ---------- */
.card { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg); }

/* ---------- Toast 與對話框 ---------- */
.toast-region { position: fixed; right: 24px; bottom: 24px; z-index: 200; display: grid; gap: 8px; max-width: min(400px, calc(100vw - 32px)); }
.toast {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 16px; border-radius: var(--r-md);
  background: var(--c-ink); color: #fff; font-size: 14px; line-height: 1.6;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .18);
  animation: toast-in .2s ease-out;
}
.toast .icon { margin-top: 2px; color: #A9B8F2; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.modal {
  width: min(480px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: var(--r-lg);
  background: #fff; color: var(--c-ink); box-shadow: 0 16px 40px rgba(16, 24, 40, .18);
}
.modal::backdrop { background: rgba(18, 26, 43, .45); }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px 0; }
.modal__title { font-size: 18px; }
.modal__body { padding: 16px 24px 8px; display: grid; gap: 16px; font-size: 15px; color: var(--c-ink-2); }
.modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px 24px; }

/* =========================================================
   官網（首頁、條款頁）
   ========================================================= */

.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--c-line); }
.site-header__inner { display: flex; align-items: center; gap: 32px; height: var(--header-h); }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav > a { padding: 8px 12px; border-radius: var(--r-sm); color: var(--c-ink-2); font-size: 15px; line-height: 1.4; }
.site-nav > a:hover { color: var(--c-ink); background: var(--c-bg-soft); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.menu-toggle { display: none; width: 40px; height: 40px; color: var(--c-ink); }
.mobile-nav { display: none; }

/* ---------- 頂欄 mega menu（左欄產品卡列／右欄資源列／底部 CTA） ---------- */
.site-nav__btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 12px; border: 0; border-radius: var(--r-sm); background: none;
  color: var(--c-ink-2); font-size: 15px; line-height: 1.4; font-family: inherit;
  cursor: pointer;
}
.site-nav__btn:hover { color: var(--c-ink); background: var(--c-bg-soft); }
.site-nav__btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.nav-mega { position: relative; }
.nav-mega__caret { transition: transform .18s ease; }
.nav-mega.is-open .nav-mega__caret { transform: rotate(180deg); }

.mega {
  position: absolute; top: 100%; left: 0; z-index: 60;
  width: 880px; max-width: calc(100vw - 48px);
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg);
  box-shadow: 0 20px 48px rgba(16, 24, 40, .14);
}
.mega[hidden] { display: none; }
@keyframes mega-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.nav-mega.is-open .mega { animation: mega-in .16s ease; }

.mega__inner { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 28px; padding-top: 22px; padding-bottom: 22px; }
.mega__col--side { border-left: 1px solid var(--c-line); padding-left: 28px; }
.mega__label { margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--c-ink-3); }
.mega__items { display: grid; gap: 2px; }
.mega-item {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) 128px; align-items: center; gap: 14px;
  padding: 9px 10px; border-radius: var(--r-md); color: var(--c-ink); text-decoration: none;
}
.mega-item:hover { background: var(--c-bg-soft); text-decoration: none; }
.mega-item__icon {
  display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: var(--r-md); background: var(--c-brand-tint); color: var(--c-brand);
}
.mega-item__name { display: block; font-size: 15px; font-weight: 600; }
.mega-item__desc { display: block; margin-top: 2px; font-size: 13px; line-height: 1.5; color: var(--c-ink-3); }
.mega-item__price { font-size: 13px; line-height: 1.4; color: var(--c-ink-2); text-align: right; white-space: nowrap; }
.mega-item__price--link { color: var(--c-brand); }
.mega__links { display: grid; gap: 2px; }
.mega__links a { display: block; padding: 8px 10px; border-radius: var(--r-sm); color: var(--c-ink); text-decoration: none; }
.mega__links a:hover { background: var(--c-bg-soft); text-decoration: none; }
.mega__links strong { display: block; font-size: 14px; font-weight: 600; }
.mega__links span { display: block; margin-top: 2px; font-size: 13px; line-height: 1.5; color: var(--c-ink-3); }
.mega__cta { display: flex; gap: 10px; margin-top: 14px; }

/* 行動版：可摺疊的產品／資源群組 */
.mobile-nav__group > summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--c-line);
  color: var(--c-ink); font-size: 16px; cursor: pointer; list-style: none;
}
.mobile-nav__group > summary::-webkit-details-marker { display: none; }
.mobile-nav__group > summary::after {
  content: ''; width: 8px; height: 8px; margin-right: 4px;
  border-right: 1.5px solid var(--c-ink-3); border-bottom: 1.5px solid var(--c-ink-3);
  transform: rotate(45deg); transition: transform .18s ease;
}
.mobile-nav__group[open] > summary::after { transform: rotate(-135deg); }
.mobile-nav__sub { display: block; padding: 2px 0 6px; }
.mobile-nav__sub a { display: block; padding: 9px 0 9px 14px; border-bottom: 0; color: var(--c-ink-2); font-size: 15px; }

section[id], [id].anchor { scroll-margin-top: calc(var(--header-h) + 16px); }

.section { padding: 88px 0; }
.section--soft { background: var(--c-bg-soft); border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); }
.section--tight { padding-top: 0; }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head__title { font-size: 28px; line-height: 1.35; }
.section-head__desc { margin-top: 8px; font-size: 16px; color: var(--c-ink-2); }
.section-head--split { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; max-width: none; }
.section-head--split > div { max-width: 720px; }

/* 首屏 */
.hero { padding: 72px 0 56px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 64px; align-items: start; }
.hero__title { font-size: 40px; line-height: 1.3; max-width: 14em; }
.hero__lead { margin-top: 16px; max-width: 34em; font-size: 18px; line-height: 1.75; color: var(--c-ink-2); }
.hero__metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 32px; padding: 16px 0; border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); }
.hero__metrics li { display: flex; flex-direction: column; gap: 2px; }
.hero__metrics strong { font-size: 26px; font-weight: 600; line-height: 1.2; color: var(--c-brand); font-variant-numeric: tabular-nums; }
.hero__metrics span { font-size: 13px; color: var(--c-ink-3); }
.hero__price-note { margin-top: 4px; font-size: 14px; color: var(--c-ink-3); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero__facts { display: grid; gap: 8px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--c-line); font-size: 15px; color: var(--c-ink-2); }
.hero__facts li { display: flex; align-items: center; gap: 12px; }
.hero__facts .icon { color: var(--c-brand); }

/* 交付範例卡 */
.sample { margin-top: 8px; }
.sample__caption { margin-top: 12px; font-size: 13px; color: var(--c-ink-3); }
.spec { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg); overflow: hidden; }
.spec__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; background: var(--c-bg-soft); border-bottom: 1px solid var(--c-line); }
.spec__title { font-size: 15px; font-weight: 600; }
.spec__sub { font-size: 13px; color: var(--c-ink-3); }
.spec__rows { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px 16px; padding: 20px; font-size: 15px; }
.spec__rows dt { color: var(--c-ink-3); font-size: 14px; line-height: 1.7; }
.spec__rows dd { display: flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.spec__foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 14px 20px; border-top: 1px dashed var(--c-line-strong); }
.spec__promise { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--c-ink-2); }
.spec__promise .icon { color: var(--c-brand); }

/* 提示區塊 */
.notice-wrap { padding-bottom: 8px; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 16px 20px; border: 1px solid var(--c-brand-line); border-radius: var(--r-md); background: var(--c-brand-tint); color: var(--c-brand-ink); }
.notice > .icon { margin-top: 4px; }
.notice__body { flex: 1; min-width: 0; font-size: 15px; }

/* 品類卡 */
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cat { display: flex; flex-direction: column; padding: 24px; background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg); }
.cat--primary { border-color: var(--c-brand-line); }
.cat__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-md); background: var(--c-bg-soft); color: var(--c-brand); }
.cat--primary .cat__icon { background: var(--c-brand-tint); }
.cat__name { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 20px; font-size: 18px; }
.cat__desc { margin-top: 8px; font-size: 15px; color: var(--c-ink-2); flex: 1; }
.cat__price { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--c-line); font-size: 14px; color: var(--c-ink-2); }
.cat__price strong { font-size: 16px; font-weight: 600; color: var(--c-brand); }
.cat__sub { margin-top: 4px; font-size: 13px; color: var(--c-ink-3); }
.cat__link { margin-top: 16px; font-size: 14px; font-weight: 500; }
/* 產品介紹（3 欄）與適用場景（5 欄）：沿用 .cat 卡片，只調欄數與內距 */
.cat-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cat-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cat-grid--5 .cat { padding: 20px; }
.cat-grid--5 .cat__icon { width: 36px; height: 36px; }
.cat-grid--5 .cat__name { margin-top: 16px; font-size: 16px; }
.cat-grid--5 .cat__desc { margin-top: 6px; font-size: 14px; }

/* 價格 */
.pricing-tabs { margin-bottom: 24px; }
.price-panel { display: grid; gap: 24px; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.plans--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plan { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg); overflow: hidden; }
.plan__head { padding: 20px 20px 16px; }
.plan__title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 18px; }
.plan__meta { margin-top: 4px; font-size: 14px; color: var(--c-ink-3); }
.plan__from { margin-top: 12px; font-size: 14px; color: var(--c-ink-2); }
.plan__from strong { font-size: 24px; font-weight: 600; color: var(--c-ink); font-variant-numeric: tabular-nums; }
.plan__note { padding: 12px 20px; border-top: 1px solid var(--c-line); font-size: 13px; color: var(--c-ink-3); background: var(--c-bg-soft); }
.plan--shared { border-style: dashed; border-color: var(--c-line-strong); }

.ptable { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.ptable th {
  padding: 10px 20px; text-align: left; font-size: 13px; font-weight: 500; color: var(--c-ink-3);
  background: var(--c-bg-soft); border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); white-space: nowrap;
}
.ptable td { padding: 12px 20px; border-bottom: 1px solid var(--c-line); vertical-align: middle; }
.ptable tbody tr:last-child td { border-bottom: 0; }
.ptable .num { text-align: right; }
.ptable .col-local { width: 26%; }
.ptable .tier-note { margin-left: 8px; }
.price-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--c-line); font-size: 14px; color: var(--c-ink-3); }
.price-foot__title { font-size: 17px; font-weight: 600; color: var(--c-ink); }
.price-foot__note { margin-top: 8px; max-width: 620px; font-size: 13px; line-height: 1.6; color: var(--c-ink-3); }

/* 方案與計費：能力卡（首頁不揭露金額） */
.value-band { margin-top: 48px; }
.value-band__title { font-size: 22px; font-weight: 600; }
.value-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.value-grid li { padding: 20px; border: 1px solid var(--c-line); border-radius: var(--r-lg); background: #fff; }
.value-grid__no { display: block; font-size: 12px; letter-spacing: .08em; color: var(--c-brand); }
.value-grid strong { display: block; margin-top: 12px; font-size: 16px; font-weight: 600; }
.value-grid p { margin-top: 6px; font-size: 14px; line-height: 1.6; color: var(--c-ink-2); }

/* 語言切換器：沿用表單控件外觀，縮成導航用尺寸 */
.lang-select { width: auto; height: 32px; padding: 0 30px 0 10px; font-size: 14px; color: var(--c-ink-2); background-position: right 8px center; }
.lang-select:hover { border-color: var(--c-ink-4); }

/* 收款資訊卡（儲值頁）：QR ＋ 應付金額 ＋ 收款帳號 */
.paybox { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 16px; padding: 16px; border: 1px solid var(--c-brand-line); border-radius: var(--r-md); background: var(--c-brand-tint); }
.paybox[hidden] { display: none; }
.paybox__qr { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px; }
.paybox__qr img { width: 132px; height: 132px; border-radius: var(--r-sm); background: #fff; border: 1px solid var(--c-line); object-fit: contain; }
.paybox__qr-hint { font-size: 12px; color: var(--c-ink-3); }
.paybox__label { font-size: 13px; color: var(--c-ink-3); }
.paybox__amount { font-size: 26px; font-weight: 600; line-height: 1.3; color: var(--c-brand-ink); font-variant-numeric: tabular-nums; }
.paybox__sub { margin-top: 2px; font-size: 13px; color: var(--c-ink-3); }
.paybox__rows { margin-top: 12px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; font-size: 14px; }
.paybox__rows dt { color: var(--c-ink-3); white-space: nowrap; }
.paybox__rows dd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; overflow-wrap: anywhere; }
.paybox__note { margin-top: 10px; font-size: 13px; line-height: 1.6; color: var(--c-ink-2); }
@media (max-width: 600px) {
  .paybox { grid-template-columns: 1fr; }
  .paybox__qr img { width: 168px; height: 168px; }
  /* 控制台頂欄：語言切換器佔位後，收窄間距與按鈕文字，避免標題被截斷 */
  .topbar__right { gap: 8px; }
  .lang-select { height: 30px; padding: 0 24px 0 8px; font-size: 13px; background-position: right 6px center; }
  .topbar .btn__label { display: none; }
}

/* 地區 */
.region-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; align-items: start; }
.rtable-wrap { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg); overflow: hidden; }
.rtable { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.rtable th { padding: 10px 16px; text-align: left; font-size: 13px; font-weight: 500; color: var(--c-ink-3); background: var(--c-bg-soft); border-bottom: 1px solid var(--c-line); white-space: nowrap; }
.rtable td { padding: 14px 16px; border-bottom: 1px solid var(--c-line); vertical-align: middle; }
.rtable tbody tr:last-child td { border-bottom: 0; }
.rtable th.num, .rtable td.num { text-align: right; }
.rtable .is-hot td { background: #FAFBFF; }
.show-sm, .cell-sub.show-sm { display: none; }
.rtable .country { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.rtable .group-row td { padding: 8px 16px; font-size: 13px; color: var(--c-ink-3); background: var(--c-bg-soft); }
.source-notes { display: grid; gap: 12px; margin-top: 24px; }
.source-note { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--c-ink-2); }
.source-note .icon { margin-top: 3px; color: var(--c-brand); }
.source-note strong { color: var(--c-ink); font-weight: 600; }

.sg-card { padding: 24px; background: #fff; border: 1px solid var(--c-brand-line); border-radius: var(--r-lg); }
.sg-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.sg-card__title { font-size: 20px; }
.sg-card__for { margin-top: 4px; font-size: 14px; color: var(--c-ink-3); }
.sg-card__price { margin-top: 16px; font-size: 14px; color: var(--c-ink-2); }
.sg-card__price strong { font-size: 22px; font-weight: 600; color: var(--c-ink); font-variant-numeric: tabular-nums; }
.sg-card__label { margin-top: 24px; font-size: 14px; font-weight: 600; }
.bullets { display: grid; gap: 8px; margin-top: 8px; font-size: 15px; color: var(--c-ink-2); }
.bullets li { position: relative; padding-left: 20px; }
.bullets li::before { content: ""; position: absolute; left: 4px; top: .78em; width: 6px; height: 6px; border-radius: 50%; background: var(--c-brand); }
.path { display: grid; gap: 0; margin-top: 8px; counter-reset: path; font-size: 15px; color: var(--c-ink-2); }
.path li { position: relative; padding: 0 0 12px 36px; counter-increment: path; }
.path li::before {
  content: counter(path); position: absolute; left: 0; top: 1px;
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: var(--r-sm);
  border: 1px solid var(--c-brand-line); background: var(--c-brand-tint); color: var(--c-brand-ink);
  font-size: 13px; font-weight: 600; line-height: 1;
}
.path li::after { content: ""; position: absolute; left: 12px; top: 28px; bottom: 2px; width: 1px; background: var(--c-brand-line); }
.path li:last-child { padding-bottom: 0; }
.path li:last-child::after { display: none; }
.sg-card .btn { margin-top: 24px; }

/* 訂購流程 */
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; counter-reset: step; }
.step { position: relative; counter-increment: step; }
.step__num {
  position: relative; z-index: 1; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: var(--r-md);
  background: #fff; border: 1px solid var(--c-line-strong); color: var(--c-ink);
  font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.step__num::before { content: counter(step); }
.step::after { content: ""; position: absolute; left: 44px; right: -16px; top: 18px; height: 1px; background: var(--c-line-strong); }
.step:last-child::after { display: none; }
.step__title { margin-top: 16px; font-size: 17px; }
.step__desc { margin-top: 8px; font-size: 14px; line-height: 1.7; color: var(--c-ink-2); }
.step__note { margin-top: 8px; font-size: 13px; line-height: 1.6; color: var(--c-ink-3); }
.step .slot[data-empty] { margin-top: 12px; }

/* 旗下產品 */
.product-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px; align-items: center;
  padding: 28px; background: var(--c-bg-soft); border: 1px solid var(--c-line); border-radius: var(--r-lg);
}
.product-card__mark { display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--c-line); color: var(--c-brand); }
.product-card__name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; font-size: 20px; }
.product-card__domain { font-size: 14px; font-weight: 400; color: var(--c-ink-3); }
.product-card__copy { margin-top: 8px; font-size: 16px; color: var(--c-ink); max-width: 46em; }
.product-card__for { margin-top: 8px; font-size: 14px; color: var(--c-ink-3); }

/* 使用規則、常見問題（左標題右內容） */
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; align-items: start; }
.split__aside .section-head { margin-bottom: 0; }
.split__aside .section-head__desc a { font-weight: 500; }
.rules { display: grid; gap: 0; border-top: 1px solid var(--c-line); }
.rule { display: flex; gap: 16px; align-items: flex-start; padding: 20px 0; border-bottom: 1px solid var(--c-line); font-size: 16px; }
.rule__icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: var(--r-md); background: var(--c-bg-soft); color: var(--c-ink-2); }
.rule p { padding-top: 5px; }

.faq { border-top: 1px solid var(--c-line); }
.qa { border-bottom: 1px solid var(--c-line); }
.qa summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 0; cursor: pointer; list-style: none; font-size: 17px; font-weight: 500;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary:hover { color: var(--c-brand-ink); }
.qa summary:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-sm); }
.qa summary .icon { color: var(--c-ink-3); transition: transform .2s ease; }
.qa[open] summary .icon { transform: rotate(180deg); }
.qa__body { display: grid; gap: 12px; padding: 0 0 24px; font-size: 15px; color: var(--c-ink-2); max-width: 46em; }

/* 結尾行動區 */
.cta-band { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; padding: 32px; border: 1px solid var(--c-line); border-radius: var(--r-lg); background: #fff; }
.cta-band__title { font-size: 22px; }
.cta-band__desc { margin-top: 4px; font-size: 15px; color: var(--c-ink-2); }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* 頁尾 */
.site-footer { padding: 56px 0 24px; background: var(--c-bg-soft); border-top: 1px solid var(--c-line); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-brand p { margin-top: 12px; max-width: 26em; color: var(--c-ink-2); }
.footer-contact { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; margin-top: 16px; color: var(--c-ink-2); }
.footer-contact dt { color: var(--c-ink-3); }
.footer-contact dd { overflow-wrap: anywhere; }
.footer-col h3 { font-size: 14px; font-weight: 600; color: var(--c-ink); }
.footer-col ul { display: grid; gap: 8px; margin-top: 12px; }
.footer-col a { display: inline-flex; align-items: center; gap: 4px; color: var(--c-ink-2); }
.footer-col a:hover { color: var(--c-ink); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--c-line); color: var(--c-ink-3); font-size: 13px; }

/* 條款頁 */
.doc { max-width: 760px; padding: 56px 0 88px; }
.doc__title { font-size: 32px; }
.doc__meta { margin-top: 8px; font-size: 14px; color: var(--c-ink-3); }
.doc__lead { margin-top: 24px; font-size: 16px; color: var(--c-ink-2); }
.doc h2 { margin-top: 40px; font-size: 20px; }
.doc p, .doc li { font-size: 16px; color: var(--c-ink-2); }
.doc p { margin-top: 12px; }
.doc ol, .doc ul { display: grid; gap: 8px; margin-top: 12px; padding-left: 24px; }
.doc ol { list-style: decimal; }
.doc ul { list-style: disc; }
.doc-nav { display: flex; gap: 16px; margin-top: 16px; font-size: 14px; }

/* =========================================================
   登入／註冊
   ========================================================= */
.auth-header { border-bottom: 1px solid var(--c-line); background: #fff; }
.auth-header .container { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.auth { padding: 56px 0 88px; background: var(--c-bg-soft); min-height: calc(100vh - var(--header-h)); }
.auth__grid { display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: 64px; align-items: start; }
.auth-card { padding: 32px; background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg); }
.auth-card .tabs { display: flex; margin-bottom: 24px; }
.auth-card .tab { flex: 1; }
.auth-card__title { font-size: 22px; }
.auth-card__desc { margin-top: 4px; font-size: 14px; color: var(--c-ink-3); }
.auth-card form { margin-top: 24px; }
.auth-card .form-stack > .btn { margin-top: 4px; }
.auth-switch { margin-top: 16px; font-size: 14px; color: var(--c-ink-3); }
.auth-switch button { padding: 0; border: 0; background: none; color: var(--c-brand); font-weight: 500; cursor: pointer; }
.auth-switch button:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-aside { padding-top: 8px; }
.auth-aside__title { font-size: 22px; }
.auth-aside__list { display: grid; gap: 20px; margin-top: 24px; }
.auth-aside__list li { display: flex; gap: 16px; align-items: flex-start; }
/* 注意：說明文字只套 li > div > span，不可寫成 .auth-aside__list span，
   否則會連圖標外框 span.rule__icon 一起覆蓋掉 display:grid，圖標會貼頂不置中。 */
.auth-aside__list .rule__icon {
  display: grid; place-items: center; margin-top: 0;
  background: #fff; border: 1px solid var(--c-line); color: var(--c-brand);
}
.auth-aside__list li > div { padding-top: 6px; }
.auth-aside__list strong { display: block; font-size: 16px; font-weight: 600; }
.auth-aside__list li > div > span { display: block; margin-top: 2px; font-size: 14px; color: var(--c-ink-2); }
.auth-aside__price { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--c-line); font-size: 14px; color: var(--c-ink-2); }
.auth-aside__price strong { font-size: 22px; color: var(--c-ink); font-variant-numeric: tabular-nums; }
.auth-aside__price p + p { margin-top: 4px; }
.auth-aside__price a { display: inline-block; margin-top: 8px; font-weight: 500; }

/* =========================================================
   控制台與後台（共用殼）
   ========================================================= */
.app-body { background: var(--c-bg-soft); }

/* ---------- 控制台：頁面頭、方案卡、工具列、步驟軸、挑選卡、方案層級 ---------- */
.sidenav__label { margin: 14px 8px 2px; font-size: 12px; font-weight: 600; color: var(--c-ink-4); letter-spacing: .04em; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head__title { font-size: 24px; font-weight: 650; letter-spacing: -.01em; }
.page-head__desc { margin-top: 6px; font-size: 15px; color: var(--c-ink-2); max-width: 62ch; }
.sub-title { margin-bottom: 12px; font-size: 16px; font-weight: 600; }

.plan-card { min-width: 264px; padding: 16px; border: 1px solid var(--c-line); border-radius: var(--r-lg); background: #fff; }
.plan-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.plan-card__label { display: block; font-size: 13px; color: var(--c-ink-3); }
.plan-card__value { display: block; margin-top: 2px; font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
.plan-card__foot { margin-top: 8px; font-size: 12px; color: var(--c-ink-3); }
.plan-card--side { margin-top: 16px; min-width: 0; padding: 14px; }
.plan-card--side .plan-card__value { font-size: 19px; }
.plan-card--side .btn { padding: 0 10px; }
.view .toolbar { justify-content: flex-start; align-items: center; }
.view .toolbar .search { flex: 1 1 280px; }
.view .toolbar .select { flex: none; width: 180px; }
.view .toolbar .btn { margin-left: auto; }
.meter { margin-top: 12px; height: 6px; border-radius: 999px; background: var(--c-bg-sunk); overflow: hidden; }
.meter__bar { height: 100%; border-radius: 999px; background: var(--c-brand); transition: width .3s ease; }

.status-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--c-line); border-radius: 999px; background: #fff; font-size: 13px; color: var(--c-ink-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c-ink-4); }
.dot--ok { background: var(--c-ok); }
.icon-btn--notif { position: relative; }
.notif-dot { position: absolute; top: 3px; right: 3px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 999px; background: var(--c-bad); color: #fff; font-size: 10px; line-height: 15px; text-align: center; }

.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.search { position: relative; flex: 1 1 240px; min-width: 200px; }
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--c-ink-4); pointer-events: none; }
.search__input { width: 100%; height: 40px; padding: 0 12px 0 36px; border: 1px solid var(--c-line); border-radius: var(--r-sm); background: #fff; font: inherit; font-size: 15px; color: var(--c-ink); }
.search__input:focus { outline: none; border-color: var(--c-brand); box-shadow: var(--focus-ring); }

.order-layout { display: grid; grid-template-columns: 208px minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.order-layout .summary { position: sticky; top: 24px; }
.steps { position: sticky; top: 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; margin: 0; padding: 0; list-style: none; }
.steps__item { display: grid; gap: 2px; padding: 10px 12px; border-left: 2px solid var(--c-line); color: var(--c-ink-3); }
.steps__item.is-active { border-left-color: var(--c-brand); background: var(--c-brand-tint); color: var(--c-ink); }
.steps__no { font-size: 12px; font-weight: 600; color: var(--c-ink-4); }
.steps__item.is-active .steps__no { color: var(--c-brand); }
.steps__label { font-size: 14px; font-weight: 500; }

.ost { padding: 20px 0; border-top: 1px solid var(--c-line); }
.ost:first-child { padding-top: 0; border-top: 0; }
.ost__title { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; }
.ost__no { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--c-brand-tint); color: var(--c-brand); font-size: 12px; font-weight: 700; }
.ost__desc { margin-top: 6px; font-size: 14px; color: var(--c-ink-3); }

.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 10px; margin-bottom: 16px; }
.pick-grid--region { grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); }
.pick-card { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px 14px; border: 1px solid var(--c-line); border-radius: var(--r-md); background: #fff; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.pick-card:hover { border-color: var(--c-line-strong); }
.pick-card input { margin-top: 2px; accent-color: var(--c-brand); }
.pick-card:has(input:checked) { border-color: var(--c-brand); background: var(--c-brand-tint); }
.pick-card__name { display: block; font-size: 15px; font-weight: 600; color: var(--c-ink); }
.pick-card__desc { display: block; margin-top: 2px; font-size: 13px; color: var(--c-ink-3); }
.pick-card__price { display: block; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--c-brand); }

.tier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(184px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tier-card { display: flex; flex-direction: column; padding: 18px; border: 1px solid var(--c-line); border-radius: var(--r-lg); background: #fff; }
.tier-card--featured { border-color: var(--c-brand); background: var(--c-brand-tint); }
.tier-card__name { font-size: 15px; font-weight: 600; }
.tier-card__price { margin-top: 10px; font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; }
.tier-card__note { margin-top: 6px; font-size: 13px; color: var(--c-ink-3); }
.tier-card__cta { margin-top: 16px; }
.tier-card__tag { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--c-brand); color: #fff; font-size: 12px; }

.panel__text { font-size: 15px; line-height: 1.6; color: var(--c-ink-2); }
.panel__text + .panel__text { margin-top: 8px; }

.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; padding: 16px 12px;
  background: #fff; border-right: 1px solid var(--c-line);
}
.sidebar__brand { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 8px; }
.sidebar__role { margin: 16px 8px 0; font-size: 13px; color: var(--c-ink-3); }
.sidenav { display: grid; gap: 2px; margin-top: 8px; }
.sidenav a {
  display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: var(--r-sm);
  color: var(--c-ink-2); font-size: 15px; text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.sidenav a:hover { background: var(--c-bg-soft); color: var(--c-ink); text-decoration: none; }
.sidenav a[aria-current="page"] { background: var(--c-brand-tint); color: var(--c-brand-ink); font-weight: 500; }
.sidenav a[aria-current="page"] .icon { color: var(--c-brand); }
.sidenav .count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: var(--r-sm); background: var(--c-bg-sunk); color: var(--c-ink-2); font-size: 12px; font-weight: 600; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.sidenav .count:empty { display: none; }
.sidebar__foot { display: grid; gap: 4px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--c-line); }
.sidebar__foot a { display: flex; align-items: center; gap: 12px; height: 36px; padding: 0 12px; border-radius: var(--r-sm); color: var(--c-ink-2); font-size: 14px; }
.sidebar__foot a:hover { background: var(--c-bg-soft); color: var(--c-ink); text-decoration: none; }
.demo-note { margin: 8px 4px 0; padding: 12px; border-radius: var(--r-sm); background: var(--c-bg-soft); font-size: 13px; line-height: 1.6; color: var(--c-ink-3); }
.demo-note button { margin-top: 4px; padding: 0; border: 0; background: none; color: var(--c-brand); font-size: 13px; font-weight: 500; cursor: pointer; }
.demo-note button:hover { text-decoration: underline; text-underline-offset: 3px; }
.sidebar__close { display: none; }

.main { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px; height: var(--header-h); padding: 0 32px;
  background: #fff; border-bottom: 1px solid var(--c-line);
}
.topbar__menu { display: none; }
.topbar__title { font-size: 18px; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.topbar__right { display: flex; align-items: center; gap: 16px; margin-left: auto; min-width: 0; }
.balance-chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border: 1px solid var(--c-line); border-radius: var(--r-sm); font-size: 14px; color: var(--c-ink-3); white-space: nowrap; }
a.balance-chip:hover { text-decoration: none; border-color: var(--c-line-strong); background: var(--c-bg-soft); color: var(--c-ink-2); }
.balance-chip strong { color: var(--c-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.user-email { font-size: 14px; color: var(--c-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }

.content { padding: 32px; max-width: 1240px; }
.view { display: none; }
.view.is-active { display: grid; gap: 24px; }
.view__intro { font-size: 15px; color: var(--c-ink-2); max-width: 48em; }

.panel { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg); min-width: 0; }
.panel__head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; padding: 16px 20px; border-bottom: 1px solid var(--c-line); }
.panel__title { font-size: 16px; }
.panel__desc { margin-top: 2px; font-size: 14px; color: var(--c-ink-3); }
.panel__body { padding: 20px; }
.panel__body--flush { padding: 0; }
.panel__foot { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; padding: 16px 20px; border-top: 1px solid var(--c-line); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { display: flex; flex-direction: column; padding: 20px; background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg); }
.stat__label { font-size: 14px; color: var(--c-ink-3); }
.stat__value { margin-top: 8px; font-size: 26px; font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; }
.stat__value small { margin-left: 4px; font-size: 14px; font-weight: 400; color: var(--c-ink-3); }
.stat__foot { margin-top: 12px; font-size: 14px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.grid-2-1 { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }

/* 資料表 */
.table-wrap { overflow-x: auto; }
.dtable { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.dtable th { padding: 10px 16px; text-align: left; font-size: 13px; font-weight: 500; color: var(--c-ink-3); background: var(--c-bg-soft); border-bottom: 1px solid var(--c-line); white-space: nowrap; }
.dtable td { padding: 12px 16px; border-bottom: 1px solid var(--c-line); vertical-align: middle; }
.dtable tbody tr:last-child td { border-bottom: 0; }
.dtable th, .dtable td { padding-left: 12px; padding-right: 12px; }
.dtable th:first-child, .dtable td:first-child { padding-left: 20px; }
.dtable th:last-child, .dtable td:last-child { padding-right: 20px; }
.dtable tbody tr:hover td { background: #FAFBFC; }
.dtable th.num, .dtable td.num { text-align: right; }
.dtable .mono { font-size: 13px; }
.cell-sub { display: block; font-size: 13px; color: var(--c-ink-3); font-weight: 400; }
.cell-sub.nowrap { white-space: nowrap; }
.dtable .actions { display: flex; justify-content: flex-end; gap: 4px; white-space: nowrap; }
.dtable .td-check { width: 44px; }
.dtable .col-wide { min-width: 240px; }
.cell-purpose { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 6px; max-width: 34em; font-size: 13px; line-height: 1.6; color: var(--c-ink-2); }
.dtable .actions--stack { flex-direction: column; align-items: stretch; gap: 4px; }
.dtable .clip { display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.secret { display: inline-flex; align-items: center; gap: 4px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* 空狀態 */
.empty { display: grid; justify-items: start; gap: 8px; padding: 40px 24px; }
.empty__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-md); background: var(--c-bg-soft); color: var(--c-ink-3); }
.empty__title { margin-top: 8px; font-size: 16px; font-weight: 600; color: var(--c-ink); }
.empty__desc { font-size: 14px; color: var(--c-ink-3); max-width: 36em; }
.empty .btn { margin-top: 8px; }

/* 下單表單 */
.order-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.summary { position: sticky; top: calc(var(--header-h) + 24px); }
.summary__rows { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 0; padding: 20px; font-size: 14px; }
.summary__rows dt { color: var(--c-ink-3); }
.summary__rows dd { padding-left: 16px; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.summary__rows .total { padding-top: 12px; border-top: 1px solid var(--c-line); font-size: 15px; font-weight: 600; color: var(--c-ink); }
.summary__rows dd.total { font-size: 20px; }
.summary__note { padding: 0 20px 20px; font-size: 13px; color: var(--c-ink-3); }
.confirm-box { padding: 16px; border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-bg-soft); }
.confirm-box.is-checked { border-color: var(--c-brand-line); background: var(--c-brand-tint); }
.submit-hint { font-size: 13px; color: var(--c-ink-3); }
.foot-total { margin-left: auto; font-size: 14px; color: var(--c-ink-3); white-space: nowrap; }
.foot-total strong { margin-left: 4px; font-size: 18px; font-weight: 600; color: var(--c-ink); font-variant-numeric: tabular-nums; }

/* 後台 IP 登記 */
.order-brief { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; padding: 16px; border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-bg-soft); font-size: 14px; }
.order-brief dt { color: var(--c-ink-3); }
.order-brief dd { overflow-wrap: anywhere; }
.code-input { font-family: var(--mono); font-size: 13px; min-height: 160px; }
.wait { font-size: 13px; color: var(--c-ink-3); white-space: nowrap; }

.scrim { display: none; }

/* =========================================================
   響應式
   ========================================================= */
@media (max-width: 1366px) {
  .app { grid-template-columns: 232px minmax(0, 1fr); }
  .content { padding: 24px; }
  .topbar { padding: 0 24px; }
}

@media (max-width: 1100px) {
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .step { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 16px; padding-bottom: 24px; }
  .step::after { left: 18px; right: auto; top: 40px; bottom: 4px; width: 1px; height: auto; }
  .step__num { grid-row: span 3; }
  .step__title { margin-top: 5px; }
  .step .slot[data-empty] { grid-column: 2; }
  .region-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-grid, .grid-2-1 { grid-template-columns: 1fr; }
  .summary { position: static; }
  .order-layout { grid-template-columns: 1fr; }
  .steps { position: static; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; padding-bottom: 6px; }
  .steps__item { border-left: 0; border-bottom: 2px solid var(--c-line); }
  .steps__item.is-active { border-bottom-color: var(--c-brand); }
}

@media (max-width: 960px) {
  :root { --gutter: 20px; }
  .site-nav, .header-actions .btn--ghost { display: none; }
  .menu-toggle { display: inline-flex; }
  .mobile-nav { border-top: 1px solid var(--c-line); background: #fff; }
  .mobile-nav.is-open { display: block; }
  .mobile-nav ul { display: grid; padding: 8px 0 16px; }
  .mobile-nav a { display: block; padding: 12px 0; color: var(--c-ink); font-size: 16px; border-bottom: 1px solid var(--c-line); }
  .mobile-nav a:hover { text-decoration: none; color: var(--c-brand); }
  .mobile-nav .mobile-nav__actions { display: flex; gap: 12px; padding-top: 16px; }
  .mobile-nav .mobile-nav__actions .btn { flex: 1; border-bottom: 1px solid var(--c-line-strong); }
  .mobile-nav .mobile-nav__actions .btn--primary { border-color: transparent; }
  .hero { padding: 48px 0 40px; }
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__title { font-size: 32px; }
  .plans, .plans--3 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 24px; }
  .product-card { grid-template-columns: auto minmax(0, 1fr); }
  .product-card__action { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .auth__grid { grid-template-columns: 1fr; gap: 40px; }
  .auth-card { max-width: 520px; }

  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 60; width: 280px; height: auto;
    transform: translateX(-100%); transition: transform .2s ease; box-shadow: none;
  }
  .sidebar.is-open { transform: none; box-shadow: 0 16px 40px rgba(16, 24, 40, .18); }
  .sidebar__close { display: inline-flex; }
  .scrim { position: fixed; inset: 0; z-index: 55; background: rgba(18, 26, 43, .4); }
  .scrim.is-open { display: block; }
  .topbar { padding: 0 16px; gap: 8px; }
  .topbar__menu { display: inline-flex; }
  .user-email { display: none; }
  .content { padding: 24px 16px; }
}

@media (max-width: 760px) {
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 32px; }
  .section-head__title { font-size: 24px; }
  .section-head--split { flex-direction: column; align-items: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .cta-band { padding: 24px; }

  /* 表格轉為上下堆疊 */
  .stack-sm thead { display: none; }
  .stack-sm, .stack-sm tbody, .stack-sm tr, .stack-sm td { display: block; width: 100%; }
  .stack-sm tr { padding: 12px 16px; border-bottom: 1px solid var(--c-line); }
  .stack-sm tbody tr:last-child { border-bottom: 0; }
  .stack-sm td, .stack-sm tbody tr:last-child td {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 6px 0; border: 0; text-align: right; background: transparent !important;
  }
  .dtable.stack-sm td, .dtable.stack-sm td:first-child, .dtable.stack-sm td:last-child { padding-left: 0; padding-right: 0; }
  .stack-sm td::before { content: attr(data-label); flex: none; align-self: flex-start; padding-top: 1px; color: var(--c-ink-3); font-size: 13px; text-align: left; }
  .stack-sm td > .cell { min-width: 0; text-align: right; }
  .stack-sm td[data-label=""]::before { content: none; }
  .stack-sm td > * { min-width: 0; }
  .stack-sm .clip { max-width: 60%; }
  .stack-sm .actions { justify-content: flex-end; flex-wrap: wrap; }
  .stack-sm .actions--stack { flex-direction: row; }
  .stack-sm .col-wide { min-width: 0; flex-wrap: wrap; }
  .stack-sm .cell-purpose { text-align: left; }
  .stack-sm .group-row td { justify-content: flex-start; padding: 0; color: var(--c-ink-3); }
  .stack-sm .td-check { width: auto; }
  .hide-sm { display: none; }
  .show-sm { display: block; }
  .cell-sub.show-sm { display: block; }
  .rtable th, .rtable td { padding-left: 12px; padding-right: 12px; }
  .pricing-tabs { display: flex; }
  .pricing-tabs .tab { flex: 1 1 auto; padding: 0 10px; font-size: 14px; }

  .ptable th, .ptable td { padding-left: 16px; padding-right: 16px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { padding: 16px; }
  .stat__value { font-size: 22px; }
}

@media (max-width: 600px) {
  :root { --gutter: 16px; }
  .cat-grid { grid-template-columns: 1fr; }
  .hero__title { font-size: 28px; }
  .hero__lead { font-size: 16px; }
  .hero__price-num { font-size: 30px; }
  .hero__cta .btn { flex: 1; }
  .spec__rows { grid-template-columns: 72px minmax(0, 1fr); padding: 16px; }
  .spec__head, .spec__foot { padding-left: 16px; padding-right: 16px; }
  .product-card { grid-template-columns: 1fr; padding: 24px; }
  .product-card__action .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .auth { padding: 24px 0 64px; }
  .auth-card { padding: 24px 20px; }
  .header-actions .btn--primary { padding: 0 12px; }
  .logo__cn { display: none; }
  .balance-chip span { display: none; }
  .topbar__title { font-size: 16px; }
  .toast-region { left: 16px; right: 16px; bottom: 16px; max-width: none; }
  .modal__head, .modal__body, .modal__foot { padding-left: 20px; padding-right: 20px; }
}

@media (max-width: 380px) {
  .stats { grid-template-columns: 1fr; }
  .topbar .btn__label { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* 方案與計費區塊響應式 */
@media (max-width: 1100px) {
  .value-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .value-grid { grid-template-columns: 1fr; }
  .hero__metrics strong { font-size: 22px; }
  .hero__metrics span { font-size: 12px; }
}
