/* ==========================================================================
   WinTrader 期貨｜股票 量化交易系統 官方網站 — 基礎樣式
   風格：深藍 × 金色（deep navy / gold）。
   深藍 #0b1f3a 為主色底（頁首區塊、頁尾），金 #c8a24b 為重點色（按鈕、標籤、
   分隔線），內容區維持淺色畫布與白色卡片，確保閱讀對比。
   標題 Poppins、內文 Inter、中文 Microsoft JhengHei / Noto Sans TC，數值等寬。
   ========================================================================== */

:root {
  --canvas: #f5f6f8;
  --surface: #ffffff;
  --raised: #f8f9fa;
  --control: #ffffff;
  --hairline: #e3e8f0;
  --hairline-soft: #edf0f5;
  --ink: #0b1f3a;
  --ink-soft: #43536f;
  --ink-mute: #64748f;
  --navy: #0b1f3a;
  --navy-deep: #081527;
  --navy-side: #1a2744;
  --gold: #c8a24b;
  --gold-bright: #a9832f;
  --gold-text: #8a6a20;
  --indigo: #4338ca;
  --indigo-deep: #3730a3;
  --danger: #dc3545;
  --warning: #d97706;
  --ok: #16a34a;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--canvas);
  color: var(--ink);
  font-family: Poppins, Inter, "Segoe UI", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 所有數字使用等寬字體，欄位才能垂直對齊比較 */
.num,
.price,
table td,
table th {
  font-family: Consolas, "Cascadia Mono", "SFMono-Regular", monospace;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- 版面骨架 */
.shell {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
}

@media (max-width: 640px) {
  .shell {
    padding-inline: 18px;
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}

.skip-link:focus {
  left: 8px;
  top: 8px;
}

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

/* ------------------------------------------------------------- 區段標籤 */
.eyebrow {
  font-family: Poppins, Inter, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-text);
}

.eyebrow-mute {
  color: var(--ink-mute);
}

/* Tailwind 端使用 var(--gold-text)：主視覺金「文字色」 */
.text-gold-text {
  color: var(--gold-text);
}

.section {
  padding-block: 72px;
  border-top: 1px solid var(--hairline-soft);
}

.section-tight {
  padding-block: 48px;
}

@media (max-width: 768px) {
  .section {
    padding-block: 52px;
  }
}

.section-title {
  font-family: Poppins, Inter, sans-serif;
  font-size: clamp(1.6rem, 2.7vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--ink);
}

.section-lead {
  color: var(--ink-soft);
  max-width: 62ch;
  margin-top: 14px;
}

/* -------------------------------------------------------------------- 卡片 */
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(11, 31, 58, 0.06);
}

.card-pad {
  padding: 24px;
}

.card-hover {
  transition: border-color 120ms ease-out, box-shadow 120ms ease-out, transform 120ms ease-out;
}

.card-hover:hover {
  border-color: #c9d4e5;
  box-shadow: 0 8px 24px rgba(11, 31, 58, 0.1);
}

.card-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-family: Poppins, Inter, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

/* -------------------------------------------------------------------- 按鈕 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: Poppins, Inter, sans-serif;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1;
  padding: 12px 20px;
  min-height: 42px;
  cursor: pointer;
  transition: background-color 120ms ease-out, border-color 120ms ease-out, color 120ms ease-out, box-shadow 120ms ease-out;
  text-decoration: none;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}

/* 主要按鈕：金底深藍字（對比約 8:1），為全站唯一的主要行動色 */
.btn-primary {
  background: linear-gradient(135deg, #d6b167, var(--gold));
  color: var(--navy);
  border-color: var(--gold-bright);
  box-shadow: 0 2px 8px rgba(200, 162, 75, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  border-color: var(--gold-bright);
  color: var(--navy);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--hairline);
}

.btn-secondary:hover {
  background: var(--raised);
  border-color: #c9d4e5;
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: transparent;
  padding-inline: 10px;
}

.btn-ghost:hover {
  color: var(--ink);
  background: #eef1f6;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-danger:hover {
  background: #c82333;
  border-color: #c82333;
}

.btn-sm {
  min-height: 32px;
  padding: 7px 12px;
  font-size: 15px;
  border-radius: 10px;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ------------------------------------------------------------ 狀態標記 */
/* 分段選取（盤後摘要：ETF 分頁、1M/3M 區間、排行 tab）
   框線需清楚可見（舊版 dashboard.css 為 rgba(148,155,175,.35) 邊框＋金色選取態），
   .btn-secondary 的 --hairline 邊框在白底上太淡，故另立 .seg-btn。 */
.seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c3cede;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  padding: 8px 14px;
  min-height: 34px;
  cursor: pointer;
  transition: background-color 120ms ease-out, border-color 120ms ease-out, color 120ms ease-out;
}

.seg-btn:hover {
  background: #f6f1e4;
  border-color: var(--gold);
}

.seg-btn.is-active,
.seg-btn[aria-pressed="true"] {
  background: #f6efdc;
  border-color: var(--gold-bright);
  color: #6b5313;
  box-shadow: inset 0 0 0 1px rgba(200, 162, 75, 0.35);
}

/* 盤後摘要 treemap：板塊外框（分隔相鄰色塊，舊版為 2px 底色邊） */
.treemap-tile {
  border: 2px solid var(--surface);
  border-radius: 4px;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px;
}

.treemap-tile:hover {
  filter: brightness(1.12);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.chip-ok {
  background: #e7f6ec;
  color: #166534;
}

.chip-warn {
  background: #fef3e2;
  color: #92400e;
}

.chip-block {
  background: #fde8ea;
  color: #b91c1c;
}

.chip-mute {
  background: #eef1f6;
  color: #64748f;
}

.chip-gold {
  background: #f6efdc;
  color: #8a6a20;
}

/* -------------------------------------------------------------------- 表格 */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

/* U-38：表格 caption（可及性——螢幕閱讀器朗讀表格用途；視覺上充當表題） */
.table caption {
  caption-side: top;
  text-align: left;
  font-size: 13px;
  color: var(--ink-mute);
  padding: 8px 16px 2px;
}

.table th {
  text-align: left;
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  background: var(--raised);
  white-space: nowrap;
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline-soft);
  color: var(--ink-soft);
  vertical-align: middle;
}

.table tbody tr:hover td {
  background: var(--raised);
}

.table td.strong,
.table th.strong {
  color: var(--ink);
  font-weight: 600;
}

.table .right {
  text-align: right;
}

/* -------------------------------------------------------------------- 表單 */
.field {
  display: block;
}

.field-label {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.field-label .req {
  color: var(--danger);
  margin-left: 2px;
}

.input,
.select,
.textarea {
  width: 100%;
  background: var(--control);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  color: var(--ink);
  font-size: 15.5px;
  font-family: inherit;
  padding: 10px 12px;
  min-height: 42px;
  transition: border-color 120ms ease-out, box-shadow 120ms ease-out;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 3px rgba(200, 162, 75, 0.22);
}

/* 固定寬度輸入框（.input 為 width:100%，與 Tailwind w-* 同級時以 site.css 後載為準，
   故此處另立 .input-inline；勿加 .num——.page-hero .num 會把文字改成白色）。 */
.input-inline {
  width: 224px;
}

.input::placeholder,
.textarea::placeholder {
  color: #94a3b8;
}

.textarea {
  min-height: 96px;
  resize: vertical;
}

.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-mute) 50%),
    linear-gradient(135deg, var(--ink-mute) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.field-error {
  color: var(--danger);
  font-size: 13.5px;
  margin-top: 5px;
}

.form-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 720px) {
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.form-grid .full {
  grid-column: 1 / -1;
}

/* form-grid-sm：更緊湊的表單網格（U-38：原本使用但未定義的死 class） */
.form-grid-sm {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 720px) {
  .form-grid-sm {
    grid-template-columns: minmax(0, 1fr);
  }
}

.form-grid-sm .full {
  grid-column: 1 / -1;
}

/* ------------------------------------------------------------- 提示訊息 */
.notice {
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  padding: 12px 16px;
  font-size: 15.5px;
  color: var(--ink-soft);
}

.notice-ok {
  border-color: #bbe3c8;
  background: #e7f6ec;
  color: #166534;
}

.notice-warn {
  border-color: #f5d9a8;
  background: #fef3e2;
  color: #92400e;
}

.notice-error {
  border-color: #f5b8be;
  background: #fde8ea;
  color: #b91c1c;
}

/* ---------------------------------------------------------------- 登入列 */
.link {
  color: var(--gold-text);
  text-decoration: none;
  border-bottom: 1px solid rgba(200, 162, 75, 0.5);
}

.link:hover {
  color: var(--gold-bright);
  border-bottom-color: currentColor;
}

.link-plain {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.link-plain:hover {
  color: var(--ink);
  border-bottom-color: var(--hairline);
}

/* ------------------------------------------------------------------- 導覽 */
.nav-link {
  font-size: 15.5px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 4px;
  border-bottom: 2px solid transparent;
  transition: color 120ms ease-out, border-color 120ms ease-out;
}

.nav-link:hover {
  color: var(--gold-text);
  border-bottom-color: var(--gold);
}

.nav-link.active {
  color: var(--gold-text);
  border-bottom-color: var(--gold);
}

/* --------------------------------------------------------------- 品牌標誌 */
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark .brand-name {
  font-family: Poppins, Inter, sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ink);
  text-transform: uppercase;
}

.brand-mark .brand-sub {
  font-family: Inter, Consolas, sans-serif;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--ink-mute);
  text-transform: uppercase;
}

/* ------------------------------------------------------------- 資料表列 */
.data-row {
  border-bottom: 1px solid var(--hairline-soft);
  padding: 14px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------- 引用區塊 */
.quote {
  border-left: 3px solid var(--gold);
  padding-left: 18px;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------- 頁面區塊 */
/* 主視覺：深藍底（對齊 regilygo.com hero），底部以金色收邊 */
.hero,
.page-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid var(--gold);
  background: linear-gradient(155deg, var(--navy-side) 0%, var(--navy) 52%, var(--navy-deep) 100%);
  color: #ffffff;
}

.hero-grid {
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  pointer-events: none;
}

/* 深底主視覺內的元素配色：標題白、副標白 82%、標籤金
   （覆蓋淺色畫布使用的 text-ink / text-ink-soft 等工具類，維持 4.5:1 以上對比） */
.hero .eyebrow,
.page-hero .eyebrow {
  color: var(--gold);
}

.hero .text-ink,
.page-hero .text-ink,
.hero .section-title,
.page-hero .section-title {
  color: #ffffff;
}

.hero .section-lead,
.page-hero .section-lead {
  color: rgba(255, 255, 255, 0.82);
}

.hero .text-ink-soft,
.page-hero .text-ink-soft {
  color: rgba(255, 255, 255, 0.82);
}

.hero .text-ink-mute,
.page-hero .text-ink-mute {
  color: rgba(255, 255, 255, 0.62);
}

.hero .stat-label,
.page-hero .stat-label {
  color: rgba(255, 255, 255, 0.62);
}

.hero .num,
.page-hero .num {
  color: #ffffff;
}

/* 深底上的次要按鈕：透明底、白色描邊與白字 */
.hero .btn-secondary,
.page-hero .btn-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
}

.hero .btn-secondary:hover,
.page-hero .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.72);
}

/* 深底上的截圖框與說明列 */
.hero .shot,
.page-hero .shot {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.hero .shot-caption,
.page-hero .shot-caption {
  border-top-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.68);
}

/* 深藍區段帶（對齊 regilygo 的 stats band / CTA band） */
.band-navy {
  background: linear-gradient(140deg, var(--navy-side) 0%, var(--navy) 55%, var(--navy-deep) 100%);
  color: #ffffff;
}

.band-navy .eyebrow {
  color: var(--gold);
}

.band-navy .eyebrow-mute {
  color: rgba(255, 255, 255, 0.62);
}

.band-navy .text-ink,
.band-navy .section-title {
  color: #ffffff;
}

.band-navy .text-ink-soft,
.band-navy .section-lead {
  color: rgba(255, 255, 255, 0.82);
}

.band-navy .text-ink-mute {
  color: rgba(255, 255, 255, 0.62);
}

.band-navy .num {
  color: #ffffff;
}

.band-navy .stat-label {
  color: rgba(255, 255, 255, 0.62);
}

.band-navy .btn-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
}

.band-navy .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.72);
}

.band-navy .card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

/* ------------------------------------------------------------- 螢幕截圖框 */
.shot {
  border: 1px solid var(--hairline);
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 8px 24px rgba(11, 31, 58, 0.12);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.shot-caption {
  border-top: 1px solid var(--hairline);
  background: var(--raised);
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--ink-mute);
  font-family: Consolas, "Cascadia Mono", monospace;
  letter-spacing: 0.04em;
}

/* --------------------------------------------------------------- 價格卡 */
.price-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 2px 12px rgba(11, 31, 58, 0.06);
}

.price-card.is-featured {
  border-color: var(--gold);
  background: #fffdf6;
  box-shadow: 0 8px 24px rgba(200, 162, 75, 0.18);
}

.price-card .price-figure {
  font-family: Poppins, Consolas, sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
}

.price-card .price-figure .unit {
  font-size: 1.05rem;
  color: var(--ink-mute);
  font-weight: 400;
  margin-left: 4px;
}

.price-card.is-featured .price-figure {
  color: var(--gold-text);
}

/* ------------------------------------------------------------- 頁尾 */
.site-footer {
  border-top: 3px solid var(--gold);
  background: var(--navy);
  color: #9aa7bd;
  padding-block: 48px 32px;
  margin-top: 0;
}

.footer-link {
  color: #9aa7bd;
  font-size: 15px;
  text-decoration: none;
  display: inline-block;
  padding: 4px 0;
}

.footer-link:hover {
  color: var(--gold);
}

/* 頁尾內的共用元素改用深底配色（維持 4.5:1 以上對比） */
.site-footer .eyebrow {
  color: var(--gold);
}

.site-footer .eyebrow-mute {
  color: #b7c1d4;
}

.site-footer .text-ink-mute {
  color: #9aa7bd;
}

.site-footer .text-ink-soft {
  color: #b7c1d4;
}

.site-footer .brand-mark .brand-name {
  color: #ffffff;
}

.site-footer .brand-mark .brand-sub {
  color: #b7c1d4;
}

.site-footer .rule {
  border-top-color: rgba(255, 255, 255, 0.12);
}

.site-footer .footer-link,
.site-footer p {
  color: #9aa7bd;
}

/* --------------------------------------------------------------- 後台 */
.admin-side {
  background: linear-gradient(180deg, var(--navy-side) 0%, var(--navy-deep) 100%);
  border-right: none;
}

.admin-side a {
  display: block;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 15px;
  color: #aab4cd;
  text-decoration: none;
  transition: background-color 120ms ease-out, color 120ms ease-out;
}

.admin-side a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.admin-side a.active {
  background: rgba(99, 102, 241, 0.18);
  border-left: 3px solid #6366f1;
  color: #ffffff;
}

.admin-side .group-label {
  padding: 16px 14px 6px;
  font-family: Inter, sans-serif;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8a94ad;
}

/* 側欄內的分隔線與品牌文字改深底配色 */
.admin-side .border-b,
.admin-side .border-t {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.admin-side .brand-mark .brand-name {
  color: #ffffff;
}

.admin-side .brand-mark .brand-sub {
  color: #8a94ad;
}

.admin-side .link-plain {
  color: #8a94ad;
}

.admin-side .link-plain:hover {
  color: var(--gold);
  border-bottom-color: transparent;
}

/* 後台頂欄：深藍漸層（對應 ERP_OK admin topbar） */
.admin-topbar {
  background: linear-gradient(135deg, var(--navy-side), var(--navy-deep));
  border-bottom: none;
}

.admin-topbar .eyebrow {
  color: var(--gold);
}

.admin-topbar .eyebrow-mute {
  color: #b7c1d4;
}

.admin-topbar .text-ink-soft {
  color: #e2e8f2;
}

.admin-topbar .btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.admin-topbar .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
}

.stat-figure {
  font-family: Poppins, Consolas, sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.stat-label {
  font-size: 13.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-family: Inter, sans-serif;
}

/* --------------------------------------------------------- 無障礙 */
:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ========================================================== 會員訂閱擴充（T1-09 起） */

/* 到期提醒 banner（登入且任一有效模組剩餘 ≤14 天；純提示、無自動扣款） */
.expiry-banner {
  border-bottom: 1px solid #f5d9a8;
  background: #fef3e2;
  color: #92400e;
  font-size: 14.5px;
}

.expiry-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 10px;
  flex-wrap: wrap;
}

.expiry-banner-text {
  margin: 0;
  line-height: 1.7;
}

.expiry-banner .link {
  color: var(--gold-text);
  white-space: nowrap;
}

/* 複製結果提示（推薦頁） */
.copy-result {
  color: var(--ok);
  min-width: 12em;
}

/* 商品卡「合購每月省」計價提示（由 OriginalPrice − monthly_price 計算） */
.price-savings {
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--gold-text);
}

/* 結帳五步流程（T2-03）：商品 → 期間 → 推薦碼 → 金額 → 付款 */
.checkout-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  font-size: 14.5px;
  color: var(--ink-soft);
}

.checkout-steps li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.checkout-steps .num-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink-mute);
  font-size: 12px;
}

.cli-checkout-steps .num-step { display: none; }

/* 推薦碼 inline 驗證訊息（無效／自薦 → 原因小字；有效 → 已套用綠字） */
.ref-msg {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.7;
}

.ref-msg-ok {
  color: var(--ok);
}

.ref-msg-warn {
  color: var(--warning);
}
