/* Portfolio page. Colors come from the site's theme where they exist; the wheel's accent is the site's own (maroon to
   gold in the light theme, cobalt in the dark). */
.pf-main { max-width: 1180px; margin: 0 auto; padding: 26px 24px 56px; }
.pf-hero h1 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.02em; margin: 0 0 6px; }
.pf-lede { font-size: 17px; color: var(--graphite, #5F5557); max-width: 68ch; margin: 0 0 16px; line-height: 1.55; }
.pf-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pf-btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 16px; border-radius: 6px; border: 1px solid var(--rule, #E7E1E2); background: transparent; color: inherit; font: inherit; font-weight: 650; font-size: 14.5px; cursor: pointer; }
.pf-btn:hover { border-color: var(--graphite, #5F5557); }
.pf-btn.primary { background: var(--ink, #1E1A1B); border-color: var(--ink, #1E1A1B); color: var(--paper, #fff); }
.pf-btn.small { height: 34px; padding: 0 12px; font-size: 13.5px; }
.pf-btn:focus-visible, .pf-seg:focus-visible, .pf-legend li:focus-visible { outline: 2px solid var(--ink, #1E1A1B); outline-offset: 2px; }
.pf-textlink { font-size: 14px; font-weight: 600; color: inherit; text-underline-offset: 3px; }
.pf-private { font-size: 13px; color: var(--graphite, #5F5557); margin: 12px 0 0; }
#pf-app { margin-top: 26px; display: flex; flex-direction: column; gap: 18px; }
.pf-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pf-name { font: inherit; font-size: 22px; font-weight: 800; border: 1px solid transparent; border-radius: 8px; padding: 4px 8px; margin-left: -8px; background: none; color: inherit; min-width: 0; max-width: 100%; }
.pf-name:hover, .pf-name:focus { border-color: var(--rule, #E7E1E2); outline: none; }
.pf-grow { flex: 1; }
.pf-sel { height: 34px; border-radius: 10px; border: 1px solid var(--rule, #E7E1E2); background: transparent; color: inherit; font: inherit; font-size: 13.5px; padding: 0 8px; }
.pf-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pf-card { border: 1px solid var(--rule, #E7E1E2); border-radius: 14px; padding: 14px 16px; }
.pf-k { margin: 0; font-size: 13px; font-weight: 700; color: var(--graphite, #5F5557); }
.pf-v { margin: 2px 0 0; font-size: 34px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pf-v small { font-size: 15px; font-weight: 700; color: var(--graphite, #5F5557); margin-left: 2px; }
.pf-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--graphite, #5F5557); line-height: 1.45; }
.pf-sub a { color: inherit; }
.pf-card.good .pf-v, .pf-card.r-good .pf-v { color: var(--healthy, #1E7B4F); }
.pf-card.mid .pf-v, .pf-card.r-mid .pf-v { color: var(--caution, #C4561A); }
.pf-card.low .pf-v, .pf-card.r-low .pf-v { color: var(--critical, #B3261E); }
.pf-warn { margin: 0; font-size: 13.5px; color: var(--caution, #C4561A); }
.pf-grid2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; }
.pf-panel { border: 1px solid var(--rule, #E7E1E2); border-radius: 16px; padding: 16px 18px; min-width: 0; }
.pf-ph { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.pf-ph h2 { margin: 0; font-size: 19px; }
.pf-hint { font-size: 12.5px; color: var(--graphite, #5F5557); }
.pf-note { font-size: 12.5px; color: var(--graphite, #5F5557); line-height: 1.5; margin: 10px 0 0; }
.mut { color: var(--graphite, #5F5557); font-size: 0.92em; }
/* the wheel */
.pf-seg-tabs { display: inline-flex; border: 1px solid var(--rule, #E7E1E2); border-radius: 999px; padding: 3px; gap: 2px; }
.pf-seg-tabs button { border: 0; background: none; color: inherit; font: inherit; font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.pf-seg-tabs button[aria-selected="true"] { background: var(--ink, #1E1A1B); color: var(--paper, #fff); }
.pf-wheelrow { display: grid; grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); gap: 14px; align-items: center; }
.pf-ring { width: 100%; height: auto; display: block; overflow: visible; }
/* the wheel's colors (change these to restyle it): segments, their hover, the selected segment's glow, the legend marker */
.pf-main { --pf-seg: #F1E6E1; --pf-seg-hover: #E8D8D0; --pf-hi-a: #E11D48; --pf-hi-b: #F59E0B; --pf-mark: #E11D48; --pf-glow: rgba(245, 158, 11, .75); }   /* Sunset */
html[data-theme="dark"] .pf-main { --pf-seg: #C7D0E3; --pf-seg-hover: #D9E0EE; --pf-hi-a: #6366F1; --pf-hi-b: #67E8F9; --pf-mark: #818CF8; --pf-glow: rgba(103, 232, 249, .8); }   /* Ocean */
.pf-seg { fill: var(--pf-seg); stroke: none; cursor: pointer; transition: fill .2s, opacity .2s; }
.pf-seg:hover { fill: var(--pf-seg-hover); }
.pf-seg.on { fill: url(#pf-hi); filter: url(#pf-glow); animation: pf-glowin .45s ease-out; }
.pf-glowc { flood-color: var(--pf-glow); flood-opacity: 1; }
@keyframes pf-glowin { from { opacity: .55; } to { opacity: 1; } }
.pf-hi-a { stop-color: var(--pf-hi-a); } .pf-hi-b { stop-color: var(--pf-hi-b); }
.pf-dots { fill: none; stroke: var(--graphite, #5F5557); stroke-opacity: .35; stroke-width: 1.4; stroke-dasharray: 1.5 6; stroke-linecap: round; }
.pf-lab { font-size: 11.5px; font-weight: 700; fill: var(--graphite, #5F5557); }
.pf-c1 { font-size: 15px; font-weight: 800; fill: var(--ink, #1E1A1B); }
.pf-c2 { font-size: 12.5px; font-weight: 600; fill: var(--graphite, #5F5557); }
.pf-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.pf-legend li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "nm b" "tk b"; padding: 7px 10px; border-radius: 10px; cursor: pointer; }
.pf-legend li:hover { background: var(--faint, rgba(0, 0, 0, .04)); }
.pf-legend li.on { background: var(--faint, rgba(0, 0, 0, .05)); box-shadow: inset 3px 0 0 var(--pf-mark), 0 0 18px -6px var(--pf-glow); }
.pf-legend .nm { grid-area: nm; font-weight: 700; font-size: 14px; } .pf-legend .tk { grid-area: tk; font-size: 12px; color: var(--graphite, #5F5557); }
.pf-legend b { grid-area: b; align-self: center; font-variant-numeric: tabular-nums; }
/* pillars and risk parts */
.pf-pil { display: grid; grid-template-columns: 9.5em minmax(0, 1fr) 2.6em; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; font-weight: 600; }
.pf-pil b { text-align: right; font-variant-numeric: tabular-nums; }
.track { position: relative; display: block; height: 9px; border-radius: 5px; background: var(--faint, rgba(0, 0, 0, .06)); }
.track .bm { position: absolute; top: -4px; width: 3px; height: 17px; margin-left: -1.5px; border-radius: 2px; background: var(--ink, #1E1A1B); opacity: .55; }
.pf-rk p .bmt { display: inline-block; margin-left: 4px; font-size: 12px; font-weight: 700; color: var(--graphite, #5F5557); white-space: nowrap; }
.track i { display: block; height: 100%; border-radius: 5px; background: var(--graphite, #5F5557); }
.track i.good, .track i.r-good { background: var(--healthy, #1E7B4F); } .track i.mid, .track i.r-mid { background: var(--caution, #C4561A); } .track i.low, .track i.r-low { background: var(--critical, #B3261E); }
.pf-rnum { display: inline-block; margin-left: 6px; padding: 1px 9px; border-radius: 8px; font-size: 16px; }
.pf-rnum.r-good { color: var(--healthy, #1E7B4F); background: rgba(30, 123, 79, .1); } .pf-rnum.r-mid { color: var(--caution, #C4561A); background: rgba(196, 86, 26, .1); } .pf-rnum.r-low { color: var(--critical, #B3261E); background: rgba(179, 38, 30, .1); }
.pf-rk { padding: 10px 0; border-top: 1px solid var(--rule, #E7E1E2); }
.pf-rk:first-of-type { border-top: 0; }
.pf-rk-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; font-weight: 700; font-size: 14.5px; }
.pf-rk-h .wt { font-size: 12px; font-weight: 600; color: var(--graphite, #5F5557); } .pf-rk-h b { margin-left: auto; font-variant-numeric: tabular-nums; }
.pf-rk-h b.r-good { color: var(--healthy, #1E7B4F); } .pf-rk-h b.r-mid { color: var(--caution, #C4561A); } .pf-rk-h b.r-low { color: var(--critical, #B3261E); }
.pf-rk p { margin: 6px 0 0; font-size: 13px; color: var(--graphite, #5F5557); }
/* tables and lists */
.pf-scroll { overflow-x: auto; }
.pf-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.pf-tbl th { text-align: left; font-size: 12px; color: var(--graphite, #5F5557); font-weight: 700; padding: 7px 8px; border-bottom: 1px solid var(--rule, #E7E1E2); white-space: nowrap; }
.pf-tbl td { padding: 8px; border-bottom: 1px solid var(--rule, #E7E1E2); vertical-align: middle; }
.pf-tbl .pf-n { text-align: right; font-variant-numeric: tabular-nums; } .pf-tbl .pf-m { text-align: center; }
.pf-tbl a { font-weight: 700; }
.pf-q { width: 6.5em; text-align: right; font: inherit; font-variant-numeric: tabular-nums; border: 1px solid var(--rule, #E7E1E2); border-radius: 7px; padding: 4px 6px; background: transparent; color: inherit; }
.pf-x { border: 0; background: none; color: var(--graphite, #5F5557); font-size: 18px; cursor: pointer; width: 28px; height: 28px; border-radius: 50%; }
.pf-x:hover { background: var(--faint, rgba(0, 0, 0, .05)); color: var(--critical, #B3261E); }
.pf-chip { display: inline-block; min-width: 2.6em; padding: 2px 6px; border-radius: 6px; font-weight: 800; font-size: 13px; }
.pf-chip.good { color: var(--healthy, #1E7B4F); background: rgba(30, 123, 79, .1); } .pf-chip.mid { color: var(--caution, #C4561A); background: rgba(196, 86, 26, .1); } .pf-chip.low { color: var(--critical, #B3261E); background: rgba(179, 38, 30, .1); }
.flag { font-size: 11px; font-weight: 700; color: var(--critical, #B3261E); border: 1px solid currentColor; border-radius: 999px; padding: 0 6px; margin-left: 4px; white-space: nowrap; }
.pf-exp { list-style: none; margin: 0; padding: 0; }
.pf-exp li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rule, #E7E1E2); font-size: 14px; }
.pf-exp .via { display: block; font-size: 11.5px; color: var(--graphite, #5F5557); }
.pf-exp b { font-variant-numeric: tabular-nums; }
/* the builder: the stock page's search styles (inputs on the field color with 6px corners, the dark .btn, .chip toggles) */
.pf-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pf-sym { position: relative; flex: 1 1 240px; }
.pf-in { height: 40px; padding: 9px 12px; border: 1px solid var(--rule); border-radius: 6px; background: var(--field); color: inherit; font: inherit; font-weight: 650; font-stretch: 110%; letter-spacing: 0.02em; }
.pf-in::placeholder { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--graphite); }
.pf-in:focus { outline: none; border-color: var(--ink); }
.pf-in.tick { width: 100%; text-transform: uppercase; }
#pf-amt { width: 9em; flex: 0 1 9em; }
.pf-unit { display: inline-flex; gap: 6px; }
.pf-unit .chip { height: 34px; padding: 0 12px; }
.pf-unit .chip[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pf-add .btn { height: 40px; padding: 0 18px; }
/* Finalize: in the wheel's accent, so the next step stands out */
.pf-add .pf-fin { background: linear-gradient(135deg, var(--pf-hi-a), var(--pf-hi-b)); color: #fff; box-shadow: 0 0 0 0 var(--pf-glow); transition: box-shadow .2s; }
.pf-add .pf-fin:not(:disabled):hover { background: linear-gradient(135deg, var(--pf-hi-a), var(--pf-hi-b)); box-shadow: 0 0 18px -2px var(--pf-glow); }
.pf-add .pf-fin:disabled { background: var(--faint, rgba(0, 0, 0, .08)); color: var(--graphite); }
/* the list of holdings being added */
.pf-draft { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.pf-draft li { display: grid; grid-template-columns: 5.2em minmax(0, 1fr) 7em 3.6em 6.5em 32px; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.pf-draft .sy { font-weight: 800; font-stretch: 110%; letter-spacing: .02em; }
.pf-draft .nm { color: var(--graphite); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-draft .pf-in.sh { height: 34px; padding: 5px 8px; text-align: right; font-variant-numeric: tabular-nums; width: 100%; }
.pf-draft .u { font-size: 12.5px; color: var(--graphite); }
.pf-draft b { text-align: right; font-variant-numeric: tabular-nums; }
.pf-draft .lev { font-size: 11px; font-weight: 800; color: var(--critical, #B3261E); border: 1px solid currentColor; border-radius: 999px; padding: 0 6px; }
.pf-draft-sum { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; margin: 10px 0 0; font-weight: 700; }
.pf-inline { text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-weight: 600; }
@media (max-width: 640px) {
  .pf-add .btn, .pf-unit { flex: 1 1 auto; } #pf-amt { flex: 1 1 8em; }
  .pf-draft li { grid-template-columns: 4.4em minmax(0, 1fr) 5.6em 6em 30px; } .pf-draft .u { display: none; }
}
.pf-sug { position: absolute; z-index: 20; left: 0; right: 0; top: 44px; list-style: none; margin: 0; padding: 4px; border: 1px solid var(--rule, #E7E1E2); border-radius: 10px; background: var(--paper, #fff); box-shadow: 0 12px 28px -12px rgba(0, 0, 0, .35); }
.pf-sug li { padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; } .pf-sug li:hover { background: var(--faint, rgba(0, 0, 0, .05)); }
.pf-empty { border: 1px dashed var(--rule, #E7E1E2); border-radius: 16px; padding: 30px; text-align: center; }
.pf-empty h2 { margin: 0 0 6px; } .pf-empty p { margin: 0; color: var(--graphite, #5F5557); }
.pf-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 90px); background: var(--ink, #1E1A1B); color: var(--paper, #fff); padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; transition: transform .25s; z-index: 200; max-width: min(92vw, 460px); }
.pf-toast.up { transform: translate(-50%, 0); }
/* dark theme: the cobalt accent, lighter unselected segments (as in a dark app's ring) */
html[data-theme="dark"] .pf-seg { opacity: .9; }
html[data-theme="dark"] .pf-sug { background: #0B0F16; }
/* smaller screens */
@media (max-width: 960px) { .pf-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pf-grid2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .pf-main { padding: 18px 16px 44px; }
  .pf-wheelrow { grid-template-columns: minmax(0, 1fr); }
  .pf-ring { max-width: 340px; margin: 0 auto; }
  .pf-v { font-size: 28px; }
  .pf-pil { grid-template-columns: 8em minmax(0, 1fr) 2.4em; font-size: 13.5px; }
  .pf-hold th:nth-child(3), .pf-hold td:nth-child(3), .pf-hold th:nth-child(7), .pf-hold td:nth-child(7) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .pf-seg, .pf-toast { transition: none; } .pf-seg.on { animation: none; } }

/* leveraged funds: their tag in the holdings, and the note when they set the risk score's minimum */
.pf-tbl .lev { font-size: 11px; font-weight: 800; color: var(--critical, #B3261E); border: 1px solid currentColor; border-radius: 999px; padding: 0 6px; }
.pf-levnote { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--critical, #B3261E); background: rgba(179, 38, 30, .08); }

/* the pentagon (pillar profile): rings and axes in the page's rule color, the portfolio in the wheel's accent with its
   glow, an S&P 500 fund dashed behind it */
.pf-radar { margin: 14px auto 0; max-width: 380px; }
.pf-radar svg { width: 100%; height: auto; display: block; overflow: visible; }
.pf-radar .rg { fill: none; stroke: var(--rule, #E7E1E2); stroke-width: 1; }
.pf-radar .rg.out { stroke-width: 1.4; }
.pf-radar .ax { stroke: var(--rule, #E7E1E2); stroke-width: 1; }
.pf-radar .you { fill: var(--pf-hi-a); fill-opacity: .22; stroke: var(--pf-hi-a); stroke-width: 2.4; stroke-linejoin: round; filter: url(#pf-rglow); }
.pf-radar .bmp { fill: none; stroke: var(--graphite, #5F5557); stroke-width: 1.6; stroke-dasharray: 5 4; opacity: .75; }
.pf-radar .dt { fill: var(--pf-hi-b); stroke: var(--pf-hi-a); stroke-width: 1.6; }
.pf-radar .lb { font-size: 12.5px; font-weight: 700; fill: var(--ink, #1E1A1B); }
.pf-radar .lv { font-size: 13px; font-weight: 800; fill: var(--graphite, #5F5557); }
.pf-radar .lv.good { fill: var(--healthy, #1E7B4F); } .pf-radar .lv.mid { fill: var(--caution, #C4561A); } .pf-radar .lv.low { fill: var(--critical, #B3261E); }
.pf-radar figcaption { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--graphite, #5F5557); margin-top: 4px; }
.pf-radar .k { display: inline-block; width: 18px; height: 0; border-top: 3px solid var(--pf-hi-a); margin-left: 10px; }
.pf-radar .k:first-child { margin-left: 0; }
.pf-radar .k.bmp { border-top: 2px dashed var(--graphite, #5F5557); }
html[data-theme="dark"] .pf-radar .rg, html[data-theme="dark"] .pf-radar .ax { stroke: rgba(201, 208, 222, .22); }
html[data-theme="dark"] .pf-radar .you { fill-opacity: .28; }

/* dark theme: the shared button's hover lightens toward the text color, which washes out on dark; a brighter blue instead */
html[data-theme="dark"] .pf-add .btn:not(.pf-fin):hover { background: #4A82FF; color: #fff; }
