/* Instructions, then graphs on the left; main content; separate right chatbot. */
.site-frame{display:grid;width:min(2480px,calc(100% - 48px));grid-template-columns:minmax(210px,240px) minmax(260px,310px) minmax(0,1fr) 320px;gap:22px;align-items:start}
#side-workspace{display:contents;min-width:0;align-items:start;font-family:Geist,system-ui,sans-serif;color:#f1ecd9;text-shadow:0 1px 3px #061b17,0 0 10px #061b1770;color-scheme:dark}
#workspace-guide,#workspace-data{position:sticky;top:112px;min-width:0;max-height:calc(100dvh - 136px);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#d0d6bb66 transparent;padding:17px 15px;border:1px solid #d4dec633;border-radius:12px;background:#102a22cc;box-shadow:none;backdrop-filter:none}
.site-frame>[data-site-content]{grid-column:3;grid-row:1}
#workspace-guide{grid-column:1;grid-row:1}
#workspace-data{grid-column:2;grid-row:1}
#side-workspace .guide-rail,#side-workspace .plot-rail,#side-workspace .grounding-rail,#side-workspace .overview-rail{position:static;display:block;inset:auto;width:100%;height:auto;min-height:0;max-height:none;max-width:none;margin:0;padding:0;overflow:visible;border:0;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none;color:#f1ecd9;text-shadow:inherit}
#side-workspace .guide-content{display:block;padding:0}
#side-workspace .guide-rail summary{padding:0 0 20px;display:block;pointer-events:none;list-style:none}
#side-workspace .guide-rail summary>span{display:block}
#side-workspace .guide-rail summary>span:last-child{margin-top:7px;font-size:22px;color:#f8edca}
#side-workspace .guide-rail summary::after{display:none}
#side-workspace .rail-kicker,#side-workspace .guide-rail .rail-kicker{color:#d2dabb}
#side-workspace .guide-chat{margin:0}
#side-workspace .guide-chat h2{font-size:18px;color:#f4e4bb}
#side-workspace .guide-chat>p{font-size:13px;line-height:1.7;color:#e0e6cc;margin:8px 0 12px}
#side-workspace .guide-composer{background:#102a224d;border-color:#d2dcbc66;min-height:48px}
#side-workspace .guide-composer input{color:#fff4d9}
#side-workspace .guide-composer input::placeholder{color:#d4dbc1}
#side-workspace .guide-questions{margin-top:12px}
#side-workspace .guide-questions button{color:#f3edce;background:#102a2233;border-color:#c9d4b955}
#side-workspace .guide-message>p{color:#f1eed7}
#side-workspace .guide-message>span{color:#ccd9b8}
#side-workspace .guide-answer-links a,#side-workspace .guide-resources a{color:#f4dfae}
#side-workspace .guide-messages{max-height:350px}
#side-workspace .guide-steps{margin:24px 0 20px;padding-left:18px;font-size:14px;line-height:1.75;color:#e3e9d2}
#side-workspace .guide-steps strong{color:#fff0c5}
#side-workspace .guide-resources{display:grid;grid-template-columns:1fr;gap:2px;border-color:#d5dec633}
#side-workspace .guide-resources a{min-height:39px;font-size:14px}
.workspace-agent{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:46px;padding:10px 12px;margin:18px 0 0;border:1px solid #d9d4ab66;border-radius:7px;background:#1b44394d;color:#fff0c5;text-align:left;font:500 14px/1.5 Geist,system-ui,sans-serif;cursor:pointer}
.workspace-agent:hover{background:#264e4066}
#side-workspace .overview-rail{margin-bottom:22px;padding-bottom:20px;border-bottom:1px solid #d4dec633}
#side-workspace .overview-rail-header{position:static;inset:auto;padding:0 0 10px;background:transparent;border-color:#d4dec633}
#side-workspace .overview-rail-header>span,#side-workspace .overview-date,#side-workspace .overview-empty{color:#d8dfc6}
#side-workspace .overview-rail-header button{color:#eee7c7;background:transparent;min-width:36px;min-height:36px}
#side-workspace .overview-rail-header button:hover{background:#15372c44;border-color:#d4dec644}
#side-workspace .overview-content{padding-top:8px}
#side-workspace .overview-content h2{font-size:22px;line-height:1.45;color:#fff0c9}
#side-workspace .overview-summary,#side-workspace .overview-points li,#side-workspace .overview-context-source>p{font-size:14px;line-height:1.8;color:#edf0dd}
#side-workspace .overview-context-source>a,#side-workspace .overview-sources a{color:#f4dba7}
#side-workspace .overview-context-note,#side-workspace .overview-sources{color:#d0d9bb}
#side-workspace .overview-related,#side-workspace .overview-sources{border-color:#d4dec633}
#side-workspace .overview-open,#side-workspace .ask-article{background:#153d305c;border-color:#d6dfc366;color:#fff0c9;min-height:44px;text-shadow:inherit}
#side-workspace .overview-empty{padding:7px 0 0;font-size:13px;line-height:1.7}
#side-workspace .rail-heading{padding:0 0 14px;margin:0;border-color:#d4dec633}
#side-workspace .rail-heading h2{font-size:23px;line-height:1.4;color:#fff0c9}
#side-workspace .plot-heading,#side-workspace .plot-heading h3{color:#fff0c9}
#side-workspace .plot-section{padding:22px 0;border-color:#d4dec633}
#side-workspace .grounding-finding{margin:12px 0 0;font-size:13px;line-height:1.8;color:#e4ebd5}
#side-workspace .grounding-date{font-size:11px;line-height:1.7;color:#d1dcc0}
#side-workspace .grounding-card{color:#f1e7c7;border-color:#d4dec633}
#side-workspace .grounding-card h3{color:#f1e7c7;font-size:17px}
#side-workspace .grounding-graphic{margin-top:14px}
#side-workspace .tone-widget{color:#f3efd8}
#side-workspace .tone-channels button{color:#e6eacb;background:#102a2233;border-color:#d4dec655}
#side-workspace .tone-channels button[aria-pressed=true]{color:#fff0c8;background:#7d996344}
#side-workspace .tone-axis,#side-workspace .tone-key{color:#d5ddc3}
#side-workspace .tone-row{color:#f4f0db}
#side-workspace .evidence-graphic text{fill:#e7ebd4;stroke:none}
#side-workspace .plot-grid{stroke:#d6e0c833}
#side-workspace .plot-zero{stroke:#d6e0c888}
#side-workspace .series-chart{color:#ecd28f}
.grounding-details{border-top:1px solid #d4dec633;margin-top:20px;padding-top:18px;color:#eee5c7;font-size:14px}
.grounding-details>summary{cursor:pointer;padding-bottom:14px}
#side-workspace .rail-footer-link{color:#f1d699}
#portfolio-chat-slot .chat-panel{position:static;inset:auto;width:100%;max-width:none;min-height:360px;height:min(610px,calc(100dvh - 175px));max-height:none;margin:0 0 22px;border:1px solid #d5dec655;border-radius:9px;background:transparent;color:#f4eed7;box-shadow:none;text-shadow:inherit;--paper:#102a2233;--ink:#f3ecd0;--body:#eee9d5;--muted:#cbd7b6;--line:#cddbb444}
#portfolio-chat-slot .chat-header,#portfolio-chat-slot .chat-messages,#portfolio-chat-slot .chat-form,#portfolio-chat-slot .chat-article{background:#102a2233;color:#eee9d5;border-color:#d4dec633}
#portfolio-chat-slot .chat-header{padding:13px 11px;gap:6px}
#portfolio-chat-slot .chat-header h2{font-size:18px;color:#fff0c9}
#portfolio-chat-slot .chat-header p,#portfolio-chat-slot .chat-footnote,#portfolio-chat-slot .chat-speaker{color:#d1dcc0}
#portfolio-chat-slot .chat-header-actions{gap:0}
#portfolio-chat-slot .chat-header-actions button{color:#f3e9c9;width:32px;height:38px}
#portfolio-chat-slot .chat-messages{padding:15px 12px}
#portfolio-chat-slot .chat-body{font-size:15px;color:#f1ecd8;line-height:1.8}
#portfolio-chat-slot .chat-message.user .chat-body,#portfolio-chat-slot .chat-starters button{background:#123b3044;color:#f1ecd8}
#portfolio-chat-slot .chat-sources a,#portfolio-chat-slot .chat-body a,#portfolio-chat-slot .chat-article>a,#portfolio-chat-slot .chat-article>button{background:transparent;color:#f3da9d;border-color:#d4dec644}
#portfolio-chat-slot .chat-composer{background:#102a2233;border-color:#d4dec655}
#portfolio-chat-slot .chat-composer textarea{color:#fff1d0;min-width:0}
#portfolio-chat-slot .chat-composer textarea::placeholder{color:#d1dcc0}
#portfolio-chat-slot .chat-send{background:#c7d9ab;color:#123529}
#portfolio-chat-slot .chat-article>span{color:#d1dcc0}
@media(min-width:980px) and (max-width:1600px){.homepage .site-frame .page-grid{grid-template-columns:1fr}.homepage .site-frame .work-column{padding-top:24px;border-top:1px solid #d6dcca}}
@media(min-width:980px) and (max-width:1199px){.site-frame{grid-template-columns:190px 240px minmax(0,1fr);gap:20px}#side-workspace{gap:12px}#workspace-guide,#workspace-data{padding:15px 10px}}
@media(max-width:979px){.site-frame{display:block;width:calc(100% - 28px)}#side-workspace{display:none}html.mobile-ui .mobile-grounding-panel{background:#0e2a22cc;backdrop-filter:none}html.mobile-ui .mobile-grounding-tabs{grid-template-columns:1fr 1fr}html.mobile-ui .mobile-grounding-body>#side-workspace{display:block;position:static;inset:auto;margin:0;padding:0}#workspace-guide,#workspace-data{position:static;top:auto;grid-column:auto;grid-row:auto;max-height:none;border:0;border-radius:0;padding:18px 20px;background:transparent;overflow:visible}#side-workspace [hidden]{display:none!important}#side-workspace .guide-rail summary{display:block}#side-workspace .guide-resources{grid-template-columns:1fr 1fr;column-gap:20px}#side-workspace .plot-rail{display:block}html.mobile-ui #portfolio-chat-slot #chat-panel{position:static;inset:auto;width:100%;height:min(610px,65dvh);min-height:330px;border-radius:9px}#side-workspace .overview-rail{display:block}#side-workspace .overview-content h2{font-size:24px}#side-workspace .overview-summary{font-size:16px}}
@media print{#side-workspace{display:none!important}.site-frame{display:block;width:100%}}

#conversation-rail{grid-column:4;grid-row:1;position:sticky;top:112px;min-width:0;max-height:calc(100dvh - 136px);color:#f2eed6;font-family:Geist,system-ui,sans-serif;text-shadow:0 1px 3px #061b17;border:1px solid #d4dec633;border-radius:12px;background:#102a22cc;overflow:hidden}
.conversation-idle{padding:22px 18px;line-height:1.7}.conversation-idle h2{font-size:23px;font-weight:450;color:#fff0c9;margin:12px 0}.conversation-idle p{font-size:14px}.conversation-idle .rail-kicker{font-size:10px;color:#d2dabb}
#conversation-rail:has(#chat-panel:not([hidden])) .conversation-idle{display:none}
#conversation-rail #chat-panel{border:0;margin:0;height:min(720px,calc(100dvh - 136px));border-radius:0}

@media(min-width:980px) and (max-width:1399px){.site-frame{grid-template-columns:190px 240px minmax(0,1fr);gap:20px}#conversation-rail{display:none}#conversation-rail:has(#chat-panel:not([hidden])){display:block;position:fixed;top:auto;right:20px;bottom:20px;width:min(420px,calc(100vw - 40px));z-index:50;background:#102a22d9}#conversation-rail #chat-panel{height:min(670px,calc(100dvh - 140px))}}
@media(max-width:979px){#conversation-rail{display:none}#conversation-rail:has(#chat-panel:not([hidden])){display:block;position:fixed;top:74px;left:12px;right:12px;bottom:calc(74px + env(safe-area-inset-bottom,0px));width:auto;max-height:none;z-index:50;background:#102a22e6}html.mobile-ui #conversation-rail #chat-panel{position:static;inset:auto;width:100%;height:100%;min-height:0;max-height:none}#conversation-rail #portfolio-chat-slot{height:100%}}
@media print{#conversation-rail{display:none!important}}

@media(min-width:1400px) and (max-width:1779px){.site-frame{grid-template-columns:210px 260px minmax(0,1fr) 300px;gap:20px}}

/* Curated headlines fill the space beneath the desktop portfolio chat. */
@media(min-width:1400px){
 #conversation-rail{display:flex;flex-direction:column;overflow-y:auto;scrollbar-width:thin}
 #conversation-rail #chat-panel{height:clamp(240px,calc(100dvh - 418px),720px);min-height:0}
 #conversation-rail #portfolio-chat-slot{min-height:0}
}
.headline-rail{position:relative;flex-shrink:0;padding:18px 16px 14px;border-top:1px solid #d4dec655;background:#102a224d;overflow:hidden}
.headline-heading{display:flex;align-items:center;gap:10px;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:#d2dabb}
.headline-heading>a{font:600 16px/1.2 Geist,system-ui,sans-serif;letter-spacing:0;color:#f0cd94;text-decoration:none}
.headline-meta{margin:13px 0 7px;font-size:11px;color:#d1dcc0;line-height:1.5}
.headline-story{display:block;color:#fff0c9;font-size:16px;line-height:1.5;font-weight:500;text-decoration:none;overflow-wrap:anywhere;display:block}
.headline-story:hover{text-decoration:underline;text-underline-offset:3px}
.headline-controls{display:flex;align-items:center;justify-content:flex-end;gap:3px;margin-top:12px}.headline-controls[hidden]{display:none}
.headline-count{margin-right:auto;color:#d1dcc0;font-size:11px;font-variant-numeric:tabular-nums}
.headline-controls button{display:grid;place-items:center;width:34px;height:32px;border:1px solid #d4dec644;background:#102a224d;color:#f2eed6;border-radius:5px;cursor:pointer;font-size:16px}
.headline-controls button:hover{background:#426b5955}.headline-rail a:focus-visible,.headline-controls button:focus-visible{outline:2px solid #eed396;outline-offset:3px}
.headline-progress{position:absolute;bottom:0;left:0;height:2px;width:0;background:#e6c886}
.headline-rail.is-rotating .headline-progress{animation:headline-progress 7s linear forwards}
.headline-rail.headline-enter .headline-story{animation:headline-enter .35s ease-out}
@keyframes headline-progress{from{width:0}to{width:100%}}
@keyframes headline-enter{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:1399px){.headline-rail{display:none}}
@media(prefers-reduced-motion:reduce){.headline-rail .headline-progress,.headline-rail.headline-enter .headline-story{animation:none!important}}

.headline-heading{border-bottom:1px solid #d4dec633;padding-bottom:12px}
.headline-on-air{width:6px;height:6px;border-radius:50%;background:#fa7762;margin-left:auto;box-shadow:0 0 9px #fa776266}
.headline-next{display:flex;flex-direction:column;gap:8px;min-height:0;margin-top:16px;border-top:1px solid #d4dec633;padding-top:12px}
.headline-next[hidden]{display:none}
.headline-next>span{flex-shrink:0;font-size:9px;text-transform:uppercase;letter-spacing:.08em;color:#f0cd94}
.headline-queue{list-style:none;margin:0;padding:0;overflow:auto;min-height:0;scrollbar-width:thin;scrollbar-color:#d0d6bb66 transparent;overscroll-behavior:contain}
.headline-queue li+li{border-top:1px solid #d4dec62b}
.headline-queue a{display:flex;align-items:baseline;gap:10px;padding:12px 2px;color:#f1ecd9;text-decoration:none;line-height:1.55}
.headline-queue a:hover{color:#fff5cc;background:#c7d9ab0a}
.headline-queue-number{flex:0 0 20px;font:11px/1.6 ui-monospace,monospace;color:#d2c592}
.headline-queue-copy{min-width:0;display:block}
.headline-queue-title{display:block;font-size:13px;overflow-wrap:anywhere}
.headline-queue-source{display:block;font-size:10px;color:#c7d3b9;line-height:1.5;margin-top:5px}
.headline-queue a:focus-visible{outline-offset:-2px}
@keyframes headline-enter{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}

/* Sky decoration is behind the page, never on the charts or reading surface. */
.libra-sky{position:fixed;z-index:-1;pointer-events:none;left:var(--libra-x,26vw);top:128px;transform:translateX(-50%);width:470px;height:610px;background:url('/assets/libra-sky-v1.svg') center/contain no-repeat;opacity:.95}
@media(max-width:979px){.libra-sky{display:none}}
@media print{.libra-sky{display:none}}

/* Extend the news area through the remaining height of the right column. */
@media(min-width:1400px){
 #conversation-rail{height:calc(100dvh - 204px);max-height:calc(100dvh - 204px)}
 #conversation-rail #portfolio-chat-slot{flex:0 0 auto}
 #conversation-rail #chat-panel{height:clamp(210px,calc(52dvh - 100px),650px)}
 .headline-rail{display:flex;flex-direction:column;flex:1 1 300px;min-height:300px}
 .headline-rail .headline-story{flex:0 0 auto;min-height:0;max-height:none}
 .headline-rail .headline-next{flex:1;min-height:90px}
 .headline-rail .headline-controls{flex-shrink:0}
}

.tone-sparse .tone-box{stroke-dasharray:3 2}
#side-workspace .tone-history-note,.tone-history-note{font-size:11px;line-height:1.65;color:#d1dcc0;margin:0 0 13px}

/* Explain the tone scale on both light reading cards and dark side panels. */
.tone-widget{--tone-note:#53694f}
#side-workspace .tone-widget,.grounding-graphic .tone-widget{--tone-note:#d2dfc1}
.tone-axis,.tone-row{grid-template-columns:76px minmax(0,1fr) 78px}
.tone-widget.is-compact .tone-axis,.tone-widget.is-compact .tone-row{grid-template-columns:39px minmax(0,1fr) 55px}
.tone-axis-heading{font-size:12px;font-weight:550;margin:6px 0 8px;color:var(--tone-note)}
.tone-axis-heading>span:nth-child(2){text-align:center}
.tone-axis-scale{margin-bottom:15px;color:var(--tone-note)}
.tone-axis-scale>div>span{display:flex;flex-direction:column;gap:3px;text-align:center}
.tone-axis-scale>div>span:first-child{text-align:left}
.tone-axis-scale>div>span:last-child{text-align:right}
.tone-axis-scale b{font-size:12px;font-weight:450;font-variant-numeric:tabular-nums}
.tone-axis-scale small{font-size:11px}
.tone-widget.is-compact .tone-axis-heading{font-size:10px}
.tone-widget.is-compact .tone-axis-scale small{font-size:9px}
.tone-history-note,#side-workspace .tone-history-note{color:var(--tone-note)}
.tone-key{color:var(--tone-note);font-size:12px!important}
.tone-reading-guide{margin:14px 0 0;border-top:1px solid #85947d45;padding-top:12px;font-size:14px;line-height:1.75;color:var(--tone-note)}
.tone-color-key{display:flex;flex-wrap:wrap;align-items:center;gap:5px 17px;font-size:11px;line-height:1.6;color:var(--tone-note);margin:10px 0 0}
.tone-color-key>span{display:inline-flex;align-items:center;gap:6px}
.tone-color-key i{display:inline-block;width:8px;height:8px;border-radius:50%}
.tone-key-low{background:#d95454}.tone-key-middle{background:#859176}.tone-key-high{background:#258565}
.tone-widget.is-compact .tone-reading-guide{font-size:11px;line-height:1.7}
.tone-widget.is-compact .tone-color-key{font-size:10px;gap:4px 10px}
.series-directory-card h2 a:hover,.series-card-entry strong a:hover{text-decoration:underline;text-underline-offset:4px}

.chat-page-intro .chat-body.is-typing::after{content:'▏';color:#edc780;animation:guide-caret .8s steps(1) infinite}
.chat-page-intro[data-state=loading] .chat-body:empty::after{content:'Reading this page…';animation:guide-pulse 1.4s ease-in-out infinite;color:var(--muted)}
@keyframes guide-caret{50%{opacity:0}}
@keyframes guide-pulse{50%{opacity:.45}}
@media(prefers-reduced-motion:reduce){.chat-page-intro .chat-body::after{animation:none!important}}

/* A persistent chat entry point, bottom right at every screen size. */
#chat-launcher{position:fixed;inset:auto 20px 20px auto;z-index:45;display:grid;place-items:center;width:56px;height:56px;padding:0;border:1px solid #edc78099;border-radius:50%;color:#f5eedb;background:linear-gradient(135deg,#204b3e,#112a37);box-shadow:0 5px 24px #071f3659;transition:transform .18s ease,background .18s ease}
#chat-launcher svg{width:25px;height:25px}
#chat-launcher:hover{transform:translateY(-2px);background:#275441}
#chat-launcher:focus-visible{outline:2px solid #edc780;outline-offset:4px}
#chat-launcher[aria-expanded=true]{border-color:#edc780;background:#244937}
@media(max-width:979px){
 html.mobile-ui .mobile-action-bar{grid-template-columns:minmax(0,1fr) 52px}
 html.mobile-ui .mobile-action-bar>#chat-launcher{position:static;inset:auto;width:48px;height:48px;min-width:48px;min-height:48px;margin:0;padding:0;display:grid;border:1px solid #edc78099;border-radius:50%;background:linear-gradient(135deg,#204b3e,#112a37);color:#f5eedb;box-shadow:none}
 html.mobile-ui .mobile-action-bar>#mobile-chat{display:none}
 html.mobile-ui .mobile-action-bar>#grounding-toggle{grid-column:1;grid-row:1}
 html.mobile-ui .mobile-action-bar>#chat-launcher{grid-column:2;grid-row:1}
}
@media(prefers-reduced-motion:reduce){#chat-launcher{transition:none}}
@media print{#chat-launcher{display:none!important}}


@media(min-width:980px) and (max-width:1399px){#conversation-rail:has(#chat-panel:not([hidden])){bottom:88px}#conversation-rail #chat-panel{height:min(670px,calc(100dvh - 206px))}}
