:root {
  --portfolio-font: Inter, "SF Pro Text", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  --portfolio-ink: #15191e;
  --portfolio-muted: #606872;
  --portfolio-line: #dce1e4;
  --portfolio-mint: #42d889;
  --portfolio-coral: #ff3f66;
  --portfolio-sky: #8fb6f4;
  --portfolio-yellow: #ffe36a;
}
html:has(body[data-portfolio-page]) { scroll-padding-top: calc(var(--portfolio-header-height, 184px) + 16px); }
body[data-portfolio-page] {
  font-family: var(--portfolio-font);
  font-size: 14px;
  line-height: 1.65;
  letter-spacing: 0;
  background: #fff;
  color: var(--portfolio-ink);
  --shadow: 0 4px 14px rgba(16, 20, 24, .045);
  --panel-shadow: 0 4px 14px rgba(16, 20, 24, .045);
}
body[data-portfolio-page]::before { display: none; }
[data-portfolio-page] :is(button, input, select, textarea) { font-family: var(--portfolio-font); letter-spacing: 0; }
[data-portfolio-page] :is(h1, h2, h3, h4, strong, th) { font-family: var(--portfolio-font); letter-spacing: 0; }
[data-portfolio-page] :is(h2, h3) { font-weight: 650; }
[data-portfolio-page] :is(a, button, summary):focus-visible { outline: 2px solid #087b4d; outline-offset: 3px; }
.portfolio-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 0;
  background: rgba(255,255,255,.97);
  color: var(--portfolio-ink);
  border-bottom: 1px solid var(--portfolio-line);
  box-shadow: none;
  overflow: clip;
  backdrop-filter: blur(12px);
}
.portfolio-header::before, .portfolio-header::after { display: none; }
.portfolio-header .topbar {
  max-width: 1500px;
  padding: 16px 24px;
  margin: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px 24px;
}
.portfolio-header h1 { margin: 0; font-size: 22px; line-height: 1.3; font-weight: 650; text-shadow: none; white-space: nowrap; }
.portfolio-header .top-actions { display: contents; }
.portfolio-header .primary-entry {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  width: auto;
  max-width: none;
}
.portfolio-header .primary-entry a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-height: 40px;
  min-width: 0;
  padding: 0 16px;
  border: 1px solid var(--portfolio-line);
  border-radius: 999px;
  box-shadow: none;
  color: var(--portfolio-ink);
  background: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  transform: none;
}
.portfolio-header .primary-entry a:hover { background: #eef8f2; border-color: #99ceb0; }
.portfolio-header .primary-entry a.nav-primary { background: #15191e; border-color: #15191e; color: #fff; }
.portfolio-header .secondary-entry {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  width: 100%;
  max-width: none;
  gap: 8px;
  margin: 0;
}
.portfolio-header .secondary-entry > a {
  flex: 1 1 110px;
  min-width: 0;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid #e1e6e8;
  border-bottom: 3px solid transparent;
  border-radius: 6px;
  background: #f6f8f9;
  box-shadow: none;
  color: var(--portfolio-ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  justify-content: flex-start;
  transform: none;
}
.portfolio-header .secondary-entry > :nth-child(4n+1) { --entry-color: var(--portfolio-mint); }
.portfolio-header .secondary-entry > :nth-child(4n+2) { --entry-color: var(--portfolio-sky); }
.portfolio-header .secondary-entry > :nth-child(4n+3) { --entry-color: var(--portfolio-yellow); }
.portfolio-header .secondary-entry > :nth-child(4n) { --entry-color: var(--portfolio-coral); }
.portfolio-header .secondary-entry > a:hover,
.portfolio-header .secondary-entry > a.active,
.portfolio-header .secondary-entry > a[aria-current] {
  background: #fff;
  border-bottom-color: var(--entry-color);
  box-shadow: none;
  transform: none;
}
.portfolio-header .secondary-entry .flow-card,
.portfolio-header .secondary-entry .tab { display: flex; gap: 10px; align-items: center; }
.portfolio-header .secondary-entry .flow-card::before,
.portfolio-header .secondary-entry .tab::before { display: none; }
.portfolio-header .secondary-entry .flow-arrow { margin-left: auto; }
.portfolio-header .secondary-entry strong { font-size: 13px; font-weight: 600; line-height: 1.4; }
.portfolio-header .secondary-entry small { display: block; margin-top: 3px; font-size: 11px; line-height: 1.4; font-weight: 400; color: var(--portfolio-muted); }
.portfolio-header .market-ribbon.portfolio-tape {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 44px;
  align-items: center;
  gap: 0;
  margin: 0;
  width: 100%;
  height: 38px;
  border: 0;
  border-top: 1px solid #e0e5e7;
  background: #f3f6f7;
  overflow: hidden;
  contain: layout paint;
}
.portfolio-tape .tape-label {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: stretch;
  padding: 0 20px 0 24px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  background: #dff7e9;
  border-right: 1px solid #bfdcc9;
  text-decoration: none;
  color: #15563b;
}
.tape-viewport { overflow: hidden; height: 100%; min-width: 0; }
.tape-track { display: flex; width: max-content; height: 100%; animation: portfolioTape 65s linear infinite; will-change: transform; }
.tape-group { display: flex; align-items: center; gap: 0; flex-shrink: 0; }
.tape-item { display: inline-flex; align-items: center; height: 100%; padding: 0 22px; gap: 12px; font-size: 12px; font-weight: 500; color: #363e45; text-decoration: none; white-space: nowrap; }
.tape-item::before { content: ""; width: 4px; height: 4px; background: #3f9768; border-radius: 1px; }
.tape-item:nth-child(3n)::before { background: #df3c5c; }
.tape-item:hover { color: #087b4d; text-decoration: underline; }
.portfolio-tape .tape-toggle { display: grid; place-items: center; width: 44px; height: 38px; padding: 0; border: 0; border-left: 1px solid #dce3e6; border-radius: 0; background: #f3f6f7; box-shadow: none; cursor: pointer; transform: none; }
.tape-toggle img { width: 15px; height: 15px; }
.portfolio-tape:hover .tape-track, .portfolio-tape:focus-within .tape-track, .portfolio-tape[data-paused="true"] .tape-track { animation-play-state: paused; }
@keyframes portfolioTape { to { transform: translateX(-50%); } }
.snapshot-note { margin: 0 0 18px; color: var(--portfolio-muted); font-size: 12px; line-height: 1.7; }
[data-portfolio-page] main:not(:has(> .hero)) { max-width: 1500px; padding: 24px; margin: auto; }
[data-portfolio-page="strategy"] main > section,
[data-portfolio-page="holdings"] main > section { box-shadow: none; border: 0; border-radius: 0; padding: 24px 0; margin-block: 18px; background: #fff; }
[data-portfolio-page] .section-heading h2,
[data-portfolio-page] .site-section-title h2 { font-size: 22px; line-height: 1.4; font-weight: 650; }
[data-portfolio-page] :is(.metric, .summary-grid .card, .visual-meter, .visual-panel, .layer-visual-panel, .site-idea, .education-card) { box-shadow: 0 4px 14px rgba(16,20,24,.035); border-radius: 8px; border-color: var(--portfolio-line); }
[data-portfolio-page] :is(.metric strong, .summary-grid .card strong) { font-weight: 650; }
[data-portfolio-page] :is(.section-heading, .site-section-title) { border-bottom-color: var(--portfolio-line); }
[data-portfolio-page="options"] .site-brief-title { font-size: 28px; font-weight: 600; line-height: 1.5; }
[data-portfolio-page="options"] .site-freshness { background: #fff8d9; border-left-color: #c3a23c; color: #68591d; }
[data-portfolio-page="home"] .hero { min-height: auto; padding-top: 18px; }
[data-portfolio-page="home"] .mosaic { grid-template-rows: 296px 180px minmax(310px, auto); min-height: 0; gap: 12px; }
[data-portfolio-page="home"] .tile { box-shadow: none; transition: transform .2s ease, box-shadow .2s ease; }
[data-portfolio-page="home"] :is(a.tile, .tile-orbit):hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(16,20,24,.08); }
[data-portfolio-page="home"] .tile-photo { background: #dcecf6 url("home-strategy-editorial-v3.png") center / cover no-repeat; color: #15191e; border-radius: 0 100px 0 0; }
[data-portfolio-page="home"] .tile-photo strong { padding: 3px 0; }
[data-portfolio-page="home"] .tile-blue { background: #dce9fc; }
[data-portfolio-page="home"] .tile-main { padding: 32px; border-radius: 0 180px 180px 0; }
[data-portfolio-page="home"] .tile-main h2 { font-size: 108px; line-height: 1; font-weight: 650; margin: 16px 0; }
[data-portfolio-page="home"] .tile-main p { font-size: 25px; line-height: 1.5; max-width: 560px; }
[data-portfolio-page="home"] .hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; width: 87%; }
[data-portfolio-page="home"] .hero-stat { border: 0; border-left: 1px solid rgba(16,20,24,.25); border-radius: 0; background: none; padding: 0 0 0 14px; min-height: 90px; }
[data-portfolio-page="home"] .hero-stat strong { font-size: 28px; font-weight: 650; overflow: visible; }
[data-portfolio-page="home"] .hero-stat small { line-height: 1.7; display: block; }
[data-portfolio-page="home"] .tile-heat { border: 1px solid var(--portfolio-line); padding: 16px; }
[data-portfolio-page="home"] .tile-heat h3 { font-size: 24px; font-weight: 600; }
[data-portfolio-page="home"] .heat-tile:is(.size-1, .size-3) { padding: 4px 6px; justify-content: center; gap: 2px; }
[data-portfolio-page="home"] .heat-tile:is(.size-1, .size-3) strong { font-size: 10px; line-height: 1.1; }
[data-portfolio-page="home"] .heat-tile:is(.size-1, .size-3) span { font-size: 9px; line-height: 1.1; }
[data-portfolio-page="home"] .heatmap-grid.is-treemap { position: relative; display: block; height: 360px; min-height: 360px; }
[data-portfolio-page="home"] .is-treemap .heat-tile { position: absolute; box-sizing: border-box; padding: 8px; border: 0; border-radius: 6px; box-shadow: inset 0 0 0 2px white; overflow: hidden; justify-content: center; gap: 5px; }
[data-portfolio-page="home"] .is-treemap .heat-tile strong { font-size: 14px; font-weight: 650; line-height: 1.2; white-space: nowrap; }
[data-portfolio-page="home"] .is-treemap .heat-tile span { font-size: 11px; line-height: 1.2; }
[data-portfolio-page="home"] .is-treemap .heat-tile[data-density="compact"] { padding: 4px; gap: 3px; }
[data-portfolio-page="home"] .is-treemap .heat-tile[data-density="compact"] strong { font-size: 10px; }
[data-portfolio-page="home"] .is-treemap .heat-tile[data-density="compact"] span { font-size: 9px; }
[data-portfolio-page="home"] .is-treemap .heat-tile[data-density="label"] { padding: 2px; }
[data-portfolio-page="home"] .is-treemap .heat-tile[data-density="label"] strong { font-size: 9px; }
[data-portfolio-page="home"] .is-treemap .heat-tile[data-density="label"] span,
[data-portfolio-page="home"] .is-treemap .heat-tile[data-density="hidden"] :is(strong, span) { display: none; }
[data-portfolio-page="home"] .is-treemap .heat-tile[data-density="hidden"] { padding: 0; }
[data-portfolio-page="home"] .is-treemap .heat-tile:hover { transform: none; box-shadow: inset 0 0 0 1px #15191e; }
[data-portfolio-page="home"] .heatmap-note { font-size: 11px; line-height: 1.5; margin: 8px 0 0; color: #56606a; }
[data-portfolio-page] .header-utility { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
[data-portfolio-page] .snapshot-refresh { min-height: 36px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: 0 0 auto; border: 1px solid #b8c9c2; border-radius: 6px; background: #eef8f2; color: #173d2a; font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; }
[data-portfolio-page] .snapshot-refresh img { display: block; }
[data-portfolio-page] .snapshot-refresh:hover { background: #eff4f2; }
[data-portfolio-page="home"] .entry-section { padding-top: 10px; }
[data-portfolio-page="home"] .entry-card { min-height: 164px; padding: 22px; border-radius: 8px; box-shadow: none; }
[data-portfolio-page="home"] .entry-card strong { font-size: 24px; line-height: 1.4; font-weight: 600; }
[data-portfolio-page="home"] .entry-card > span { display: none; }
[data-portfolio-page="home"] .entry-card p { font-size: 13px; line-height: 1.7; }
[data-portfolio-page="home"] .entry-card em { background: transparent; color: #15191e; padding: 0; min-height: 24px; font-size: 12px; }
[data-portfolio-page="home"] .panel { box-shadow: none; border: 0; border-top: 1px solid var(--portfolio-line); border-radius: 0; scroll-margin-top: 0; }
[data-portfolio-page="home"] :is(#current-signals, #layer-map) { scroll-margin-top: 0; }
[data-portfolio-page="home"] .panel-head { padding: 20px 0 0; }
[data-portfolio-page="home"] .panel-head h3 { font-size: 24px; font-weight: 600; line-height: 1.4; }
[data-portfolio-page="home"] .panel-head p { font-size: 13px; }
[data-portfolio-page="home"] .layer-map, [data-portfolio-page="home"] .signal-list { padding: 20px 0; }
[data-portfolio-page="home"] .layer-map-card.core .layer-track i { background: #42d889; }
[data-portfolio-page="home"] .layer-map-card.attack .layer-track i { background: #8fb6f4; }
[data-portfolio-page="home"] .layer-map-card.event .layer-track i { background: #ffe36a; }
[data-portfolio-page="home"] .layer-map-card.optionality .layer-track i { background: #ff3f66; }
[data-portfolio-page="home"] .layer-map-card.cash .layer-track i { background: #060709; }
[data-portfolio-page="home"] .layer-map-card.options .layer-track i { background: #ff7a30; }
@media (max-width: 1180px) and (min-width: 981px) {
  [data-portfolio-page="home"] .tile-main h2 { font-size: 82px; }
  [data-portfolio-page="home"] .tile-round { padding: 26px; }
  [data-portfolio-page="home"] .signal-preview dd { font-size: 28px; }
}
@media (max-width: 980px) {
  .portfolio-header .topbar { grid-template-columns: minmax(0,1fr); gap: 12px; padding: 14px 18px; }
  .portfolio-header .primary-entry { grid-column: 1; grid-row: auto; justify-content: flex-start; }
  .portfolio-header .secondary-entry { gap: 6px; }
  .portfolio-header .secondary-entry > a { flex-basis: 120px; }
  .portfolio-header .secondary-entry:has(> a:nth-child(7)) > a { flex: 0 1 auto; min-height: 36px; padding: 6px 12px; }
  [data-portfolio-page="home"] .mosaic { grid-template-rows: none; }
  [data-portfolio-page="home"] .tile { border-radius: 8px; }
  [data-portfolio-page="home"] .tile-orbit { height: 290px; }
  [data-portfolio-page="home"] .tile-main { min-height: 330px; border-radius: 8px; }
  [data-portfolio-page="home"] .tile-main h2 { font-size: 84px; }
  [data-portfolio-page="home"] .hero-stats { width: 100%; }
}
@media (max-width: 560px) {
  .portfolio-header .topbar { padding: 12px 14px; }
  .portfolio-header h1 { font-size: 20px; }
  .portfolio-header .primary-entry {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }
  .portfolio-header .primary-entry a {
    width: 100%;
    min-height: 34px;
    height: 34px;
    padding: 0 4px;
    font-size: 12px;
    white-space: nowrap;
  }
  .portfolio-header .secondary-entry > a { flex-basis: 130px; }
  .portfolio-header .secondary-entry .flow-card { flex-basis: 85px; padding: 8px; }
  .portfolio-header .secondary-entry .flow-arrow { display: none; }
  .portfolio-header .secondary-entry small { font-size: 10px; }
  .portfolio-tape .tape-label { padding: 0 10px 0 14px; font-size: 10px; }
  .tape-item { font-size: 11px; padding: 0 14px; }
  [data-portfolio-page] main:not(:has(> .hero)) { padding: 18px 14px; }
  [data-portfolio-page="home"] .tile-main { padding: 24px; min-height: 330px; }
  [data-portfolio-page="home"] .tile-main h2 { font-size: 64px; }
  [data-portfolio-page="home"] .tile-main p { font-size: 20px; }
  [data-portfolio-page="home"] .hero-stats { gap: 10px; }
  [data-portfolio-page="home"] .hero-stat { padding-left: 8px; }
  [data-portfolio-page="home"] .hero-stat strong { font-size: 22px; }
  [data-portfolio-page="home"] .tile-heat .tile-head { flex-wrap: wrap; gap: 10px; }
  [data-portfolio-page="home"] .layer-map-card { min-width: 0; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; background: #fafbfc; }
  [data-portfolio-page="home"] .layer-map-card p { grid-column: 1 / -1; }
  [data-portfolio-page="options"] .site-brief-title { font-size: 23px; }
}
@media (max-width: 350px) {
  .portfolio-header .primary-entry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  [data-portfolio-page] *, [data-portfolio-page] *::before, [data-portfolio-page] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .tape-viewport { overflow-x: auto; }
  .tape-group[aria-hidden="true"] { display: none; }
}
