/* Treasury concept: locally computed, synthetic scenario values. */
.td-demo{--td-ink:#18383c;--td-muted:#626e68;--td-rule:#d9ddcf;--td-paper:#fcfaf4;--td-teal:#285e61;color:var(--td-ink);font-family:inherit;font-variant-numeric:tabular-nums}
.td-demo *{box-sizing:border-box}
.td-demo :is(button,input,summary){font:inherit;touch-action:manipulation}
.td-demo button{cursor:pointer}
.td-demo :is(button,input,summary):focus-visible{outline:3px solid #267baa;outline-offset:3px}
.td-summary{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:22px 24px 18px;border-radius:12px 12px 0 0;background:#efeee4;border:1px solid var(--td-rule);border-bottom:0}
.td-source{margin:0 0 9px;font-size:11px;line-height:1.45;color:#52645e;letter-spacing:.015em}
.td-total{font-size:clamp(35px,4.8vw,49px);line-height:1.05;letter-spacing:-.055em;font-weight:500}
.td-total-label{font-size:12px;line-height:1.4;margin:6px 0 0;color:var(--td-muted)}
.td-difference{text-align:right;flex-shrink:0}
.td-difference strong{display:block;font-size:23px;font-weight:500;line-height:1.2;letter-spacing:-.03em}
.td-difference span{display:block;margin-top:6px;font-size:11px;line-height:1.4;color:var(--td-muted)}
.td-difference[data-direction=down] strong{color:#94612c}
.td-difference[data-direction=up] strong{color:#36634c}
.td-presets{display:flex;gap:6px;flex-wrap:wrap;background:#efeee4;border:1px solid var(--td-rule);border-top:0;padding:0 24px 20px;border-radius:0 0 12px 12px}
.td-presets button{min-height:44px;padding:8px 11px;border:1px solid #c7cfbf;border-radius:6px;background:#fafaf5;color:#3d544b;font-size:12px;line-height:1.25}
.td-presets button[aria-pressed=true]{background:#254e4c;color:#fff;border-color:#254e4c}
.td-presets button:hover{border-color:#355e55}
.td-main-grid{margin:24px 0 20px;min-width:0}
.td-allocation{min-width:0;margin-bottom:18px}
.td-allocation-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.td-allocation-heading h3{font-size:13px;font-weight:650;line-height:1.4;margin:0}
.td-allocation-heading>span{font-size:11px;color:var(--td-muted)}
/* Catalog segmented-bar adapted to the host's existing palette. Values render
   at their final width: slider input never restarts a decorative animation. */
.td-segmented-bar{display:flex;gap:3px;height:16px;border-radius:4px;overflow:hidden;margin-top:10px}
.td-segment{flex-basis:0;min-width:0;background:var(--td-asset-color);opacity:.78}
.td-segment[data-selected=true]{opacity:1;box-shadow:inset 0 -3px 0 rgb(0 0 0 / .18)}
.td-chart-key{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px;font-size:11px;line-height:1.4;color:var(--td-muted)}
.td-chart-key>span:last-child{display:flex;align-items:center;gap:6px;white-space:nowrap}
.td-key-scenario{display:inline-block;width:14px;height:6px;border-radius:2px;background:var(--td-teal)}
.td-key-baseline{display:inline-block;width:2px;height:13px;background:var(--td-ink);margin-left:8px}
.td-assets{display:grid;gap:4px;min-width:0}
.td-asset{display:grid;grid-template-columns:37px minmax(0,1fr) auto;align-items:center;column-gap:10px;row-gap:6px;min-height:64px;padding:8px 10px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--td-ink);text-align:left;transition:background-color .16s ease,border-color .16s ease}
.td-asset[aria-pressed=true]{background:#f0f2e9;border-color:#bccbbe}
.td-asset:hover{background:#f4f5ee;border-color:#d7dfd0}
.td-asset[aria-pressed=true]:hover{background:#e8ede1;border-color:#93aa98}
.td-symbol{width:34px;height:34px;display:grid;place-items:center;border:1px solid var(--td-asset-color);border-radius:50%;color:var(--td-asset-color);font-size:24px;line-height:1;background:#fffdf8;grid-row:1 / span 2}
.td-symbol-word{font-size:10px;font-weight:750;letter-spacing:-.02em}
.td-asset-name{font-size:13px;font-weight:600;line-height:1.25;min-width:0}
.td-asset-name small{display:block;font-size:11px;font-weight:400;line-height:1.4;color:var(--td-muted);margin-top:3px}
.td-asset-amount{text-align:right;white-space:nowrap}
.td-asset-value{display:block;font-size:15px;font-weight:600;letter-spacing:-.025em;line-height:1.25}
.td-asset-amount small{display:block;font-size:11px;line-height:1.4;margin-top:3px;color:var(--td-muted)}
.td-position-track{grid-column:2 / -1;display:block;height:7px;position:relative;border-radius:2px;background:#e9e9de}
.td-position-fill{display:block;height:100%;border-radius:2px;background:var(--td-asset-color)}
.td-position-baseline{position:absolute;top:-3px;bottom:-3px;width:2px;background:var(--td-ink);transform:translateX(-1px);box-shadow:0 0 0 1px var(--td-paper)}
.td-value-axis{display:flex;justify-content:space-between;margin:7px 10px 0 57px;font-size:10px;line-height:1.4;color:var(--td-muted)}
.td-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:26px;padding:20px 0;border-top:1px solid var(--td-rule);border-bottom:1px solid var(--td-rule)}
.td-control-heading{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:10px}
.td-control-heading h3{font-size:14px;line-height:1.3;font-weight:600;margin:0;letter-spacing:-.02em}
.td-control-heading output{font-size:18px;line-height:1.2;font-weight:500;letter-spacing:-.035em;white-space:nowrap}
.td-field-label{display:block;font-size:11px;line-height:1.4;color:var(--td-muted);margin-bottom:5px}
.td-demo input[type=range]{display:block;width:100%;height:44px;margin:0;cursor:pointer;accent-color:#305f5b}
.td-range-ends{display:flex;justify-content:space-between;font-size:10px;line-height:1.3;color:var(--td-muted)}
.td-contribution,.td-reserve-status{font-size:12px;line-height:1.4;margin:11px 0 0;min-height:17px}
.td-contribution span{font-weight:650}
.td-reserve-status{font-weight:600;color:#3c664d}
.td-reserve-status[data-state=gap]{color:#92602b}
.td-assumptions{margin:15px 0 0;font-size:11px;line-height:1.55;color:#586b62}
.td-assumptions summary{cursor:pointer;display:list-item;min-height:44px;padding:12px 0;list-style-position:inside;color:#405b50}
.td-assumptions p{max-width:76ch;margin:5px 0 8px}
.td-scope{margin:6px 0 0;color:#61726a;font-size:11px;line-height:1.5}
.td-contact{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:46px;width:100%;margin:18px 0 0;padding:12px 16px;color:#fff;background:#254e4c;border:1px solid #254e4c;border-radius:7px;font-size:13px;font-weight:600}
.td-contact:hover{background:#173d3b}
.td-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}
@media(max-width:700px){
  .td-asset{column-gap:8px;grid-template-columns:32px minmax(0,1fr) auto}
  .td-symbol{width:30px;height:30px;font-size:21px}.td-symbol-word{font-size:9px}
  .td-value-axis{margin-left:50px}
}
@media(max-width:540px){
  .td-summary{padding:16px 14px 13px;gap:10px}
  .td-source{font-size:10px;margin-bottom:7px}
  .td-total{font-size:35px}.td-total-label{font-size:11px}
  .td-difference strong{font-size:18px}.td-difference span{font-size:10px;max-width:100px}
  .td-presets{padding:0 14px 14px;gap:5px}
  .td-presets button{font-size:10px;min-height:44px;padding:8px 9px}
  .td-main-grid{margin:20px 0}
  .td-allocation{margin-bottom:16px}
  .td-allocation-heading h3{font-size:13px}.td-allocation-heading>span{font-size:11px}
  .td-chart-key{font-size:10px;gap:8px}
  .td-chart-key>span:last-child{gap:5px}
  .td-key-baseline{margin-left:3px}
  .td-asset{min-height:66px;grid-template-columns:28px minmax(0,1fr) auto;column-gap:8px;padding:8px 6px}
  .td-symbol{width:27px;height:27px;font-size:19px}.td-symbol-word{font-size:8px}
  .td-asset-name{font-size:12px;line-height:1.2}
  .td-asset-name small,.td-asset-amount small{font-size:11px}
  .td-asset-value{font-size:14px}
  .td-value-axis{margin-left:42px;margin-right:6px;font-size:10px}
  .td-controls{gap:17px;padding:17px 0}
  .td-control-heading{display:block;margin-bottom:8px}
  .td-control-heading h3{font-size:12px;margin-bottom:4px}
  .td-control-heading output{font-size:18px}
  .td-field-label{font-size:10px;min-height:14px}
  .td-range-ends{font-size:11px}
  .td-contribution,.td-reserve-status{font-size:11px}
  .td-assumptions,.td-scope{font-size:10px}
}
@media(prefers-reduced-motion:reduce){.td-demo *{scroll-behavior:auto;transition:none!important;animation:none!important}}
.td-example{display:inline-block;margin-right:6px;padding:1px 7px;border-radius:4px;background:#b98038;color:#fff;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;vertical-align:1px}
