/* ThreeFolio 三分倉 — design system v2
   襯線標題(Noto Serif TC)+ 黑體內文(Noto Sans TC)+ 等寬數據(IBM Plex Mono)
   墨黑底、香檳金、hairline 邊框;無光暈、無漸層、無 emoji。 */
:root {
  --bg: #0c0d11;
  --bg-alt: #101219;
  --card: #14161e;
  --card-edge: rgba(231, 226, 213, .08);
  --text: #eceae3;
  --text-dim: #a39f93;
  --text-faint: #6e6a5e;
  --gold: #c9a962;
  --gold-hover: #d6b97a;
  --btc: #e08a2c;
  --usd: #43a47e;
  --danger: #c4574e;
  --font-display: "Noto Serif TC", "Noto Serif CJK TC", serif;
  --font-zh: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-mono: "Inter", "Noto Sans TC", sans-serif;
  --r-s: 4px;
  --r-m: 8px;
  --r-l: 10px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; hanging-punctuation: first allow-end; }
body {
  font-feature-settings: "tnum" 1;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-zh);
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
}
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 760px; }

h1, h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: .01em; }
h1 { font-size: clamp(36px, 5.2vw, 54px); line-height: 1.25; text-wrap: balance; }
h2 { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.3; text-align: left; }
h3 { font-family: var(--font-zh); font-weight: 700; font-size: 17px; line-height: 1.45; }

.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--card-edge); }
.sec-no {
  font: 500 12px var(--font-mono); color: var(--gold); letter-spacing: .18em; margin-bottom: 12px;
}
.sec-no::after {
  content: ""; display: inline-block; width: 32px; height: 1px;
  background: rgba(201, 169, 98, .45); margin-left: 12px; vertical-align: .28em;
}
.section-lead { text-align: left; color: var(--text-dim); margin: 14px 0 52px; font-size: 15px; max-width: 680px; }

/* 微觀排版 */
.sep {
  display: inline-block; width: 1px; height: .85em; background: currentColor;
  opacity: .3; margin: 0 .7em; vertical-align: -.06em;
}
.fine-print { color: var(--text-faint); font-size: 12px; line-height: 1.9; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12, 13, 17, .82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-edge);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark { display: inline-flex; color: var(--gold); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: .02em; }
.brand-name em { font-style: normal; color: var(--text-dim); font-size: 13px; margin-left: 6px; font-family: var(--font-zh); font-weight: 400; }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a {
  color: var(--text-dim); text-decoration: underline transparent; text-underline-offset: 6px;
  font-size: 13px; transition: color .15s, text-decoration-color .15s;
}
.nav-links a:hover { color: var(--text); text-decoration-color: var(--gold); }
.nav-links .nav-demo { color: var(--gold); }
.nav-user {
  color: var(--text-dim); font-size: 13px; font-family: var(--font-mono);
  border: 1px solid var(--card-edge); border-radius: var(--r-m); padding: 7px 14px;
}

/* buttons */
.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  font-family: var(--font-zh); font-weight: 700; font-size: 15px;
  padding: 13px 26px; border-radius: var(--r-m);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--gold); color: #15110a; letter-spacing: .02em; }
.btn-primary:hover { background: var(--gold-hover); }
.btn-primary:active { background: #b8964e; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--card-edge); }
.btn-ghost:hover { border-color: rgba(231, 226, 213, .25); }
.btn-sm { padding: 9px 18px; font-size: 13px; }
.btn-lg { padding: 16px 38px; font-size: 17px; }
.btn-danger { border-color: rgba(196, 87, 78, .45); color: #d99892; }
.btn-danger:hover { border-color: rgba(196, 87, 78, .7); }

/* hero */
.hero { padding: 72px 0 88px; }
.hero-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 48px; align-items: center; }
.hero-eyebrow { font: 500 12px/1 var(--font-zh); color: var(--gold); letter-spacing: .32em; margin-bottom: 20px; }
.eyebrow-status {
  margin-left: 10px; font-size: 11px; font-weight: 500; letter-spacing: .06em;
  color: var(--text-dim); border: 1px solid var(--card-edge); border-radius: var(--r-s);
  padding: 3px 8px; vertical-align: 1px;
}
.hero h1 { margin-bottom: 22px; }
.hero-sub { color: var(--text-dim); font-size: 16px; margin-bottom: 26px; max-width: 30em; }
.hero-sub strong { color: var(--text); }
.hero-trust { list-style: none; display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.hero-trust li {
  border: 1px solid rgba(201, 169, 98, .35); color: var(--gold); border-radius: var(--r-s);
  padding: 6px 12px; font: 500 12px/1 var(--font-zh); letter-spacing: .14em;
}
.hero-note { color: var(--text-faint); font-size: 12px; line-height: 1.9; }

/* allocator widget */
.hero-widget {
  background: var(--card);
  border: 1px solid var(--card-edge); border-radius: var(--r-l); padding: 24px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 24px 60px rgba(0, 0, 0, .45);
}
.aw-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.aw-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.aw-reset {
  background: none; border: 0; color: var(--text-dim); font-size: 12px; cursor: pointer;
  font-family: var(--font-zh); text-decoration: underline dotted; text-underline-offset: 4px;
}
.aw-reset:hover { color: var(--gold); }

.aw-bar { position: relative; display: flex; height: 44px; border-radius: var(--r-m); margin-bottom: 18px; user-select: none; }
.aw-seg { display: flex; align-items: center; justify-content: center; height: 100%; transition: width .08s linear; min-width: 0; overflow: hidden; }
.aw-seg:first-child { border-radius: var(--r-m) 0 0 var(--r-m); }
.aw-seg:nth-child(3) { border-radius: 0 var(--r-m) var(--r-m) 0; }
.aw-seg-btc { background: var(--btc); }
.aw-seg-gold { background: var(--gold); }
.aw-seg-usd { background: var(--usd); }
.aw-seg-label { font-size: 13px; font-weight: 700; color: #14110a; white-space: nowrap; }
.aw-seg-label b { font-family: var(--font-mono); font-weight: 500; font-size: 13px; }
.aw-seg-narrow .aw-seg-label { display: none; }
.aw-handle {
  position: absolute; top: -6px; bottom: -6px; width: 12px; transform: translateX(-50%);
  background: #e8ecf6; border-radius: 6px; cursor: grab; z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 0, 0, .25);
  touch-action: none;
}
.aw-handle::after {
  content: ""; position: absolute; inset: 12px 4px; border-radius: 2px;
  background: repeating-linear-gradient(180deg, #8b97b6 0 2px, transparent 2px 5px);
}
.aw-handle:hover, .aw-handle:focus-visible {
  box-shadow: 0 2px 8px rgba(0, 0, 0, .5), 0 0 0 3px rgba(201, 169, 98, .45); outline: none;
}
.aw-handle:active { cursor: grabbing; }

.aw-chart { min-height: 200px; transition: opacity .15s; }
.aw-busy { opacity: .45; }
.aw-loading {
  display: grid; place-items: center; min-height: 200px; color: var(--text-faint); font-size: 13px;
  border-radius: var(--r-m);
  background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, .045) 50%, transparent 65%) #0e1016;
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.aw-legend { display: flex; align-items: center; gap: 6px; justify-content: center; color: var(--text-dim); font-size: 12px; margin: 6px 0 14px; }
.aw-legend .dot-btc { margin-left: 14px; }

.aw-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.aw-stat {
  background: var(--bg); border: 1px solid var(--card-edge); border-radius: var(--r-m);
  padding: 12px 8px; text-align: center; display: flex; flex-direction: column; gap: 2px;
}
.aw-stat b {
  font-family: var(--font-mono); font-weight: 500; font-size: 20px; color: var(--text);
  font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
.aw-stat-hl b { color: var(--gold); }
.aw-stat span { font-size: 12px; color: var(--text-dim); }
.aw-cta { width: 100%; }
.aw-note { margin-top: 12px; font-size: 11px; color: var(--text-faint); line-height: 1.9; text-align: center; }
.aw-note a { color: var(--gold); }
.aw-note svg { vertical-align: -2px; margin-left: 2px; }

/* ticker */
.ticker { background: var(--bg-alt); border-block: 1px solid var(--card-edge); }
.ticker-inner { display: flex; gap: 36px; padding: 15px 24px; flex-wrap: wrap; align-items: center; }
.tick { display: flex; align-items: baseline; gap: 10px; }
.tick-label { color: var(--text-dim); font: 400 12px var(--font-mono); letter-spacing: .06em; }
.tick-val {
  font-family: var(--font-mono); font-weight: 500; font-size: 15px;
  font-variant-numeric: tabular-nums; min-width: 6ch;
}
.tick-flash { animation: tick-flash .7s ease; }
@keyframes tick-flash { 0% { color: var(--gold); } }
.tick-src { margin-left: auto; color: var(--text-faint); font-size: 12px; }

/* dots */
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-btc { background: var(--btc); }
.dot-gold { background: var(--gold); }
.dot-usd { background: var(--usd); }

/* strategy cards */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 64px; }
.card {
  background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--r-l);
  padding: 28px; border-top: 2px solid transparent; transition: border-color .2s ease;
}
.card:hover { border-color: rgba(231, 226, 213, .18); }
.card-btc { border-top-color: var(--btc); }
.card-gold { border-top-color: var(--gold); }
.card-usd { border-top-color: var(--usd); }
.card-top { display: flex; align-items: baseline; gap: 12px; margin-bottom: 2px; }
.card-w {
  font-family: var(--font-mono); font-weight: 500; font-size: 30px;
  font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
.card-btc .card-w { color: var(--btc); }
.card-gold .card-w { color: var(--gold); }
.card-usd .card-w { color: var(--usd); }
.card h3 { font-size: 19px; }
.card-role { color: var(--text-dim); font-weight: 500; font-size: 13px; letter-spacing: .14em; margin-bottom: 12px; }
.card p { font-size: 15px; color: var(--text-dim); line-height: 1.85; }
.card-inst { margin-top: 14px; font-size: 12px !important; color: var(--text-faint) !important; font-family: var(--font-mono); }

/* 再平衡時間軸 */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 40px; }
.flow-step { position: relative; border-top: 1px solid var(--card-edge); padding-top: 18px; }
.flow-step::before { content: ""; position: absolute; top: -1px; left: 0; width: 28px; height: 2px; background: var(--gold); }
.flow-n { display: block; font: 500 12px var(--font-mono); letter-spacing: .12em; color: var(--gold); margin-bottom: 10px; }
.flow-t { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.flow-d { font-size: 13px; color: var(--text-dim); }
.flow-note { margin-top: 28px; max-width: 760px; }

/* steps */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.steps li { background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--r-l); padding: 26px; }
.step-n {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: var(--r-s); margin-bottom: 16px;
  border: 1px solid rgba(201, 169, 98, .4); color: var(--gold);
  font-family: var(--font-mono); font-weight: 500; font-size: 14px;
}
.steps h3 { font-size: 16px; margin-bottom: 8px; }
.steps p { font-size: 14px; color: var(--text-dim); line-height: 1.8; }
.steps b { color: var(--text); }

/* security hairline list */
.sec-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; }
.sec-item { display: flex; gap: 18px; padding: 26px 0; border-top: 1px solid var(--card-edge); }
.sec-ico {
  flex: 0 0 40px; height: 40px; border-radius: var(--r-m);
  background: rgba(201, 169, 98, .08); color: var(--gold); display: grid; place-items: center;
}
.sec-ico svg { width: 20px; height: 20px; display: block; }
.sec-item h3 { font-size: 16px; margin-bottom: 6px; }
.sec-item p { font-size: 14px; color: var(--text-dim); line-height: 1.8; }

/* fees */
.fees-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: start; }
.fees-explain { color: var(--text-dim); font-size: 15px; margin-bottom: 16px; line-height: 1.9; }
.fees-explain b { color: var(--text); }
.fees-box { background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--r-l); padding: 14px 26px; }
.fee-row { display: flex; justify-content: space-between; padding: 15px 0; border-bottom: 1px solid var(--card-edge); font-size: 15px; }
.fee-row:last-child { border-bottom: 0; }
.fee-row span { color: var(--text-dim); }
.fee-row b { font-family: var(--font-mono); font-weight: 500; }
.fee-row-hl b { color: var(--usd); font-family: var(--font-zh); font-weight: 700; }

/* faq */
.faq { background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--r-l); margin-bottom: 12px; overflow: hidden; }
.faq summary { cursor: pointer; padding: 18px 48px 18px 22px; font-weight: 700; font-size: 15px; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 12px; height: 12px;
  margin-top: -6px; transition: transform .2s ease;
  background:
    linear-gradient(currentColor, currentColor) center / 12px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 12px no-repeat;
  color: var(--text-dim);
}
.faq[open] summary::after { transform: rotate(45deg); color: var(--gold); }
.faq p { padding: 0 22px 20px; color: var(--text-dim); font-size: 14px; line-height: 1.9; }
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  .faq::details-content { height: 0; overflow: clip; transition: height .25s ease, content-visibility .25s allow-discrete; }
  .faq[open]::details-content { height: auto; }
}

/* final CTA */
.cta-final { padding: 96px 0; text-align: center; background: var(--bg-alt); border-block: 1px solid var(--card-edge); }
.cta-final h2 { text-align: center; margin-bottom: 8px; }
.cta-final p { color: var(--text-dim); margin-bottom: 30px; font-size: 16px; }

/* footer */
.footer { padding: 56px 0 36px; border-top: 1px solid var(--card-edge); }
.footer-grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.footer-brand { font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.footer-brand em { font-style: normal; color: var(--text-dim); font-size: 13px; margin-left: 6px; font-family: var(--font-zh); font-weight: 400; }
.footer-mail { color: var(--text-dim); font-size: 13px; font-family: var(--font-mono); }
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--text-dim); text-decoration: none; font-size: 13px; }
.footer-links a:hover { color: var(--text); }
.disclaimer { color: var(--text-faint); font-size: 12px; line-height: 1.9; margin-bottom: 16px; text-align: justify; }
.copyright { color: var(--text-faint); font-size: 12px; font-family: var(--font-mono); }

/* modal */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5, 6, 9, .75); backdrop-filter: blur(4px); animation: fade .18s ease both; }
@keyframes fade { from { opacity: 0; } }
.modal-card {
  position: relative; background: var(--card); border: 1px solid var(--card-edge);
  border-radius: var(--r-l); padding: 36px; width: min(420px, calc(100vw - 40px));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 24px 80px rgba(0, 0, 0, .5);
  animation: modal-in .18s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-card h3 { font-family: var(--font-display); font-size: 22px; margin-bottom: 10px; }
.modal-card > p { color: var(--text-dim); font-size: 14px; margin-bottom: 22px; }
.modal-x {
  position: absolute; top: 14px; right: 18px; background: none; border: 0;
  color: var(--text-dim); font-size: 24px; cursor: pointer; line-height: 1;
}
#waitlist-form { display: flex; flex-direction: column; gap: 12px; }
#waitlist-form input {
  background: var(--bg); border: 1px solid var(--card-edge); border-radius: var(--r-m);
  padding: 13px 16px; color: var(--text); font-size: 15px; font-family: var(--font-mono); outline: none;
}
#waitlist-form input:focus { border-color: var(--gold); }
.modal-ok { color: var(--usd); font-weight: 700; margin-top: 14px; font-size: 14px; }

/* dashboard (app.html) */
.dash-banner {
  border: 1px solid rgba(201, 169, 98, .35); color: var(--text-dim);
  border-radius: var(--r-m); padding: 12px 18px; font-size: 13px; margin: 24px 0; text-align: center;
}
.tag-preview {
  font: 500 11px/1 var(--font-mono); letter-spacing: .12em; color: var(--gold);
  border: 1px solid rgba(201, 169, 98, .4); border-radius: var(--r-s); padding: 3px 8px; margin-right: 10px;
}
.dash { padding: 24px 0 80px; }
.dash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 24px; }
.dash-card { background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--r-l); padding: 24px; }
.dash-card h3 { font-size: 13px; color: var(--text-dim); font-weight: 500; margin-bottom: 8px; }
.dash-num {
  font-family: var(--font-mono); font-weight: 500; font-size: 28px;
  font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
.dash-sub { font-size: 12px; color: var(--text-dim); margin-top: 4px; line-height: 1.8; }
.dash-num .up { color: var(--usd); }
.dash-wide { grid-column: 1 / -1; }
.dash-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.alloc-bars { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.alloc-row { display: grid; grid-template-columns: 120px 1fr 120px; gap: 14px; align-items: center; font-size: 14px; }
.alloc-name { color: var(--text-dim); }
.alloc-track { background: var(--bg); border-radius: 3px; height: 12px; position: relative; overflow: hidden; }
.alloc-fill { position: absolute; inset: 0 auto 0 0; border-radius: 3px; }
.alloc-target { position: absolute; top: -3px; bottom: -3px; width: 2px; background: rgba(255, 255, 255, .4); }
.alloc-val { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 13px; }
.table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14px; }
.table th { text-align: left; color: var(--text-dim); font-weight: 500; padding: 10px 12px; border-bottom: 1px solid var(--card-edge); font-size: 13px; }
.table td { padding: 12px; border-bottom: 1px solid rgba(231, 226, 213, .05); font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 13px; }
.table td:first-child { font-family: var(--font-zh); }
.tag { padding: 3px 10px; border-radius: var(--r-s); font-size: 12px; font-weight: 700; }
.tag-buy { background: rgba(67, 164, 126, .15); color: var(--usd); }
.tag-sell { background: rgba(224, 138, 44, .15); color: var(--btc); }
.tag-earn { background: rgba(201, 169, 98, .15); color: var(--gold); }

/* 封測連接表單 */
.connect-form { display: flex; flex-direction: column; gap: 12px; }
.connect-form input, .connect-form select {
  background: var(--bg); border: 1px solid var(--card-edge); border-radius: var(--r-m);
  padding: 11px 14px; color: var(--text); font-size: 14px; font-family: var(--font-mono);
  width: 100%;
}
.connect-form input:focus, .connect-form select:focus { border-color: var(--gold); outline: none; }
.connect-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 10px; }
.connect-row label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-dim); }
.earn-input {
  background: var(--bg); border: 1px solid var(--card-edge); border-radius: var(--r-m);
  padding: 8px 12px; color: var(--text); font-size: 13px; font-family: var(--font-mono); width: 140px;
}
.earn-input:focus { border-color: var(--gold); outline: none; }

/* lab(回測實驗室) */
.lab { padding: 48px 24px 80px; }
.lab-head { margin-bottom: 40px; max-width: 680px; }
.lab-head h1 { font-size: clamp(30px, 4.5vw, 42px); margin-bottom: 12px; }
.lab-head p { color: var(--text-dim); }
.lab-grid { display: grid; grid-template-columns: 380px 1fr; gap: 24px; align-items: start; }
.lab-panel { background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--r-l); padding: 26px; position: sticky; top: 84px; }
.lab-h2 { font-size: 13px; color: var(--gold); margin: 20px 0 12px; text-align: left; font-weight: 700; }
.lab-h2:first-child { margin-top: 0; }
.ln { font: 500 12px var(--font-mono); color: var(--gold); letter-spacing: .1em; margin-right: 10px; }
.asset-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(231, 226, 213, .05); }
.asset-row:last-child { border-bottom: 0; }
.asset-name { flex: 1; font-size: 14px; font-weight: 700; }
.asset-name em { display: block; font-style: normal; font-weight: 400; font-size: 11px; color: var(--text-faint); font-family: var(--font-zh); }
.asset-row input {
  width: 76px; background: var(--bg); border: 1px solid var(--card-edge); border-radius: var(--r-m);
  padding: 8px 10px; color: var(--text); font-family: var(--font-mono); font-size: 14px; text-align: right;
  font-variant-numeric: tabular-nums;
}
.asset-row input:focus { border-color: var(--gold); outline: none; }
.lab-total { margin-top: 14px; font-size: 14px; color: var(--text-dim); }
.lab-total b { font-family: var(--font-mono); font-weight: 500; font-size: 17px; font-variant-numeric: tabular-nums; }
.lab-hint { margin-left: 6px; font-size: 12px; }
.lab-presets { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.chip {
  background: none; color: var(--text-dim); border: 1px solid var(--card-edge);
  border-radius: var(--r-s); padding: 6px 12px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: var(--font-zh);
}
.chip:hover { border-color: rgba(201, 169, 98, .4); color: var(--gold); }
.chip-ghost { color: var(--text-faint); }
.lab-controls { display: flex; flex-direction: column; gap: 12px; }
.lab-controls label { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--text-dim); gap: 12px; }
.lab-controls select, .lab-controls input {
  background: var(--bg); border: 1px solid var(--card-edge); border-radius: var(--r-m);
  padding: 9px 12px; color: var(--text); font-size: 13px; width: 170px; font-family: var(--font-zh);
}
.lab-run { width: 100%; margin-top: 20px; }
.lab-run:disabled { opacity: .4; cursor: not-allowed; }
.lab-note { margin-top: 14px; font-size: 12px; color: var(--text-faint); line-height: 1.8; }
.lab-stats { grid-template-columns: repeat(4, 1fr); margin-bottom: 20px; }
.lab-empty {
  display: grid; place-items: center; min-height: 320px; color: var(--text-faint);
  border: 1px solid var(--card-edge); border-radius: var(--r-l); font-size: 15px;
}

/* lab 結果區(bt-*) */
.bt-panel { background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--r-l); padding: 26px 26px 18px; margin-bottom: 26px; }
.bt-chart { width: 100%; height: auto; display: block; }
.bt-legend { list-style: none; display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.bt-legend li { display: flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: 13px; }
.bt-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 30px; }
.bt-stat {
  background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--r-l);
  padding: 24px; text-align: center; display: flex; flex-direction: column; gap: 4px;
}
.bt-stat-hl .bt-num { color: var(--gold); }
.bt-num {
  font-family: var(--font-mono); font-weight: 500; font-size: 30px; color: var(--text);
  font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
.bt-label { font-size: 13px; color: var(--text); font-weight: 700; }
.bt-vs { font-size: 12px; color: var(--text-faint); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.bt-disclaimer { text-align: left; font-size: 12px; color: var(--text-faint); max-width: 760px; line-height: 1.9; }

/* 全域互動規範 */
:focus-visible { outline: 2px solid rgba(201, 169, 98, .9); outline-offset: 2px; }
.aw-handle:focus-visible { outline: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* responsive */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-trust { flex-wrap: wrap; }
  .lab-grid { grid-template-columns: 1fr; }
  .lab-panel { position: static; }
  .lab-stats { grid-template-columns: 1fr 1fr; }
  .cards-3, .steps, .dash-grid { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: 1fr 1fr; gap: 24px 32px; }
  .fees-grid { grid-template-columns: 1fr; gap: 28px; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .cards-3, .steps, .dash-grid, .bt-stats, .aw-stats { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .sec-list { grid-template-columns: 1fr; gap: 0; }
  .alloc-row { grid-template-columns: 90px 1fr 90px; }
}

/* ---------- 文章 / 學習專區 ---------- */
.blog-head { padding: 80px 0 4px; }
.blog-head .section-no { margin-bottom: 14px; }
.blog-head p { color: var(--text-dim); font-size: 15px; margin-top: 16px; max-width: 60ch; }

.article-list { margin-top: 8px; }
.article-card {
  display: block; text-decoration: none; color: inherit;
  padding: 30px 0; border-top: 1px solid var(--card-edge); transition: opacity .2s;
}
.article-list .article-card:last-child { border-bottom: 1px solid var(--card-edge); }
.article-card:hover { opacity: .85; }
.article-card:hover .article-card-title { color: var(--gold); }
.article-meta { font: 500 12px var(--font-mono); color: var(--text-faint); letter-spacing: .06em; margin-bottom: 10px; display: flex; gap: 16px; }
.article-card-title { font-family: var(--font-display); font-weight: 700; font-size: 23px; line-height: 1.35; margin-bottom: 9px; transition: color .2s; }
.article-card-excerpt { color: var(--text-dim); font-size: 15px; line-height: 1.7; max-width: 62ch; }
.article-card-more { display: inline-block; margin-top: 14px; color: var(--gold); font-size: 13px; }

.article { padding: 52px 0 88px; }
.article-back { display: inline-block; margin-bottom: 26px; color: var(--text-dim); font-size: 13px; text-decoration: none; }
.article-back:hover { color: var(--gold); }
.article-header { margin-bottom: 40px; padding-bottom: 26px; border-bottom: 1px solid var(--card-edge); }
.article-header .article-meta { margin-bottom: 16px; }
.article-header h1 { font-size: clamp(28px, 4.4vw, 40px); line-height: 1.22; }

.prose { color: var(--text-dim); font-size: 16px; line-height: 1.8; }
.prose > * + * { margin-top: 18px; }
.prose h2 { font-size: 22px; margin-top: 48px; margin-bottom: 2px; }
.prose h3 { font-size: 16px; margin-top: 26px; color: var(--text); }
.prose strong { color: var(--text); font-weight: 700; }
.prose a { color: var(--gold); text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 20px; }
.prose li { margin-top: 7px; }
.prose code, .prose kbd {
  font-family: var(--font-mono); font-size: .88em; background: var(--bg-alt);
  border: 1px solid var(--card-edge); border-radius: var(--r-s); padding: 1px 6px; color: var(--text);
}
.prose hr { border: 0; border-top: 1px solid var(--card-edge); margin: 36px 0; }

.step-block { display: grid; grid-template-columns: 38px 1fr; gap: 0 18px; align-items: start; padding: 24px 0; border-top: 1px solid var(--card-edge); }
.step-block:first-of-type { border-top: 0; padding-top: 6px; }
.step-num {
  font-family: var(--font-mono); font-weight: 600; font-size: 14px; color: var(--gold);
  border: 1px solid rgba(201,169,98,.4); border-radius: 50%; width: 34px; height: 34px;
  display: grid; place-items: center;
}
.step-body h3 { margin: 3px 0 10px; font-size: 17px; color: var(--text); }
.step-body p, .step-body li { color: var(--text-dim); font-size: 15px; line-height: 1.75; }
.step-body > * + * { margin-top: 10px; }

.callout {
  border: 1px solid var(--card-edge); border-left: 2px solid var(--gold);
  border-radius: var(--r-s); padding: 15px 18px; background: var(--bg-alt);
  font-size: 14.5px; line-height: 1.7; color: var(--text-dim);
}
.callout strong { color: var(--text); }
.callout-warn { border-left-color: #d99892; }

.prose table, .article-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
.prose th, .prose td, .article-table th, .article-table td {
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--card-edge);
}
.prose th, .article-table th { color: var(--text-faint); font-weight: 500; }
.prose td b, .article-table td b { color: var(--text); }
