:root {
  --red-950: #5f0509;
  --red-900: #7c080d;
  --red-800: #981017;
  --red-700: #b5121b;
  --red-600: #d21b24;
  --gold-500: #d9a83c;
  --gold-300: #f0cf82;
  --navy-900: #082c59;
  --ink: #191919;
  --muted: #6f6964;
  --paper: #f8f5ee;
  --white: #fff;
  --border: #ded8cd;
  --shadow: 0 22px 55px rgba(54, 24, 12, .11);
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  content: "";
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
  opacity: .05;
}

a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1200;
  padding: 8px 14px;
  color: #fff;
  background: var(--navy-900);
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 10px max(24px, calc((100vw - var(--max)) / 2));
  color: #fff;
  background: rgba(95, 5, 9, .97);
  border-bottom: 1px solid rgba(255,255,255,.18);
  transition: background .3s ease, box-shadow .3s ease, min-height .3s ease;
}

.site-header.is-scrolled {
  min-height: 62px;
  background: rgba(121, 7, 12, .94);
  box-shadow: 0 8px 30px rgba(49, 4, 6, .2);
  backdrop-filter: blur(14px);
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  aspect-ratio: 1;
  color: var(--red-900);
  background: var(--gold-300);
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: 900;
}

.top-nav { display: flex; gap: 34px; }
.top-nav a { font-size: .9rem; font-weight: 700; text-decoration: none; }
.top-nav a::after {
  display: block;
  width: 0;
  height: 2px;
  margin-top: 3px;
  content: "";
  background: var(--gold-300);
  transition: width .25s ease;
}
.top-nav a:hover::after, .top-nav a:focus-visible::after { width: 100%; }

.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.header-promo {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  color: #fff;
  font-size: .92rem;
  font-weight: 700;
  white-space: nowrap;
}
.header-promo strong { color: var(--gold-300); font-size: 1.1rem; font-weight: 900; }
.header-promo > span { color: var(--gold-300); font-size: 1.15rem; font-weight: 900; }

.header-cta {
  padding: 9px 19px;
  color: var(--red-950);
  background: var(--gold-300);
  font-size: .94rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.header-cta-secondary {
  color: #fff;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.58);
}

.hero {
  position: relative;
  overflow: hidden;
  height: clamp(440px, 42vw, 620px);
  background: var(--red-900) url("assets/hero-bg.png") center / cover no-repeat;
}

.hero-title {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: min(88vw, 780px);
  margin: 0;
  color: #fff;
  font-family: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", system-ui, sans-serif;
  font-size: clamp(4.6rem, 8vw, 8.8rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 8px 28px rgba(70, 0, 0, .36);
  transform: translate(-50%, -42%);
}

.hero-title::before {
  display: block;
  width: min(100%, 360px);
  height: 4px;
  margin: 0 auto 24px;
  content: "";
  background: var(--gold-300);
}

.hero-title span { display: block; }

.hero-quick-nav {
  position: sticky;
  top: 62px;
  z-index: 90;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  color: #fff;
  background: var(--red-950);
  font-size: 1.08rem;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(49, 4, 6, .18);
}

.hero-quick-nav a {
  text-decoration: none;
}

.hero-quick-nav a:hover,
.hero-quick-nav a:focus-visible {
  color: var(--gold-300);
}

.mobile-bottom-cta {
  display: none;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 110;
  display: grid;
  place-items: center;
  width: 46px;
  aspect-ratio: 1;
  color: var(--red-950);
  background: var(--gold-300);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 14px 36px rgba(49, 4, 6, .24);
  cursor: pointer;
  font-size: 1.45rem;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: #f5d994;
}

.scroll-cue {
  position: absolute;
  right: max(24px, calc((100vw - var(--max)) / 2));
  bottom: 30px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-size: .83rem;
  font-weight: 700;
  text-decoration: none;
}
.scroll-cue svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 2; animation: bounce 1.7s infinite; }

.section { padding: 104px 24px; }
.section-inner { width: min(100%, var(--max)); margin-inline: auto; }
#active-funds,
#etf-funds {
  scroll-margin-top: 140px;
}

.overview {
  color: #fff;
  background: var(--navy-900);
}
.overview-grid {
  display: block;
  width: min(100%, var(--max));
}
.overview-copy { width: 100%; }
.overview h2 {
  max-width: 1100px;
  margin: 0 auto 30px;
  font-family: "Noto Serif TC", "PMingLiU", serif;
  font-size: clamp(2.2rem, 3.4vw, 3.75rem);
  line-height: 1.18;
  text-align: center;
}
.overview-copy > p {
  width: 100%;
  margin: 0;
  color: rgba(255,255,255,.82);
  font-size: 1.18rem;
  line-height: 1.9;
  text-align: center;
}
.fund-section { background: var(--paper); }
.etf-section { background: #efebe3; }
.section-heading {
  margin-bottom: 44px;
  text-align: center;
}
.section-heading h2 { margin: 0; font-family: "Noto Serif TC", "PMingLiU", serif; font-size: clamp(2rem, 3vw, 3.25rem); line-height: 1.25; }
.section-heading > div > p:last-child { margin: 10px 0 0; color: #56504a; font-size: 1.06rem; }

.fund-switcher { box-shadow: var(--shadow); }
.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #e6e0d5;
  border-bottom: 1px solid var(--border);
}
.tabs-two { grid-template-columns: repeat(2, 1fr); }
.tab {
  position: relative;
  min-height: 90px;
  padding: 17px 22px;
  color: #514b46;
  background: transparent;
  border: 0;
  border-right: 1px solid #cec7bb;
  cursor: pointer;
  text-align: left;
  transition: color .2s ease, background .2s ease;
}
.tab:last-child { border-right: 0; }
.tab span, .tab small { display: block; }
.tab span { font-size: 1.08rem; font-weight: 900; }
.tab small { color: #645d56; font-size: .86rem; }
.tab::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 4px;
  content: "";
  background: var(--gold-500);
  transform: scaleX(0);
  transition: transform .25s ease;
}
.tab:hover { background: rgba(255,255,255,.5); }
.tab.is-active { color: #fff; background: var(--red-800); }
.tab.is-active small { color: rgba(255,255,255,.72); }
.tab.is-active::after { transform: scaleX(1); }
.tab:focus-visible { outline: 3px solid var(--navy-900); outline-offset: -4px; }

.fund-panel { padding: 52px; background: #fff; }
.fund-panel[hidden] { display: none; }
.fund-panel.is-entering { animation: panelIn .36s ease both; }
.fund-intro {
  margin-bottom: 42px;
}
.fund-intro h3 { margin: 0 0 13px; font-size: clamp(1.6rem, 2.8vw, 2.65rem); line-height: 1.3; }
.fund-intro > div > p:not(.suitable) { max-width: 820px; margin: 0; color: #45403c; font-size: 1.08rem; }
.suitable { margin: 20px 0 0; color: #37322e; font-weight: 600; }
.suitable span { margin-right: 9px; padding: 5px 9px; color: #fff; background: var(--navy-900); font-size: .85rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); }
table { width: 100%; min-width: 720px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
th, td { padding: 15px 18px; border-bottom: 1px solid #e7e2d9; text-align: center; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { color: #fff; background: var(--navy-900); font-size: .94rem; }
tbody th { color: #403b37; font-size: 1rem; font-weight: 500; }
tbody td { color: #4f4944; font-weight: 400; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.metric-cell {
  transition: color .24s ease, text-shadow .24s ease;
}
.metric-cell.is-animating {
  color: var(--red-800);
  text-shadow: 0 0 1px rgba(181, 18, 27, .18);
}
.source { margin: 18px 0 0; color: #45403c; font-size: .96rem; line-height: 1.75; font-weight: 700; }

.cta-section {
  position: relative;
  overflow: hidden;
  padding: 112px 24px;
  color: #fff;
  background: var(--red-800);
}
.cta-section::before {
  position: absolute;
  top: -120px;
  right: -90px;
  width: 440px;
  aspect-ratio: 1;
  content: "0";
  color: rgba(240, 207, 130, .1);
  font-family: Georgia, serif;
  font-size: 32rem;
  font-weight: 900;
  line-height: .8;
}
.cta-lines {
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image: linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px);
  background-size: 74px 74px;
  transform: perspective(500px) rotateX(58deg) translateY(52%);
}
.cta-inner { position: relative; z-index: 1; text-align: center; }
.cta-inner h2 { margin: 6px auto 24px; font-family: "Noto Serif TC", "PMingLiU", serif; font-size: clamp(2.45rem, 5.5vw, 5.6rem); line-height: 1.13; }
.cta-highlight { color: var(--gold-300); font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif; font-weight: 900; }
.cta-inner > p { max-width: 730px; margin: 0 auto; color: #fff; font-size: 1.12rem; }
.cta-actions { display: flex; justify-content: center; gap: 16px; margin-top: 38px; }
.cta-actions .btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  width: min(100%, 360px);
  min-height: 88px;
  padding: 16px 20px;
  border: 2px solid transparent;
  box-shadow: 0 10px 26px rgba(62, 3, 6, .24);
  text-align: left;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.cta-actions .btn:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(62, 3, 6, .32); }
.cta-actions .btn:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.cta-actions .btn small, .cta-actions .btn strong { display: block; }
.cta-actions .btn small { margin-bottom: 2px; font-size: .88rem; font-weight: 700; }
.cta-actions .btn strong { font-size: 1.12rem; font-weight: 900; line-height: 1.4; }
.btn-arrow { flex: none; font-size: 1.5rem; font-weight: 900; line-height: 1; }
.btn-gold { color: var(--red-950); background: var(--gold-300); }
.btn-outline { color: var(--red-950); background: #fff; }
.btn-outline:hover { background: #fff6df; }
.cta-note { display: block; margin-top: 26px; color: var(--gold-300); font-size: 1rem; }

.notice-section { background: #e9e4db; }
.notice-content { color: #111; font-size: 1rem; font-weight: 700; line-height: 1.85; }
.notice-content h2 { margin: 0 0 28px; color: var(--red-900); font-size: 1.65rem; font-weight: 900; line-height: 1.35; }
.notice-content p { margin: 0 0 22px; }
.notice-content span { display: inline; }
.warning-red { color: #c00000; }
.approval-code { color: var(--ink); font-weight: 900; }

.notice-dialog {
  width: min(860px, calc(100vw - 48px));
  max-width: none;
  max-height: min(680px, calc(100dvh - 48px));
  margin: auto;
  padding: 0;
  color: var(--ink);
  background: #fff;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}
.notice-dialog::backdrop { background: rgba(20, 16, 16, .62); }
.notice-dialog-shell { display: flex; flex-direction: column; max-height: inherit; }
.notice-dialog h2 {
  flex: none;
  margin: 0;
  padding: 40px 70px 20px;
  color: var(--red-700);
  font-size: clamp(1.25rem, 2.4vw, 1.85rem);
  font-weight: 900;
  line-height: 1.4;
  text-align: center;
}
.notice-dialog-close {
  position: absolute;
  top: 12px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: #777;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 2.3rem;
  line-height: 1;
}
.notice-dialog-close:hover { color: var(--red-700); }
.notice-dialog-scroll { min-height: 0; overflow-y: auto; padding: 0 54px 24px; overscroll-behavior: contain; }
.notice-dialog-company { margin-bottom: 22px; font-size: .9rem; font-weight: 700; }
.notice-dialog-company p { margin: 0 0 6px; }
.notice-dialog-copy { font-size: 1.06rem; font-weight: 700; line-height: 1.7; }
.notice-dialog-copy p { margin: 0 0 18px; }
.notice-dialog-actions {
  flex: none;
  display: flex;
  justify-content: center;
  padding: 16px 24px 18px;
  background: #fff;
  border-top: 1px solid var(--border);
}
.notice-dialog-actions button {
  min-width: 180px;
  min-height: 48px;
  padding: 8px 28px;
  color: #fff;
  background: var(--red-700);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 800;
}
.notice-dialog-actions button:hover { background: var(--red-900); }
.notice-dialog button:focus-visible, .notice-dialog-scroll:focus-visible { outline: 3px solid var(--navy-900); outline-offset: 2px; }

.site-footer { padding: 64px 24px 20px; color: rgba(255,255,255,.85); background: #171717; font-size: .98rem; }
.footer-grid { display: block; }
.footer-brand { margin-bottom: 20px; color: #fff; font-size: 1rem; }
.site-footer p { margin: 4px 0; }
.site-footer a { color: #fff; text-underline-offset: 3px; }
.contact-list { display: block; margin-top: 18px; }
.footer-bottom { display: flex; justify-content: space-between; margin-top: 38px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.15); color: #fff; font-weight: 700; }
.footer-bottom a { text-decoration: none; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@keyframes panelIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .site-header { min-height: 64px; }
  .header-promo { font-size: .82rem; }
  .header-promo strong { font-size: .98rem; }
  .top-nav { display: none; }
}

@media (max-width: 680px) {
  .notice-dialog { width: calc(100vw - 36px); max-height: min(720px, calc(100dvh - 48px)); }
  .notice-dialog h2 { padding: 54px 24px 18px; font-size: 1.25rem; }
  .notice-dialog-close { top: 8px; right: 10px; }
  .notice-dialog-scroll { padding: 0 20px 18px; }
  .notice-dialog-copy { font-size: 1rem; }
  .notice-dialog-company { font-size: .9rem; }
  body { padding-bottom: calc(122px + env(safe-area-inset-bottom)); }
  .site-header { min-height: 58px; gap: 10px; padding-inline: 16px; }
  .brand { flex: none; font-size: .94rem; }
  .brand-mark { width: 29px; font-size: 18px; }
  .header-actions { display: none; }
  .header-cta { padding: 6px 9px; font-size: .72rem; }
  .hero-quick-nav {
    top: 58px;
    gap: 10px;
    padding: 14px 16px;
    font-size: 1rem;
  }
  #active-funds,
  #etf-funds {
    scroll-margin-top: 112px;
  }
  .mobile-bottom-cta {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 120;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(95, 5, 9, .96);
    box-shadow: 0 -12px 34px rgba(49, 4, 6, .24);
    backdrop-filter: blur(12px);
  }
  .mobile-bottom-promo {
    grid-column: 1 / -1;
    margin: 0 0 2px;
    color: #fff;
    font-size: .88rem;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
  }
  .mobile-bottom-promo strong {
    color: var(--gold-300);
    font-size: 1rem;
    font-weight: 900;
  }
  .mobile-bottom-cta a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 52px;
    padding: 10px 12px;
    font-size: 1rem;
    font-weight: 900;
    text-decoration: none;
  }
  .mobile-cta-primary {
    color: var(--red-950);
    background: var(--gold-300);
  }
  .mobile-cta-secondary {
    color: var(--red-950);
    background: #fff;
  }
  .mobile-bottom-cta a:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
  .back-to-top {
    right: 14px;
    bottom: calc(120px + env(safe-area-inset-bottom));
    width: 42px;
    font-size: 1.28rem;
  }
  .hero {
    height: 390px;
    background-position: 38% center;
  }
  .hero-title {
    top: 51%;
    left: 50%;
    width: calc(100% - 48px);
    font-size: clamp(3.1rem, 15vw, 4.1rem);
    line-height: 1.08;
    transform: translate(-50%, -38%);
  }
  .hero-title::before {
    width: 210px;
    height: 3px;
    margin-bottom: 16px;
  }
  .scroll-cue { display: none; }
  .section { padding: 76px 18px; }
  .overview h2 { font-size: 2.12rem; }
  .overview-copy > p { font-size: 1.1rem; }
  .section-heading { margin-bottom: 30px; }
  .section-heading h2 { font-size: 1.82rem; }
  .tabs, .tabs-two {
    display: grid;
    overflow: visible;
  }
  .tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tabs-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tab {
    min-width: 0;
    min-height: 72px;
    padding: 10px 5px;
    border-right: 1px solid #cec7bb;
    border-bottom: 0;
  }
  .tab span {
    font-size: .92rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }
  .tab small {
    display: block;
    margin-left: 0;
    font-size: .76rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }
  .fund-panel { padding: 30px 18px; }
  .fund-intro h3 { font-size: 1.72rem; }
  th, td { padding: 12px 14px; }
  .cta-section { padding: 80px 18px; }
  .cta-inner h2 { font-size: 2.05rem; line-height: 1.2; }
  .cta-actions { flex-direction: column; align-items: stretch; }
  .cta-actions .btn { width: 100%; min-height: 82px; }
  .contact-list { grid-template-columns: 1fr; }
  .footer-bottom { gap: 20px; align-items: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .metric-cell { transition: none; }
}
