/* A reading workspace: shared Portal colors, square surfaces and restrained feedback. */
#portalPage[data-tab="user-guide"] :is(#portalBanner, .portal-portal-tools) { display: none; }
.user-guide { --guide-surface: var(--card); --guide-muted-surface: var(--surface-soft); color: var(--ink-soft); }
.user-guide [hidden], .guide-search[hidden], .guide-search [hidden] { display: none !important; }
.user-guide svg, .guide-search svg { flex: 0 0 auto; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
#portalPage[data-tab="user-guide"] .portal-page-body > .portal-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; scroll-margin-top: calc(var(--topbar-height) + 72px); }
#portalPage[data-tab="user-guide"] .portal-page-heading > .portal-page-title-row { flex: 0 0 auto; }
.guide-search { position: relative; flex: 0 1 440px; width: 45%; min-width: 0; margin: 0; }
.guide-search > svg { position: absolute; left: 14px; top: 12px; color: var(--muted); pointer-events: none; }
.guide-search input { display: block; box-sizing: border-box; width: 100%; height: 44px; min-width: 0; padding: 10px 42px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 400 14px/1.5 var(--font-sans); -webkit-appearance: none; appearance: none; }
.guide-search input:focus { border-color: var(--focus); outline: none; box-shadow: inset 0 0 0 1px var(--focus); }
.guide-search input::-webkit-search-cancel-button { display: none; }
.guide-search input::placeholder { color: var(--muted); }
.guide-clear { position: absolute; right: 2px; top: 2px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.guide-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
/* Contain absolute screen-reader captions inside the reader's scroll area;
   otherwise their static positions extend the document beyond the workspace. */
.guide-reader { position: relative; min-width: 0; }
.guide-topics { overflow-y: auto; overscroll-behavior: contain; padding-right: 12px; border-right: 1px solid var(--line); font-size: 12px; }
.guide-all { display: block; margin: 0 0 12px; padding: 10px 12px; color: var(--brand-ink); text-decoration: none; font-weight: 500; }
.guide-topic { margin: 4px 0; }
.guide-topic summary { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 8px 10px; list-style: none; color: var(--ink-soft); font-weight: 500; cursor: pointer; }
.guide-topic summary::-webkit-details-marker { display: none; }
.guide-topic summary span { flex: 1; }
.guide-topic summary svg { width: 16px; height: 16px; }
.guide-topic summary svg:last-child { width: 12px; height: 12px; transition: transform 160ms ease; }
.guide-topic[open] summary svg:last-child { transform: rotate(90deg); }
.guide-topic-links { padding: 2px 0 8px; }
.guide-topic-links a { display: block; padding: 9px 10px 9px 35px; color: var(--muted); text-decoration: none; line-height: 1.5; }
.guide-topics [aria-current="page"] { color: var(--brand-ink); background: var(--portal-sidebar-press); }
.guide-content { min-width: 0; min-height: 460px; }
.guide-section-title { margin: 0 0 20px; color: var(--ink); font: 400 23px/1.3 var(--font-display); }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; row-gap: 30px; }
.guide-category { min-width: 0; padding: 24px 0 12px; border-top: 1px solid var(--line); }
.guide-category-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--brand-ink); }
.guide-category-heading h3 { margin: 0; color: var(--ink); font-size: 15px; font-weight: 500; }
.guide-category-heading > span { margin-left: auto; color: var(--muted); font-size: 11px; }
.guide-category > p { margin: 13px 0 20px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.guide-article-link { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 42px; padding: 9px 8px; margin: 0 -8px; font-size: 13px; line-height: 1.5; text-decoration: none; color: var(--ink-soft); }
.guide-article-link svg { width: 15px; height: 15px; color: var(--muted); }
.guide-eyebrow { color: var(--muted); font-size: 11px; line-height: 1.6; letter-spacing: .035em; }
.guide-result { position: relative; display: block; padding: 22px 36px 22px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.guide-result h3 { margin: 7px 0; color: var(--brand-ink); font-size: 16px; font-weight: 500; }
.guide-result p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.guide-result svg { position: absolute; right: 8px; top: 45px; width: 17px; color: var(--muted); }
.guide-empty { padding: 64px 20px; text-align: center; color: var(--muted); }
.guide-empty > svg { width: 28px; height: 28px; }
.guide-empty h3 { color: var(--ink); font-size: 17px; font-weight: 500; }
.guide-empty p { font-size: 13px; line-height: 1.8; }
.guide-article { max-width: 760px; margin: 0 auto; }
.guide-back { display: inline-block; margin: 0 0 28px; padding: 6px 0; color: var(--muted); text-decoration: none; font-size: 12px; }
.guide-article > .guide-eyebrow { margin: 0 0 14px; }
.guide-article-title { margin: 0; color: var(--ink); font: 300 clamp(28px, 2.8vw, 38px)/1.2 var(--font-display); letter-spacing: -.02em; scroll-margin-top: 150px; outline: none; }
.user-guide .guide-article-title:focus { outline: none; }
.guide-article-summary { margin: 16px 0 36px; padding-bottom: 30px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 15px; line-height: 1.8; }
.guide-article-section { margin: 0 0 34px; }
.guide-article-section h3 { margin: 0 0 14px; color: var(--ink); font-size: 17px; font-weight: 500; line-height: 1.5; }
.guide-article-section p { margin: 0 0 14px; font-size: 14px; line-height: 1.95; overflow-wrap: anywhere; }
.guide-steps { margin: 0; padding: 0; list-style: none; counter-reset: guide-step; }
.guide-steps li { position: relative; counter-increment: guide-step; padding: 2px 0 20px 42px; font-size: 14px; line-height: 1.95; overflow-wrap: anywhere; }
.guide-steps li::before { content: counter(guide-step); position: absolute; top: 2px; left: 0; display: grid; place-items: center; width: 27px; height: 27px; color: var(--brand-ink); background: var(--guide-muted-surface); font: 500 12px/1 var(--font-sans); }
.guide-feature-link { display: inline-flex; align-items: center; gap: 24px; min-height: 42px; padding: 10px 16px; margin: 0 0 32px; background: var(--guide-muted-surface); color: var(--brand-ink); font-size: 13px; text-decoration: none; }
.guide-feature-link svg { width: 16px; height: 16px; }
.guide-related { margin-top: 4px; padding-top: 28px; border-top: 1px solid var(--line); }
.guide-related h3 { margin: 0 0 14px; color: var(--muted); font-size: 12px; font-weight: 500; }
.guide-support { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 20px; padding-top: 28px; margin-top: 56px; border-top: 1px solid var(--line); font-size: 12px; }
.guide-support strong { font-weight: 500; color: var(--ink); }
.guide-support a { color: var(--brand-ink); text-underline-offset: 3px; }
.guide-support p { flex-basis: 100%; margin: 0; font-size: 11px; color: var(--muted); line-height: 1.8; }
.guide-contents-toggle { display: none; }
.guide-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.user-guide :is(a, button, summary), .guide-clear { transition: background-color 120ms ease, color 120ms ease; transform: none; }
@media (hover: hover) and (pointer: fine) {
  .guide-clear:hover, .user-guide :is(.guide-all, .guide-topic summary, .guide-topic-links a, .guide-article-link, .guide-result, .guide-feature-link, .guide-contents-toggle):hover { background: var(--portal-sidebar-hover); }
}
.guide-clear:active, .user-guide :is(.guide-all, .guide-topic summary, .guide-topic-links a, .guide-article-link, .guide-result, .guide-feature-link, .guide-contents-toggle):active { background: var(--portal-sidebar-press); }
/* Investment illustrations use the same surfaces in light and dark mode. */
.guide-nav-visual { margin: 22px 0; font-variant-numeric: tabular-nums; }
.guide-nav-stage { margin-top: 44px; }
.guide-nav-stage h3 { display: flex; align-items: baseline; gap: 14px; }
.guide-nav-step { flex: 0 0 auto; color: var(--brand-ink); font-size: 12px; letter-spacing: .08em; }
.guide-nav-snapshot { margin: 18px 0 0; padding: clamp(18px, 3vw, 28px); background: var(--guide-surface); border: 1px solid var(--line); }
.guide-nav-label { display: block; color: var(--muted); font: 400 12px/1.7 var(--font-sans); }
.guide-nav-metrics { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr; gap: 20px; margin: 22px 0 26px; }
.guide-nav-metrics > div { min-width: 0; }
.guide-nav-metrics dt { color: var(--muted); font: 400 11px/1.6 var(--font-sans); }
.guide-nav-metrics dd { margin: 8px 0 0; color: var(--ink); font: 400 clamp(20px, 2.1vw, 28px)/1.2 var(--font-sans); letter-spacing: -.035em; overflow-wrap: anywhere; }
.guide-nav-metrics > div:nth-child(2) dd { color: var(--brand-ink); }
.guide-nav-metrics > div:last-child dd { font-size: clamp(18px, 1.8vw, 23px); }
.guide-nav-allocation { display: flex; gap: 3px; width: 100%; height: 32px; margin: 0 0 20px; overflow: hidden; }
.guide-nav-allocation > span { display: flex; align-items: center; justify-content: center; min-width: 0; flex-basis: 0; font: 500 12px/1 var(--font-sans); }
.guide-nav-member-a { background: #3267a8; color: #fff; }
.guide-nav-member-b { background: #a9c4e7; color: #172c49; }
.guide-nav-member-c { background: #dbaa78; color: #302011; }
.guide-nav-dot { display: inline-block; width: 8px; height: 8px; margin-right: 9px; vertical-align: 1px; }
.guide-nav-table { width: 100%; margin: 0; border-collapse: collapse; color: var(--ink-soft); font: 400 12px/1.6 var(--font-sans); }
.guide-nav-table :is(th, td) { padding: 12px 6px; text-align: right; border: 0; border-bottom: 1px solid var(--line); background: transparent; white-space: nowrap; }
.guide-nav-table :is(th, td):first-child { padding-left: 0; text-align: left; }
.guide-nav-table :is(th, td):last-child { padding-right: 0; }
.guide-nav-table thead th { color: var(--muted); font-size: 10px; font-weight: 400; white-space: normal; }
.guide-nav-table tbody th { font-weight: 500; }
.guide-nav-table tfoot :is(th, td) { padding-top: 17px; border-bottom: 0; color: var(--ink); font-weight: 500; }
.guide-nav-formula { padding: 20px 24px; background: var(--guide-muted-surface); }
.guide-nav-equation { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; padding: 18px 0 4px; color: var(--ink); font: 400 clamp(18px, 2vw, 24px)/1.4 var(--font-display); }
.guide-nav-equation strong { font-weight: 400; }
.guide-nav-equals { color: var(--muted); }
.guide-nav-fraction { display: inline-flex; flex-direction: column; text-align: center; }
.guide-nav-fraction > span { padding: 3px 8px; }
.guide-nav-fraction > span:first-child { border-bottom: 1px solid var(--muted); }
.guide-nav-definitions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.guide-nav-definitions .guide-nav-formula { padding: 18px; }
.guide-nav-definitions .guide-nav-equation { justify-content: flex-start; font: 400 13px/1.6 var(--font-sans); gap: 10px; }
.guide-article-section .guide-nav-takeaway { margin: 22px 0 0; padding: 2px 0 2px 18px; border-left: 2px solid var(--brand-ink); color: var(--ink-soft); font-size: 13px; }
.guide-nav-explorer { padding: 22px 24px; background: var(--guide-muted-surface); }
.guide-nav-explorer-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--ink); font-size: 13px; }
.guide-nav-explorer-heading output { color: var(--brand-ink); font-size: 22px; }
.guide-nav-explorer input[type="range"] { display: block; width: 100%; min-width: 0; height: 32px; margin: 16px 0 0; padding: 0; border: 0; box-shadow: none; background: transparent; accent-color: var(--brand-ink); cursor: pointer; }
.guide-nav-explorer input[type="range"]:focus-visible { outline: 1px solid var(--focus); outline-offset: 4px; }
.guide-nav-range-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.guide-nav-explorer-result { padding: 4px 24px 18px; border: 1px solid var(--line); border-top: 0; background: var(--guide-surface); }
.guide-article-section .guide-nav-explorer-note { margin: 16px 0 0; color: var(--muted); font-size: 12px; }
.guide-hwm-equation { padding: 16px 0 4px; color: var(--ink); font: 400 clamp(16px, 1.8vw, 22px)/1.7 var(--font-sans); text-align: center; overflow-wrap: anywhere; }
.guide-hwm .guide-hwm-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.guide-hwm .guide-hwm-metrics dd { font-size: 24px; }
.user-guide .guide-hwm-chart { display: block; width: 100%; height: auto; margin: 12px 0 0; stroke: none; overflow: visible; }
.guide-hwm-chart text { fill: var(--ink-soft); stroke: none; font: 400 15px var(--font-sans); }
.guide-hwm-chart .guide-hwm-axis { fill: var(--muted); font-size: 13px; }
.guide-hwm-chart .guide-hwm-mark-label { fill: var(--brand-ink); }
.guide-hwm-grid { stroke: var(--line); stroke-width: 1; }
.guide-hwm-threshold { stroke: var(--brand-ink); stroke-width: 1.5; stroke-dasharray: 5 5; }
.guide-hwm-path { fill: none; stroke: var(--brand-ink); stroke-width: 3; }
.guide-hwm-point { fill: var(--card); stroke: var(--brand-ink); stroke-width: 3; }
.guide-hwm-excess { stroke: #c68c50; stroke-width: 5; }
.guide-hwm-checkpoints { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding-top: 20px; margin-top: 12px; border-top: 1px solid var(--line); }
.guide-hwm-checkpoints > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.guide-hwm-checkpoints strong { color: var(--ink); font-size: 22px; font-weight: 400; }
.guide-hwm-checkpoints > div > span:last-child { color: var(--muted); font-size: 11px; line-height: 1.6; }
.guide-hwm-table th { white-space: normal; }
.guide-hwm-table tbody tr:last-child :is(th, td) { border-bottom: 0; }
.guide-hwm .guide-nav-snapshot > .guide-hwm-table { margin-top: 18px; }
.guide-hwm-lots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.guide-hwm-lots .guide-nav-snapshot { margin: 0; padding: 20px; }
.guide-hwm-lots .guide-hwm-metrics { margin-bottom: 0; gap: 22px 16px; }
.guide-hwm-lots .guide-hwm-metrics dd { font-size: 21px; }
@media (max-width: 620px) {
  .guide-hwm-lots { grid-template-columns: 1fr; }
  .guide-hwm .guide-hwm-metrics > div:first-child { grid-column: auto; }
  .guide-hwm .guide-hwm-metrics dd, .guide-hwm .guide-hwm-metrics > div:first-child dd { font-size: 22px; }
  .guide-hwm-chart text, .guide-hwm-chart .guide-hwm-axis { font-size: 24px; }
  .guide-hwm-checkpoints { gap: 8px; }
  .guide-hwm-checkpoints strong { font-size: 19px; }
  .guide-hwm-checkpoints .guide-nav-label, .guide-hwm-checkpoints > div > span:last-child { font-size: 10px; }
  .guide-hwm-table th[scope="row"] { grid-column: 1 / -1; font-size: 12px; font-weight: 500; }
  .guide-nav-definitions { grid-template-columns: 1fr; }
  .guide-nav-stage { margin-top: 34px; }
  .guide-nav-snapshot { padding: 18px 16px; }
  .guide-nav-metrics { grid-template-columns: 1fr 1fr; gap: 20px 12px; margin: 20px 0; }
  .guide-nav-metrics > div:first-child { grid-column: 1 / -1; }
  .guide-nav-metrics > div:first-child dd { font-size: 32px; }
  .guide-nav-metrics dd { font-size: 22px; }
  .guide-nav-metrics > div:last-child dd { font-size: 18px; }
  .guide-nav-metrics dt { font-size: 10px; }
  .guide-nav-allocation { height: 28px; margin-bottom: 8px; }
  .guide-nav-table, .guide-nav-table :is(thead, tbody, tfoot) { display: block; }
  .guide-nav-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .guide-nav-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .guide-nav-table :is(th, td), .guide-nav-table tfoot :is(th, td) { padding: 0; border: 0; white-space: normal; text-align: left; font-size: 12px; }
  .guide-nav-table td::before { display: block; content: attr(data-label); margin-bottom: 3px; color: var(--muted); font-size: 9px; font-weight: 400; }
  .guide-nav-table th[scope="row"] { align-self: center; color: var(--ink); font-size: 14px; }
  .guide-nav-table tfoot tr { border: 0; padding-bottom: 0; }
  .guide-nav-formula { padding: 16px; }
  .guide-nav-equation { gap: 12px; font-size: 18px; }
  .guide-nav-explorer { padding: 18px 16px; }
  .guide-nav-explorer-result { padding: 2px 16px 18px; }
}
/* A bounded desktop workspace keeps both navigation columns stationary.
   Only the reader scrolls; a long topic directory has its own scroll area. */
@media (min-width: 1025px) {
  #portalPage[data-tab="user-guide"] .portal-portal { height: calc(100dvh - var(--topbar-height)); min-height: 0; grid-template-rows: minmax(0, 1fr); }
  #portalPage[data-tab="user-guide"] .portal-portal-main { display: flex; flex-direction: column; min-height: 0; padding-bottom: 0; }
  #portalPage[data-tab="user-guide"] .portal-portal-header { position: relative; top: auto; flex: 0 0 auto; }
  #portalPage[data-tab="user-guide"] .portal-page-body { display: flex; flex: 1; flex-direction: column; min-height: 0; padding-bottom: 28px; overflow: visible; }
  #portalPage[data-tab="user-guide"] .portal-page-heading { flex: 0 0 auto; margin-bottom: 24px; }
  #userGuidePanel { display: flex; flex: 1; flex-direction: column; min-height: 0; }
  .guide-layout { flex: 1; min-height: 0; align-items: stretch; }
  .guide-topics, .guide-reader { min-height: 0; overflow-y: auto; overscroll-behavior: contain; overflow-anchor: none; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
  .guide-topics { padding-bottom: 16px; }
  .guide-reader { padding: 0 16px 16px 0; scrollbar-gutter: stable; }
  .guide-support { margin-top: 40px; }
}
@media (max-width: 1180px) {
  .guide-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 28px; }
  .guide-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .guide-layout { display: block; }
  .guide-topics { display: none; position: static; max-height: none; padding: 0 0 18px; margin-bottom: 28px; border-right: 0; border-bottom: 1px solid var(--line); }
  .user-guide.is-nav-open .guide-topics { display: block; }
  .guide-contents-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; margin-bottom: 24px; padding: 10px 12px; border: 1px solid var(--line); background: var(--guide-surface); color: var(--ink-soft); font-size: 13px; cursor: pointer; }
  .guide-contents-toggle::after { content: '+'; font-size: 20px; line-height: 1; }
  .guide-contents-toggle[aria-expanded="true"]::after { content: '−'; }
  .guide-topics a, .guide-topic summary { min-height: 44px; font-size: 13px; }
  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
@media (max-width: 620px) {
  #portalPage[data-tab="user-guide"] .portal-page-body > .portal-page-heading { align-items: stretch; flex-direction: column; gap: 16px; margin-bottom: 16px; }
  .guide-search { flex: none; width: 100%; }
  .guide-search input { font-size: 16px; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide-section-title { font-size: 22px; }
  .guide-content { min-height: 300px; }
  .guide-back { min-height: 44px; margin-bottom: 18px; }
  .guide-article-title { font-size: 30px; scroll-margin-top: 100px; }
  .guide-article-summary { font-size: 14px; margin-bottom: 28px; }
  .guide-article-section h3 { font-size: 16px; }
  .guide-article-section p, .guide-steps li { font-size: 13px; line-height: 1.9; }
  .guide-steps li { padding-left: 38px; }
  .guide-article-link { min-height: 44px; }
  .guide-support { margin-top: 36px; }
}
@media (prefers-reduced-motion: reduce) { .user-guide *, .user-guide summary svg, .guide-clear { transition: none; } }
