/* OBOR homepage tool deck. Existing research instruments are not rebuilt or moved. */
.home-v3.obor-deck-ready #portfolio-main {
  min-height:calc(100svh - var(--obor-tool-header-height,70px) - 96px);
  display:block;
  width:100%;
  margin:0;
}
.home-v3.obor-deck-ready #portfolio-main > section[data-obor-section] {
  scroll-margin-top:calc(var(--obor-tool-header-height,70px) + 106px);
}
.home-v3.obor-deck-ready #portfolio-main > section[data-obor-section]:not(.obor-tool-active) {
  display:none!important;
}
.home-v3.obor-deck-ready #portfolio-main > section[data-obor-section].obor-tool-active {
  display:block!important;
}
.home-v3.obor-deck-ready #portfolio-main > section[data-obor-section] > .obor-module-tile {display:none!important}
/* Fixed tool order supersedes legacy panel rearrangement; research filter defaults remain available. */
.home-v3.obor-deck-ready #obor-customize-modules-heading,
.home-v3.obor-deck-ready #obor-customize-modules-heading + .obor-customize-help,
.home-v3.obor-deck-ready #obor-customize-list {display:none!important}
.obor-master-tools {
  --obor-arrow-shift:0px;
  position:sticky;
  top:var(--obor-tool-header-height,70px);
  z-index:28;
  display:grid;
  grid-template-columns:minmax(75px,1fr) minmax(0,520px) minmax(75px,1fr);
  align-items:stretch;
  gap:12px;
  min-height:96px;
  padding:8px max(18px,calc((100vw - 1420px)/2));
  box-sizing:border-box;
  border-block:1px solid rgba(216,231,236,.16);
  color:#eff6f7;
  background:#102d3d;
  box-shadow:0 7px 23px rgba(14,41,55,.12);
  font-family:Inter,ui-sans-serif,system-ui,sans-serif;
}
.obor-master-tools button {
  appearance:none;
  font:inherit;
  color:inherit;
  cursor:pointer;
  border:0;
}
.obor-master-arrow {
  display:flex;
  align-items:center;
  justify-content:flex-start;
  min-width:0;
  padding:7px 12px;
  border-radius:7px;
  background:transparent;
  transition:background-color .2s ease,opacity .2s ease;
}
.obor-master-arrow--next {justify-content:flex-end}
.obor-master-arrow:hover:not(:disabled),
.obor-master-arrow:focus-visible {background:rgba(225,242,246,.11)}
.obor-master-arrow:focus-visible {outline:2px solid #b6dce5;outline-offset:-3px}
.obor-master-arrow:disabled {opacity:.24;cursor:default}
.obor-master-arrow svg {width:47px;height:31px;fill:none;stroke:currentColor;stroke-width:1.45;stroke-linejoin:round;stroke-linecap:round;transition:transform .33s cubic-bezier(.2,.7,.2,1)}
.obor-master-arrow--previous svg {transform:translateX(calc(-1 * var(--obor-arrow-shift)))}
.obor-master-arrow--next svg {transform:translateX(var(--obor-arrow-shift))}
.obor-master-tools.is-scrolled {--obor-arrow-shift:14px}
.obor-master-center {display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;text-align:center;padding:7px 0}
.obor-master-overline {font-size:9px;font-weight:760;letter-spacing:.17em;color:#92b8c5;line-height:1.45}
.obor-master-title {font-size:clamp(18px,2.2vw,27px);font-weight:660;letter-spacing:-.034em;line-height:1.13;margin:4px 0 5px;text-wrap:balance}
.obor-master-subtitle {font-size:11px;color:#c1d2d8;line-height:1.35}
.obor-master-progress {display:flex;align-items:center;justify-content:center;gap:6px;margin-top:8px}
.obor-master-progress i {display:block;width:25px;height:2px;background:#537483;transition:background .25s,width .25s}
.obor-master-progress i.is-current {width:45px;background:#efbb91}
.obor-master-a11y {position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.home-v3.obor-deck-ready #obor-customize-dialog .obor-customize-lede {margin-bottom:15px}
.home-v3.obor-deck-ready #obor-customize-dialog .obor-customize-small {margin-top:15px}
@supports (view-transition-name:obor-tool-content) {
  .home-v3.obor-deck-ready #portfolio-main {view-transition-name:obor-tool-content}
  ::view-transition-old(obor-tool-content) {animation:obor-tool-out-left .28s cubic-bezier(.35,0,.5,1) both}
  ::view-transition-new(obor-tool-content) {animation:obor-tool-in-right .38s cubic-bezier(.2,.7,.2,1) both}
  html[data-obor-tool-direction="previous"]::view-transition-old(obor-tool-content) {animation-name:obor-tool-out-right}
  html[data-obor-tool-direction="previous"]::view-transition-new(obor-tool-content) {animation-name:obor-tool-in-left}
}
@keyframes obor-tool-out-left {to {opacity:.08;transform:translateX(-7%)}}
@keyframes obor-tool-in-right {from {opacity:.08;transform:translateX(8%)}}
@keyframes obor-tool-out-right {to {opacity:.08;transform:translateX(7%)}}
@keyframes obor-tool-in-left {from {opacity:.08;transform:translateX(-8%)}}
.home-v3.obor-deck-ready #portfolio-main.obor-deck-enter-forward {animation:obor-tool-in-right .38s cubic-bezier(.2,.7,.2,1)}
.home-v3.obor-deck-ready #portfolio-main.obor-deck-enter-previous {animation:obor-tool-in-left .38s cubic-bezier(.2,.7,.2,1)}
@media(max-width:700px) {
  .obor-master-tools {
    grid-template-columns:54px minmax(0,1fr) 54px;
    min-height:82px;
    gap:2px;
    padding:5px 8px;
  }
  .obor-master-arrow {padding:7px 4px}
  .obor-master-arrow svg {width:37px;height:26px}
  .obor-master-title {font-size:clamp(15px,4.4vw,20px)}
  .obor-master-overline {font-size:8px;letter-spacing:.12em}
  .obor-master-subtitle {font-size:10px}
  .obor-master-progress {margin-top:6px}
  .obor-master-progress i {width:17px}
  .obor-master-progress i.is-current {width:29px}
  .obor-master-tools.is-scrolled {--obor-arrow-shift:4px}
}
@media(prefers-reduced-motion:reduce) {
  .obor-master-tools *, .home-v3.obor-deck-ready #portfolio-main {animation:none!important;transition:none!important}
  ::view-transition-old(obor-tool-content),::view-transition-new(obor-tool-content) {animation:none!important}
}

/* Trade Flows is a full research tool; retain the standalone page's readable width. */
.home-v3.obor-deck-ready #portfolio-main > .obor-trade-flows-home.obor-tool-active{
  width:min(calc(100% - 36px),var(--max));
  max-width:var(--max);
  margin:0 auto;
  padding:clamp(12px,2vw,24px) 0 70px;
}
.home-v3.obor-deck-ready #portfolio-main > .obor-trade-flows-home .page-hero{margin-top:0}
.home-v3.obor-deck-ready #portfolio-main > .obor-trade-flows-home :is(#hs6-heading,#td-heading,#ti-heading,#trade-summary){
  scroll-margin-top:calc(var(--obor-tool-header-height,70px) + 118px);
}
@media(max-width:700px){
 .home-v3.obor-deck-ready #portfolio-main > .obor-trade-flows-home.obor-tool-active{
   width:min(calc(100% - 28px),var(--max));padding-bottom:40px;
 }
}

/* Tool 05 isolates the existing provincial research environment from
   Trade Evidence, which uses many of the same control and element IDs. */
.home-v3.obor-deck-ready #portfolio-main > .obor-provinces-home.obor-tool-active {
  display:block!important;width:100%;max-width:none;margin:0;padding:0 0 40px;
}
.obor-provinces-frame-shell{
  width:100%;margin:0 auto;max-width:var(--max);overflow:visible;
}
.obor-provinces-embed{
  display:block;width:100%;min-height:900px;height:1200px;border:0;
  background:transparent;overflow:hidden;
}
@media(max-width:700px){
  .obor-provinces-frame-shell{width:100%;max-width:100%}
  .obor-provinces-embed{min-height:700px}
}

/* Tool 06 uses the original standalone HS6 product instrument, moved rather
   than cloned, so its selectors, data checks, history and context stay intact. */
.home-v3.obor-deck-ready #portfolio-main > .obor-products-home.obor-tool-active{
  width:min(calc(100% - 36px),var(--max));
  max-width:var(--max);
  margin:0 auto;
  padding:clamp(12px,2vw,24px) 0 68px;
}
.home-v3.obor-deck-ready #portfolio-main > .obor-products-home .td-panel{margin:10px 0 0}
.home-v3.obor-deck-ready #portfolio-main > .obor-products-home #hs6-heading{
  scroll-margin-top:calc(var(--obor-tool-header-height,70px) + 118px);
}
.obor-products-route{
  display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;
  gap:8px 22px;padding:18px 22px;margin:22px 0;
  border:1px solid #d8e5e9;background:#f3f8fa;border-radius:9px;
  font-size:12px;color:#52707c;
}
.obor-products-route a{
  color:#1c5269;text-decoration:none;font-size:14px;
  display:inline-flex;align-items:center;gap:10px;
}
.obor-products-route a:hover{text-decoration:underline}
.obor-products-route a:focus-visible{outline:3px solid #b58a50;outline-offset:3px}
@media(max-width:700px){
 .home-v3.obor-deck-ready #portfolio-main > .obor-products-home.obor-tool-active{
   width:min(calc(100% - 28px),var(--max));padding-bottom:40px;
 }
 .obor-products-route{padding:14px}
}

/* Tool 07 retains the dedicated history research environment's original
   chart, year-month atlas and monthly evidence table inside the master deck. */
.home-v3.obor-deck-ready #portfolio-main > .obor-history-home.obor-tool-active{
  display:block!important;
  width:min(calc(100% - 36px),var(--max));
  max-width:var(--max);
  margin:0 auto;
  padding:0 0 72px;
}
.home-v3.obor-deck-ready #portfolio-main > .obor-history-home .history-hero{
  padding-top:clamp(16px,2.8vw,36px);
}
.home-v3.obor-deck-ready #portfolio-main > .obor-history-home :is(#history-series-title,#history-chart-container,#history-atlas){
  scroll-margin-top:calc(var(--obor-tool-header-height,70px) + 118px);
}
@media(max-width:700px){
  .home-v3.obor-deck-ready #portfolio-main > .obor-history-home.obor-tool-active{
    width:min(calc(100% - 28px),var(--max));
    padding-bottom:40px;
  }
}
