/*==============================================================================
statSCALAR -- Homepage "Agri, Food & Commodity Market Intelligence, in action"
Dark band: feature list (auto-cycling, clickable) on the left, a mock
statSCALAR window on the right where each feature plays a short preview.
Every class is sx- prefixed: all page stylesheets load on every route.
==============================================================================*/
.sx-band {
  --sx-ink: #0F172A; --sx-text: #475569; --sx-muted: #64748B; --sx-line: #E2E8F0; --sx-faint: #F1F5F9;
  --sx-band: #0B1526; --sx-band-2: #111F36; --sx-band-line: #1F2E48; --sx-band-text: #C9D3E0; --sx-band-muted: #8C9AB0;
  --sx-brand: #00A86B; --sx-brand-2: #1FC488; --sx-brand-soft: #E8F7F0; --sx-up: #0B8F5A; --sx-down: #D14343;
  background: radial-gradient(1200px 500px at 85% 10%, #13305A 0%, rgba(19,48,90,0) 60%), var(--sx-band);
  color: var(--sx-band-text); padding: 72px 20px 76px; font-family: Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.sx-band *, .sx-band *::before, .sx-band *::after { box-sizing: border-box; }
.sx-in { max-width: 1180px; margin: 0 auto; display: grid; gap: 34px; }
.sx-head { text-align: center; display: grid; gap: 10px; justify-items: center; }
.sx-kicker { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sx-brand-2); }
.sx-head h2 { margin: 0; color: #fff; font-size: clamp(24px, 3.4vw, 36px); font-weight: 800; letter-spacing: -.01em; text-wrap: balance; }
.sx-head p { margin: 0; max-width: 66ch; color: var(--sx-band-muted); line-height: 1.6; font-size: 15px; }
.sx-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; margin-top: 4px; font-size: 14px; color: var(--sx-band-muted); }
.sx-stats b { color: #fff; font-weight: 800; margin-right: 4px; }

.sx-grid { display: grid; grid-template-columns: minmax(250px, 330px) minmax(0, 1fr); gap: 34px; align-items: center; }
.sx-menu { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.sx-menu li { margin: 0; }
.sx-menu button { width: 100%; display: grid; grid-template-columns: 42px 1fr; gap: 14px; align-items: center; text-align: left; font: inherit; color: var(--sx-band-text); background: transparent; border: 1px solid transparent; border-radius: 14px; padding: 10px 14px 10px 10px; cursor: pointer; position: relative; overflow: hidden; }
.sx-menu button:hover { background: rgba(255,255,255,.04); }
.sx-menu button:focus-visible { outline: 2px solid var(--sx-brand-2); outline-offset: 2px; }
.sx-menu .sx-ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #16243C; color: #B8C4D6; }
.sx-menu .sx-ic svg { width: 20px; height: 20px; }
.sx-menu .sx-t { display: block; font-size: 16px; font-weight: 600; }
.sx-menu .sx-d { display: none; font-size: 12.5px; color: var(--sx-band-muted); margin-top: 3px; line-height: 1.45; }
.sx-menu button[aria-selected="true"] { background: var(--sx-band-2); border-color: var(--sx-band-line); color: #fff; }
.sx-menu button[aria-selected="true"] .sx-ic { background: var(--sx-brand); color: #fff; }
.sx-menu button[aria-selected="true"] .sx-d { display: block; }
.sx-menu .sx-bar { position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; }
.sx-menu button[aria-selected="true"] .sx-bar { background: rgba(255,255,255,.08); }
.sx-menu .sx-bar i { display: block; height: 100%; width: 0; background: var(--sx-brand-2); }

.sx-stage { position: relative; min-width: 0; }
.sx-win { background: #fff; border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.06); overflow: hidden; color: var(--sx-text); text-align: left; }
.sx-win-top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--sx-line); background: #FBFCFD; }
.sx-dots { display: flex; gap: 6px; } .sx-dots i { width: 10px; height: 10px; border-radius: 50%; background: #E2E8F0; }
.sx-logo { font-weight: 800; font-size: 15px; color: var(--sx-ink); } .sx-logo span { color: var(--sx-brand); }
.sx-crumb { font-size: 12px; color: var(--sx-muted); margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-scene { position: relative; height: 528px; padding: 20px 22px; overflow: hidden; font-size: 14px; }
.sx-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.sx-btn { font-weight: 700; font-size: 14px; border-radius: 10px; padding: 11px 20px; border: 1px solid var(--sx-brand); background: var(--sx-brand); color: #fff; text-decoration: none; }
.sx-btn:hover { color: #fff; filter: brightness(1.06); text-decoration: none; }
.sx-btn--ghost { background: transparent; border-color: #33476A; }

.sx-cursor { position: absolute; left: 0; top: 0; width: 22px; height: 22px; pointer-events: none; z-index: 20; opacity: 0; transition: transform .7s cubic-bezier(.4,.1,.2,1); filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); }
.sx-cursor.sx-click::after { content: ""; position: absolute; left: -9px; top: -9px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--sx-brand); animation: sx-ping .5s ease-out; }
@keyframes sx-ping { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }

/* shared in-window UI */
.sx-scene p { margin: 0; }
.sx-h { font-size: 15px; font-weight: 800; color: var(--sx-ink); margin: 0 0 2px !important; }
.sx-sub { font-size: 12px; color: var(--sx-muted); margin: 0 0 12px !important; }
.sx-seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--sx-faint); border-radius: 8px; }
.sx-seg span { font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 6px; color: var(--sx-muted); transition: all .25s; }
.sx-seg span.sx-on { background: #fff; color: var(--sx-ink); box-shadow: 0 1px 2px rgba(15,23,42,.12); }
.sx-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sx-between { justify-content: space-between; align-items: flex-start; }
.sx-fade { opacity: 0; transform: translateY(8px); transition: opacity .45s, transform .45s; }
.sx-fade.sx-in-view { opacity: 1; transform: none; }
.sx-pill { font-size: 11px; font-weight: 700; color: var(--sx-brand); background: var(--sx-brand-soft); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.sx-pill.sx-alt { color: #9A5B00; background: #FFF4E5; }
.sx-code { font: 600 11.5px/1 ui-monospace, Consolas, monospace; color: var(--sx-ink); background: var(--sx-faint); border: 1px solid var(--sx-line); border-radius: 6px; padding: 5px 7px; }
.sx-searchbox { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--sx-brand); border-radius: 12px; padding: 10px 12px; box-shadow: 0 0 0 4px rgba(0,168,107,.1); }
.sx-q { flex: 1; font-size: 15px; color: var(--sx-ink); min-height: 20px; }
.sx-q::after { content: ""; display: inline-block; width: 2px; height: 17px; background: var(--sx-brand); vertical-align: -3px; margin-left: 1px; animation: sx-blink 1s steps(1) infinite; }
@keyframes sx-blink { 50% { opacity: 0; } }
.sx-go { font-size: 12.5px; font-weight: 700; color: #fff; background: var(--sx-brand); border-radius: 8px; padding: 7px 14px; }
.sx-results { margin-top: 14px; display: grid; gap: 6px; }
.sx-res { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; gap: 12px; align-items: center; border: 1px solid var(--sx-line); border-radius: 10px; padding: 9px 12px; }
.sx-res .sx-n { font-size: 13.5px; font-weight: 700; color: var(--sx-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-res .sx-f { font-size: 12px; color: var(--sx-muted); white-space: nowrap; }
.sx-res mark { background: #FFF3BF; color: inherit; border-radius: 3px; padding: 0 1px; }
.sx-res.sx-hl { border-color: var(--sx-brand); background: #F6FCF9; }
.sx-chart svg { display: block; width: 100%; height: auto; }
.sx-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.sx-chip { border: 1px solid var(--sx-line); border-radius: 10px; padding: 8px 12px; font-size: 12px; color: var(--sx-muted); }
.sx-chip b { display: block; font-size: 16px; color: var(--sx-ink); margin-top: 2px; }
.sx-up { color: var(--sx-up); } .sx-dn { color: var(--sx-down); }
.sx-legend i { display: inline-block; width: 18px; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: 4px; }

/* intelligence types & sectors */
/* The intelligence types stay on one line: full names when they fit, short
   names ("Price") on narrower windows, and a sideways scroll on phones. */
.sx-scene { container: sx-scene / inline-size; }
.sx-cats { display: flex; gap: 5px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.sx-cats::-webkit-scrollbar { display: none; }
.sx-cat { flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--sx-text); border: 1px solid var(--sx-line); border-radius: 999px; padding: 6px 10px; transition: all .3s; white-space: nowrap; }
.sx-cat .sx-short { display: none; }
@container sx-scene (max-width: 750px) {
  .sx-cat .sx-full:not(:only-child) { display: none; }
  .sx-cat .sx-short { display: inline; }
}
@container sx-scene (max-width: 470px) {
  .sx-cats { gap: 4px; }
  .sx-cat { font-size: 11px; padding: 5px 8px; }
}
.sx-cat.sx-on { background: var(--sx-brand); border-color: var(--sx-brand); color: #fff; }
.sx-blurb { font-size: 12.5px; color: var(--sx-ink); margin: 9px 0 11px !important; min-height: 18px; }
.sx-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sx-tile { border: 1px solid var(--sx-line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 4px; align-content: start; background: #fff; transition: opacity .35s, border-color .35s, background .35s; min-width: 0; }
.sx-tile .sx-nm { font-size: 12.5px; font-weight: 800; color: var(--sx-ink); line-height: 1.3; }
.sx-tile .sx-ct { font-size: 11px; color: var(--sx-muted); line-height: 1.4; }
.sx-tile.sx-on { border-color: var(--sx-brand); background: #F6FCF9; } .sx-tile.sx-on .sx-nm { color: #0B7A55; }
.sx-tile.sx-off { opacity: .32; }
.sx-tile.sx-total { background: var(--sx-ink); border-color: var(--sx-ink); } .sx-tile.sx-total .sx-nm, .sx-tile.sx-total .sx-ct { color: #9FB0C8; font-weight: 600; }
.sx-tile .sx-big { font-size: 20px; font-weight: 800; color: #fff; line-height: 1.15; }
.sx-ex { margin-top: 12px; display: grid; gap: 5px; }
.sx-ex .sx-lbl { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sx-muted); }
.sx-ex .sx-it { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--sx-ink); font-weight: 600; min-width: 0; }
.sx-ex .sx-it span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-ex .sx-it .sx-sec { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--sx-muted); white-space: nowrap; }

/* report builder */
.sx-rb { display: grid; grid-template-columns: 128px minmax(0,1fr); gap: 14px; }
.sx-thumbs { display: grid; gap: 8px; align-content: start; }
.sx-thumb { border: 1.5px solid var(--sx-line); border-radius: 8px; height: 68px; padding: 6px; font-size: 9.5px; font-weight: 700; color: var(--sx-ink); background: #fff; display: grid; align-content: space-between; }
.sx-thumb.sx-on { border-color: var(--sx-brand); box-shadow: 0 0 0 3px rgba(0,168,107,.15); }
.sx-thumb.sx-cover { background: linear-gradient(135deg, #0B1526, #13305A); color: #fff; }
.sx-thumb small { font-weight: 500; color: var(--sx-muted); font-size: 9px; }
.sx-thumb.sx-cover small { color: #9FB0C8; }
.sx-slide { border: 1px solid var(--sx-line); border-radius: 10px; aspect-ratio: 16/9; max-height: 320px; position: relative; padding: 14px 16px; background: #fff; box-shadow: 0 8px 22px rgba(15,23,42,.08); }
.sx-slide .sx-st { font-size: 14px; font-weight: 800; color: var(--sx-ink); padding-right: 90px; }
.sx-slide .sx-ss { font-size: 10.5px; color: var(--sx-muted); }
.sx-slide .sx-lg { position: absolute; right: 12px; top: 10px; font-size: 10px; font-weight: 800; border: 1.5px dashed #CBD5E1; color: #94A3B8; border-radius: 6px; padding: 5px 8px; transition: all .4s; }
.sx-slide .sx-lg.sx-set { border-style: solid; border-color: #0B1526; background: #0B1526; color: #fff; }
.sx-slide .sx-take { position: absolute; left: 16px; right: 16px; bottom: 10px; font-size: 10.5px; background: var(--sx-brand-soft); color: #075E3E; border-radius: 6px; padding: 6px 8px; }
.sx-export { position: absolute; right: 22px; top: 18px; display: grid; gap: 4px; justify-items: end; }
.sx-eb { font-size: 12px; font-weight: 700; color: #fff; background: var(--sx-ink); border-radius: 8px; padding: 7px 12px; }
.sx-pop { background: #fff; border: 1px solid var(--sx-line); border-radius: 10px; box-shadow: 0 10px 30px rgba(15,23,42,.15); padding: 5px; display: grid; min-width: 170px; }
.sx-pop span { font-size: 12.5px; padding: 7px 10px; border-radius: 6px; color: var(--sx-ink); }
.sx-pop span.sx-hov { background: var(--sx-brand-soft); }
.sx-toast { position: absolute; left: 50%; bottom: 18px; transform: translate(-50%, 16px); opacity: 0; transition: all .4s; background: var(--sx-ink); color: #fff; font-size: 12.5px; font-weight: 600; border-radius: 10px; padding: 10px 14px; display: flex; gap: 8px; align-items: center; white-space: nowrap; z-index: 5; }
.sx-toast.sx-in-view { opacity: 1; transform: translate(-50%, 0); }
.sx-toast i { width: 18px; height: 18px; border-radius: 50%; background: var(--sx-brand); display: grid; place-items: center; font-style: normal; font-size: 11px; }

/* export dialog */
.sx-dlg { position: absolute; left: 50%; top: 50%; width: min(620px, calc(100% - 32px)); transform: translate(-50%, -46%) scale(.97); opacity: 0; transition: all .45s; display: grid; grid-template-columns: 1fr 1.15fr; border-radius: 14px; overflow: hidden; box-shadow: 0 24px 60px rgba(15,23,42,.35); z-index: 3; }
.sx-dlg.sx-in-view { opacity: 1; transform: translate(-50%, -50%); }
.sx-dlg .sx-l { background: linear-gradient(160deg, #00A86B, #0B7A55); color: #fff; padding: 18px; display: grid; gap: 10px; align-content: start; }
.sx-dlg .sx-l h3 { margin: 0; font-size: 18px; font-weight: 800; color: #fff; }
.sx-dlg .sx-lab { font-size: 11.5px; font-weight: 600; opacity: .9; }
.sx-inp { background: #fff; color: var(--sx-ink); border-radius: 8px; padding: 9px 10px; font-size: 12.5px; font-weight: 600; min-height: 36px; white-space: nowrap; overflow: hidden; }
.sx-fmt { display: flex; gap: 6px; }
.sx-fmt span { flex: 1; text-align: center; font-size: 12px; font-weight: 700; border: 1.5px solid rgba(255,255,255,.5); border-radius: 8px; padding: 7px 6px; }
.sx-fmt span.sx-on { background: #fff; color: #0B7A55; border-color: #fff; }
.sx-dlg .sx-r { background: #fff; padding: 18px; display: grid; gap: 9px; align-content: start; }
.sx-dlg .sx-r h4 { margin: 0 0 2px; font-size: 14px; color: var(--sx-ink); font-weight: 800; }
.sx-opt { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; font-size: 12.5px; color: var(--sx-ink); padding: 7px 8px; border-radius: 8px; transition: background .25s; }
.sx-opt small { display: block; color: var(--sx-muted); font-size: 11px; margin-top: 1px; }
.sx-rd { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #CBD5E1; margin-top: 1px; transition: all .25s; }
.sx-opt.sx-on { background: var(--sx-brand-soft); } .sx-opt.sx-on .sx-rd { border: 5px solid var(--sx-brand); }
.sx-dates { display: none; gap: 6px; padding-left: 34px; flex-wrap: wrap; }
.sx-dates.sx-in-view { display: flex; }
.sx-dates span { white-space: nowrap; font-size: 11.5px; font-weight: 600; border: 1px solid var(--sx-line); border-radius: 6px; padding: 5px 8px; color: var(--sx-ink); }
.sx-dl { margin-top: 6px; font-size: 13px; font-weight: 700; color: #fff; background: var(--sx-brand); border-radius: 9px; padding: 10px; text-align: center; position: relative; overflow: hidden; }
.sx-dl i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(255,255,255,.25); transition: width 1.1s ease; }
.sx-dl span { position: relative; }
.sx-ghost { opacity: .5; filter: blur(.4px); }
.sx-gt { display: grid; grid-template-columns: 1fr 1fr 1fr; font-size: 12px; border-bottom: 1px solid var(--sx-line); padding: 8px 4px; }
.sx-gt.sx-gh { font-weight: 700; color: var(--sx-ink); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }

/* updates */
.sx-upd { display: grid; gap: 7px; }
.sx-u { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--sx-line); border-radius: 10px; padding: 10px 12px; background: #fff; }
.sx-u .sx-n { font-size: 13.5px; font-weight: 700; color: var(--sx-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-u .sx-m { font-size: 11.5px; color: var(--sx-muted); margin-top: 2px; }
.sx-u .sx-when { font-size: 12px; color: var(--sx-muted); white-space: nowrap; text-align: right; }
.sx-u.sx-new { border-color: var(--sx-brand); background: #F6FCF9; }
.sx-badge { display: inline-block; font-size: 10.5px; font-weight: 800; color: #fff; background: var(--sx-brand); border-radius: 999px; padding: 2px 7px; margin-left: 6px; vertical-align: 1px; }

@media (max-width: 860px) {
  .sx-band { padding: 52px 16px 56px; }
  .sx-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .sx-menu { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .sx-menu li { flex: 0 0 auto; }
  .sx-menu button { grid-template-columns: 30px auto; gap: 8px; padding: 7px 12px 7px 7px; border-color: var(--sx-band-line); }
  .sx-menu .sx-ic { width: 30px; height: 30px; } .sx-menu .sx-ic svg { width: 16px; height: 16px; }
  .sx-menu .sx-t { font-size: 13.5px; white-space: nowrap; }
  .sx-menu button[aria-selected="true"] .sx-d { display: none; }
  .sx-scene { height: 420px; padding: 14px; }
  .sx-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; } .sx-tile { padding: 7px 8px; } .sx-tile .sx-nm { font-size: 11px; } .sx-tile .sx-ct { display: none; } .sx-tile .sx-big { font-size: 15px; }
  .sx-ex { display: none; }
  .sx-rb { grid-template-columns: minmax(0,1fr); } .sx-thumbs { grid-template-columns: repeat(4, 1fr); } .sx-thumb { height: 48px; }
  .sx-dlg { grid-template-columns: 1fr; } .sx-dlg .sx-l { gap: 6px; padding: 12px; } .sx-dlg .sx-r { padding: 12px; gap: 4px; }
  .sx-res { grid-template-columns: minmax(0,1fr) auto; } .sx-res .sx-code, .sx-res .sx-f { display: none; }
  .sx-export { right: 14px; top: 12px; }
}
@media (prefers-reduced-motion: reduce) { .sx-fade, .sx-dlg, .sx-toast, .sx-cursor { transition: none !important; } }
