:root {
  --ink: #18332d;
  --ink-soft: #48615a;
  --green: #17594a;
  --green-dark: #0f463a;
  --green-light: #e6f0eb;
  --mint: #f0f5f1;
  --paper: #fbfaf6;
  --card: #ffffff;
  --line: #e6e8e2;
  --orange: #d97b46;
  --orange-soft: #faeee6;
  --red: #c86358;
  --red-soft: #f9eae8;
  --yellow: #d2ad42;
  --yellow-soft: #faf4dc;
  --blue: #4f7f91;
  --blue-soft: #e7f0f3;
  --shadow: 0 18px 45px rgba(35, 64, 56, 0.08);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", "Noto Sans SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 248px;
  display: flex;
  flex-direction: column;
  padding: 28px 20px 22px;
  color: #eef6f2;
  background:
    radial-gradient(circle at 15% 90%, rgba(213, 186, 91, 0.12), transparent 24%),
    linear-gradient(170deg, #123f35 0%, #0c3029 100%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 32px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #173f35;
  background: #f1d983;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.brand-mark svg {
  width: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 20px;
  letter-spacing: 0.08em;
}

.brand small {
  margin-top: 2px;
  color: rgba(238, 246, 242, 0.62);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.main-nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  color: rgba(238, 246, 242, 0.7);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: 180ms ease;
}

.nav-item:hover,
.nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: -20px;
  width: 4px;
  height: 24px;
  border-radius: 0 4px 4px 0;
  background: #f1d983;
}

.nav-icon {
  width: 21px;
  color: #d9c675;
  font-size: 21px;
  text-align: center;
}

.nav-badge {
  margin-left: auto;
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 99px;
  color: #18332d;
  background: #f1d983;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.sidebar-card {
  margin-top: 32px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
}

.sidebar-card-icon {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 9px;
  color: #173f35;
  background: #f1d983;
  font-size: 12px;
  font-weight: 700;
}

.sidebar-card strong {
  font-size: 14px;
}

.sidebar-card p {
  margin: 7px 0 0;
  color: rgba(238, 246, 242, 0.6);
  font-size: 12px;
  line-height: 1.7;
}

.sidebar-footer {
  margin-top: auto;
}

.sidebar-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.text-button {
  padding: 8px 10px;
  border: 0;
  color: rgba(238, 246, 242, 0.62);
  background: transparent;
  font-size: 12px;
  cursor: pointer;
}

.text-button:hover {
  color: #fff;
}

.user-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 15px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #173f35;
  background: #d9c675;
  font-weight: 700;
}

.user-mini > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.user-mini strong,
.user-mini small {
  display: block;
}

.user-mini strong {
  font-size: 12px;
}

.user-mini small {
  margin-top: 3px;
  color: rgba(238, 246, 242, 0.5);
  font-size: 10px;
}

.user-mini button {
  border: 0;
  color: rgba(238, 246, 242, 0.5);
  background: transparent;
  cursor: pointer;
}

.main-content {
  min-height: 100vh;
  margin-left: 248px;
  padding: 0 44px 36px;
}

.topbar {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  color: #80908b;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(21px, 2.1vw, 30px);
  letter-spacing: -0.03em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid #d9e1dc;
  border-radius: 99px;
  color: #6e817a;
  background: rgba(255, 255, 255, 0.65);
  font-size: 11px;
}

.demo-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d2ad42;
  box-shadow: 0 0 0 3px #f7edc8;
}

.icon-button {
  position: relative;
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink-soft);
  background: #fff;
  font-size: 19px;
  cursor: pointer;
}

.notification-button i {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: var(--orange);
}

.page {
  display: none;
  animation: enter 260ms ease;
}

.page.active {
  display: block;
}

@keyframes enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.daily-brief {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  align-items: center;
  gap: 40px;
  margin-top: 30px;
  padding: 36px 42px;
  border-radius: var(--radius-lg);
  color: #eef6f2;
  background:
    radial-gradient(circle at 88% 14%, rgba(242, 217, 131, 0.14), transparent 20%),
    radial-gradient(circle at 10% 105%, rgba(255, 255, 255, 0.08), transparent 32%),
    linear-gradient(125deg, #174f42, #0f3c33);
  box-shadow: var(--shadow);
}

.daily-brief::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -170px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow: 0 0 0 42px rgba(255, 255, 255, 0.025), 0 0 0 84px rgba(255, 255, 255, 0.018);
}

.brief-copy,
.market-mood {
  position: relative;
  z-index: 1;
}

.brief-label {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 18px;
}

.brief-label span {
  padding: 5px 10px;
  border-radius: 99px;
  color: #153f35;
  background: #f1d983;
  font-size: 11px;
  font-weight: 700;
}

.brief-label small {
  color: rgba(238, 246, 242, 0.5);
  font-size: 10px;
}

.daily-brief h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.daily-brief h2 em {
  color: #f1d983;
  font-style: normal;
}

.daily-brief p {
  max-width: 740px;
  margin: 14px 0 0;
  color: rgba(238, 246, 242, 0.68);
  font-size: 13px;
  line-height: 1.8;
}

.brief-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.primary-button,
.secondary-button,
.full-button {
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  transition: 180ms ease;
}

.primary-button {
  padding: 12px 17px;
  color: #173f35;
  background: #f1d983;
  font-weight: 700;
  box-shadow: 0 7px 18px rgba(10, 30, 25, 0.16);
}

.primary-button:hover {
  transform: translateY(-1px);
  background: #f7df89;
}

.primary-button span {
  margin-left: 8px;
}

.secondary-button {
  padding: 12px 17px;
  color: rgba(238, 246, 242, 0.78);
  background: rgba(255, 255, 255, 0.09);
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.market-mood {
  text-align: center;
}

.mood-ring {
  width: 126px;
  height: 126px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 50%;
  background: conic-gradient(#f1d983 calc(var(--score) * 1%), rgba(255, 255, 255, 0.12) 0);
}

.mood-ring::before {
  content: "";
  position: absolute;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: #14483d;
}

.mood-ring div {
  position: relative;
  z-index: 1;
}

.mood-ring strong,
.mood-ring span {
  display: block;
}

.mood-ring strong {
  color: #f1d983;
  font-size: 32px;
}

.mood-ring span {
  color: rgba(238, 246, 242, 0.68);
  font-size: 11px;
}

.market-mood > p {
  margin: 10px 0 2px;
  color: #fff;
  font-weight: 600;
}

.market-mood > small {
  color: #9dccb9;
  font-size: 10px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 34px 0 16px;
}

.section-heading.compact {
  margin-top: 0;
}

.section-kicker {
  display: block;
  margin-bottom: 5px;
  color: #9a8d51;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.section-heading h2,
.page-intro h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.link-button {
  padding: 6px;
  border: 0;
  color: var(--green);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.link-button span {
  margin-left: 5px;
}

.quiet-text {
  color: #9aa6a2;
  font-size: 11px;
}

.sector-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.sector-card {
  position: relative;
  overflow: hidden;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.78);
  transition: 180ms ease;
}

.sector-card:hover {
  transform: translateY(-2px);
  border-color: #cdd8d2;
  box-shadow: 0 12px 28px rgba(35, 64, 56, 0.07);
}

.sector-card-top,
.sector-change,
.sector-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sector-icon {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 700;
}

.tone-green { color: var(--green); background: var(--green-light); }
.tone-orange { color: var(--orange); background: var(--orange-soft); }
.tone-blue { color: var(--blue); background: var(--blue-soft); }
.tone-red { color: var(--red); background: var(--red-soft); }

.temperature {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #71817c;
  font-size: 10px;
}

.temperature i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.temperature.low i { background: var(--blue); }
.temperature.fair i { background: var(--green); }
.temperature.high i { background: var(--orange); }

.sector-card h3 {
  margin: 17px 0 5px;
  font-size: 15px;
}

.sector-change {
  align-items: end;
}

.sector-change strong {
  font-size: 20px;
}

.sector-change small {
  color: #9aa6a2;
  font-size: 9px;
}

.positive { color: #c75f4f !important; }
.negative { color: #2b8a71 !important; }

.sparkline {
  width: 100%;
  height: 42px;
  margin: 12px 0 8px;
}

.sparkline path.line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sparkline path.area {
  fill: currentColor;
  opacity: 0.07;
}

.sector-meta {
  padding-top: 10px;
  border-top: 1px solid #edf0ec;
  color: #8d9a96;
  font-size: 9px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.8fr);
  gap: 28px;
  margin-top: 36px;
}

.advice-list {
  display: grid;
  gap: 11px;
}

.advice-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 15px;
  align-items: center;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
}

.fund-symbol {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--green);
  background: var(--green-light);
  font-weight: 700;
}

.advice-main {
  min-width: 0;
}

.advice-name-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 5px;
}

.advice-name-row h3 {
  overflow: hidden;
  margin: 0;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.advice-name-row small {
  flex: none;
  color: #a0aaa7;
  font-size: 9px;
}

.advice-main > p {
  overflow: hidden;
  margin: 0;
  color: #778681;
  font-size: 11px;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.advice-side {
  min-width: 104px;
  text-align: right;
}

.action-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
}

.action-tag.hold { color: var(--green); background: var(--green-light); }
.action-tag.invest { color: var(--blue); background: var(--blue-soft); }
.action-tag.watch { color: #9b7226; background: var(--yellow-soft); }
.action-tag.profit { color: var(--orange); background: var(--orange-soft); }

.advice-side button {
  display: block;
  margin: 7px 0 0 auto;
  padding: 0;
  border: 0;
  color: #9a8d51;
  background: transparent;
  font-size: 9px;
  cursor: pointer;
}

.health-card,
.structure-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.health-score {
  display: flex;
  align-items: center;
  gap: 16px;
}

.score-orbit {
  flex: 0 0 70px;
  height: 70px;
  display: grid;
  place-content: center;
  border: 6px solid var(--green-light);
  border-top-color: var(--green);
  border-radius: 50%;
  text-align: center;
}

.score-orbit strong,
.score-orbit span {
  display: block;
}

.score-orbit strong {
  font-size: 19px;
}

.score-orbit span {
  color: #7a8c86;
  font-size: 8px;
}

.health-score h3 {
  margin: 0 0 5px;
  font-size: 14px;
}

.health-score p {
  margin: 0;
  color: #7c8b86;
  font-size: 10px;
  line-height: 1.55;
}

.health-bars {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}

.health-bars > div > span {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: #71817c;
  font-size: 9px;
}

.health-bars span i {
  color: var(--green);
  font-style: normal;
}

.health-bars b {
  height: 5px;
  display: block;
  overflow: hidden;
  border-radius: 99px;
  background: #edf1ee;
}

.health-bars b i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--green);
}

.health-tip {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: 11px;
  background: var(--yellow-soft);
}

.health-tip > span {
  flex: 0 0 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--yellow);
  font-size: 11px;
  font-weight: 700;
}

.health-tip p {
  margin: 0;
  color: #7d7047;
  font-size: 9px;
  line-height: 1.55;
}

.health-tip strong {
  display: block;
  margin-bottom: 2px;
  color: #66582e;
}

.full-button {
  width: 100%;
  margin-top: 16px;
  padding: 10px;
  color: var(--green);
  background: var(--green-light);
  font-size: 10px;
  font-weight: 700;
}

.full-button:hover {
  background: #dcebe4;
}

.disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 32px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  color: #9ba6a2;
  font-size: 9px;
}

.disclaimer > span {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border: 1px solid #b9c1be;
  border-radius: 50%;
  font-family: serif;
}

.disclaimer p {
  margin: 1px 0 0;
}

.page-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 35px 0 25px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.page-intro h2 {
  font-size: 27px;
}

.page-intro p {
  max-width: 660px;
  margin: 9px 0 0;
  color: #74837e;
  font-size: 12px;
  line-height: 1.7;
}

.legend {
  display: flex;
  gap: 14px;
  color: #788681;
  font-size: 10px;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.dot.low { background: var(--blue); }
.dot.fair { background: var(--green); }
.dot.high { background: var(--orange); }

.filter-bar,
.fund-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 17px;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-chip {
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: #6f7f7a;
  background: #fff;
  font-size: 10px;
  cursor: pointer;
}

.filter-chip:hover,
.filter-chip.active {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.filter-bar select {
  padding: 8px 30px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #61726c;
  background: #fff;
  font-size: 10px;
}

.sector-table-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.sector-table-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.4fr) repeat(5, minmax(90px, 0.7fr)) minmax(170px, 1.2fr);
  align-items: center;
  min-width: 920px;
  padding: 15px 20px;
  border-top: 1px solid #eef0ed;
}

.sector-table-row.header {
  padding-top: 12px;
  padding-bottom: 12px;
  border: 0;
  color: #8f9b97;
  background: #f7f8f5;
  font-size: 9px;
}

.sector-name {
  display: flex;
  align-items: center;
  gap: 11px;
}

.sector-name .sector-icon {
  width: 35px;
  height: 35px;
}

.sector-name strong,
.sector-name small {
  display: block;
}

.sector-name strong {
  font-size: 12px;
}

.sector-name small {
  margin-top: 3px;
  color: #9aa5a1;
  font-size: 8px;
}

.table-value {
  font-size: 11px;
}

.table-value small {
  display: block;
  margin-top: 3px;
  color: #9aa5a1;
  font-size: 8px;
}

.heat-meter {
  width: 58px;
  height: 5px;
  overflow: hidden;
  margin-top: 5px;
  border-radius: 99px;
  background: #ecf0ed;
}

.heat-meter i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--orange);
}

.period-pill {
  padding: 5px 8px;
  border-radius: 7px;
  color: var(--green);
  background: var(--green-light);
  font-size: 9px;
}

.fund-toolbar {
  align-items: flex-start;
}

.search-field {
  width: min(390px, 100%);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.search-field span {
  color: #96a29e;
  font-size: 18px;
}

.search-field input {
  width: 100%;
  border: 0;
  outline: none;
  color: var(--ink);
  background: transparent;
  font-size: 11px;
}

.fund-list {
  display: grid;
  gap: 11px;
}

.live-fund-result {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
}

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

.analysis-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin: 17px 0;
}

.analysis-metrics > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfa;
}

.analysis-metrics span,
.analysis-metrics strong,
.analysis-metrics small {
  display: block;
}

.analysis-metrics span {
  color: #8d9a96;
  font-size: 8px;
}

.analysis-metrics strong {
  margin-top: 5px;
  font-size: 13px;
}

.analysis-metrics small {
  margin-top: 3px;
  color: #9da7a3;
  font-size: 7px;
}

.estimate-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 15px;
  margin-top: 13px;
  padding: 12px 14px;
  border-radius: 10px;
  color: #71632e;
  background: var(--yellow-soft);
  font-size: 10px;
}

.estimate-line small {
  grid-column: 1 / -1;
  color: #968755;
  font-size: 8px;
}

.live-fund-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 17px;
}

.source-note {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: #96a19d !important;
  font-size: 9px !important;
}

.real-sector-stats {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 15px 0 10px;
  color: #84918d;
  font-size: 9px;
}

.real-sector-stats b {
  color: var(--ink);
}

.span-all {
  grid-column: 1 / -1;
}

.fund-row {
  display: grid;
  grid-template-columns: minmax(230px, 1.4fr) repeat(4, minmax(90px, 0.55fr)) minmax(150px, 0.8fr);
  align-items: center;
  gap: 18px;
  padding: 17px 19px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.fund-row:hover {
  border-color: #cdd8d2;
  box-shadow: 0 9px 25px rgba(35, 64, 56, 0.06);
}

.fund-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.fund-identity h3 {
  overflow: hidden;
  margin: 0 0 4px;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fund-identity p {
  margin: 0;
  color: #96a19d;
  font-size: 8px;
}

.fund-metric span,
.fund-metric strong {
  display: block;
}

.fund-metric span {
  margin-bottom: 4px;
  color: #9aa5a1;
  font-size: 8px;
}

.fund-metric strong {
  font-size: 12px;
}

.fund-action {
  text-align: right;
}

.fund-action button {
  display: block;
  margin: 6px 0 0 auto;
  padding: 0;
  border: 0;
  color: #928446;
  background: transparent;
  font-size: 8px;
  cursor: pointer;
}

.planner-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(430px, 1.1fr);
  gap: 25px;
  align-items: start;
}

.planner-form,
.plan-result {
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
}

.form-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.form-heading > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--green);
  font-size: 11px;
  font-weight: 700;
}

.form-heading h3,
.form-heading p {
  margin: 0;
}

.form-heading h3 {
  font-size: 16px;
}

.form-heading p {
  margin-top: 3px;
  color: #96a19d;
  font-size: 9px;
}

.field-label {
  display: flex;
  justify-content: space-between;
  margin: 20px 0 9px;
  color: #566b64;
  font-size: 10px;
  font-weight: 600;
}

.field-label strong {
  color: var(--green);
}

.amount-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 15px;
  border: 1px solid #dce3df;
  border-radius: 12px;
  background: #fbfcfa;
}

.amount-input > span {
  color: #8a9994;
  font-size: 16px;
}

.amount-input input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: none;
  color: var(--ink);
  background: transparent;
  font-size: 20px;
  font-weight: 700;
}

.amount-input small {
  color: #97a29e;
  font-size: 9px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 4px;
  border-radius: 11px;
  background: #eff3f0;
}

.segmented button {
  padding: 9px 5px;
  border: 0;
  border-radius: 8px;
  color: #75857f;
  background: transparent;
  font-size: 10px;
  cursor: pointer;
}

.segmented button.active {
  color: var(--green);
  background: #fff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(35, 64, 56, 0.08);
}

.range {
  width: 100%;
  accent-color: var(--green);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  color: #a0aaa6;
  font-size: 8px;
}

.goal-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.goal-options button {
  padding: 13px 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.goal-options button.active {
  border-color: var(--green);
  background: var(--green-light);
}

.goal-options span,
.goal-options strong,
.goal-options small {
  display: block;
}

.goal-options span {
  margin-bottom: 8px;
  color: var(--green);
}

.goal-options strong {
  font-size: 10px;
}

.goal-options small {
  margin-top: 3px;
  color: #98a39f;
  font-size: 7px;
}

.plan-result {
  background:
    radial-gradient(circle at 95% 5%, rgba(217, 198, 117, 0.13), transparent 21%),
    #fff;
  box-shadow: var(--shadow);
}

.plan-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.plan-result-head span {
  color: #92a09b;
  font-size: 9px;
}

.plan-result-head h3 {
  margin: 5px 0 0;
  font-size: 20px;
}

.risk-pill {
  padding: 6px 9px;
  border-radius: 99px;
  color: var(--orange) !important;
  background: var(--orange-soft);
  font-weight: 700;
}

.allocation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 45px;
  margin: 28px 0;
}

.donut {
  position: relative;
  width: 148px;
  height: 148px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.donut::after {
  content: "配置比例";
  position: absolute;
  inset: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #778782;
  background: #fff;
  font-size: 10px;
}

.allocation-legend {
  min-width: 190px;
  display: grid;
  gap: 12px;
}

.allocation-legend div {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 10px;
}

.allocation-legend i {
  width: 8px;
  height: 8px;
  border-radius: 3px;
}

.allocation-legend small {
  display: block;
  margin-top: 2px;
  color: #9ba5a1;
  font-size: 7px;
}

.plan-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.plan-summary div {
  padding: 13px 15px;
  border-left: 1px solid var(--line);
}

.plan-summary div:first-child {
  border-left: 0;
}

.plan-summary span,
.plan-summary strong {
  display: block;
}

.plan-summary span {
  margin-bottom: 5px;
  color: #9aa5a1;
  font-size: 8px;
}

.plan-summary strong {
  font-size: 11px;
}

.why-box {
  margin: 16px 0;
  padding: 14px 15px;
  border-radius: 12px;
  background: var(--green-light);
}

.why-box h4 {
  margin: 0 0 7px;
  color: var(--green);
  font-size: 10px;
}

.why-box h4 span {
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  margin-right: 6px;
  border-radius: 6px;
  color: #fff;
  background: var(--green);
  font-size: 7px;
}

.why-box p {
  margin: 0;
  color: #587069;
  font-size: 9px;
  line-height: 1.7;
}

.discipline-list {
  display: grid;
  gap: 9px;
}

.discipline-list > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.scenario {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  font-weight: 700;
}

.scenario.down { color: var(--green); background: var(--green-light); }
.scenario.up { color: var(--orange); background: var(--orange-soft); }
.scenario.adjust { color: var(--blue); background: var(--blue-soft); }

.discipline-list p,
.discipline-list strong,
.discipline-list small {
  margin: 0;
}

.discipline-list strong,
.discipline-list small {
  display: block;
}

.discipline-list strong {
  font-size: 9px;
}

.discipline-list small {
  margin-top: 2px;
  color: #8b9894;
  font-size: 8px;
  line-height: 1.45;
}

.full-width {
  width: 100%;
  margin-top: 19px;
}

.portfolio-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 30px;
}

.portfolio-stats article {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.portfolio-stats span,
.portfolio-stats strong,
.portfolio-stats small {
  display: block;
}

.portfolio-stats span {
  color: #8d9a96;
  font-size: 9px;
}

.portfolio-stats strong {
  margin: 8px 0 5px;
  font-size: 18px;
}

.portfolio-stats small {
  color: #a0aaa6;
  font-size: 8px;
}

.holding-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(270px, 0.75fr);
  gap: 25px;
}

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

.holding-card {
  display: grid;
  grid-template-columns: minmax(210px, 1.5fr) repeat(3, minmax(80px, 0.6fr)) minmax(125px, 0.8fr);
  align-items: center;
  gap: 15px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.holding-card .fund-identity h3 {
  white-space: normal;
}

.holding-action {
  text-align: right;
}

.holding-action button {
  display: block;
  margin: 5px 0 0 auto;
  padding: 0;
  border: 0;
  color: #928446;
  background: transparent;
  font-size: 8px;
  cursor: pointer;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 7px;
}

.row-actions button {
  margin: 0;
  color: #74837e;
}

.row-actions .danger-link {
  color: var(--red);
}

.empty-state {
  display: grid;
  justify-items: center;
  padding: 46px 20px;
  border: 1px dashed #cfd8d3;
  border-radius: var(--radius-md);
  color: #7e8e88;
  background: rgba(255, 255, 255, 0.62);
  text-align: center;
}

.empty-state > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--green);
  background: var(--green-light);
  font-size: 24px;
}

.empty-state h3 {
  margin: 14px 0 5px;
  color: var(--ink);
  font-size: 15px;
}

.empty-state p {
  max-width: 390px;
  margin: 0 0 18px;
  font-size: 10px;
  line-height: 1.7;
}

.structure-bar {
  height: 13px;
  display: flex;
  overflow: hidden;
  border-radius: 99px;
}

.structure-bar i {
  height: 100%;
}

.structure-legend {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}

.structure-legend span {
  display: grid;
  grid-template-columns: 9px 1fr auto;
  align-items: center;
  gap: 8px;
  color: #687a74;
  font-size: 9px;
}

.structure-legend i {
  width: 8px;
  height: 8px;
  border-radius: 3px;
}

.structure-legend strong {
  color: var(--ink);
}

.health-tip.warning {
  background: var(--orange-soft);
}

.health-tip.warning > span {
  background: var(--orange);
}

.health-tip.warning p {
  color: #8a5f46;
}

.health-tip.warning strong {
  color: #754b33;
}

.mobile-nav {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 30, 25, 0.46);
  backdrop-filter: blur(5px);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  position: relative;
  width: min(510px, 100%);
  max-height: 84vh;
  overflow: auto;
  padding: 32px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.22);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  color: #74837e;
  background: #f1f3f0;
  cursor: pointer;
}

.modal-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: var(--green);
  font-size: 11px;
  font-weight: 700;
}

.modal h2 {
  margin: 15px 0 13px;
  font-size: 21px;
}

.modal p,
.modal li {
  color: #62756e;
  font-size: 11px;
  line-height: 1.8;
}

.modal ul {
  padding-left: 20px;
}

.modal-callout {
  margin-top: 16px;
  padding: 13px 14px;
  border-radius: 11px;
  color: #5e7047;
  background: var(--yellow-soft);
  font-size: 10px;
  line-height: 1.65;
}

.modal-form {
  display: grid;
  gap: 13px;
}

.modal-form label {
  display: grid;
  gap: 6px;
  color: #596e67;
  font-size: 10px;
  font-weight: 600;
}

.modal-form input,
.modal-form select,
.modal-form textarea {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #dce3df;
  border-radius: 9px;
  outline: none;
  color: var(--ink);
  background: #fbfcfa;
  font-size: 11px;
  resize: vertical;
}

.modal-form input:focus,
.modal-form select:focus,
.modal-form textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 89, 74, 0.08);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.form-help {
  margin: 0 !important;
  color: #8c9995 !important;
  font-size: 9px !important;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 19px;
}

.modal-actions.left {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.secondary-light-button,
.danger-button {
  padding: 10px 14px;
  border: 0;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.secondary-light-button {
  color: var(--green);
  background: var(--green-light);
}

.danger-button {
  color: #fff;
  background: var(--red);
}

.data-center {
  display: grid;
  gap: 21px;
}

.data-center section {
  padding-bottom: 19px;
  border-bottom: 1px solid var(--line);
}

.data-center h3 {
  margin: 0 0 5px;
  font-size: 13px;
}

.data-center section > p {
  margin: 0 0 13px;
  font-size: 10px;
}

.sync-status {
  color: #879590;
  font-size: 9px;
}

.glossary-grid {
  display: grid;
  gap: 10px;
}

.glossary-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.glossary-grid strong {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
}

.glossary-grid p {
  margin: 0;
  font-size: 10px;
}

.toast {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 120;
  max-width: 340px;
  padding: 13px 17px;
  border-radius: 11px;
  color: #fff;
  background: var(--green-dark);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  font-size: 11px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 200ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .sidebar { width: 218px; }
  .main-content { margin-left: 218px; padding: 0 28px 35px; }
  .sector-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: minmax(0, 1.45fr) minmax(250px, 0.75fr); }
  .fund-row { grid-template-columns: minmax(220px, 1.2fr) repeat(2, minmax(85px, 0.5fr)) minmax(130px, 0.7fr); }
  .fund-row .hide-tablet { display: none; }
  .holding-card { grid-template-columns: minmax(190px, 1.3fr) repeat(2, minmax(75px, 0.5fr)) minmax(120px, 0.7fr); }
  .holding-card .hide-tablet { display: none; }
}

@media (max-width: 900px) {
  body { padding-bottom: 72px; }
  .sidebar { display: none; }
  .main-content { margin-left: 0; padding: 0 20px 30px; }
  .topbar { min-height: 88px; }
  .mobile-nav {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 7px 10px max(7px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
  }
  .mobile-nav button {
    display: grid;
    place-items: center;
    gap: 3px;
    border: 0;
    color: #879590;
    background: transparent;
    font-size: 9px;
    cursor: pointer;
  }
  .mobile-nav button span {
    font-size: 19px;
  }
  .mobile-nav button.active {
    color: var(--green);
    font-weight: 700;
  }
  .planner-layout,
  .holding-layout {
    grid-template-columns: 1fr;
  }
  .plan-result { order: -1; }
}

@media (max-width: 680px) {
  .main-content { padding: 0 14px 24px; }
  .topbar h1 { font-size: 19px; }
  .topbar-actions .demo-badge { display: none; }
  .topbar-actions { gap: 6px; }
  .icon-button { width: 35px; height: 35px; }
  .daily-brief {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 26px 22px;
  }
  .daily-brief h2 { font-size: 23px; }
  .daily-brief p { font-size: 11px; }
  .market-mood {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
  }
  .mood-ring { width: 78px; height: 78px; margin: 0; }
  .mood-ring::before { width: 64px; height: 64px; }
  .mood-ring strong { font-size: 21px; }
  .market-mood > p { margin: 0; }
  .market-mood > small { margin-left: auto; }
  .brief-actions { align-items: stretch; flex-direction: column; }
  .section-heading { margin-top: 27px; }
  .sector-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .sector-card { padding: 14px; }
  .sector-card h3 { margin-top: 13px; }
  .content-grid { grid-template-columns: 1fr; margin-top: 28px; }
  .advice-card {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 11px;
    padding: 14px;
  }
  .fund-symbol { width: 40px; height: 40px; }
  .advice-side {
    grid-column: 2;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }
  .advice-side button { display: inline; margin: 0; }
  .page-intro {
    align-items: flex-start;
    flex-direction: column;
    padding: 27px 0 20px;
  }
  .page-intro h2 { font-size: 23px; }
  .legend { width: 100%; overflow-x: auto; }
  .filter-bar,
  .fund-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .chip-group {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 3px;
  }
  .filter-chip { flex: 0 0 auto; }
  .sector-table-wrap { overflow-x: auto; }
  .fund-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }
  .fund-row .fund-metric { display: none; }
  .fund-action { min-width: 100px; }
  .planner-form,
  .plan-result { padding: 20px; border-radius: 18px; }
  .allocation { gap: 23px; }
  .donut { width: 118px; height: 118px; }
  .donut::after { inset: 21px; }
  .allocation-legend { min-width: 145px; }
  .goal-options { grid-template-columns: 1fr; }
  .goal-options button {
    display: grid;
    grid-template-columns: 25px 1fr;
    align-items: center;
  }
  .goal-options span { grid-row: 1 / 3; margin: 0; }
  .plan-summary strong { font-size: 10px; }
  .portfolio-stats { grid-template-columns: 1fr 1fr; }
  .holdings-intro .primary-button { width: 100%; }
  .page-actions { width: 100%; }
  .page-actions button { flex: 1; }
  .analysis-metrics { grid-template-columns: 1fr 1fr; }
  .holding-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .holding-card .fund-metric { display: none; }
  .holding-action { min-width: 100px; }
  .modal { padding: 27px 22px; }
  .form-row { grid-template-columns: 1fr; }
  .modal-actions { align-items: stretch; flex-direction: column; }
  .modal-actions.left { align-items: stretch; }
  .modal-actions button { width: 100%; }
  .toast { right: 14px; bottom: 82px; left: 14px; max-width: none; }
}

@media (max-width: 420px) {
  .sector-grid { grid-template-columns: 1fr; }
  .allocation { align-items: flex-start; }
  .donut { width: 102px; height: 102px; }
  .donut::after { inset: 18px; font-size: 8px; }
  .allocation-legend { min-width: 0; flex: 1; }
  .portfolio-stats { grid-template-columns: 1fr; }
}

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