* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
  --ink: #111820;
  --brand-lime: #b8f36a;
  --glass-surface: rgba(255, 255, 255, .76);
  --glass-surface-soft: rgba(255, 255, 255, .6);
  --glass-border: rgba(17, 24, 32, .1);
  --glass-blur: 12px;
  --glass-shadow: 0 18px 48px rgba(17, 24, 32, .07);
}

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  --page-base: #e9f1e6;
  --page-accent: #7fca69;
  --page-wash: rgba(127, 202, 105, .19);
  --page-glow-a: rgba(117, 194, 98, .23);
  --page-glow-b: rgba(206, 226, 166, .31);
  --page-line: rgba(38, 76, 44, .12);
  --ambient-line: rgba(50, 102, 55, .13);
  --ambient-word: rgba(31, 76, 38, .075);
  position: relative;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background-color: var(--page-base);
  background-image:
    radial-gradient(circle at 10% 18%, var(--page-glow-a), transparent 34%),
    radial-gradient(circle at 92% 72%, var(--page-glow-b), transparent 37%),
    linear-gradient(rgba(17, 24, 32, .024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 32, .024) 1px, transparent 1px);
  background-size: auto, auto, 34px 34px, 34px 34px;
  background-attachment: fixed;
  color: #1f2329;
  line-height: 1.5;
  padding-bottom: 48px;
}

body > main {
  position: relative;
  z-index: 1;
}

.lof-page,
.lof-detail {
  --page-base: #f3e8da;
  --page-accent: #f2ad57;
  --page-wash: rgba(242, 173, 87, .2);
  --page-glow-a: rgba(239, 166, 75, .2);
  --page-glow-b: rgba(244, 213, 166, .32);
  --page-line: rgba(105, 69, 28, .12);
  --ambient-line: rgba(137, 83, 28, .13);
  --ambient-word: rgba(111, 67, 25, .075);
}

.simulator-page {
  --page-base: #e8eef4;
  --page-accent: #66bdf2;
  --page-wash: rgba(102, 189, 242, .2);
  --page-glow-a: rgba(91, 172, 224, .19);
  --page-glow-b: rgba(181, 204, 230, .33);
  --page-line: rgba(35, 68, 101, .12);
  --ambient-line: rgba(42, 94, 139, .13);
  --ambient-word: rgba(32, 77, 117, .075);
}

.account-page {
  --page-base: #f4e8e4;
  --page-accent: #f18e7d;
  --page-wash: rgba(241, 142, 125, .2);
  --page-glow-a: rgba(235, 124, 109, .17);
  --page-glow-b: rgba(239, 197, 177, .31);
  --page-line: rgba(108, 53, 45, .11);
  --ambient-line: rgba(139, 67, 57, .12);
  --ambient-word: rgba(113, 51, 43, .07);
}

.compare-page {
  --page-base: #e6f1ef;
  --page-accent: #2fa8a1;
  --page-wash: rgba(47, 168, 161, .2);
  --page-glow-a: rgba(39, 151, 145, .18);
  --page-glow-b: rgba(169, 210, 205, .32);
  --page-line: rgba(27, 88, 84, .12);
  --ambient-line: rgba(30, 105, 100, .13);
  --ambient-word: rgba(24, 87, 83, .075);
}

.ai-tools-page {
  --page-base: #e9edf4;
  --page-accent: #df7d52;
  --page-wash: rgba(223, 125, 82, .18);
  --page-glow-a: rgba(216, 113, 72, .17);
  --page-glow-b: rgba(177, 195, 225, .34);
  --page-line: rgba(92, 62, 49, .11);
  --ambient-line: rgba(118, 72, 52, .12);
  --ambient-word: rgba(99, 60, 44, .07);
}

.ambient-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  contain: strict;
}
.ambient-glow {
  position: absolute;
  width: min(42vw, 560px);
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: .72;
  filter: blur(22px);
  animation: ambient-breathe 15s ease-in-out infinite alternate;
}
.ambient-glow-a {
  top: 10%;
  left: -16%;
  background: radial-gradient(circle, var(--page-glow-a), transparent 68%);
}
.ambient-glow-b {
  right: -14%;
  bottom: 3%;
  background: radial-gradient(circle, var(--page-glow-b), transparent 70%);
  animation-delay: -7s;
  animation-duration: 19s;
}
.ambient-word {
  position: absolute;
  width: max-content;
  color: var(--ambient-word);
  font-size: clamp(31px, 4.6vw, 64px);
  font-weight: 800;
  line-height: .85;
  letter-spacing: 0;
  white-space: nowrap;
  filter: blur(1.15px);
  animation: ambient-word-drift 18s ease-in-out infinite alternate;
}
.ambient-word-1 {
  top: 27%;
  left: -2.5%;
  transform: rotate(-5deg);
}
.ambient-word-2 {
  top: 55%;
  right: -4%;
  font-size: clamp(26px, 3.8vw, 52px);
  transform: rotate(4deg);
  animation-delay: -5s;
  animation-duration: 22s;
}
.ambient-word-3 {
  bottom: 17%;
  left: 8%;
  font-size: clamp(23px, 3.2vw, 45px);
  transform: rotate(2deg);
  animation-delay: -10s;
  animation-duration: 20s;
}
.ambient-word-4 {
  top: 38%;
  right: 18%;
  font-size: clamp(20px, 2.6vw, 38px);
  opacity: .72;
  transform: rotate(-2deg);
  animation-delay: -13s;
  animation-duration: 24s;
}
.ambient-shape {
  position: absolute;
  color: var(--ambient-line);
  opacity: .9;
}
.ambient-ring {
  top: 25%;
  right: 7%;
  width: clamp(118px, 17vw, 210px);
  aspect-ratio: 1;
  border: 1px solid var(--ambient-line);
  border-radius: 50%;
  animation: ambient-float 16s ease-in-out infinite alternate;
}
.ambient-ring::before,
.ambient-ring::after {
  content: "";
  position: absolute;
  border: 1px solid var(--ambient-line);
  border-radius: 50%;
}
.ambient-ring::before { inset: 17%; opacity: .72; }
.ambient-ring::after { inset: 38%; opacity: .58; }
.ambient-diamond {
  bottom: 22%;
  left: 17%;
  width: clamp(46px, 6vw, 76px);
  aspect-ratio: 1;
  border: 1px solid var(--ambient-line);
  transform: rotate(45deg);
  animation: ambient-diamond 14s ease-in-out infinite alternate;
}
.ambient-diamond::after {
  content: "";
  position: absolute;
  inset: 26%;
  border: 1px solid var(--ambient-line);
}
.ambient-grid {
  top: 61%;
  left: 43%;
  width: clamp(110px, 15vw, 180px);
  aspect-ratio: 1.5;
  background-image:
    linear-gradient(var(--ambient-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--ambient-line) 1px, transparent 1px);
  background-size: 17px 17px;
  mask-image: radial-gradient(circle, #000, transparent 72%);
  opacity: .5;
  animation: ambient-float 20s ease-in-out -8s infinite alternate;
}
.ambient-cross {
  top: 38%;
  left: 12%;
  width: 22px;
  height: 22px;
  animation: ambient-spin 24s linear infinite;
}
.ambient-cross::before,
.ambient-cross::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--ambient-line);
  transform: translate(-50%, -50%);
}
.ambient-cross::before { width: 22px; height: 1px; }
.ambient-cross::after { width: 1px; height: 22px; }
.ambient-dot {
  right: 20%;
  bottom: 13%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ambient-line);
  box-shadow:
    24px -13px 0 -1px var(--ambient-line),
    -13px 22px 0 -2px var(--ambient-line);
  animation: ambient-float 12s ease-in-out -4s infinite alternate;
}
.ambient-pointer {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  transition: opacity .25s ease;
  will-change: transform;
}
body.has-pointer .ambient-pointer { opacity: 1; }
.ambient-pointer-ring,
.ambient-pointer-diamond,
.ambient-pointer-dot {
  position: absolute;
  display: block;
}
.ambient-pointer-ring {
  top: -23px;
  left: -23px;
  width: 46px;
  height: 46px;
  border: 1px solid var(--ambient-line);
  border-radius: 50%;
  box-shadow: inset 0 0 0 7px color-mix(in srgb, var(--page-accent) 8%, transparent);
  animation: ambient-pointer-pulse 3.2s ease-in-out infinite;
}
.ambient-pointer-diamond {
  top: -7px;
  left: -7px;
  width: 14px;
  height: 14px;
  border: 1px solid var(--ambient-line);
  transform: rotate(45deg);
}
.ambient-pointer-dot {
  top: -2px;
  left: -2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--page-accent);
  opacity: .55;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 9px 14px;
  border-radius: 6px;
  background: var(--brand-lime);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: relative;
  z-index: 2;
  overflow: hidden;
  background: var(--ink);
  color: #f5f7f2;
}

.brand-stage {
  position: relative;
  min-height: 148px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.brand-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(90deg, transparent, #000 28%, #000 72%, transparent);
}
.brand-stage::after {
  content: "";
  position: absolute;
  top: -65%;
  bottom: -65%;
  left: -30%;
  width: 22%;
  background: linear-gradient(90deg, transparent, rgba(184, 243, 106, .1), transparent);
  transform: skewX(-16deg);
  animation: brand-scan 12s linear infinite;
  pointer-events: none;
}
.brand-ghost {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max-content;
  color: rgba(255, 255, 255, .045);
  font-size: clamp(84px, 13vw, 176px);
  font-weight: 800;
  line-height: .8;
  white-space: nowrap;
  filter: blur(.3px);
  transform: translate(-50%, -50%);
  animation: brand-drift 16s ease-in-out infinite alternate;
  pointer-events: none;
}
.brand-stage-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 34px 24px 30px;
}
.brand {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}
.brand-name {
  font-size: clamp(38px, 5.3vw, 62px);
  font-weight: 780;
  line-height: .92;
}
.brand-name span { color: var(--brand-lime); }
.brand-caption {
  max-width: 300px;
  color: #89949d;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  line-height: 1.6;
  text-align: right;
  text-transform: uppercase;
}
.brand-alias {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--brand-lime);
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
}

.primary-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(17, 24, 32, .96);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 10px 26px rgba(17, 24, 32, .12);
  backdrop-filter: blur(14px);
}
.primary-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 20px 0;
}
.primary-tab {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 11px;
  min-width: 0;
  min-height: 74px;
  padding: 13px 18px 15px;
  color: #a8b2ba;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.primary-tab + .primary-tab { border-left: 1px solid rgba(255, 255, 255, .08); }
.primary-tab::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--page-accent);
  box-shadow: 0 -3px 14px var(--page-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.primary-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, .045);
}
.primary-tab.on {
  color: #fff;
  background: linear-gradient(180deg, var(--page-wash), transparent);
}
.primary-tab.on::after { transform: scaleX(1); }
.tab-number {
  grid-row: 1 / 3;
  align-self: center;
  color: #6f7b84;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}
.primary-tab.on .tab-number { color: var(--page-accent); }
.tab-label {
  align-self: end;
  overflow: hidden;
  color: inherit;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tab-en {
  align-self: start;
  color: #758089;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  line-height: 1.5;
  text-transform: uppercase;
}
.primary-tab.on .tab-en { color: #b9c2c9; }
.primary-tab:focus-visible,
.brand:focus-visible,
.skip-link:focus-visible {
  outline: 2px solid var(--page-accent);
  outline-offset: -2px;
}

.page-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: 38px;
  align-items: end;
  width: 100%;
  max-width: 1120px;
  margin: 26px auto 0;
  padding: 0 24px 24px;
  border-bottom: 1px solid var(--page-line);
}
.page-copy { min-width: 0; }
.page-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #5e6b65;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
}
.page-kicker::before {
  content: "";
  width: 24px;
  height: 3px;
  background: var(--page-accent);
}
.page-intro h1 {
  max-width: 720px;
  margin-top: 10px;
  color: var(--ink);
  font-size: clamp(30px, 3.5vw, 44px);
  font-weight: 760;
  line-height: 1.15;
}
.page-description {
  max-width: 620px;
  margin-top: 9px;
  color: #4c5752;
  font-size: 13px;
  line-height: 1.65;
}
.page-context {
  margin-top: 7px;
  color: #5c6762;
  font-size: 12px;
}
.page-tools {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.tool-caption {
  color: #7a8580;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  text-transform: uppercase;
}
.data-status { color: #46514d; font-size: 13px; font-weight: 600; }
.tag-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 9px; }
.page-intro .back { display: inline-block; margin-bottom: 14px; }

.page-tools #toggle-pool {
  width: fit-content;
  margin-top: 0;
  padding: 9px 14px;
  border: 1px solid var(--ink);
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.page-tools #toggle-pool:hover { background: #26313a; border-color: #26313a; }
.page-tools #search {
  width: 100%;
  margin-top: 0;
  padding: 11px 13px;
  border: 1px solid #cfd6d3;
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 5px 18px rgba(17, 24, 32, .05);
}
.page-tools #search:focus {
  border-color: var(--ink);
  background: #fff;
  box-shadow: 0 0 0 3px var(--page-wash);
}
.page-tools #search-meta,
.page-tools #lof-meta { margin-top: -2px; min-height: 16px; }
.page-tools #lof-sort {
  width: 100%;
  margin-top: 0;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
}
.page-tools .sort-label { margin-top: 2px; }

.account-main .page-intro,
.sim-main > .page-intro {
  grid-template-columns: minmax(0, 1fr);
  max-width: none;
  margin-bottom: 16px;
  padding-right: 0;
  padding-left: 0;
}

.detail .page-intro,
.lof-detail .page-intro {
  grid-template-columns: minmax(0, 1fr);
  max-width: 900px;
  padding-right: 16px;
  padding-left: 16px;
}
.detail .page-intro h1,
.lof-detail .page-intro h1 {
  margin-top: 14px;
  overflow-wrap: anywhere;
}

@keyframes brand-scan {
  from { transform: translateX(0) skewX(-16deg); }
  to { transform: translateX(680%) skewX(-16deg); }
}
@keyframes brand-drift {
  from { transform: translate(-52%, -50%); }
  to { transform: translate(-48%, -50%); }
}
@keyframes ambient-breathe {
  from { transform: scale(.92) translate3d(-1%, 0, 0); opacity: .55; }
  to { transform: scale(1.08) translate3d(2%, -1%, 0); opacity: .82; }
}
@keyframes ambient-word-drift {
  from { translate: -8px 4px; }
  to { translate: 13px -9px; }
}
@keyframes ambient-float {
  from { transform: translate3d(0, 8px, 0); }
  to { transform: translate3d(10px, -12px, 0); }
}
@keyframes ambient-diamond {
  from { transform: rotate(45deg) translate3d(0, 7px, 0); }
  to { transform: rotate(53deg) translate3d(9px, -8px, 0); }
}
@keyframes ambient-spin {
  to { transform: rotate(360deg); }
}
@keyframes ambient-pointer-pulse {
  0%, 100% { transform: scale(.92); opacity: .72; }
  50% { transform: scale(1.08); opacity: 1; }
}

.group { margin: 16px 12px 0; }
.group h2 { font-size: 15px; margin-bottom: 8px; }
.group h2 small { color: #86909c; font-weight: normal; margin-left: 4px; }

.table-wrap,
.card,
.account-panel,
.sim-stat,
.sim-route-card,
.sim-route-editor,
.sim-selected-row,
.sim-search-results {
  background: var(--glass-surface);
  border-color: var(--glass-border);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.12);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.12);
  box-shadow: var(--glass-shadow);
}
.table-wrap { overflow: hidden; border-radius: 8px; border: 1px solid var(--glass-border); }
table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 12px; text-align: left; }
th { color: #6f7975; font-weight: normal; border-bottom: 1px solid rgba(17, 24, 32, .09); }
tbody tr + tr { border-top: 1px solid rgba(17, 24, 32, .065); }
td.code { color: #86909c; font-variant-numeric: tabular-nums; }
.fund-name { overflow-wrap: anywhere; }
th:nth-child(1) { width: 9%; }
th:nth-child(2) { width: 33%; }
th:nth-child(3) { width: 13%; }
th:nth-child(4) { width: 12%; }
th:nth-child(5) { width: 10%; }
th:nth-child(6) { width: 13%; }
th:nth-child(7) { width: 10%; }
.lof-index { color: #86909c; font-size: 11px; margin-top: 2px; }
.lof-time { color: #86909c; font-size: 12px; white-space: nowrap; }
.empty { text-align: center; color: #86909c; padding: 24px 0; }

.st { padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.st-open      { background: #e8f7ee; color: #0c8a43; }
.st-limited   { background: #fff7e6; color: #b25d09; }
.st-suspended { background: #ffece8; color: #cb2e3a; }
.st-listed    { background: #e8f3ff; color: #1d6fd1; }
.st-closed, .st-raising, .st-unknown { background: #f2f3f5; color: #86909c; }

.tag {
  display: inline-block;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 3px;
  background: #f2f3f5;
  color: #86909c;
  font-size: 11px;
  line-height: 16px;
  vertical-align: 1px;
}

#toggle-pool {
  margin-top: 8px;
  padding: 4px 14px;
  border: 1px solid #d9dce1;
  border-radius: 14px;
  background: #fff;
  color: #4e5969;
  font-size: 12px;
  cursor: pointer;
}

#search {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 8px 14px;
  border: 1px solid #d9dce1;
  border-radius: 18px;
  background: #f6f7f9;
  font-size: 14px;
  outline: none;
  -webkit-appearance: none;
}
#search:focus { border-color: #1d6fd1; background: #fff; }
#search-meta { font-size: 12px; color: #86909c; margin-top: 6px; min-height: 16px; }

#lof-sort {
  margin-top: 10px;
  padding: 6px 12px;
  border: 1px solid #d9dce1;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  color: #4e5969;
  outline: none;
}
.sort-label { font-size: 12px; color: #86909c; margin-right: 6px; }

mark { background: #fff1a8; border-radius: 2px; padding: 0 1px; }

/* ===== 详情页 ===== */
.back { font-size: 13px; color: #1d6fd1; text-decoration: none; }
.st.big { font-size: 15px; padding: 4px 14px; border-radius: 6px; }
.status-raw { margin-left: 8px; font-size: 12px; color: #86909c; }

.card {
  margin: 12px;
  padding: 14px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
}
.card h2 { font-size: 14px; margin-bottom: 10px; }
.card-title { display: flex; justify-content: space-between; align-items: center; }
.card-title h2 { margin-bottom: 0; }

.kv-row { display: flex; margin-top: 12px; }
.kv { flex: 1; text-align: center; }
.kv b { display: block; font-size: 16px; }
.kv i { font-style: normal; font-size: 11px; color: #86909c; }

.range-btns button {
  margin-left: 6px; padding: 2px 10px; font-size: 12px;
  border: 1px solid #d9dce1; border-radius: 12px; background: #fff; color: #4e5969; cursor: pointer;
}
.range-btns button.on { border-color: #1d6fd1; color: #1d6fd1; }

.chart { width: 100%; height: 160px; display: block; margin-top: 8px; }
.chart .cv { font-size: 10px; fill: #4e5969; }
.chart .cd { font-size: 9px; fill: #c9cdd4; }
#chart { position: relative; }
.chart .hover-line { stroke: #4e5969; stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.chart .hover-dot { stroke: #fff; stroke-width: 1; }
.chart .chart-hit { cursor: crosshair; }
.chart-tip {
  position: absolute; z-index: 2; pointer-events: none; white-space: nowrap;
  background: rgba(31, 35, 41, .92); color: #fff; padding: 6px 8px;
  border-radius: 6px; font-size: 11px; line-height: 1.5;
  transform: translate(12px, -100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.chart-tip b { font-weight: 600; }
.note { font-size: 11px; color: #86909c; margin-top: 6px; }

.ret-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.ret { text-align: center; padding: 8px 0; background: #f6f7f9; border-radius: 6px; }
.ret b { display: block; font-size: 14px; }
.ret i { font-style: normal; font-size: 11px; color: #86909c; }
.up { color: #cb2e3a; }
.down { color: #0c8a43; }

.info-list { font-size: 13px; }
.info-row { display: flex; padding: 7px 0; border-top: 1px solid #f2f3f5; }
.info-row:first-child { border-top: none; }
.info-row dt { width: 76px; color: #86909c; flex-shrink: 0; }
.info-row dd { flex: 1; }

.holdings-report-date {
  color: #527064;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}
.holdings-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.holdings-table {
  min-width: 480px;
}
.holdings-table th:nth-child(1) { width: 10%; }
.holdings-table th:nth-child(2) { width: 42%; }
.holdings-table th:nth-child(3) { width: 20%; }
.holdings-table th:nth-child(4) { width: 28%; }
.holding-rank {
  color: #7c8c84;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
}
.holding-name { font-weight: 600; }
.holding-code {
  color: #7c8c84;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
}
.holding-weight {
  display: flex;
  align-items: center;
  gap: 9px;
}
.holding-weight b {
  min-width: 52px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.holding-weight-bar {
  flex: 1;
  min-width: 48px;
  height: 5px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(17, 24, 32, .08);
}
.holding-weight-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--page-accent);
}

tr.rowlink { cursor: pointer; }
tr.rowlink:hover { background: rgba(255, 255, 255, .76); }
.fav-col { width: 54px; text-align: center !important; }
.fav-btn {
  width: 30px; height: 30px; padding: 0;
  border: 1px solid #d9dce1; border-radius: 50%;
  background: #fff; color: #86909c; font-size: 18px; line-height: 28px;
  cursor: pointer;
}
.fav-btn:hover { border-color: #e5a800; color: #b87d00; background: #fffaf0; }
.fav-btn.on { border-color: #f0c44c; background: #fff7dc; color: #b87d00; }
.fav-btn:disabled { cursor: wait; opacity: .65; }
.empty-state { color: #86909c; text-align: center; padding: 28px 16px; font-size: 13px; }

.detail-head-actions {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.fav-detail {
  padding: 5px 12px;
  border: 1px solid #d9dce1; border-radius: 16px;
  background: #fff; color: #4e5969; font-size: 13px;
  cursor: pointer;
}
.fav-detail.on { border-color: #f0c44c; background: #fff7dc; color: #9d6b00; }
.fav-detail:disabled { cursor: wait; opacity: .7; }

/* ===== 个人中心 ===== */
.account-main { max-width: 760px; margin: 16px auto 0; padding: 0 12px; }
.account-panel {
  border: 1px solid var(--glass-border); border-radius: 8px;
  padding: 18px;
}
.account-panel + .account-panel { margin-top: 14px; }
.account-panel h2 { font-size: 17px; }

.auth-tabs { display: flex; gap: 6px; border-bottom: 1px solid #e5e6eb; margin-bottom: 18px; }
.auth-tabs button {
  padding: 8px 16px; border: 0; border-bottom: 2px solid transparent;
  background: transparent; color: #86909c; font-size: 14px; cursor: pointer;
}
.auth-tabs button.on { border-bottom-color: #1d6fd1; color: #1d6fd1; }
.auth-method {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px; border: 1px solid rgba(17, 24, 32, .1);
  border-radius: 8px; background: rgba(255, 255, 255, .58);
}
.auth-method button {
  padding: 8px 10px; border: 0; border-radius: 5px;
  background: transparent; color: #66706c; font-size: 13px; cursor: pointer;
}
.auth-method button.on {
  background: rgba(255, 255, 255, .92); color: #1b5f49;
  box-shadow: 0 2px 10px rgba(17, 24, 32, .08);
}

.account-form { display: grid; gap: 14px; max-width: 420px; margin: 0 auto; }
.account-form label { display: grid; gap: 6px; font-size: 13px; color: #4e5969; }
.account-form input, .nickname-form input {
  width: 100%; padding: 9px 12px;
  border: 1px solid #d9dce1; border-radius: 6px;
  background: #fff; font-size: 14px; outline: none;
}
.account-form input:focus, .nickname-form input:focus { border-color: #1d6fd1; }
.sms-code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.sms-code-row .secondary-btn { white-space: nowrap; }
.primary-btn {
  padding: 8px 16px; border: 0; border-radius: 6px;
  background: #1d6fd1; color: #fff; font-size: 14px; cursor: pointer;
}
.primary-btn:disabled { cursor: wait; opacity: .7; }
.secondary-btn {
  padding: 8px 16px; border: 1px solid #d9dce1; border-radius: 6px;
  background: #fff; color: #4e5969; font-size: 14px; cursor: pointer;
}
.secondary-btn:hover { border-color: #aab1bb; color: #1f2329; }
.secondary-btn:disabled { cursor: wait; opacity: .7; }
.guest-actions { max-width: 420px; margin: 18px auto 0; text-align: center; }
.form-error { color: #cb2e3a; font-size: 12px; min-height: 18px; }
.form-message { color: #0c8a43; font-size: 12px; min-height: 18px; margin-top: 6px; }
.account-error { text-align: center; margin-top: 12px; }

.profile-head { display: flex; align-items: center; gap: 14px; }
.avatar-wrap {
  width: 72px; height: 72px; border-radius: 50%;
  overflow: hidden; background: #e8f3ff; color: #1d6fd1;
  display: grid; place-items: center; flex-shrink: 0;
  font-size: 28px; font-weight: 600;
}
.avatar-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-title h2 { font-size: 20px; }
.profile-title p { color: #86909c; font-size: 13px; margin-top: 2px; }
.avatar-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.file-btn {
  display: inline-block; padding: 5px 12px;
  border: 1px solid #d9dce1; border-radius: 6px;
  color: #4e5969; font-size: 12px; cursor: pointer;
}
.text-btn {
  padding: 5px 0; border: 0; background: transparent;
  color: #1d6fd1; font-size: 12px; cursor: pointer;
}
.text-btn.danger { color: #cb2e3a; margin-top: 18px; }
.nickname-form {
  display: grid; grid-template-columns: 48px 1fr auto;
  align-items: center; gap: 8px; margin-top: 16px;
}
.nickname-form label { color: #86909c; font-size: 13px; }
.phone-bind-form {
  display: grid; gap: 12px; margin-top: 18px; padding: 16px;
  border: 1px solid rgba(17, 24, 32, .08); border-radius: 8px;
  background: rgba(255, 255, 255, .38);
}
.phone-bind-form[hidden] { display: none; }
.phone-bind-form label { display: grid; gap: 6px; color: #4e5969; font-size: 13px; }
.phone-bind-form input {
  width: 100%; padding: 9px 12px;
  border: 1px solid #d9dce1; border-radius: 6px;
  background: rgba(255, 255, 255, .92); font-size: 14px; outline: none;
}
.phone-bind-form input:focus { border-color: #1d6fd1; }
.phone-bind-form .primary-btn { justify-self: start; }
.phone-bind-title { display: grid; gap: 3px; }
.phone-bind-title strong { font-size: 14px; }
.phone-bind-title span { color: #86909c; font-size: 12px; }

.account-meta { margin-top: 16px; border-top: 1px solid #f2f3f5; }
.account-meta div {
  display: flex; padding: 9px 0; border-bottom: 1px solid #f2f3f5;
  font-size: 13px;
}
.account-meta dt { width: 84px; color: #86909c; }
.account-meta dd { flex: 1; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.text-link { color: #1d6fd1; font-size: 13px; text-decoration: none; }
.favorite-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-top: 1px solid #f2f3f5;
}
.favorite-main {
  min-width: 0; flex: 1; display: flex; align-items: center; gap: 9px;
  color: inherit; text-decoration: none;
}
.favorite-code { color: #86909c; font-size: 12px; font-variant-numeric: tabular-nums; }
.favorite-name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }

@media (min-width: 768px) {
  #search { max-width: 480px; margin-left: auto; margin-right: auto; }
  .card { margin: 16px auto 0; max-width: 900px; }
  .detail-head-actions { max-width: 900px; margin-left: auto; margin-right: auto; }
}

@media (max-width: 900px) {
  .table-wrap {
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
  }
  table, tbody { display: block; width: 100%; }
  thead { display: none; }
  tbody tr + tr { border-top: 0; }
  tbody tr.rowlink {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "code code favorite"
      "name name name"
      "status status status"
      "limit fee premium";
    gap: 8px 12px;
    margin-top: 8px;
    padding: 12px;
    background: var(--glass-surface-soft);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
  }
  tbody td { display: block; min-width: 0; padding: 0; }
  td.code {
    grid-column: 1 / 3;
    grid-row: 1;
    align-self: center;
    font-size: 12px;
  }
  td.fund-name {
    grid-area: name;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
  }
  td.fund-status { grid-area: status; }
  td.fund-limit,
  td.fund-fee,
  td.fund-premium {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }
  td.fund-limit { grid-area: limit; }
  td.fund-fee { grid-area: fee; }
  td.fund-premium { grid-area: premium; }
  td.fund-limit::before,
  td.fund-fee::before,
  td.fund-premium::before {
    content: attr(data-label);
    color: #86909c;
    font-size: 11px;
    line-height: 1.35;
    white-space: normal;
  }
  td.fav-col {
    grid-area: favorite;
    align-self: center;
    width: auto;
    text-align: right !important;
  }
}

.pm-high { color: #cb2e3a; font-weight: 600; }
.pm-mid  { color: #b25d09; }
.pm-flat { color: #1f2329; }
.pm-neg  { color: #0c8a43; }
.na { color: #c9cdd4; }

footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  background: color-mix(in srgb, var(--page-base) 72%, white 28%);
  border-top: 1px solid rgba(17, 24, 32, .1);
  padding: 8px 14px;
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  backdrop-filter: blur(16px) saturate(1.1);
}
footer p { font-size: 11px; color: #86909c; line-height: 1.4; }
.footer-brand { color: #56616a; font-weight: 700; }

@media (min-width: 768px) {
  .group { margin: 20px auto 0; max-width: 900px; }
}

@media (max-width: 800px) {
  .ambient-word-4 { display: none; }
  .ambient-ring { right: -5%; opacity: .68; }
  .ambient-grid { left: 46%; opacity: .36; }
  .brand-stage { min-height: 112px; }
  .brand-stage-inner { align-items: flex-start; padding: 25px 18px 24px; }
  .brand-name { font-size: clamp(34px, 8vw, 46px); }
  .brand-caption { display: none; }
  .primary-tabs { padding: 6px 8px 0; }
  .primary-tab {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    justify-items: center;
    align-content: center;
    gap: 2px;
    min-height: 64px;
    padding: 9px 5px 11px;
    text-align: center;
  }
  .tab-number { grid-row: auto; align-self: end; font-size: 9px; }
  .tab-label {
    align-self: start;
    max-width: 100%;
    font-size: 13px;
  }
  .tab-en { display: none; }
  .primary-tab::after { right: 7px; left: 7px; height: 2px; }
  .page-intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 17px;
    margin-top: 20px;
    padding: 0 16px 20px;
  }
  .page-intro h1 { font-size: clamp(24px, 6.8vw, 32px); }
  .page-description { font-size: 13px; }
  .page-tools { padding-top: 0; }
  .detail .page-intro,
  .lof-detail .page-intro { padding-right: 16px; padding-left: 16px; }
}

@media (max-width: 480px) {
  .brand-stage { min-height: 102px; }
  .brand-stage-inner { padding: 22px 14px 21px; }
  .brand-name { font-size: 34px; }
  .primary-tabs { padding: 5px 4px 0; }
  .primary-tab { min-height: 60px; padding: 8px 2px 10px; }
  .tab-label { font-size: 12px; }
  .page-intro { padding-right: 12px; padding-left: 12px; }
  .account-main { padding: 0 8px; }
  .account-panel { padding: 14px; }
  .favorite-main { flex-wrap: wrap; gap: 4px 8px; }
  .favorite-name { flex-basis: calc(100% - 70px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .brand-stage::after,
  .brand-ghost,
  .ambient-glow,
  .ambient-word,
  .ambient-shape,
  .ambient-pointer-ring { animation: none; }
  .ambient-pointer { display: none; }
  .primary-tab,
  .primary-tab::after,
  .cmp-tool-tab { transition: none; }
  .cmp-tool-panel:not([hidden]) { animation: none; }
}

/* ===== 基金模拟器 ===== */
.simulator-page { padding-bottom: 92px; }
.sim-main { max-width: 1080px; margin: 0 auto; padding: 16px 12px 0; }
.sim-main > section > .account-panel + .account-panel { margin-top: 14px; }
.sim-muted { color: #86909c; font-size: 12px; }
.sim-page-error { text-align: center; margin-top: 12px; }
.sim-inline-btn { display: inline-block; text-decoration: none; }
.sim-eyebrow {
  color: #1d6fd1; font-size: 12px; font-weight: 600;
  letter-spacing: 0; margin-bottom: 2px;
}
.sim-form { display: grid; gap: 14px; }
.sim-form label { display: grid; gap: 6px; color: #4e5969; font-size: 13px; }
.sim-form input, .sim-form select, .sim-selected-row select {
  width: 100%; min-width: 0; padding: 9px 11px;
  border: 1px solid #d9dce1; border-radius: 6px;
  background: #fff; color: #1f2329; font-size: 14px; outline: none;
}
.sim-form input:focus, .sim-form select:focus, .sim-selected-row select:focus {
  border-color: #1d6fd1;
}
.sim-field-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sim-setup-panel { padding: 20px; }
.segmented {
  display: inline-flex; flex-wrap: wrap; gap: 4px;
  padding: 4px; border-radius: 8px; background: #f2f3f5;
}
.segmented button {
  padding: 6px 14px; border: 0; border-radius: 6px;
  background: transparent; color: #4e5969; font-size: 13px; cursor: pointer;
}
.segmented button.on { background: #fff; color: #1d6fd1; box-shadow: 0 1px 3px rgba(0, 0, 0, .09); }
.sim-strategy { width: fit-content; }
.sim-search-label { margin-top: 2px; }
.sim-search-results {
  display: grid; gap: 1px; margin-top: -8px;
  border: 1px solid var(--glass-border); border-radius: 8px;
  overflow: hidden; background: var(--glass-surface);
}
.sim-search-results button {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 10px 12px; border: 0;
  background: #fff; color: #1f2329; text-align: left; cursor: pointer;
}
.sim-search-results button:hover { background: #f8fbff; }
.sim-search-results b { display: block; font-size: 13px; }
.sim-search-results small { display: block; color: #86909c; font-size: 11px; }
.sim-search-results .sim-search-empty {
  margin: 0; padding: 12px; color: #7b8783; font-size: 12px;
}
.sim-selected-list { display: grid; gap: 8px; }
.sim-selected-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px 150px 30px;
  grid-template-areas: "name freq amount remove";
  align-items: end; gap: 10px;
  padding: 12px; border: 1px solid var(--glass-border); border-radius: 8px;
  background: var(--glass-surface-soft);
}
.sim-selected-name { grid-area: name; min-width: 0; align-self: center; }
.sim-selected-name b { display: block; font-size: 13px; overflow-wrap: anywhere; }
.sim-selected-name small { display: block; color: #86909c; font-size: 11px; }
.sim-selected-row select { grid-area: freq; }
.sim-selected-row label { grid-area: amount; }
.sim-principal-meta {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 6px 12px; color: #86909c; font-size: 12px;
}
.sim-principal-meta b { color: #4e5969; font-weight: 600; }
.sim-route-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.sim-route-tabs { display: flex; flex: 1; flex-wrap: wrap; gap: 6px; min-width: 0; }
.sim-route-tabs button {
  max-width: 210px; padding: 6px 12px; overflow: hidden;
  border: 1px solid #d9dce1; border-radius: 16px;
  background: #fff; color: #4e5969; font-size: 12px;
  text-overflow: ellipsis; white-space: nowrap; cursor: pointer;
}
.sim-route-tabs button.on { border-color: #1d6fd1; background: #e8f3ff; color: #1d6fd1; }
.sim-route-editor {
  display: grid; gap: 12px; padding: 14px;
  border: 1px solid var(--glass-border); border-radius: 8px;
  background: var(--glass-surface-soft);
}
.sim-route-editor-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
}
.sim-route-name { display: grid; flex: 1; gap: 6px; min-width: 0; color: #4e5969; font-size: 13px; }
.sim-route-name input {
  width: 100%; min-width: 0; padding: 9px 11px;
  border: 1px solid #d9dce1; border-radius: 6px;
  background: #fff; color: #1f2329; font-size: 14px; outline: none;
}
.sim-route-name input:focus { border-color: #1d6fd1; }
.sim-route-editor .text-btn.danger { flex-shrink: 0; margin-top: 0; white-space: nowrap; }
.sim-remove-btn {
  grid-area: remove; width: 30px; height: 30px; padding: 0;
  border: 1px solid #e5e6eb; border-radius: 50%;
  background: #fff; color: #86909c; font-size: 18px; cursor: pointer;
}
.sim-remove-btn:hover { color: #cb2e3a; border-color: #f0b8be; }
.sim-allocation-meta { min-height: 18px; color: #86909c; font-size: 12px; }
.sim-allocation-meta.ok { color: #0c8a43; }
.sim-allocation-meta.warn { color: #b25d09; }
.sim-actions { display: flex; justify-content: flex-end; }
.sim-route-compare-panel { margin-top: 14px; }
.sim-route-comparison {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px;
}
.sim-route-card {
  display: grid; align-content: start; gap: 5px; min-width: 0;
  padding: 14px; border: 1px solid var(--glass-border); border-radius: 8px;
  background: var(--glass-surface); color: inherit; text-align: left; cursor: pointer;
}
.sim-route-card:hover { border-color: #b8c8dc; }
.sim-route-card.on { border-color: #1d6fd1; box-shadow: 0 0 0 1px #1d6fd1 inset; }
.sim-route-card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 2px 8px;
}
.sim-route-card-head b { min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.sim-route-card-head small, .sim-route-card > span:not(.sim-route-card-head) {
  color: #86909c; font-size: 12px;
}
.sim-route-card > strong { font-size: 19px; line-height: 1.35; overflow-wrap: anywhere; }
.sim-route-card dl {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
  margin-top: 5px; padding-top: 9px; border-top: 1px solid #f2f3f5;
}
.sim-route-card dl span { min-width: 0; }
.sim-route-card dt { color: #86909c; font-size: 10px; }
.sim-route-card dd { font-size: 11px; overflow-wrap: anywhere; }
.sim-route-badge {
  max-width: 48%; padding: 2px 8px; border-radius: 4px;
  background: #e8f3ff; color: #1d6fd1; font-size: 11px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sim-round-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sim-round-head h2 { font-size: 20px; }
.sim-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.sim-stat {
  min-width: 0; padding: 14px; border: 1px solid var(--glass-border);
  border-radius: 8px; background: var(--glass-surface);
}
.sim-stat span { display: block; color: #86909c; font-size: 12px; }
.sim-stat strong { display: block; margin-top: 4px; font-size: 18px; overflow-wrap: anywhere; }
.sim-warning {
  margin: 10px 0; padding: 9px 12px; border-radius: 6px;
  background: #fff7e6; color: #8c5707; font-size: 12px;
}
.sim-two-col { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 14px; }
.sim-two-col > .account-panel { min-width: 0; }
.sim-position-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 64px;
  gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid #f2f3f5;
}
.sim-position-row:first-child { border-top: 0; }
.sim-position-main { min-width: 0; }
.sim-position-main b { display: block; font-size: 13px; overflow-wrap: anywhere; }
.sim-position-main small { display: block; color: #86909c; font-size: 11px; }
.sim-position-numbers { display: grid; justify-items: end; gap: 2px; color: #4e5969; font-size: 12px; }
.sim-small-btn { padding: 5px 10px; }
.sim-sell-presets { display: flex; gap: 6px; }
.sim-sell-presets button {
  padding: 4px 10px; border: 1px solid #d9dce1; border-radius: 12px;
  background: #fff; color: #4e5969; font-size: 12px; cursor: pointer;
}
.sim-picked-fund {
  width: fit-content; max-width: 100%; padding: 6px 10px;
  border: 1px solid #bcd7fa; border-radius: 6px;
  background: #f0f7ff; color: #1d6fd1; font-size: 12px;
  overflow-wrap: anywhere; text-align: left; cursor: pointer;
}
.sim-plan-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-top: 1px solid #f2f3f5; font-size: 13px;
}
.sim-plan-row:first-child { border-top: 0; }
.sim-plan-row b { display: block; }
.sim-plan-row small, .sim-plan-row > span { color: #86909c; font-size: 12px; }
.sim-order-list { display: grid; }
.sim-order-row {
  display: grid; grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid #f2f3f5;
}
.sim-order-row:first-child { border-top: 0; }
.sim-side-label {
  padding: 2px 6px; border-radius: 4px; font-size: 11px; text-align: center;
}
.sim-side-label.buy { background: #ffece8; color: #cb2e3a; }
.sim-side-label.sell { background: #e8f7ee; color: #0c8a43; }
.sim-order-main { min-width: 0; }
.sim-order-main b { display: block; font-size: 13px; overflow-wrap: anywhere; }
.sim-order-main small { display: block; color: #86909c; font-size: 11px; }
.sim-order-amount { display: grid; justify-items: end; gap: 2px; font-size: 13px; }
.sim-order-amount small { color: #86909c; font-size: 11px; }
.sim-finish-row { display: flex; justify-content: flex-end; margin: 14px 0 0; }
.sim-danger-btn { color: #cb2e3a; border-color: #efc7cb; }
.sim-history-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 18px;
  gap: 12px; align-items: center; width: 100%;
  padding: 12px 0; border: 0; border-top: 1px solid #f2f3f5;
  background: transparent; color: inherit; text-align: left; text-decoration: none; cursor: pointer;
}
.sim-history-row:first-child { border-top: 0; }
.sim-history-row:hover { background: rgba(255, 255, 255, .68); }
.account-sim-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px; align-items: center;
  border-top: 1px solid rgba(17, 24, 32, .065);
}
.account-sim-row:first-child { border-top: 0; }
.account-sim-row:hover { background: rgba(255, 255, 255, .5); }
.account-sim-link {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 18px;
  gap: 12px; align-items: center; min-width: 0;
  padding: 12px 0; color: inherit; text-decoration: none;
}
.account-sim-link::after {
  content: "›"; color: #9ba39f; font-size: 18px; line-height: 1;
}
.account-sim-delete {
  padding: 5px 9px; border: 1px solid rgba(203, 46, 58, .28);
  border-radius: 6px; background: rgba(255, 255, 255, .52);
  color: #a82431; font-size: 12px; white-space: nowrap; cursor: pointer;
}
.account-sim-delete:hover { border-color: rgba(203, 46, 58, .52); background: rgba(255, 236, 232, .9); }
.account-sim-delete:disabled { cursor: wait; opacity: .62; }
.sim-history-main, .account-sim-main { min-width: 0; }
.sim-history-main b, .account-sim-main b { display: block; font-size: 13px; }
.sim-history-main small, .account-sim-main small { display: block; color: #86909c; font-size: 11px; }
.sim-history-row > span:not(.sim-history-main), .sim-round-result {
  font-size: 12px; text-align: right;
}
.sim-round-result b, .sim-round-result small { display: block; }
.sim-round-result small { color: #86909c; font-size: 11px; }
.sim-round-status, .sim-round-state {
  padding: 2px 7px; border-radius: 4px;
  background: #e8f3ff; color: #1d6fd1; font-size: 11px;
}
.sim-chevron { color: #c9cdd4; font-size: 18px; }
.sim-summary-list { display: grid; }
.sim-summary-row {
  display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, minmax(90px, auto));
  gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid #f2f3f5;
}
.sim-summary-row:first-child { border-top: 0; }
.sim-summary-row > span:not(.sim-order-main) { display: grid; justify-items: end; gap: 2px; font-size: 13px; }
.sim-summary-row > span small { color: #86909c; font-size: 11px; }
.sim-route-results { display: grid; }
.sim-route-result {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid #f2f3f5;
}
.sim-route-result:first-child { border-top: 0; }
.sim-route-result.best { background: #f8fbff; }
.sim-rank {
  display: grid; place-items: center; width: 26px; height: 26px;
  border-radius: 50%; background: #f2f3f5; color: #4e5969; font-size: 12px;
}
.sim-route-result.best .sim-rank { background: #1d6fd1; color: #fff; }
.sim-route-result-main { min-width: 0; }
.sim-route-result-main b { display: block; font-size: 13px; overflow-wrap: anywhere; }
.sim-route-result-main small { display: block; color: #86909c; font-size: 11px; overflow-wrap: anywhere; }
.sim-route-result-value { display: grid; justify-items: end; gap: 2px; min-width: 0; }
.sim-route-result-value strong { font-size: 15px; overflow-wrap: anywhere; }
.sim-route-result-value small { font-size: 11px; }
.sim-route-summary { padding: 14px 0; border-top: 1px solid #f2f3f5; }
.sim-route-summary:first-child { padding-top: 0; border-top: 0; }
.sim-route-summary-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 4px 12px;
}
.sim-route-summary-head b { min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.sim-route-summary-head span { font-size: 13px; }

@media (max-width: 720px) {
  .sim-main { padding: 10px 8px 0; }
  .sim-field-grid { grid-template-columns: 1fr; }
  .sim-selected-row {
    grid-template-columns: minmax(0, 1fr) 30px;
    grid-template-areas:
      "name remove"
      "freq freq"
      "amount amount";
  }
  .sim-two-col { grid-template-columns: 1fr; }
  .sim-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sim-stat strong { font-size: 16px; }
  .sim-position-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "main button" "numbers numbers";
  }
  .sim-position-main { grid-area: main; }
  .sim-position-numbers { grid-area: numbers; grid-template-columns: repeat(3, minmax(0, 1fr)); justify-items: start; }
  .sim-position-row .sim-small-btn { grid-area: button; }
  .sim-order-row {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "side amount" "main main";
  }
  .sim-side-label { grid-area: side; }
  .sim-order-main { grid-area: main; }
  .sim-order-amount { grid-area: amount; }
  .sim-summary-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas: "main main main" "buy fee profit";
  }
  .sim-summary-row .sim-order-main { grid-area: main; }
  .sim-summary-row > span:nth-child(2) { grid-area: buy; }
  .sim-summary-row > span:nth-child(3) { grid-area: fee; }
  .sim-summary-row > span:nth-child(4) { grid-area: profit; }
  .sim-summary-row > span:not(.sim-order-main) { justify-items: start; }
  .sim-two-col > .account-panel + .account-panel { margin-top: 0; }
}

@media (max-width: 480px) {
  .simulator-page { padding-bottom: 112px; }
  .sim-round-head { align-items: flex-start; }
  .sim-round-head h2 { font-size: 17px; }
  .sim-route-toolbar { align-items: stretch; }
  .sim-route-tabs { flex-basis: 100%; }
  .sim-route-tabs button { max-width: 100%; }
  .sim-route-toolbar > button { width: 100%; }
  .sim-route-editor { padding: 12px; }
  .sim-route-editor-head { align-items: flex-start; }
  .sim-route-comparison { grid-template-columns: 1fr; }
  .sim-route-result {
    grid-template-columns: 26px minmax(0, 1fr);
    grid-template-areas: "rank main" "rank value";
  }
  .sim-rank { grid-area: rank; align-self: start; }
  .sim-route-result-main { grid-area: main; }
  .sim-route-result-value { grid-area: value; justify-items: start; margin-top: 2px; }
  .sim-route-summary-head { align-items: flex-start; }
  .sim-history-row { grid-template-columns: minmax(0, 1fr) auto; }
  .account-sim-link { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .account-sim-link::after { display: none; }
  .account-sim-link .sim-round-result { text-align: left; }
  .account-sim-delete { align-self: start; margin-top: 12px; }
  .sms-code-row { grid-template-columns: minmax(0, 1fr); }
  .phone-bind-form .primary-btn { justify-self: stretch; }
  .sim-chevron { display: none; }
  .sim-finish-row { justify-content: stretch; }
  .sim-finish-row button { width: 100%; }
}

/* ===== 对比工具 ===== */
.cmp-tool-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  width: calc(100% - 24px);
  max-width: 1120px;
  margin: 16px auto 0;
  padding: 5px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, .48);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.12);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.12);
  box-shadow: var(--glass-shadow);
}
.cmp-tool-tab {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-width: 0;
  min-height: 62px;
  padding: 10px 14px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #4e5d58;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.cmp-tool-tab:hover {
  background: rgba(255, 255, 255, .58);
}
.cmp-tool-tab[aria-selected="true"] {
  border-color: rgba(47, 168, 161, .34);
  background: rgba(255, 255, 255, .8);
  color: #17241f;
  box-shadow: 0 0 0 3px rgba(47, 168, 161, .08);
}
.cmp-tool-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 14px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--page-accent);
}
.cmp-tool-tab:focus-visible {
  outline: 2px solid var(--page-accent);
  outline-offset: -2px;
}
.cmp-tool-index {
  color: #788681;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}
.cmp-tool-tab[aria-selected="true"] .cmp-tool-index { color: var(--page-accent); }
.cmp-tool-copy {
  display: block;
  min-width: 0;
}
.cmp-tool-copy b,
.cmp-tool-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cmp-tool-copy b {
  font-size: 14px;
  font-weight: 680;
  line-height: 1.35;
}
.cmp-tool-copy small {
  margin-top: 2px;
  color: #778580;
  font-size: 10px;
  line-height: 1.4;
}
.cmp-tool-tab[aria-selected="true"] .cmp-tool-copy small { color: #58706a; }
.cmp-tool-panel:not([hidden]) {
  animation: cmp-panel-enter .2s ease-out both;
}
@keyframes cmp-panel-enter {
  from { opacity: .35; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.cmp-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.cmp-section-head h2 { margin-bottom: 0; }
.cmp-meta {
  color: #6d7975;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}
.cmp-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}
.cmp-select-label {
  color: #6d7975;
  font-size: 12px;
}
.cmp-select {
  min-width: 220px;
  max-width: 100%;
  padding: 9px 12px;
  border: 1px solid #c8d4d1;
  border-radius: 8px;
  background: rgba(255, 255, 255, .88);
  color: #1f2329;
  font-size: 13px;
  outline: none;
}
.cmp-select:focus {
  border-color: var(--page-accent);
  box-shadow: 0 0 0 3px var(--page-wash);
}
.cmp-select:disabled { opacity: .62; }
.cmp-pill {
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--page-wash);
  color: var(--page-accent);
  font-size: 11px;
  font-weight: 650;
}
.cmp-pill-muted {
  background: rgba(17, 24, 32, .06);
  color: #6d7975;
}
.cmp-channel-search {
  display: grid;
  gap: 7px;
  margin: 12px 0 20px;
  color: #5f6d68;
  font-size: 12px;
}
.cmp-search-field {
  position: relative;
}
.cmp-search-field input {
  width: 100%;
  min-width: 0;
  padding: 11px 44px 11px 13px;
  border: 1px solid rgba(17, 24, 32, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .68);
  color: #1f2329;
  font-size: 14px;
  outline: none;
}
.cmp-search-field input:focus {
  border-color: var(--page-accent);
  box-shadow: 0 0 0 3px var(--page-wash);
}
.cmp-search-field input::-webkit-search-cancel-button {
  display: none;
}
.cmp-search-clear {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  transform: translateY(-50%);
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: rgba(17, 24, 32, .07);
  color: #52615c;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.cmp-search-clear:hover {
  background: rgba(17, 24, 32, .12);
}
.cmp-channel-note {
  min-height: 18px;
  color: #6d7975;
  font-size: 12px;
}
.cmp-channel-block {
  min-width: 0;
}
.cmp-channel-block + .cmp-channel-block {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(17, 24, 32, .09);
}
.cmp-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}
.cmp-subhead h3 {
  margin: 0;
  font-size: 14px;
}
.cmp-panel {
  min-height: 92px;
  padding: 18px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--glass-surface);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.12);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.12);
  box-shadow: var(--glass-shadow);
}
.cmp-table {
  min-width: 980px;
  table-layout: fixed;
}
.cmp-table th { white-space: nowrap; }
.cmp-table td { vertical-align: middle; }
.cmp-table .fund-name { line-height: 1.45; }
.cmp-link {
  color: #176f6a;
  text-decoration: none;
}
.cmp-link:hover { text-decoration: underline; }

.stock-finder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--glass-surface);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.12);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.12);
  box-shadow: var(--glass-shadow);
}
.stock-picker {
  position: relative;
  z-index: 6;
  display: grid;
  gap: 10px;
  min-width: 0;
}
.stock-search-field {
  position: relative;
  display: grid;
  gap: 6px;
  color: #5f6d68;
  font-size: 12px;
}
.stock-search-field input {
  width: 100%;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid #bfd0cb;
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  color: #1f2329;
  font-size: 14px;
  outline: none;
}
.stock-search-field input:focus {
  border-color: var(--page-accent);
  box-shadow: 0 0 0 3px var(--page-wash);
}
.stock-search-field input::-webkit-search-cancel-button {
  display: none;
}
.stock-search-results {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  z-index: 30;
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid rgba(17, 24, 32, .13);
  border-radius: 8px;
  background: rgba(250, 252, 251, .98);
  box-shadow: 0 20px 42px rgba(17, 24, 32, .18);
}
.stock-search-results.opens-up {
  top: auto;
  bottom: calc(100% + 5px);
  box-shadow: 0 -20px 42px rgba(17, 24, 32, .18);
}
.stock-search-results button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-top: 1px solid rgba(17, 24, 32, .06);
  background: transparent;
  color: #25332f;
  text-align: left;
  cursor: pointer;
}
.stock-search-results button:first-child { border-top: 0; }
.stock-search-results button:hover { background: var(--page-wash); }
.stock-search-results button:disabled {
  background: rgba(17, 24, 32, .035);
  color: #89928e;
  cursor: default;
}
.stock-search-results button span,
.stock-search-results button b,
.stock-search-results button small {
  display: block;
}
.stock-search-results button b { font-size: 13px; }
.stock-search-results button small {
  margin-top: 2px;
  color: #7b8783;
  font-size: 11.5px;
}
.stock-search-empty {
  padding: 12px;
  color: #7b8783;
  font-size: 12px;
}
.stock-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.stock-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 7px 6px 10px;
  border: 1px solid rgba(47, 168, 161, .22);
  border-radius: 7px;
  background: rgba(255, 255, 255, .75);
}
.stock-chip > span {
  min-width: 0;
}
.stock-chip b {
  display: block;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stock-chip small {
  display: block;
  color: #7b8783;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}
.stock-chip button {
  display: grid;
  width: 22px;
  height: 22px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: rgba(17, 24, 32, .06);
  color: #5f6d68;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.stock-finder > .primary-btn {
  min-width: 132px;
  margin-bottom: 1px;
}
.stock-summary {
  margin: 14px 0 6px;
  color: #354641;
  font-size: 13px;
  font-weight: 650;
}
.stock-coverage {
  display: grid;
  grid-template-columns: minmax(90px, 180px) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: #65736f;
  font-size: 11px;
}
.stock-coverage.low { color: #9a5c17; }
.stock-coverage-bar {
  height: 5px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(17, 24, 32, .08);
}
.stock-coverage-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--page-accent);
}
.stock-coverage.low .stock-coverage-bar i { background: #d59039; }
.stock-results {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}
.stock-product {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--glass-surface);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.12);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.12);
  box-shadow: var(--glass-shadow);
}
.stock-product-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.stock-product-rank {
  color: var(--page-accent);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
}
.stock-product-title {
  min-width: 0;
}
.stock-product-title b,
.stock-product-title small {
  display: block;
}
.stock-product-title b {
  color: #21332e;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.stock-product-title small {
  margin-top: 2px;
  color: #70807a;
  font-size: 11px;
}
.stock-product-flags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}
.stock-product-flags i {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--page-wash);
  color: #176f6a;
  font-size: 10px;
  font-style: normal;
}
.stock-match-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 11px 0;
  color: #65736f;
  font-size: 11px;
}
.stock-match-line > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.stock-match-line div span {
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .68);
  color: #4a5b55;
}
.stock-match-line div b {
  color: #176f6a;
  font-variant-numeric: tabular-nums;
}
.stock-class-list {
  display: grid;
  gap: 6px;
}
.stock-class-row {
  display: grid;
  grid-template-columns: minmax(210px, 2fr) minmax(82px, .7fr) repeat(3, minmax(60px, .55fr)) minmax(82px, .75fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .58);
  font-size: 12px;
}
.stock-class-name {
  min-width: 0;
}
.stock-class-name a,
.stock-class-name small {
  display: block;
}
.stock-class-name a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stock-class-name small,
.stock-class-row > span > small {
  color: #7b8783;
  font-size: 10px;
}
.stock-class-row > span > b {
  display: block;
  margin-top: 1px;
  color: #354641;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ai-workspace {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.ai-picker,
.ai-controls,
.ai-output {
  padding: 16px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--glass-surface);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.12);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.12);
  box-shadow: var(--glass-shadow);
}
.ai-picker {
  display: grid;
  gap: 12px;
  position: relative;
  z-index: 4;
}
.ai-search-field {
  position: relative;
  display: grid;
  z-index: 2;
  gap: 7px;
  color: #6d7975;
  font-size: 12px;
}
.ai-search-field input,
.ai-controls input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #c8d4d1;
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  color: #1f2329;
  font-size: 14px;
  outline: none;
}
.ai-search-field input:focus,
.ai-controls input:focus {
  border-color: var(--page-accent);
  box-shadow: 0 0 0 3px var(--page-wash);
}
.ai-search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 40;
  max-height: min(52vh, 380px);
  margin-top: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: rgba(249, 252, 251, .98);
  box-shadow: 0 20px 42px rgba(17, 24, 32, .18);
}
.ai-search-results.opens-up {
  top: auto;
  bottom: calc(100% + 4px);
  box-shadow: 0 -20px 42px rgba(17, 24, 32, .18);
}
.ai-search-summary {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 9px 12px;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(246, 251, 249, .98);
  color: #52615c;
  font-size: 12px;
}
.ai-search-results button:disabled {
  background: rgba(17, 24, 32, .045);
  color: #86909c;
  cursor: default;
}
.ai-search-results .ai-search-more {
  justify-content: center;
  background: var(--page-wash);
  color: #176f6a;
  font-size: 12px;
  font-weight: 650;
}
.ai-field-help {
  color: #7b8783;
  font-size: 11px;
}
.ai-search-results button {
  gap: 8px;
}
.ai-search-empty {
  padding: 12px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--glass-surface);
  color: #86909c;
  font-size: 12px;
}
.ai-selected-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px 30px;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--glass-surface-soft);
}
.ai-selected-name {
  min-width: 0;
}
.ai-selected-name b {
  display: block;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.ai-selected-name small {
  display: block;
  color: #86909c;
  font-size: 11px;
}
.ai-market-label {
  display: grid;
  gap: 5px;
  color: #6d7975;
  font-size: 11px;
}
.ai-market-label input {
  padding: 8px 10px;
  border: 1px solid #c8d4d1;
  border-radius: 6px;
  background: rgba(255, 255, 255, .9);
  color: #1f2329;
  font-size: 13px;
  outline: none;
}
.ai-market-label input:focus {
  border-color: var(--page-accent);
}
.ai-note {
  min-height: 18px;
  color: #6d7975;
  font-size: 12px;
}
.ai-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  color: #6d7975;
  font-size: 12px;
}
.ai-action-copy {
  display: grid;
  gap: 3px;
}
.ai-action-copy b {
  color: #33413d;
  font-size: 13px;
}
.ai-controls button {
  justify-self: start;
}
.ai-error {
  padding: 11px 13px;
  border: 1px solid rgba(203, 46, 58, .3);
  border-radius: 8px;
  background: rgba(255, 236, 232, .82);
  color: #a82431;
  font-size: 13px;
}
.ai-output {
  display: grid;
  gap: 16px;
}
.ai-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.ai-summary-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(17, 24, 32, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .64);
}
.ai-summary-card span {
  color: #6d7975;
  font-size: 11px;
}
.ai-summary-card strong {
  font-size: 17px;
  overflow-wrap: anywhere;
}
.ai-sev-low { color: #0c8a43; }
.ai-sev-medium { color: #b25d09; }
.ai-sev-high { color: #cb2e3a; }
.ai-block {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.ai-block h3 {
  margin: 0;
  font-size: 14px;
}
.ai-block-item {
  padding-left: 10px;
  border-left: 2px solid var(--page-wash);
  color: #4e5969;
  font-size: 13px;
}
.ai-announcement {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgba(17, 24, 32, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .6);
}
.ai-announcement-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 650;
}
.ai-announcement-title small {
  color: #86909c;
  font-size: 11px;
  font-weight: 400;
  white-space: nowrap;
}
.ai-announcement p {
  color: #4e5969;
  font-size: 13px;
}
.ai-announcement .ai-impact {
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--page-wash);
  color: var(--page-accent);
}
.ai-announcement a,
.ai-block a {
  color: #176f6a;
  font-size: 12px;
}
.ai-kv {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: #6d7975;
  font-size: 12px;
}

.cmp-ai-intro {
  margin: -2px 0 10px;
  color: #5f6d68;
  font-size: 13px;
}
.cmp-ai-intro strong {
  display: block;
  margin-bottom: 3px;
  color: #273632;
  font-size: 15px;
}
.ai-guide {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin: 0 0 12px;
  color: #65736f;
  font-size: 12px;
}
.ai-guide span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ai-guide b {
  color: var(--page-accent);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.ai-auth {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 0;
  text-align: left;
}
.ai-auth p {
  color: #4e5969;
  font-size: 13px;
}
.ai-auth .primary-btn {
  display: inline-block;
  flex-shrink: 0;
  text-decoration: none;
  white-space: nowrap;
}

.account-ai-quota {
  margin: -4px 0 10px;
  color: #6d7975;
  font-size: 12px;
}
.account-ai-record {
  border-top: 1px solid rgba(17, 24, 32, .065);
}
.account-ai-record:first-child {
  border-top: 0;
}
.account-ai-record > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
}
.account-ai-record > summary::-webkit-details-marker {
  display: none;
}
.account-ai-record > summary::after {
  content: "›";
  color: #9ba39f;
  font-size: 18px;
  line-height: 1;
  transition: transform .16s ease;
}
.account-ai-record[open] > summary::after {
  transform: rotate(90deg);
}
.account-ai-main {
  min-width: 0;
}
.account-ai-main b,
.account-ai-main small {
  display: block;
}
.account-ai-main b {
  font-size: 13px;
}
.account-ai-main small {
  margin-top: 2px;
  overflow: hidden;
  color: #86909c;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-ai-badge {
  grid-column: 2;
  grid-row: 1;
  color: #6d7975;
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}
.account-ai-record > summary::after {
  grid-column: 3;
  grid-row: 1;
}
.account-ai-record > summary {
  grid-template-columns: minmax(0, 1fr) auto 18px;
}
.account-ai-body {
  display: grid;
  gap: 12px;
  padding: 2px 0 16px;
}
.account-ai-holdings {
  padding: 12px;
  border: 1px solid rgba(17, 24, 32, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .52);
}
.account-ai-holdings h3 {
  margin-bottom: 8px;
  font-size: 13px;
}
.account-ai-holdings ul {
  display: grid;
  gap: 7px;
  list-style: none;
}
.account-ai-holdings li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}
.account-ai-holdings li span {
  min-width: 0;
}
.account-ai-holdings li b,
.account-ai-holdings li small {
  display: block;
}
.account-ai-holdings li small {
  color: #86909c;
  font-size: 11px;
}
.account-ai-holdings li > strong {
  flex-shrink: 0;
  color: #4e5969;
  font-variant-numeric: tabular-nums;
}
.account-ai-report {
  box-shadow: none;
}

.lof-history-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.lof-history-table {
  display: table;
  width: 100%;
  min-width: 620px;
  table-layout: fixed;
}
.lof-history-table tbody {
  display: table-row-group;
}
.lof-history-table thead {
  display: table-header-group;
}
.lof-history-table tr {
  display: table-row;
}
.lof-history-table tbody tr + tr {
  border-top: 1px solid rgba(17, 24, 32, .065);
}
.lof-history-table th:nth-child(1) { width: 31%; }
.lof-history-table th:nth-child(2) { width: 19%; }
.lof-history-table th:nth-child(3) { width: 16%; }
.lof-history-table th:nth-child(4) { width: 16%; }
.lof-history-table th:nth-child(5) { width: 18%; }
.lof-history-table th,
.lof-history-table td {
  display: table-cell;
  padding-right: 16px;
  padding-left: 16px;
  white-space: nowrap;
}
.lof-history-table td:first-child {
  color: #5f6d68;
  font-variant-numeric: tabular-nums;
}
.lof-history-time-col { width: 31%; }
.lof-history-premium-col { width: 19%; }

@media (min-width: 768px) {
  .compare-page .group { max-width: 1120px; }
}

@media (max-width: 900px) {
  .compare-page .table-wrap {
    overflow: hidden;
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
  }
  .compare-page .table-scroll { overflow-x: auto; }
  .compare-page .cmp-table {
    display: table;
    width: 100%;
    min-width: 980px;
  }
  .compare-page .cmp-table tbody { display: table-row-group; }
  .compare-page .cmp-table thead { display: table-header-group; }
  .compare-page .cmp-table tr { display: table-row; }
  .compare-page .cmp-table th,
  .compare-page .cmp-table td {
    display: table-cell;
    padding: 9px 12px;
    text-align: left;
  }
  .compare-page .cmp-table tbody tr + tr {
    border-top: 1px solid rgba(17, 24, 32, .065);
  }
}

@media (max-width: 760px) {
  .cmp-tool-tab {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
    min-height: 54px;
    padding: 9px 10px;
  }
  .cmp-tool-index {
    display: none;
  }
  .cmp-tool-copy b {
    font-size: 13px;
    white-space: normal;
  }
  .cmp-tool-copy small {
    display: none;
  }
  .stock-finder {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    padding: 13px;
  }
  .stock-finder > .primary-btn {
    width: 100%;
  }
  .stock-class-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
  }
  .stock-class-name {
    grid-column: 1 / -1;
  }
  .stock-class-name a {
    white-space: normal;
  }
  .stock-class-row > span:nth-child(2) {
    justify-self: end;
  }
  .stock-product {
    padding: 13px;
  }
  .stock-product-head {
    grid-template-columns: 28px minmax(0, 1fr);
  }
  .stock-product-flags {
    grid-column: 2;
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .stock-coverage {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .stock-chip {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .primary-tab .tab-label { font-size: 11px; }
  .cmp-tool-tabs {
    gap: 3px;
    width: calc(100% - 16px);
    margin-top: 12px;
    padding: 4px;
  }
  .cmp-tool-tab {
    min-height: 48px;
    padding: 7px 5px;
    text-align: center;
  }
  .cmp-tool-copy b { font-size: 12px; }
  .cmp-tool-tab[aria-selected="true"]::after {
    right: 8px;
    left: 8px;
  }
  .cmp-section-head { align-items: flex-start; }
  .cmp-select { min-width: 0; flex: 1; }
  .cmp-pill { flex-shrink: 0; }
  .ai-picker,
  .ai-controls,
  .ai-output {
    padding: 13px;
  }
  .ai-selected-row {
    grid-template-columns: minmax(0, 1fr) 30px;
    grid-template-areas:
      "name remove"
      "market market";
  }
  .ai-selected-name { grid-area: name; }
  .ai-market-label { grid-area: market; }
  .ai-selected-row .sim-remove-btn { grid-area: remove; align-self: center; }
  .ai-controls {
    grid-template-columns: 1fr;
  }
  .ai-controls button {
    width: 100%;
  }
  .ai-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ai-announcement-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
  .ai-announcement-title small { white-space: normal; }
  .ai-auth {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }
  .ai-auth .primary-btn {
    text-align: center;
  }
  .account-ai-record > summary {
    grid-template-columns: minmax(0, 1fr) 18px;
  }
  .account-ai-badge {
    grid-column: 1;
    grid-row: 2;
    text-align: left;
  }
  .account-ai-record > summary::after {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
  .account-ai-main small {
    white-space: normal;
  }
  .lof-history-wrap {
    overflow-x: auto;
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cmp-tool-tab { transition: none; }
  .cmp-tool-panel:not([hidden]) { animation: none; }
}
