:root { font-family: Inter, Arial, sans-serif; color: #172d33; background: #eef3f4; }
* { box-sizing: border-box; }
body { margin: 0; }
.shell { width: min(1180px, calc(100% - 28px)); margin: auto; padding: 22px 0 50px; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; border-bottom: 3px solid #17816d; padding: 8px 0 17px; }
.eyebrow { font-size: 11px; font-weight: 800; color: #08715e; letter-spacing: 0; }
.page-head h1 { font-size: 30px; line-height: 1.1; margin: 5px 0; }
.page-head p { margin: 0; color: #526771; font-size: 14px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.head-actions a, .head-actions button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 12px; border: 1px solid #a9bec3; border-radius: 5px; background: #fff; color: #17464b; text-decoration: none; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.head-actions button:disabled { opacity: .5; }
.toolbar { display: flex; align-items: center; gap: 10px; margin: 16px 0; font-size: 13px; flex-wrap: wrap; }
.toolbar label { font-weight: 800; }
.toolbar select { min-width: 160px; padding: 8px; border: 1px solid #a9bec3; border-radius: 5px; background: #fff; font: inherit; }
.toolbar #status { color: #526771; }
.direction { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 4px 8px; margin: 0; border: 1px solid #a9bec3; border-radius: 5px; background: #fff; }
.direction legend { font-size: 11px; font-weight: 800; }
.direction label { white-space: nowrap; font-weight: 600; cursor: pointer; }
.pick-action { min-height: 36px; padding: 7px 18px; border: 1px solid #08715e; border-radius: 5px; background: #08715e; color: white; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.pick-action:disabled { opacity: .55; cursor: default; }
.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #c8d6d9; border-radius: 6px; background: #fff; }
.summary div { padding: 12px 14px; border-right: 1px solid #e1e9eb; min-width: 0; }
.summary div:last-child { border: 0; }
.summary span { display: block; font-size: 10px; font-weight: 800; text-transform: uppercase; color: #627681; }
.summary strong { display: block; margin-top: 5px; font-size: 18px; overflow-wrap: anywhere; }
.red { color: #bd2539; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 23px 0 8px; }
.section-head h2 { margin: 0; font-size: 18px; }
.section-head span { font-size: 12px; color: #5c717b; }
.history { display: flex; gap: 7px; overflow-x: auto; padding: 2px 0 9px; }
.run { flex: 0 0 auto; min-width: 128px; padding: 9px 11px; border: 1px solid #bfcfd3; border-radius: 5px; background: #fff; color: #203b43; text-align: left; font: inherit; cursor: pointer; }
.run[aria-pressed=true] { border-color: #0f806e; box-shadow: inset 0 0 0 1px #0f806e; }
.run strong, .run small { display: block; }
.run strong { font-size: 13px; }
.run small { margin-top: 4px; font-size: 11px; color: #667983; }
.run .run-flag { color: #bd2539; font-weight: 800; }
.comparison-summary { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 10px 0; font-size: 12px; color: #4e636d; }
.comparison-summary b { color: #183840; }
.contracts-table-wrap { overflow-x: auto; border: 1px solid #c8d6d9; border-radius: 6px; background: #fff; }
.contracts-table { width: 100%; min-width: 1130px; border-collapse: collapse; font-size: 12px; }
.contracts-table th { padding: 10px 9px; background: #e5eff0; color: #425c64; font-size: 10px; text-align: left; text-transform: uppercase; white-space: nowrap; }
.contracts-table td { padding: 9px; border-bottom: 1px solid #e0e9eb; vertical-align: top; }
.contract-row:nth-of-type(4n+3), .contract-detail-row:nth-of-type(4n+4) { background: #f8fbfb; }
.contract-row.gain-direction { border-left: 4px solid #bd2539; background: #fff3f4; }
.contract-row td > strong, .contract-row td > small { display: block; }
.contract-row td > small, .contract-detail-row small { margin-top: 3px; color: #6a7d85; font-size: 10px; }
.contract-row td:first-child small { overflow-wrap: anywhere; }
.contract-row .expiration-sign { width: fit-content; padding: 2px 5px; border-radius: 3px; font-weight: 800; text-transform: uppercase; }
.contract-row .expiration-sign.expired { background: #fce8ea; color: #aa2839; }
.contract-row .expiration-sign.today { background: #fff0cf; color: #825900; }
.contract-quote-links { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; }
.contract-quote-links a { color: #176a9b; font-size: 11px; font-weight: 700; white-space: nowrap; }
.scan-price-line span { display: block; white-space: nowrap; }
.scan-price-line strong { display: inline; }
.scan-price-history summary, .contract-details summary { margin-top: 5px; color: #176a9b; font-weight: 700; cursor: pointer; }
.scan-price-list { max-height: 260px; min-width: 140px; overflow-y: auto; margin-top: 5px; border-top: 1px solid #dce7e9; }
.scan-price-entry { padding: 5px 0; border-bottom: 1px solid #e4ecee; }
.scan-price-entry small { display: block; margin-bottom: 3px; }
.contract-detail-row td { padding: 3px 9px 9px; }
.contract-details summary { margin: 0; font-size: 11px; }
.contract-details[open] { padding: 6px 0; }
.contract-details .flag-facts { margin: 10px 0; }
.contract-details .quote-links a { color: #176a9b; font-size: 12px; font-weight: 700; }
.row-actions { min-width: 112px; }
.row-actions button { display: block; width: 100%; margin-bottom: 5px; min-height: 30px; padding: 4px 7px; font-size: 11px; }
.overnight-section[hidden] { display: none; }
.overnight-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.overnight-side { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px; border: 1px solid #9ab9d1; border-left: 4px solid #24658f; border-radius: 5px; background: #eaf4fb; }
.overnight-side-label { color: #245b80; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.overnight-side > strong { font-size: 17px; }
.overnight-side small { color: #526771; font-size: 12px; overflow-wrap: anywhere; }
.overnight-values { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 4px 0; font-size: 12px; }
.overnight-values b { display: block; margin-top: 3px; font-size: 14px; }
.overnight-side a { align-self: flex-start; color: #176a9b; font-size: 12px; font-weight: 700; }
.overnight-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 8px; }
.overnight-actions .pick-action { background: #245b80; border-color: #245b80; }
.overnight-note { margin: 8px 0 0; color: #526771; font-size: 12px; line-height: 1.45; }
.contracts { border-top: 1px solid #cbd8dc; }
.contract { display: grid; grid-template-columns: minmax(180px, 1.7fr) repeat(4, minmax(100px, 1fr)) minmax(145px, 1.2fr); gap: 12px; align-items: center; padding: 12px 8px; border-bottom: 1px solid #d5e0e3; background: #fff; }
.contract:nth-child(even) { background: #f8fbfb; }
.contract.gain-direction { border-left: 4px solid #bd2539; padding-left: 4px; background: #fff3f4; }
.contract .identity { min-width: 0; }
.contract .identity strong, .contract .identity small { display: block; }
.contract .identity strong { font-size: 14px; }
.contract .identity small { font-size: 11px; color: #60747d; overflow-wrap: anywhere; margin-top: 4px; }
.metric, .flag { min-width: 0; }
.metric span, .flag-facts span { display: block; color: #526771; text-transform: uppercase; font-size: 11px; font-weight: 800; }
.metric strong { display: block; font-size: 15px; margin-top: 4px; overflow-wrap: anywhere; }
.metric small { display: block; color: #667983; font-size: 11px; margin-top: 3px; }
.last-prices span:not(:first-child) { margin-top: 10px; }
.flag { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 12px 14px; border: 1px solid #d0dde0; border-radius: 5px; background: #f7faf9; }
.gain-direction .flag { border-color: #e6bec5; background: #fff; }
.flag-head { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.flag-head strong { font-size: 14px; }
.flag-head span { color: #526771; font-size: 12px; font-weight: 700; }
.flag strong.red { color: #bd2539; }
.flag-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 18px; }
.flag-facts strong { display: block; margin-top: 4px; font-size: 15px; overflow-wrap: anywhere; }
.flag-facts small { display: block; margin-top: 3px; color: #526771; font-size: 11px; }
.flag-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 10px; border-top: 1px solid #dce6e8; }
.quote-links { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.flag a { font-size: 12px; font-weight: 700; color: #176a9b; white-space: nowrap; }
.empty { padding: 17px; background: #fff; color: #5e737c; font-size: 13px; }
.disclaimer { margin-top: 22px; font-size: 12px; line-height: 1.5; color: #5d727b; }
@media (max-width: 760px) {
  .page-head { align-items: start; flex-direction: column; }
  .head-actions { width: 100%; }
  .head-actions > * { flex: 1 1 120px; }
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary div:nth-child(2) { border-right: 0; }
  .summary div:nth-child(-n+2) { border-bottom: 1px solid #e1e9eb; }
  .section-head { align-items: start; flex-direction: column; gap: 3px; }
  .overnight-pair { grid-template-columns: 1fr; }
  .contract { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; }
  .contract.gain-direction { padding-left: 8px; }
  .contract .identity { grid-column: 1 / -1; }
  .flag { grid-template-columns: 1fr; padding: 12px; }
  .flag-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flag-actions { justify-content: space-between; flex-wrap: wrap; }
  .toolbar #status { width: 100%; }
}
@media (max-width: 440px) {
  .flag-facts { grid-template-columns: 1fr; }
  .flag-actions { align-items: stretch; }
  .quote-links { width: 100%; }
}
