:root {
  color: #13233b;
  background: #f5f7fa;
  font-family: var(--font-sans);
  font-synthesis: none;
  font-variant-numeric: tabular-nums;
  text-rendering: optimizeLegibility;
  --font-sans:
    Aptos,
    "Segoe UI",
    "DengXian",
    "PingFang SC",
    "Microsoft YaHei UI",
    "Microsoft YaHei",
    "Noto Sans SC",
    system-ui,
    sans-serif;
  --font-display:
    "Source Han Serif SC",
    "Noto Serif CJK SC",
    "Noto Serif SC",
    "Songti SC",
    "STSong",
    "SimSun",
    serif;
  --font-mono:
    "Cascadia Mono",
    "SFMono-Regular",
    Consolas,
    "Roboto Mono",
    ui-monospace,
    monospace;
  --ink: #13233b;
  --ink-soft: #536074;
  --navy: #0d2342;
  --navy-2: #173b67;
  --navy-3: #23517f;
  --paper: #f7f9fc;
  --paper-2: #eef3f7;
  --panel: #ffffff;
  --line: rgba(13, 35, 66, 0.1);
  --line-strong: rgba(13, 35, 66, 0.18);
  --gold: #a97818;
  --rust: #b4533a;
  --shadow: 0 24px 70px rgba(13, 35, 66, 0.08);
  --radius: 6px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font-sans);
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.92), transparent 32%),
    linear-gradient(135deg, rgba(13, 35, 66, 0.035) 0%, transparent 34%),
    linear-gradient(180deg, #f8fafc 0%, #eef3f7 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.42;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), transparent 46%),
    linear-gradient(90deg, transparent, rgba(13, 35, 66, 0.026), transparent);
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
select {
  font: inherit;
}

main {
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto;
  padding-bottom: 72px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: stretch;
  padding: 34px 0 28px;
}

.hero-copy,
.fund-snapshot,
.panel,
.metric-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 252, 255, 0.98)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  overflow: hidden;
  display: flex;
  min-height: 340px;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 56px);
  border-top: 5px solid var(--navy);
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 42%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(13, 35, 66, 0.18));
}

.hero-copy h1 {
  position: relative;
  max-width: 1080px;
  margin: 0;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: clamp(40px, 5.4vw, 76px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.01em;
}

.hero-copy h1 span {
  display: block;
}

.hero-copy h1::before {
  content: "ATTRACTION RESEARCH";
  display: block;
  margin-bottom: 18px;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.hero-text {
  position: relative;
  max-width: none;
  margin: 22px 0 10px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.85;
  white-space: nowrap;
}

.hero-contact {
  position: relative;
  margin: 0 0 28px;
  color: #33405a;
  font-size: 15px;
  line-height: 1.7;
}

.hero-contact a {
  color: var(--navy);
  border-bottom: 1px solid rgba(169, 120, 24, 0.6);
  font-weight: 700;
}

.hero-contact a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.fund-picker {
  position: relative;
  display: inline-grid;
  grid-template-columns: auto minmax(260px, 560px);
  align-items: center;
  gap: 12px;
  width: min(100%, 700px);
  padding: 10px;
  background: rgba(13, 35, 66, 0.045);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.fund-picker label {
  padding-left: 4px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.fund-picker select {
  width: 100%;
  padding: 13px 14px;
  color: var(--navy);
  background: var(--panel);
  border: 1px solid rgba(13, 35, 66, 0.08);
  border-radius: 4px;
  outline: none;
}

.fund-picker select:focus {
  border-color: rgba(184, 135, 43, 0.72);
  box-shadow: 0 0 0 3px rgba(184, 135, 43, 0.16);
}

.fund-snapshot {
  align-self: stretch;
  padding: 30px;
  border-top: 5px solid var(--gold);
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  gap: 24px;
  align-items: stretch;
}

.allocation-panel {
  min-height: 100%;
}

.fund-snapshot h2 {
  margin: 0 0 8px;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.fund-snapshot > p {
  margin: 0 0 22px;
  color: var(--ink-soft);
}

dl,
dd {
  margin: 0;
}

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

.snapshot-grid div {
  display: grid;
  gap: 7px;
  min-height: 78px;
  padding: 14px;
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  border: 1px solid rgba(13, 35, 66, 0.08);
  border-radius: 4px;
}

dt {
  color: #6c7280;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

dd {
  overflow-wrap: anywhere;
  color: var(--navy);
  font-family: var(--font-mono);
  font-weight: 650;
}

.objective,
.data-note {
  line-height: 1.72;
}

.objective {
  margin: 18px 0 0;
  color: #33405a;
}

.data-note {
  margin: 16px 0 0;
  padding: 14px 16px;
  color: #41516c;
  background: #f8fafc;
  border: 1px solid rgba(169, 120, 24, 0.22);
  border-radius: 4px;
  font-size: 14px;
}

.source-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  color: #ffffff;
  background: var(--navy);
  border: 1px solid rgba(13, 35, 66, 0.18);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.source-link:hover {
  background: var(--navy-2);
}

.snapshot-link {
  margin-top: 18px;
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  gap: 24px;
  align-items: start;
}

.main-column,
.side-column {
  display: grid;
  gap: 24px;
}

.side-column {
  position: sticky;
  top: 24px;
}

.panel {
  position: relative;
  overflow: hidden;
  padding: 26px;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--navy), var(--navy-3), var(--gold));
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.panel h2 {
  margin: 0;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.tag {
  padding: 8px 10px;
  color: var(--navy);
  background: #eef1f4;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.range-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: #edf0f2;
  border: 1px solid rgba(13, 35, 66, 0.16);
  border-radius: 4px;
}

.range-tabs button {
  min-width: 54px;
  padding: 7px 9px;
  color: #42506a;
  background: transparent;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.range-tabs button:hover {
  color: var(--navy);
  background: rgba(13, 35, 66, 0.08);
}

.range-tabs button:active {
  transform: translateY(1px);
}

.range-tabs button.is-active {
  color: #ffffff;
  background: var(--navy);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.chart-frame {
  position: relative;
  width: 100%;
  min-width: 0;
  padding: 12px 4px 0;
}

.chart-frame canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.chart-tooltip {
  position: absolute;
  z-index: 5;
  min-width: 128px;
  padding: 9px 10px;
  color: #ffffff;
  background: rgba(13, 35, 66, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  box-shadow: 0 16px 34px rgba(13, 35, 66, 0.24);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
  pointer-events: none;
  transform: translate(12px, -50%);
}

.chart-tooltip strong,
.chart-tooltip span {
  display: block;
}

.chart-tooltip span {
  color: rgba(255, 255, 255, 0.72);
}

.chart-tooltip[hidden] {
  display: none;
}

.chart-tall {
  height: 410px;
}

.chart-medium {
  height: 330px;
}

.pie-frame {
  height: 280px;
}

.legend-list,
.holding-list,
.stats-list {
  display: grid;
  gap: 10px;
}

.legend-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.legend-list li {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  color: #26334d;
}

.legend-list li span {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.legend-list em,
.holding-row em {
  color: var(--navy);
  font-family: var(--font-mono);
  font-style: normal;
  font-weight: 700;
}

.holding-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 13px 0;
  border-bottom: 1px solid rgba(13, 35, 66, 0.09);
}

.holding-row > span {
  color: var(--gold);
  font-family: var(--font-mono);
  font-weight: 900;
}

.holding-row strong,
.holding-row small {
  display: block;
}

.holding-row strong {
  overflow-wrap: anywhere;
  color: #1d2d49;
  font-size: 14px;
  font-weight: 700;
}

.holding-row small {
  margin-top: 4px;
  color: #6b7280;
}

.stats-list div {
  display: grid;
  gap: 7px;
  padding: 15px;
  background: #f8fafc;
  border: 1px solid rgba(13, 35, 66, 0.08);
  border-radius: 4px;
}

.stats-list span {
  color: #6c7280;
  font-size: 13px;
}

.stats-list strong {
  color: var(--navy);
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
}

.api-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #536074;
  line-height: 1.7;
}

.api-note p {
  margin: 0;
}

.page-footer {
  margin-top: 34px;
  padding: 24px 0 10px;
  color: var(--navy);
  border-top: 1px solid rgba(13, 35, 66, 0.16);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-align: center;
}

.metric-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: var(--navy);
  border-radius: 4px;
  font-weight: 900;
}

@media (max-width: 1100px) {
  main {
    width: min(100% - 28px, 980px);
  }

  .hero,
  .overview-grid,
  .layout-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: auto;
  }

  .side-column {
    position: static;
  }
}

@media (max-width: 720px) {
  main {
    width: min(100% - 20px, 680px);
    padding-bottom: 42px;
  }

  .hero {
    gap: 16px;
    padding-top: 14px;
  }

  .hero-copy,
  .fund-snapshot,
  .panel {
    padding: 18px;
  }

  .hero-copy h1 {
    font-size: 34px;
    line-height: 1.14;
  }

  .hero-copy h1::before {
    margin-bottom: 12px;
    font-size: 10px;
  }

  .hero-text {
    margin: 16px 0 10px;
    font-size: 15px;
    line-height: 1.75;
    white-space: normal;
  }

  .hero-contact {
    margin-bottom: 20px;
    font-size: 14px;
  }

  .fund-picker {
    grid-template-columns: 1fr;
  }

  .snapshot-grid {
    grid-template-columns: 1fr;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .range-tabs {
    width: 100%;
  }

  .range-tabs button {
    flex: 1 1 auto;
  }

  .chart-tall {
    height: 330px;
  }

  .chart-medium,
  .pie-frame {
    height: 290px;
  }
}
