:root {
  --tra-ink: #070910;
  --tra-surface: rgba(14, 18, 29, .86);
  --tra-surface-soft: rgba(255, 255, 255, .025);
  --tra-gold: #cdb46f;
  --tra-gold-bright: #eadba7;
  --tra-line: rgba(205, 180, 111, .19);
  --tra-text: #f4f1e9;
  --tra-muted: rgba(235, 231, 220, .64);
  --tra-radius: 22px;
  --tra-shadow: 0 28px 80px rgba(0, 0, 0, .28);
}

html { background: var(--tra-ink); }

body {
  min-width: 320px;
  color: var(--tra-text);
  font-family: Inter, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Noto Sans JP", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(900px 560px at 12% -8%, rgba(205, 180, 111, .105), transparent 67%),
    radial-gradient(800px 520px at 94% 4%, rgba(46, 75, 125, .10), transparent 65%),
    linear-gradient(180deg, #090c14 0%, #070a11 48%, #05070b 100%) !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .32;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 72%);
}

.hero-grid { opacity: .22; background-size: 72px 72px !important; }

::selection { background: rgba(205, 180, 111, .28); color: white; }

a, button, input, textarea { transition: border-color .2s ease, background-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--tra-gold); outline-offset: 3px; }

.serif-title {
  font-family: "Iowan Old Style", Georgia, "Noto Serif", "Times New Roman", serif;
  letter-spacing: -.035em !important;
  text-wrap: balance;
}

html[lang="zh-Hant"] .serif-title,
html[lang="ja"] .serif-title {
  font-family: Inter, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Noto Sans JP", system-ui, sans-serif;
  font-weight: 650;
  letter-spacing: -.045em !important;
  word-break: keep-all;
}

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

.glass {
  background: linear-gradient(145deg, rgba(20, 24, 36, .88), rgba(10, 13, 22, .78)) !important;
  border-color: var(--tra-line) !important;
  backdrop-filter: blur(18px) saturate(115%);
}

.hairline { border-color: var(--tra-line) !important; }
.shadow-gold { box-shadow: var(--tra-shadow), inset 0 1px 0 rgba(255,255,255,.025) !important; }

header {
  background: rgba(7, 9, 16, .88) !important;
  border-bottom-color: rgba(205, 180, 111, .14) !important;
  backdrop-filter: blur(22px) saturate(125%);
}

header nav { min-height: 78px; }
header nav > a { min-width: 205px; }
header nav > a img { transform: scale(1.035); }
header nav > div:nth-child(2) a {
  position: relative;
  color: rgba(255,255,255,.66);
  font-weight: 500;
  letter-spacing: .015em;
}
header nav > div:nth-child(2) a::after {
  content: "";
  position: absolute;
  left: 50%; right: 50%; bottom: -9px;
  height: 1px;
  background: var(--tra-gold);
  transition: left .2s ease, right .2s ease;
}
header nav > div:nth-child(2) a:hover,
header nav > div:nth-child(2) a[aria-current="page"] { color: white; }
header nav > div:nth-child(2) a:hover::after,
header nav > div:nth-child(2) a[aria-current="page"]::after { left: 0; right: 0; }

.lang { min-width: 42px; }
.lang.bg-gold { background: var(--tra-gold) !important; }

main { position: relative; z-index: 1; }
main.mx-auto, main > section.mx-auto { width: min(100%, 1280px); }
main[class*="py-20"] { padding-top: 88px !important; padding-bottom: 104px !important; }

main > .max-w-3xl,
main > .max-w-4xl { max-width: 850px !important; }

main > .max-w-3xl h1,
main > .max-w-4xl h1,
main > div[class*="grid"] h1 {
  font-size: clamp(2.55rem, 4.6vw, 4.4rem) !important;
  line-height: 1.08 !important;
}

main > .max-w-3xl > p,
main > .max-w-4xl > p { max-width: 760px; color: var(--tra-muted) !important; }

main section { scroll-margin-top: 110px; }

main .rounded-3xl,
main .rounded-\[2rem\] { border-radius: var(--tra-radius) !important; }

main .grid > .glass,
main .grid > a.glass,
main .grid > article.glass {
  height: 100%;
}

main a.glass, main article.glass, main .grid > div.glass {
  box-shadow: 0 20px 55px rgba(0,0,0,.18);
}

main a.glass:hover, main article.glass:hover {
  border-color: rgba(205,180,111,.42) !important;
  transform: translateY(-2px);
  box-shadow: 0 26px 68px rgba(0,0,0,.28);
}

main a.bg-gold {
  background: linear-gradient(135deg, #e2cb88, #b99a50) !important;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 12px 32px rgba(185,154,80,.18);
}
main a.bg-gold:hover { transform: translateY(-1px); box-shadow: 0 16px 38px rgba(185,154,80,.27); }

body.page-otc main > section:first-child > div:first-child .mt-9 > a {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body.page-otc main > section:first-child > div:first-child .mt-9 > a:nth-child(2),
body.page-otc main > section:first-child > div:first-child .mt-9 > a:nth-child(3) {
  color: var(--tra-gold-bright) !important;
  border-color: rgba(205,180,111,.58) !important;
  background: rgba(205,180,111,.075) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
body.page-otc main > section:first-child > div:first-child .mt-9 > a:nth-child(2):hover,
body.page-otc main > section:first-child > div:first-child .mt-9 > a:nth-child(3):hover {
  color: #090b10 !important;
  background: linear-gradient(135deg, #e2cb88, #b99a50) !important;
  transform: translateY(-1px);
}

/* Homepage: controlled line lengths, balanced hero and quieter emblem panel. */
body.page-index main > section:first-child {
  grid-template-columns: minmax(0, 1.16fr) minmax(340px, .84fr) !important;
  gap: clamp(42px, 5vw, 78px) !important;
  min-height: 675px;
  padding-top: 94px !important;
  padding-bottom: 90px !important;
}

body.page-index main > section:first-child > div:first-child { max-width: 720px; }
body.page-index main > section:first-child h1 {
  max-width: 720px;
  margin-top: 30px !important;
  font-size: clamp(3rem, 4.25vw, 3.9rem) !important;
  line-height: 1.06 !important;
  letter-spacing: -.052em !important;
}

body.page-index .hero-line { display: block; }
html[lang="zh-Hant"] body.page-index .hero-line,
html[lang="ja"] body.page-index .hero-line { white-space: nowrap; }
body.page-index .hero-line + .hero-line { margin-top: .12em; }
body.page-index main > section:first-child p[data-i18n="hero.subtitle"] { max-width: 670px; color: rgba(244,241,233,.68) !important; }
body.page-index main > section:first-child > div:last-child {
  max-width: 440px;
  justify-self: end;
  padding: 34px !important;
  background: radial-gradient(circle at 50% 36%, rgba(205,180,111,.13), transparent 43%), linear-gradient(145deg,rgba(16,20,31,.92),rgba(8,10,17,.82)) !important;
}
body.page-index main > section:first-child > div:last-child img { width: min(78%, 300px) !important; height: auto !important; aspect-ratio: 1; }

.tra-home-announcement { box-shadow: 0 24px 74px rgba(0,0,0,.22) !important; }
.tra-home-announcement::before { opacity: .55; }

/* Document and resource cards. */
body.page-whitepaper main .grid > a { min-height: 156px; display: flex; flex-direction: column; justify-content: space-between; }
body.page-whitepaper main .grid > a h2,
body.page-whitepaper main .grid > a h3 { font-size: 1.18rem !important; line-height: 1.5 !important; }
body.page-dataroom article { min-height: 208px; display: flex; flex-direction: column; }
body.page-dataroom article > a { margin-top: auto !important; padding-top: 18px; }
body.page-media main > .mt-10.grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px !important; }
body.page-media main > .mt-10.grid article { height: 100%; }
body.page-media main > .mt-10.grid article > .p-6 { padding: 24px !important; }
body.page-media main > .mt-10.grid article .sm\:grid-cols-3 { grid-template-columns: 1fr !important; }

table { border-collapse: separate; border-spacing: 0; }
thead th { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; }
tbody tr { transition: background-color .2s ease; }
tbody tr:hover { background: rgba(255,255,255,.025); }

input, textarea {
  border-radius: 12px !important;
  background: rgba(0,0,0,.24) !important;
  border-color: rgba(255,255,255,.12) !important;
}
input:hover, textarea:hover { border-color: rgba(205,180,111,.30) !important; }
input:focus, textarea:focus { border-color: var(--tra-gold) !important; box-shadow: 0 0 0 3px rgba(205,180,111,.09); }

footer { position: relative; z-index: 1; background: rgba(3,5,9,.62); border-top-color: rgba(205,180,111,.13) !important; }
footer > div { min-height: 64px; }

.tra-notice-card { border-radius: 24px !important; max-width: 860px; }
.tra-notice-title { font-size: clamp(2rem, 4vw, 3.4rem) !important; line-height: 1.08 !important; }

@media (max-width: 1279px) {
  header nav { min-height: 72px; }
  header nav > a { min-width: 0; }
  body.page-index main > section:first-child {
    grid-template-columns: minmax(0, 1.08fr) minmax(310px, .92fr) !important;
    gap: 42px !important;
    min-height: 610px;
    padding-top: 72px !important;
  }
  body.page-index main > section:first-child h1 { font-size: clamp(2.8rem, 4.7vw, 3.35rem) !important; }
}

@media (max-width: 1023px) {
  main[class*="py-20"] { padding-top: 68px !important; padding-bottom: 82px !important; }
  body.page-index main > section:first-child {
    grid-template-columns: 1fr !important;
    min-height: auto;
    padding-top: 70px !important;
    padding-bottom: 64px !important;
  }
  body.page-index main > section:first-child > div:first-child { max-width: 760px; }
  body.page-index main > section:first-child > div:last-child { max-width: 620px; width: 100%; justify-self: start; }
  body.page-index main > section:first-child > div:last-child img { width: min(62%, 280px) !important; }
  body.page-media main > .mt-10.grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  header nav { padding-top: 12px !important; padding-bottom: 12px !important; }
  header nav > a > div:first-child { width: 40px !important; height: 40px !important; }
  .lang { min-width: 0; padding-left: 8px !important; padding-right: 8px !important; }
  main[class*="py-20"] { padding: 54px 20px 70px !important; }
  main > section { margin-top: 52px; }
  body.page-index main > section:first-child { padding: 56px 20px 48px !important; gap: 38px !important; }
  body.page-index main > section:first-child h1 {
    font-size: clamp(2.55rem, 12.2vw, 3.25rem) !important;
    line-height: 1.08 !important;
  }
  html[lang="zh-Hant"] body.page-index .hero-line,
  html[lang="ja"] body.page-index .hero-line { white-space: normal; }
  body.page-index main > section:first-child > div:last-child { padding: 26px 22px !important; }
  body.page-index main > section:first-child > div:last-child img { width: min(76%, 250px) !important; }
  main > .max-w-3xl h1,
  main > .max-w-4xl h1,
  main > div[class*="grid"] h1 { font-size: clamp(2.35rem, 11vw, 3.25rem) !important; }
  .serif-title { letter-spacing: -.035em !important; }
  main .rounded-3xl, main .rounded-\[2rem\] { border-radius: 18px !important; }
  main .p-8, main .md\:p-10, main .md\:p-12 { padding: 24px !important; }
  .tra-notice-overlay { padding: 12px !important; }
  .tra-notice-card { border-radius: 18px !important; max-height: calc(100vh - 24px); overflow-y: auto; }
  footer > div { align-items: flex-start !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}


/* TRA FINAL QA · 2026-10-04 · iOS / Safari safe-area hardening */
html { -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; overflow-x: hidden; }
@supports (padding: env(safe-area-inset-top)) {
  header { padding-top: env(safe-area-inset-top); }
  header nav,
  .mobile-menu > div {
    padding-left: max(1.25rem, env(safe-area-inset-left)) !important;
    padding-right: max(1.25rem, env(safe-area-inset-right)) !important;
  }
  main,
  main[class*="py-20"],
  body.page-index main > section:first-child {
    padding-left: max(1.25rem, env(safe-area-inset-left)) !important;
    padding-right: max(1.25rem, env(safe-area-inset-right)) !important;
  }
  footer > div {
    padding-left: max(1.25rem, env(safe-area-inset-left)) !important;
    padding-right: max(1.25rem, env(safe-area-inset-right)) !important;
    padding-bottom: max(1rem, env(safe-area-inset-bottom)) !important;
  }
  .tra-notice-overlay {
    padding-top: max(12px, env(safe-area-inset-top)) !important;
    padding-right: max(12px, env(safe-area-inset-right)) !important;
    padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
    padding-left: max(12px, env(safe-area-inset-left)) !important;
  }
}
