:root{--navy:#102b3b;--teal:#138a8a;--teal2:#61aaa5;--gold:#c6a86c;--bg:#f4f6f5;--ink:#182b38;--muted:#657681;--line:#dce4e3;--white:#fff;--red:#ba6862}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.45 Inter,Segoe UI,Arial,sans-serif}
.top{background:var(--navy);color:white;padding:30px max(5vw,26px) 27px;display:flex;align-items:center;justify-content:space-between;border-bottom:4px solid var(--gold)}
h1{margin:3px 0 0;font-size:32px;letter-spacing:-.5px}
.eyebrow{font-size:11px;font-weight:700;letter-spacing:1.8px;color:#9cd1cc}
.sub{margin:5px 0 0;color:#c2d2d5}
.refresh{background:var(--gold);border:0;color:#182b38;font-size:14px;font-weight:700;padding:12px 18px;border-radius:5px;cursor:pointer}
main{max-width:1500px;margin:25px auto;padding:0 28px}
.controls{display:flex;align-items:end;gap:14px;margin-bottom:19px}
.controls label,.lookup label{font-size:12px;color:var(--muted);font-weight:650;display:flex;flex-direction:column;gap:6px}
.controls select,.lookup select,.lookup input{height:40px;min-width:160px;border:1px solid var(--line);background:white;border-radius:4px;padding:0 11px;color:var(--ink);font-size:14px}
.status{margin-left:auto;color:var(--muted);font-size:12px;padding-bottom:8px}.status.error{color:var(--red)}
.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:16px}
.metric,.panel,.chart-panel,.table-panel{background:white;border:1px solid var(--line);border-radius:6px}
.metric{padding:13px 16px}.metric .label{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.7px}.metric .value{font-size:21px;font-weight:700;color:var(--navy);margin-top:3px}
.chart-panel{padding:20px 22px 16px}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.panel-head h2,.panel h2,.table-panel h2{font-size:17px;margin:0;color:var(--navy)}.panel-head p,.lookup>p{font-size:12px;color:var(--muted);margin:3px 0 0}
.legend{font-size:11px;color:var(--muted);display:flex;align-items:center;gap:7px}.dot{width:9px;height:9px;border-radius:50%;display:inline-block}.mid{background:var(--gold)}.line-key{width:25px;border-top:2px solid var(--teal);margin-left:9px}
.chart-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(310px,1fr);gap:18px;align-items:stretch;margin-top:12px}.chart-stage{min-width:0}.chart-stage canvas{display:block;width:100%;height:430px}.chart-side{min-width:0;border-left:1px solid var(--line);padding-left:16px}.chart-side h3{font-size:13px;color:var(--navy);margin:3px 0 0}.chart-side p{font-size:11px;color:var(--muted);margin:2px 0 8px}.chart-side .table-scroll{max-height:430px;margin-top:7px}.chart-side table{font-size:11px}.chart-side th,.chart-side td{padding:7px 6px}
#chart.hover-readout{touch-action:pan-y;cursor:crosshair}.chart-slider-wrap{display:flex;align-items:center;gap:12px;padding:0 6px 2px;color:var(--muted);font-size:11px}.chart-slider-wrap input{flex:1;accent-color:var(--teal);cursor:ew-resize}.tenor-key{color:var(--key);font-weight:700;margin-left:5px}.tenor-key:before{content:"";display:inline-block;width:15px;border-top:2px solid var(--key);vertical-align:middle;margin-right:4px}
.lower{display:grid;grid-template-columns:1.5fr 1fr;gap:14px;margin:15px 0}.panel{padding:17px 19px}.lookup-grid{display:flex;flex-wrap:wrap;gap:10px;align-items:end;margin-top:17px}.lookup-grid input{width:150px}.lookup-grid label:first-child select{min-width:210px}.lookup-grid button{height:40px;border:0;border-radius:4px;background:var(--teal);color:white;font-weight:700;padding:0 18px;cursor:pointer}
.query-result{margin-top:14px;padding-top:12px;border-top:1px solid var(--line);font-size:14px;font-weight:600;color:var(--navy);min-height:37px}.query-head{font-size:12px;color:var(--muted);font-weight:500}.query-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:10px 0}.query-card{padding:12px;background:#f4f6f5;border:1px solid var(--line);border-radius:5px;font-size:12px}.query-card>strong{display:block;color:var(--navy);font-size:13px;margin-bottom:7px}.query-card span{display:block;margin-top:4px;color:var(--muted)}.query-card b{color:var(--navy)}
.param-list{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin:15px 0 9px}.param{font-size:11px;color:var(--muted)}.param strong{display:block;color:var(--navy);font-size:14px;margin-top:3px}.small{font-size:11px;color:var(--muted)}
.table-panel{padding:17px 19px;margin-bottom:14px}.table-scroll{overflow:auto;max-height:320px;margin-top:12px}table{width:100%;border-collapse:collapse;font-size:12px}th{position:sticky;top:0;background:#f0f4f3;color:#556871;text-align:right;font-weight:700;padding:9px 10px;border-bottom:1px solid var(--line)}td{text-align:right;padding:8px 10px;border-bottom:1px solid #edf0ef;font-variant-numeric:tabular-nums}th:first-child,td:first-child{text-align:left}.tag{display:inline-block;padding:2px 6px;border-radius:3px;background:#e8f4f2;color:#157674;font-size:10px}.tag.put{background:#f5eddf;color:#8b6d35}.heatmap-wrap{padding-top:15px}.hidden{display:none!important}footer{padding:10px 0 28px;font-size:11px;color:var(--muted)}
.compact-tenors .table-scroll{overflow:visible;max-height:none}.compact-tenors table{font-size:11px}.compact-tenors th,.compact-tenors td{padding:6px 8px;white-space:nowrap}.data-scroll{max-height:none!important;overflow-x:auto;overflow-y:visible}.data-scroll table{font-size:10px;table-layout:fixed}.data-scroll th,.data-scroll td{padding:3px 5px;line-height:1.25}.data-scroll th:first-child,.data-scroll td:first-child{width:100px}
@media(max-width:1000px){.chart-layout{grid-template-columns:minmax(0,1.5fr) minmax(270px,1fr)}.chart-side{padding-left:12px}.controls select{min-width:135px}}
@media(max-width:800px){.top{padding:23px 20px}.controls{flex-wrap:wrap}.status{width:100%;margin:0}.metrics{grid-template-columns:repeat(2,1fr)}.lower{grid-template-columns:1fr}.panel-head{align-items:flex-start;flex-direction:column}.legend{padding-top:4px}.chart-layout{grid-template-columns:1fr}.chart-side{border-left:0;border-top:1px solid var(--line);padding:12px 0 0}.chart-side .table-scroll{max-height:280px}.param-list{grid-template-columns:repeat(3,1fr)}}
@media(max-width:520px){.query-cards{grid-template-columns:1fr}.chart-stage canvas{height:350px}.lookup-grid label:first-child{width:100%}}

/* Application navigation and strategy pricer */
.app-shell{display:grid;grid-template-columns:205px minmax(0,1fr);min-height:calc(100vh - 105px)}
.sidebar{background:#e9efed;border-right:1px solid var(--line);padding:22px 12px;display:flex;flex-direction:column;gap:7px}
.sidebar-brand{font-size:12px;font-weight:800;letter-spacing:1.6px;color:var(--navy);padding:5px 12px 21px;line-height:1.5}.sidebar-brand span{font-size:10px;color:var(--teal);letter-spacing:2.5px}
.nav-item{width:100%;border:0;background:transparent;text-align:left;padding:12px 13px;border-radius:5px;color:#526671;font-size:14px;font-weight:650;cursor:pointer}
.nav-item:hover{background:#dfe9e6}.nav-item.active{background:var(--navy);color:#fff;box-shadow:0 2px 7px #102b3b24}
.app-content{min-width:0}#app-main{max-width:1680px;margin:20px auto;padding:0 24px}.page-content{min-width:0}
.pricer-heading{display:flex;align-items:center;justify-content:space-between;margin:4px 0 15px}.pricer-heading h2{font-size:27px;margin:1px 0;color:var(--navy)}.pricer-heading p{color:var(--muted);font-size:13px;margin:4px 0}
.strategy-toolbar{display:flex;align-items:end;gap:12px;margin-bottom:10px}.strategy-toolbar label{display:flex;flex-direction:column;gap:6px;color:var(--muted);font-size:12px;font-weight:650}.strategy-toolbar select{height:40px;min-width:230px;border:1px solid #d5bd8c;background:#fbf6ea;border-radius:4px;padding:0 10px;color:var(--ink);font-size:14px}.secondary-button{height:39px;border:1px solid var(--teal);border-radius:4px;padding:0 15px;background:#edf7f5;color:#126e70;font-size:13px;font-weight:700;cursor:pointer}.secondary-button:hover{background:#d9eeea}.strategy-definition{margin:0 1px 12px}.leg-matrix-panel{padding:16px 17px;margin-bottom:13px}.leg-matrix-panel h3,.portfolio-summary h3{font-size:15px;margin:0;color:var(--navy)}.leg-matrix-panel .panel-head p{font-size:11px;margin:3px 0 0;color:var(--muted)}.leg-matrix-scroll{overflow:auto;margin-top:12px;max-height:calc(100vh - 310px);border:1px solid var(--line);border-radius:4px}.leg-matrix{width:max-content;min-width:100%;border-collapse:separate;border-spacing:0;font-size:12px}.leg-matrix th,.leg-matrix td{min-width:190px;max-width:260px;text-align:left;vertical-align:middle;padding:7px 9px;border-bottom:1px solid #e8eeec;border-right:1px solid #edf0ef;background:white}.leg-matrix tr:last-child th,.leg-matrix tr:last-child td{border-bottom:0}.leg-matrix th:first-child{position:sticky;left:0;z-index:2;min-width:148px;max-width:148px;background:#f0f4f3;color:#526671;font-size:11px;font-weight:700}.leg-matrix td{min-width:225px}.leg-matrix td.input-cell{background:#fbf6ea}.leg-matrix td.output-cell{background:#eff8f6;color:#153c47;font-variant-numeric:tabular-nums}.leg-matrix td.output-cell .output-value{font-weight:650}.leg-matrix input,.leg-matrix select{width:100%;height:32px;border:1px solid #d5bd8c;border-radius:3px;background:#fffdf7;padding:0 7px;color:var(--ink);font:12px Inter,Segoe UI,Arial,sans-serif}.leg-matrix select{cursor:pointer}.leg-matrix .strike-inputs{display:grid;grid-template-columns:90px 1fr;gap:5px}.leg-matrix .leg-head{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;font-weight:750;color:var(--navy)}.leg-remove{border:0;background:#f8e8e6;color:#995853;border-radius:3px;width:24px;height:24px;font-size:16px;line-height:1;cursor:pointer}.leg-meta{font-size:10px;color:var(--muted);margin-top:3px}.portfolio-summary{padding:14px 17px}.summary-content{margin-top:8px;font-size:13px;color:#344d59}.summary-grid{display:flex;flex-wrap:wrap;gap:10px}.summary-card{background:#f0f6f4;border:1px solid #d6e8e4;border-radius:4px;padding:9px 12px;min-width:190px}.summary-card strong{display:block;color:var(--navy);font-size:11px;margin-bottom:4px}.summary-card span{font-variant-numeric:tabular-nums;font-weight:650}.greek-note{margin:10px 2px 25px;line-height:1.5}
@media(max-width:850px){.app-shell{grid-template-columns:1fr}.sidebar{position:sticky;top:0;z-index:10;flex-direction:row;padding:8px 12px;border-right:0;border-bottom:1px solid var(--line)}.sidebar-brand{display:none}.nav-item{width:auto;padding:9px 12px}.strategy-toolbar{flex-wrap:wrap}.leg-matrix-scroll{max-height:none}#app-main{padding:0 13px}}
.pricer-chat-panel{margin-bottom:12px;padding:15px 17px}.pricer-chat-panel h3{font-size:15px;margin:0;color:var(--navy)}.pricer-chat-panel .panel-head p{font-size:11px;margin:3px 0 0;color:var(--muted)}.pricer-chat-log{display:flex;flex-direction:column;gap:8px;max-height:220px;overflow:auto;margin:12px 0}.chat-message{max-width:min(820px,95%);padding:9px 12px;border-radius:7px;font-size:12px;line-height:1.55;white-space:pre-wrap}.assistant-message{align-self:flex-start;background:#eef5f4;color:#294753}.user-message{align-self:flex-end;background:#173b4b;color:#fff}.chat-message code{font-size:11px}.pricer-chat-compose{display:flex;align-items:stretch;gap:9px}.pricer-chat-compose textarea{flex:1;min-width:0;resize:vertical;border:1px solid #cad8d5;border-radius:4px;padding:9px 10px;font:12px/1.5 Inter,Segoe UI,Arial,sans-serif;color:var(--ink)}.pricer-chat-compose button{border:0;border-radius:4px;background:var(--teal);color:white;padding:0 16px;font-weight:700;cursor:pointer}.pricer-chat-compose button:hover{filter:brightness(.95)}@media(max-width:650px){.pricer-chat-compose{flex-direction:column}.pricer-chat-compose button{height:38px}}

/* v8: option legs show every leg with no inner scroll; legs wrap into stacked blocks that fit the width */
.leg-blocks{display:flex;flex-direction:column;gap:12px;margin-top:12px}
.leg-blocks .leg-matrix{width:100%;min-width:0;table-layout:fixed;border:1px solid var(--line);border-radius:4px;overflow:hidden}
.leg-blocks .leg-matrix th,.leg-blocks .leg-matrix td{min-width:0;max-width:none;overflow-wrap:anywhere}
.leg-blocks .leg-matrix th:first-child{position:static;width:148px;min-width:0;max-width:none}
.leg-blocks .leg-matrix td.leg-filler{background:#fafcfb}
.leg-blocks .leg-matrix .strike-inputs{grid-template-columns:minmax(62px,90px) minmax(0,1fr)}
.leg-blocks .leg-matrix input,.leg-blocks .leg-matrix select{min-width:0}
@media(max-width:600px){.leg-blocks .leg-matrix th:first-child{width:104px}.leg-blocks .leg-matrix th,.leg-blocks .leg-matrix td{padding:6px 7px}}

/* v9: strategy assistant input is a single-line, grey, chat-style field (grows only when a multi-line paste needs it; Enter sends, Shift+Enter adds a line) */
.pricer-chat-compose{align-items:flex-end;gap:8px;background:#eceff0;border:1px solid #dce2e2;border-radius:22px;padding:4px 4px 4px 16px}
.pricer-chat-compose:focus-within{border-color:var(--teal2);background:#e9eded}
.pricer-chat-compose textarea{border:0;border-radius:0;background:transparent;resize:none;padding:8px 0;height:34px;min-height:34px;max-height:132px;overflow-y:auto;font:13px/1.4 Inter,Segoe UI,Arial,sans-serif;outline:none;box-shadow:none}
.pricer-chat-compose textarea::placeholder{color:#7f8d94;opacity:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pricer-chat-compose button{flex:none;height:34px;border-radius:17px;padding:0 16px;white-space:nowrap}
@media(max-width:650px){.pricer-chat-compose{flex-direction:row;padding-left:14px}.pricer-chat-compose textarea{font-size:16px;line-height:1.35;height:38px;min-height:38px}.pricer-chat-compose button{width:38px;height:38px;border-radius:50%;padding:0;font-size:19px;line-height:1}.pricer-chat-compose .send-label{display:none}.pricer-chat-compose button:after{content:"\2191";font-weight:700}}

/* Option Pricer: no examples box above the input; the chat log only shows once there are replies */
.pricer-chat-log:empty{display:none}

@media (max-width:760px){.compact-tenors .table-scroll{overflow-x:auto;overflow-y:visible;-webkit-overflow-scrolling:touch}.compact-tenors th:first-child,.compact-tenors td:first-child{position:sticky;left:0;z-index:1;text-align:left}.compact-tenors td:first-child{background:#fff}.compact-tenors th:first-child{z-index:2}}

.top .eyebrow{position:relative;z-index:1}.brand-title{display:flex;align-items:center;gap:12px}.brand-logo{width:68px;height:68px;flex:none;display:block;margin:-16px -3px -16px -11px}
@media(max-width:800px){.brand-logo{width:54px;height:54px;margin:-12px -3px -12px -9px}.brand-title{gap:9px}}

.brand-title{letter-spacing:-.3px}@media(max-width:600px){.top .sub .sub-more{display:none}}
