/* the directory's column: the same width and gutters as the product and pricing pages (.pp-wrap) */
.demo-width { width: 100%; max-width: var(--container); margin-inline: auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)) }
.demo-logo { width: 22px; height: 22px; background: currentColor; mask: url("/logo.svg") center/contain no-repeat }
.demo-directory { padding-block: clamp(25px, 3.5vw, 40px) 44px; font-size: 14px }
.demo-directory h1 { font-size: clamp(32px, 4.65vw, 48px); line-height: 1.07; letter-spacing: -.04em }
.demo-intro { margin: 9px 0 clamp(18px, 2.6vw, 28px); font-size: 15px }
.demo-spotlight { padding: 3px 9px; border-radius: var(--r-pill); background: var(--warning-tint); color: var(--warning); font-size: 11px; font-weight: 650 }
.demo-identity { display: flex; align-items: center; gap: 12px; min-width: 0 }
.demo-identity > div { min-width: 0 }
.demo-portrait { display: block; flex: none; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--hairline); background: var(--canvas-soft); object-fit: cover }
.demo-asset-total { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; margin: 0 }
.demo-asset-total dt { color: var(--body); font-size: 12px }
.demo-asset-total dd { margin: 0; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums }
.demo-filing-link { text-decoration: none }
.demo-filing-link:hover { color: var(--ink) }
.demo-open { display: inline-flex; align-items: center; gap: 10px; text-decoration: none }
.demo-open::after { content: ""; position: absolute; z-index: 2; inset: 0; border-radius: inherit }
.demo-arrow { font-size: 18px; line-height: 1 }
.demo-option { display: inline-block; vertical-align: 1px; padding: 0 4px; border-radius: 4px; background: light-dark(#eeebf6,#373044); color: light-dark(#59427c,#dbcbef); font: 600 10px/1.5 var(--font-sans); white-space: nowrap }
.demo-trend { margin: 0; min-width: 0; --trend-ink: var(--trend-muted, var(--body)) }
.demo-trend[data-direction="up"] { --trend-ink: var(--trend-up, light-dark(#19754f, var(--success))) }
.demo-trend[data-direction="down"] { --trend-ink: var(--trend-down, var(--error)) }
.demo-trend figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 500; color: var(--trend-muted,var(--body)) }
.demo-trend figcaption strong { font: 600 15px/1.2 var(--font-mono); color: var(--trend-ink) }
.demo-trend-plot { margin: 4px 0 }
.demo-trend svg { display: block; width: 100%; height: 56px }
.demo-trend svg path { fill: none; stroke: var(--trend-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round }
.demo-trend-zero { stroke: var(--trend-grid,var(--hairline-strong)); stroke-dasharray: 3 3; vector-effect: non-scaling-stroke }
.demo-trend-end, .demo-chart-empty { color: var(--trend-muted,var(--body)); font-size: 11px; font-variant-numeric: tabular-nums }
.demo-trend-end { text-align: right }
.demo-photo-credits { margin-top: 16px; color: var(--body); font-size: 12px }
.demo-photo-credits summary { width: fit-content; cursor: pointer }
.demo-photo-credits p { margin: 8px 0 4px }
.demo-photo-credits ul { margin: 0; padding-inline-start: 18px }
.holdings-list { margin-top: clamp(20px, 2.5vw, 28px) }
.holdings-list > h2 { margin: 0 0 10px; font-size: 19px; font-weight: 550 }
.holdings-list > ul { overflow: hidden; list-style: none; margin: 0; padding: 0; border: 1px solid var(--hairline); border-radius: 10px }
.holdings-list > ul > li { margin: 0 }
.holdings-list > ul > li + li { border-top: 1px solid var(--hairline) }
.holding-card { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0,.92fr) minmax(0,1.3fr); align-items: center; gap: 8px clamp(18px, 3vw, 42px); padding: 17px clamp(15px, 2.2vw, 25px); background: var(--surface-card) }
.holding-feature { border: 1px solid var(--hairline); border-inline-start: 3px solid var(--primary); border-radius: 10px; background: light-dark(#fffcf6, #24211a) }
.holding-summary { min-width: 0 }
.holding-filing { display: flex; flex-wrap: wrap; align-items: center; grid-column: 1 / -1; gap: 4px 12px; color: var(--body); font-size: 12px }
.holding-filing > a { position: relative; z-index: 3; color: inherit; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em }
.holding-filing > a:hover { color: var(--ink) }
.holding-facts { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px }
.holding-facts time { white-space: nowrap; font-variant-numeric: tabular-nums }
.holding-facts .demo-asset-total { align-items: baseline; gap: 5px; border-inline-start: 1px solid var(--hairline-strong); padding-inline-start: 10px }
.holding-facts dd { color: var(--ink); font-size: 13px }
.holding-card .demo-identity { gap: 9px }
.holding-card .demo-portrait { width: 40px; height: 40px }
.demo-initials { display: grid; place-items: center; color: var(--body); font-size: 14px; font-weight: 600; letter-spacing: .02em; user-select: none }
.holding-card .demo-identity h2, .holding-card .demo-identity h3 { margin: 0; font-size: clamp(17px, 1.7vw, 21px); line-height: 1.18; letter-spacing: -.025em; font-weight: 550 }
.holding-feature .demo-identity h2 { font-size: clamp(20px, 2vw, 25px) }
.holding-card .demo-identity p { margin: 2px 0 0; font-size: 12px }
.holding-summary > p { margin: 7px 0 0; font-size: 13px }
.holding-open { margin-top: 10px; gap: 4px; color: var(--body); font-size: 12px; font-weight: 550; white-space: nowrap }
.holding-open .demo-arrow { font-size: 16px }
/* The whole card is the link, so hover tints the card rather than the "View portfolio" label. */
.holding-card { transition: background-color .15s ease }
@media (hover: hover) {
  .holding-card:hover { background: var(--hairline-soft) }
  .holding-feature:hover { background: light-dark(#f8efdc, #2e2a20) }
}
.holding-card:has(.holding-open:focus-visible) { background: var(--hairline-soft) }
.holding-feature:has(.holding-open:focus-visible) { background: light-dark(#f8efdc, #2e2a20) }
.holding-metrics { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(12px, 2vw, 24px); align-items: center; min-width: 0 }
.holding-metrics .demo-trend svg { height: 58px }
.holding-metrics .demo-trend-plot { margin-block: 6px }
.holding-ranks { min-width: 0; margin: 0; padding-inline-start: clamp(10px, 1.6vw, 20px); border-inline-start: 1px solid var(--hairline) }
.holding-ranks figcaption, .holding-ranks li { display: flex; justify-content: space-between; align-items: baseline; gap: 4px }
.holding-ranks figcaption { margin-bottom: 4px; font-size: 12px }
.holding-ranks figcaption span { font-size: 11px; color: var(--body) }
.holding-ranks ol { margin: 0; padding: 0; list-style: none }
.holding-ranks li { margin: 0; min-height: 20px; font: 12px/1.55 var(--font-mono) }
.holding-ranks li + li { border-top: 1px solid var(--hairline-soft) }
.holding-ranks li > span { color: var(--body); font-variant-numeric: tabular-nums }
.holding-ranks a { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 2px 4px }
@media (max-width: 639px) {
  .holding-card { grid-template-columns: minmax(0,1fr); gap: 12px; padding: 15px }
  .holding-metrics { padding-top: 10px; border-top: 1px solid var(--hairline); gap: clamp(12px, 3vw, 24px) }
}
/* Below 480px the facts line cannot hold all three items, so the holding count takes its own line without a divider. */
@media (max-width: 479px) {
  .holding-facts .demo-asset-total + .demo-asset-total { flex-basis: 100%; border-inline-start: 0; padding-inline-start: 0 }
}
@media (max-width: 439px) {
  .holding-card { padding: 12px; gap: 10px }
  .holding-card .demo-portrait { width: 34px; height: 34px }
  .holding-facts { column-gap: 6px }
  .holding-facts time, .holding-facts dt { font-size: 11px }
  .holding-facts .demo-asset-total { padding-inline-start: 6px; gap: 4px }
  .holding-metrics { grid-template-columns: minmax(0,.78fr) minmax(0,1fr); gap: 8px }
  .holding-metrics .demo-trend figcaption { display: grid; gap: 2px }
  .holding-metrics .demo-trend svg { height: 48px }
  .holding-ranks { padding-inline-start: 8px }
  .holding-ranks li { font-size: 11px }
  .holding-ranks a { gap: 2px }
  .holding-ranks .demo-option { font-size: 9px; padding-inline: 3px }
}
body.demos #demo-back { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); text-decoration: none }
/* The directory's top bar sits on its column, so the logo and the theme toggle line up with the cards' edges;
   a portfolio's own view keeps the app's full-width bar beside its side nav. */
.demos:not(.has-side) .top-inner { width: 100%; max-width: var(--container); margin-inline: auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)) }
/* a portfolio's bar also holds the ticker search, so Product and Pricing give way first, then the crumb's name */
@media (max-width: 1099px) { .demos.has-side .pp-top-link[href="/product"], .demos.has-side .pp-top-link[href="/pricing"] { display: none } }
@media (max-width: 640px) { .demos:not(.has-side) .crumbs { display: none } .demos:not(.has-side) .pp-top-actions { margin-left: auto } }
/* phones: the theme toggle has no room, as on the product page (whose footer carries it instead) */
@media (max-width: 480px) {
  .demos .pp-top-actions #theme-toggle { display: none }
  .demos.has-side .pp-top-link[href="/login"] { display: none }
}
@media (max-width: 359px) {
  .demos:not(.has-side) .crumbs, .demos.has-side .top-crumb { display: none }
  .demos.has-side #demo-back { display: inline-grid; place-items: center; width: 28px; height: 32px; font-size: 0; text-decoration: none }
  .demos.has-side #demo-back::before { content: "←"; font-size: 18px }
}
.demo-ticker-open { position: relative; z-index: 3; color: inherit; text-decoration: none }
.demo-ticker-open:hover, .demo-ticker-open:focus-visible { text-decoration: underline }
.demo-pills { margin-bottom: 8px }
#demo-detail .wrap { container: page / inline-size }
/* Wrap the coverage note to the concentration table so the breakdown keeps its space. */
[data-concentration] > .small { contain: inline-size }
.demo-table-tools, .demo-table-tools > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px }
.demo-table-tools { justify-content: space-between; margin: 8px 0 }
.demo-table-tools input { width: min(100%,220px) }
.demo-table-tools output { font-size: 12px; font-variant-numeric: tabular-nums }
.demo-table .sec-link, #demo-detail .sec-link { color: inherit }
.demo-table .demo-option { margin-left: 4px }
.demo-table td:has(.demo-option) { white-space: nowrap }
.demo-change { white-space: nowrap }
/* Recent actions replace the app's P&L, cash and positions figures: four across, two by two when narrow. */
.pf-stats.demo-action-stats { grid-template-columns: repeat(4, minmax(0, 1fr)) }
button.demo-action-card { display: block; width: 100%; height: auto; margin: 0; border: 0; border-radius: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer }
button.demo-action-card .pf-label, button.demo-action-card .pf-figure { display: block }
button.demo-action-card:hover:not(:disabled) { background: var(--canvas-soft) }
button.demo-action-card:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px }
button.demo-action-card:disabled { cursor: default }
@container page (max-width: 836px) {
  .pf-stats.demo-action-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .demo-action-stats .pf-stat:nth-child(3) { grid-column: auto; border-left: 0 }
  .demo-action-stats .pf-stat:nth-child(n+3) { border-top: 1px solid var(--hairline-soft) }
}
#period-table-card { scroll-margin-top: 72px }
.demo-action-filter { margin: var(--s-xs) 0 var(--s-xxs) }
.demo-action-filter button.chip { height: 28px; padding: 2px 10px; font-size: 12px }
.demo-action-filter button.chip:disabled { opacity: .45; cursor: default }
.demo-chip-count { margin-left: 2px; font-variant-numeric: tabular-nums; opacity: .7 }
#demo-detail .lt-table .sec-link, #demo-detail .lt-summary-securities .sec-link { font-weight: 600 }
#demo-detail .sec-link { text-decoration: none }
#demo-detail .sec-link:hover { text-decoration: underline }
#sec-pane .sec-section .kv dd { overflow-wrap: anywhere }
@media (max-width: 639px) {
  #demo-crumb { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
  #demo-detail .demo-table-tools { gap: 6px }
}
