/* TrustCome Financial Instruments — Clean Responsive Rebuild v3.0
   Rebuilt from the last known-good desktop source. No patch stacking. */
html.financial-instruments-active,
html.financial-instruments-active body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden !important;
  background: #02070b !important;
}
html.financial-instruments-active .app-shell,
html.financial-instruments-active .scene-root {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: hidden !important;
  background: #02070b !important;
}
html.financial-instruments-active .app-header { display: none !important; }

#scene-009,
#scene-009 * { box-sizing: border-box; }
#scene-009.tc-fi-locked {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  display: block !important;
  overflow: hidden !important;
  isolation: isolate;
  color: #f7f1df;
  background: #02070b;
  font-family: Arial, Helvetica, sans-serif;
}

#scene-009 .suite-return-command {
  position: absolute !important;
  z-index: 100;
  top: max(8px, env(safe-area-inset-top));
  left: max(8px, env(safe-area-inset-left));
  height: clamp(24px, 3.2vh, 34px);
  padding: 0 clamp(8px, 1vw, 14px);
  border: 1px solid rgba(220, 174, 70, .72);
  border-radius: 2px;
  background: rgba(3, 5, 7, .9);
  color: #e1c477;
  font: 600 clamp(7px, .62vw, 10px)/1 Arial, sans-serif;
  letter-spacing: .11em;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
}
#scene-009 .suite-return-command:hover,
#scene-009 .suite-return-command:focus-visible {
  outline: 1px solid rgba(255, 225, 150, .75);
  outline-offset: 2px;
}

/* One fluid application shell: every region participates in normal CSS Grid flow. */
#scene-009 .fi3-shell {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: clamp(3px, .35vw, 7px);
  display: grid;
  grid-template-rows: minmax(82px, 12.5%) minmax(58px, 8.5%) minmax(0, 1fr) minmax(54px, 8.5%) minmax(34px, 5.5%);
  gap: clamp(3px, .35vw, 7px);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0, rgba(176, 117, 24, .12), transparent 22%),
    #02070b;
}

#scene-009 .fi3-header,
#scene-009 .fi3-kpis,
#scene-009 .fi3-map,
#scene-009 .fi3-intel,
#scene-009 .fi3-health,
#scene-009 .fi3-nav,
#scene-009 .fi3-footer {
  min-width: 0;
  min-height: 0;
  border: 1px solid #8d5f16;
  background: linear-gradient(180deg, rgba(8, 15, 20, .98), rgba(2, 7, 11, .98));
  box-shadow: inset 0 0 28px rgba(0, 0, 0, .75);
}

/* Header */
#scene-009 .fi3-header {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(360px, 2.35fr) minmax(210px, 1fr);
  align-items: center;
  gap: clamp(8px, 1.1vw, 22px);
  padding: clamp(7px, .75vw, 14px) clamp(16px, 1.8vw, 30px);
  overflow: hidden;
}
#scene-009 .fi3-status {
  white-space: nowrap;
  font-size: clamp(8px, .72vw, 12px);
  line-height: 1.3;
  letter-spacing: .075em;
}
#scene-009 .fi3-status i {
  display: inline-block;
  width: clamp(6px, .55vw, 9px);
  aspect-ratio: 1;
  margin-right: clamp(6px, .65vw, 10px);
  border-radius: 50%;
  background: #2ee769;
  box-shadow: 0 0 10px #2ee769;
}
#scene-009 .fi3-brand {
  min-width: 0;
  text-align: center;
  overflow: hidden;
}
#scene-009 .fi3-brand > strong {
  display: block;
  margin: 0;
  color: #f3d17a;
  font: clamp(26px, 3vw, 48px)/.92 Georgia, serif;
  letter-spacing: .15em;
  text-shadow: 0 0 12px #8b5c16;
  white-space: nowrap;
}
#scene-009 .fi3-brand h1 {
  margin: clamp(3px, .45vh, 7px) 0 0;
  font: clamp(15px, 1.55vw, 25px)/1 Georgia, serif;
  letter-spacing: .19em;
  white-space: nowrap;
}
#scene-009 .fi3-brand small {
  display: block;
  margin-top: clamp(3px, .45vh, 6px);
  font-size: clamp(6px, .55vw, 9px);
  line-height: 1;
  letter-spacing: .24em;
  white-space: nowrap;
}
#scene-009 .fi3-clocks {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: clamp(10px, 1.3vw, 22px);
  text-align: center;
  white-space: nowrap;
}
#scene-009 .fi3-clocks > i {
  width: 1px;
  height: 60%;
  background: #8d5f16;
}
#scene-009 .fi3-clocks b,
#scene-009 .fi3-clocks span {
  display: block;
  color: #e8b84d;
  font-size: clamp(6px, .58vw, 10px);
}
#scene-009 .fi3-clocks strong {
  display: block;
  margin: 2px 0;
  font: clamp(15px, 1.65vw, 27px)/1.1 Georgia, serif;
}

/* KPI strip */
#scene-009 .fi3-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
}
#scene-009 .fi3-kpis article {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3px;
  border-right: 1px solid #66450f;
  text-align: center;
  overflow: hidden;
}
#scene-009 .fi3-kpis article:last-child { border-right: 0; }
#scene-009 .fi3-kpis span { font-size: clamp(6px, .6vw, 10.5px); white-space: nowrap; }
#scene-009 .fi3-kpis strong { margin: .2em 0; color: #e9b44b; font: clamp(18px, 1.9vw, 31px)/1 Georgia, serif; }
#scene-009 .fi3-kpis small { font-size: clamp(5px, .55vw, 10px); white-space: nowrap; }
#scene-009 .fi3-kpis b { color: #29df67; }
#scene-009 .fi3-kpis em { color: #ff6a24; font-style: normal; }

/* Central region */
#scene-009 .fi3-body {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 19.5%);
  gap: clamp(3px, .35vw, 7px);
  overflow: hidden;
}
#scene-009 .fi3-main {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 59%) minmax(0, 41%);
  overflow: hidden;
}
#scene-009 .fi3-map {
  position: relative;
  overflow: hidden;
}
#scene-009 .fi3-map-image {
  position: absolute;
  inset: 0 0 clamp(24px, 3.2vh, 34px);
  background: url('../images/room2-gold-network-map.jpg') center / 100% 100% no-repeat;
  filter: saturate(1.45) contrast(1.1) brightness(.98);
}
#scene-009 .fi3-map-image::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(2, 7, 11, .08), transparent 50%, rgba(2, 7, 11, .08));
}
#scene-009 .fi3-legend {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(24px, 3.2vh, 34px);
  display: flex;
  align-items: center;
  gap: clamp(5px, .65vw, 13px);
  padding: 0 clamp(7px, .8vw, 13px);
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid #6f4a12;
  background: rgba(2, 7, 11, .92);
  font-size: clamp(5px, .52vw, 10px);
}
#scene-009 .fi3-legend b { color: #d6b36a; }
#scene-009 .fi3-legend .c1 { color: #ca55ef; }
#scene-009 .fi3-legend .c2 { color: #4c8fff; }
#scene-009 .fi3-legend .c3 { color: #36d9de; }
#scene-009 .fi3-legend .c4 { color: #dfa13a; }
#scene-009 .fi3-legend .c5 { color: #a5cf39; }
#scene-009 .fi3-legend .c6 { color: #f2c34a; }

#scene-009 .fi3-cards {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(2px, .28vw, 5px);
  overflow: hidden;
}
#scene-009 .fi3-card {
  min-width: 0;
  min-height: 0;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 0 clamp(4px, .45vw, 9px);
  padding: clamp(6px, .65vw, 11px);
  border: 1px solid currentColor;
  background: linear-gradient(145deg, rgba(10, 18, 25, .96), rgba(4, 8, 12, .98));
  color: #c653e9;
  text-align: left;
  overflow: hidden;
  cursor: pointer;
}
#scene-009 .fi3-card.b { color: #4a8dff; }
#scene-009 .fi3-card.t { color: #38d5dc; }
#scene-009 .fi3-card.g { color: #d69a38; }
#scene-009 .fi3-card.l { color: #a4cc38; }
#scene-009 .fi3-card.c { color: #f0bd3e; }
#scene-009 .fi3-card:hover,
#scene-009 .fi3-card.is-selected { box-shadow: inset 0 0 22px color-mix(in srgb, currentColor 18%, transparent); }
#scene-009 .fi3-card .num { grid-column: 1; font: clamp(17px, 1.85vw, 32px)/1 Georgia, serif; }
#scene-009 .fi3-card .ico { grid-column: 2; justify-self: start; font-size: clamp(15px, 1.7vw, 30px); line-height: 1; }
#scene-009 .fi3-card h3 {
  grid-column: 1 / -1;
  align-self: center;
  margin: clamp(3px, .5vh, 8px) 0;
  color: currentColor;
  font: 700 clamp(7px, .72vw, 13.5px)/1.25 Georgia, serif;
  overflow-wrap: anywhere;
}
#scene-009 .fi3-card em {
  grid-column: 1 / -1;
  align-self: end;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-width: 0;
  padding: clamp(4px, .48vh, 8px) clamp(5px, .5vw, 9px);
  border: 1px solid currentColor;
  color: #f3f3f3;
  font: normal clamp(5px, .55vw, 10px)/1 Arial, sans-serif;
  white-space: nowrap;
}

/* Right intelligence rail */
#scene-009 .fi3-right {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 67%) minmax(0, 33%);
  gap: clamp(3px, .35vw, 7px);
  overflow: hidden;
}
#scene-009 .fi3-intel,
#scene-009 .fi3-health {
  min-width: 0;
  min-height: 0;
  padding: clamp(7px, .7vw, 13px);
  overflow: hidden;
}
#scene-009 .fi3-intel h2,
#scene-009 .fi3-health h2 {
  margin: 0 0 clamp(4px, .45vh, 8px);
  padding-bottom: clamp(4px, .45vh, 8px);
  border-bottom: 1px solid #6e4a12;
  color: #e7bd5e;
  font: clamp(9px, .9vw, 15px)/1 Georgia, serif;
  letter-spacing: .04em;
}
#scene-009 .fi3-intel > small { font-size: clamp(6px, .6vw, 11px); }
#scene-009 .fi3-selected {
  display: grid;
  grid-template-columns: clamp(20px, 2.2vw, 38px) minmax(0, 1fr) minmax(42px, 25%);
  align-items: center;
  gap: clamp(4px, .45vw, 8px);
  margin: clamp(4px, .55vh, 9px) 0;
}
#scene-009 .fi3-selected > span { font-size: clamp(18px, 2vw, 34px); }
#scene-009 .fi3-selected h3 { margin: 0; color: #ca55ef; font: clamp(9px, 1vw, 17px)/1.15 Georgia, serif; }
#scene-009 .fi3-selected b { padding: clamp(3px, .35vw, 6px); border: 1px solid #8d5f16; font-size: clamp(5px, .5vw, 9px); text-align: center; }
#scene-009 .fi3-intel > p {
  margin: clamp(4px, .55vh, 9px) 0;
  font-size: clamp(6px, .68vw, 12px);
  line-height: 1.42;
}
#scene-009 .fi3-intel dl {
  display: grid;
  grid-template-columns: 43% 57%;
  margin: 0;
  font-size: clamp(5px, .62vw, 11.5px);
  line-height: 1.28;
}
#scene-009 .fi3-intel dt,
#scene-009 .fi3-intel dd { margin: 0; padding: 1px 2px; min-width: 0; overflow-wrap: anywhere; }
#scene-009 .fi3-intel dd:first-of-type { color: #2ee769; }
#scene-009 .fi3-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3px, .4vw, 7px);
  margin-top: clamp(4px, .55vh, 9px);
}
#scene-009 .fi3-actions button {
  min-width: 0;
  padding: clamp(5px, .55vh, 9px) 3px;
  border: 1px solid #b653e8;
  background: rgba(2, 7, 11, .85);
  color: #f4f4f4;
  font-size: clamp(5px, .53vw, 9.5px);
  cursor: pointer;
}
#scene-009 .fi3-actions button:last-child { border-color: #d6a23c; }

#scene-009 .fi3-health {
  display: grid;
  grid-template-columns: minmax(64px, 42%) 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: center;
}
#scene-009 .fi3-health h2 { grid-column: 1 / -1; }
#scene-009 .fi3-health .ring {
  width: min(8vw, 9vh, 92px);
  min-width: 54px;
  aspect-ratio: 1;
  margin: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: clamp(5px, .55vw, 8px) solid #29d887;
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(41, 216, 135, .6), inset 0 0 14px rgba(41, 216, 135, .28);
}
#scene-009 .fi3-health .ring strong { font-size: clamp(11px, 1.25vw, 21px); }
#scene-009 .fi3-health .ring span { font-size: clamp(5px, .48vw, 8px); }
#scene-009 .fi3-health ul { margin: 0; padding-left: clamp(11px, 1.1vw, 18px); font-size: clamp(5px, .55vw, 10px); }
#scene-009 .fi3-health li { margin: .16em 0; }
#scene-009 .fi3-health small { display: block; font-size: clamp(4px, .45vw, 8px); color: #d4d4d4; }

/* Navigation and footer */
#scene-009 .fi3-nav {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  overflow: hidden;
}
#scene-009 .fi3-nav button {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1px;
  padding: 2px;
  border: 0;
  border-right: 1px solid #5b3d13;
  background: rgba(4, 10, 14, .96);
  color: #e8e2d4;
  overflow: hidden;
  cursor: pointer;
}
#scene-009 .fi3-nav button:last-child { border-right: 0; }
#scene-009 .fi3-nav button.active { background: linear-gradient(180deg, rgba(196, 138, 47, .75), rgba(93, 54, 11, .75)); }
#scene-009 .fi3-nav button.about { background: linear-gradient(180deg, rgba(10, 115, 135, .85), rgba(3, 45, 58, .9)); }
#scene-009 .fi3-nav button.private { background: linear-gradient(180deg, rgba(50, 74, 190, .9), rgba(18, 25, 76, .95)); }
#scene-009 .fi3-nav span { font-size: clamp(10px, 1.25vw, 22px); line-height: 1; color: #e9cf91; }
#scene-009 .fi3-nav b { max-width: 100%; font-size: clamp(4.8px, .54vw, 9.5px); line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#scene-009 .fi3-nav small { font-size: clamp(4px, .45vw, 8.5px); }

#scene-009 .fi3-footer {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(300px, 3fr) minmax(120px, 1fr);
  align-items: center;
  padding: 0 clamp(10px, 1.1vw, 18px);
  overflow: hidden;
}
#scene-009 .fi3-footer > strong { color: #e2be69; font-size: clamp(10px, 1.15vw, 19px); white-space: nowrap; }
#scene-009 .fi3-footer div { min-width: 0; text-align: center; }
#scene-009 .fi3-footer div b,
#scene-009 .fi3-footer div span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#scene-009 .fi3-footer div b { font-size: clamp(5px, .62vw, 12px); }
#scene-009 .fi3-footer div span { font-size: clamp(4px, .52vw, 10px); }
#scene-009 .fi3-footer em { text-align: right; font-size: clamp(4px, .5vw, 9px); font-style: normal; white-space: nowrap; }

/* Financial Instruments Responsive Rebuild v1.1 — compact layouts.
   Desktop and laptop rules above remain locked. Compact devices use true
   CSS reflow: no fixed 1600 × 900 canvas, no transform scaling and no clipping. */

@media (max-width: 1024px) {
  html.financial-instruments-active,
  html.financial-instruments-active body {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
    background: #02070b !important;
  }

  html.financial-instruments-active .app-shell,
  html.financial-instruments-active .scene-root {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100dvh !important;
    overflow: visible !important;
  }

  #scene-009.tc-fi-locked {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100dvh !important;
    overflow: visible !important;
  }

  #scene-009 .suite-return-command {
    position: sticky !important;
    top: max(6px, env(safe-area-inset-top)) !important;
    left: max(6px, env(safe-area-inset-left)) !important;
    float: left;
    margin: 6px 0 -36px 6px;
    height: 30px !important;
    font-size: 8px !important;
    z-index: 1000 !important;
  }

  #scene-009 .fi3-shell {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 100dvh !important;
    padding: 6px !important;
    display: grid !important;
    grid-template-rows: auto auto auto auto auto !important;
    gap: 6px !important;
    overflow: visible !important;
    transform: none !important;
  }

  #scene-009 .fi3-header {
    min-height: 126px;
    grid-template-columns: 1fr 1.8fr 1fr !important;
    gap: 8px !important;
    padding: 14px 12px 10px !important;
  }
  #scene-009 .fi3-brand > strong { font-size: clamp(26px, 5vw, 40px) !important; }
  #scene-009 .fi3-brand h1 { font-size: clamp(14px, 2.8vw, 23px) !important; }
  #scene-009 .fi3-brand small { font-size: clamp(6px, 1.1vw, 9px) !important; }
  #scene-009 .fi3-status { align-self: start; padding-top: 34px; font-size: clamp(8px, 1.35vw, 11px) !important; }
  #scene-009 .fi3-clocks { align-self: start; padding-top: 22px; gap: 8px !important; }
  #scene-009 .fi3-clocks strong { font-size: clamp(13px, 2.2vw, 21px) !important; }
  #scene-009 .fi3-clocks b,
  #scene-009 .fi3-clocks span { font-size: clamp(6px, 1vw, 9px) !important; }

  #scene-009 .fi3-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-rows: minmax(78px, auto);
  }
  #scene-009 .fi3-kpis article {
    border-right: 1px solid #66450f !important;
    border-bottom: 1px solid #66450f;
    padding: 8px 4px !important;
  }
  #scene-009 .fi3-kpis article:nth-child(3n) { border-right: 0 !important; }
  #scene-009 .fi3-kpis article:nth-last-child(-n+3) { border-bottom: 0; }
  #scene-009 .fi3-kpis span { font-size: clamp(8px, 1.5vw, 11px) !important; }
  #scene-009 .fi3-kpis strong { font-size: clamp(22px, 4vw, 31px) !important; }
  #scene-009 .fi3-kpis small { font-size: clamp(7px, 1.2vw, 10px) !important; }

  #scene-009 .fi3-body {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    overflow: visible !important;
  }
  #scene-009 .fi3-main {
    display: grid !important;
    grid-template-rows: auto auto !important;
    gap: 6px;
    overflow: visible !important;
  }
  #scene-009 .fi3-map {
    aspect-ratio: 16 / 6.2;
    min-height: 250px !important;
  }
  #scene-009 .fi3-map-image {
    inset: 0 0 32px !important;
    background-size: cover !important;
    background-position: center !important;
  }
  #scene-009 .fi3-legend {
    height: 32px !important;
    gap: 10px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none;
    font-size: 8px !important;
  }
  #scene-009 .fi3-legend::-webkit-scrollbar { display: none; }

  #scene-009 .fi3-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-rows: minmax(170px, auto);
    gap: 6px !important;
    overflow: visible !important;
  }
  #scene-009 .fi3-card {
    min-height: 170px !important;
    height: auto !important;
    padding: 12px !important;
  }
  #scene-009 .fi3-card .num { font-size: clamp(25px, 4vw, 32px) !important; }
  #scene-009 .fi3-card .ico { font-size: clamp(23px, 4vw, 31px) !important; }
  #scene-009 .fi3-card h3 { font-size: clamp(10px, 1.8vw, 14px) !important; min-height: 48px; }
  #scene-009 .fi3-card em { font-size: clamp(7px, 1.2vw, 10px) !important; padding: 8px !important; }

  #scene-009 .fi3-right {
    display: grid !important;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr) !important;
    grid-template-rows: auto !important;
    gap: 6px !important;
    overflow: visible !important;
  }
  #scene-009 .fi3-intel,
  #scene-009 .fi3-health {
    min-height: 330px !important;
    height: auto !important;
    overflow: visible !important;
    padding: 14px !important;
  }
  #scene-009 .fi3-intel h2,
  #scene-009 .fi3-health h2 { font-size: clamp(12px, 2vw, 16px) !important; }
  #scene-009 .fi3-intel > p { font-size: clamp(10px, 1.5vw, 12px) !important; }
  #scene-009 .fi3-intel dl { font-size: clamp(9px, 1.4vw, 11.5px) !important; }
  #scene-009 .fi3-health .ring { width: min(16vw, 110px) !important; }
  #scene-009 .fi3-health ul { font-size: clamp(8px, 1.3vw, 10px) !important; }

  #scene-009 .fi3-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    grid-auto-rows: minmax(66px, auto);
    overflow: visible !important;
  }
  #scene-009 .fi3-nav button {
    min-height: 66px !important;
    border-right: 1px solid #5b3d13 !important;
    border-bottom: 1px solid #5b3d13;
    padding: 6px 3px !important;
  }
  #scene-009 .fi3-nav button:nth-child(5n) { border-right: 0 !important; }
  #scene-009 .fi3-nav button:nth-last-child(-n+5) { border-bottom: 0; }
  #scene-009 .fi3-nav span { font-size: clamp(15px, 2.7vw, 22px) !important; }
  #scene-009 .fi3-nav b { font-size: clamp(7px, 1.25vw, 10px) !important; }
  #scene-009 .fi3-nav small { font-size: clamp(6px, 1vw, 8.5px) !important; }

  #scene-009 .fi3-footer {
    min-height: 72px;
    grid-template-columns: 1fr !important;
    gap: 5px !important;
    padding: 10px 12px !important;
    text-align: center !important;
  }
  #scene-009 .fi3-footer > strong,
  #scene-009 .fi3-footer em { text-align: center !important; }
  #scene-009 .fi3-footer > strong { font-size: 16px !important; }
  #scene-009 .fi3-footer div b { font-size: 10px !important; }
  #scene-009 .fi3-footer div span { font-size: 8px !important; }
  #scene-009 .fi3-footer em { font-size: 8px !important; }
}

/* Landscape phones: two-column card flow, compact but readable intelligence row. */
@media (max-width: 767px) and (orientation: landscape) {
  #scene-009 .fi3-shell { padding: 4px !important; gap: 4px !important; }
  #scene-009 .fi3-header {
    min-height: 108px;
    grid-template-columns: .9fr 1.7fr .9fr !important;
    padding: 10px 8px 8px !important;
  }
  #scene-009 .fi3-status { padding-top: 30px; }
  #scene-009 .fi3-clocks { padding-top: 20px; }
  #scene-009 .fi3-brand > strong { font-size: clamp(25px, 5vw, 34px) !important; }
  #scene-009 .fi3-brand h1 { font-size: clamp(13px, 2.5vw, 19px) !important; }
  #scene-009 .fi3-brand small { display: none; }

  #scene-009 .fi3-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-rows: 68px;
  }
  #scene-009 .fi3-kpis article { padding: 5px 3px !important; }
  #scene-009 .fi3-kpis span { font-size: 8px !important; }
  #scene-009 .fi3-kpis strong { font-size: 23px !important; }
  #scene-009 .fi3-kpis small { font-size: 7px !important; }

  #scene-009 .fi3-map {
    min-height: 220px !important;
    aspect-ratio: 16 / 5.3;
  }

  #scene-009 .fi3-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: minmax(142px, auto);
  }
  #scene-009 .fi3-card { min-height: 142px !important; padding: 10px !important; }
  #scene-009 .fi3-card h3 { min-height: 38px; font-size: 11px !important; }

  #scene-009 .fi3-right {
    grid-template-columns: minmax(0, 1.45fr) minmax(230px, .55fr) !important;
  }
  #scene-009 .fi3-intel,
  #scene-009 .fi3-health { min-height: 300px !important; padding: 12px !important; }

  #scene-009 .fi3-nav { grid-auto-rows: 58px; }
  #scene-009 .fi3-nav button { min-height: 58px !important; }
}

/* Portrait compact tablets: balanced 3×2 cards, intelligence and health side-by-side. */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  #scene-009 .fi3-map { min-height: 300px !important; aspect-ratio: 16 / 7; }
  #scene-009 .fi3-cards { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  #scene-009 .fi3-right { grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr) !important; }
}
@media (prefers-reduced-motion: reduce) {
  #scene-009 *, #scene-009 *::before, #scene-009 *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* Financial Instruments Responsive Rebuild v1.2 — Tablet Breakpoint Correction
   This final override intentionally targets compact tablets by viewport width,
   without relying on orientation detection. Desktop/laptop and phone rules remain unchanged. */
@media (min-width: 700px) and (max-width: 1100px) {
  html.financial-instruments-active,
  html.financial-instruments-active body {
    width: 100% !important;
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  html.financial-instruments-active .app-shell,
  html.financial-instruments-active .scene-root,
  #scene-009.tc-fi-locked {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100dvh !important;
    overflow: visible !important;
  }

  #scene-009 .fi3-shell {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100dvh !important;
    padding: 8px !important;
    gap: 8px !important;
    grid-template-rows: auto auto auto auto auto !important;
    overflow: visible !important;
    transform: none !important;
  }

  #scene-009 .fi3-header {
    min-height: 138px !important;
    grid-template-columns: minmax(125px, .9fr) minmax(320px, 2fr) minmax(185px, 1fr) !important;
    padding: 18px 16px 12px !important;
  }
  #scene-009 .fi3-brand > strong { font-size: clamp(32px, 5.3vw, 48px) !important; }
  #scene-009 .fi3-brand h1 { font-size: clamp(17px, 2.8vw, 25px) !important; }
  #scene-009 .fi3-brand small { font-size: clamp(7px, 1.15vw, 10px) !important; }

  #scene-009 .fi3-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-rows: minmax(86px, auto) !important;
  }

  #scene-009 .fi3-body {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-flow: row !important;
    gap: 8px !important;
    overflow: visible !important;
  }

  #scene-009 .fi3-main {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    gap: 8px !important;
    overflow: visible !important;
  }

  #scene-009 .fi3-map {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 16 / 7.4 !important;
    overflow: hidden !important;
  }
  #scene-009 .fi3-map-image {
    display: block !important;
    position: absolute !important;
    inset: 0 0 34px !important;
    width: auto !important;
    height: auto !important;
    background-size: cover !important;
    background-position: center center !important;
  }
  #scene-009 .fi3-legend {
    display: flex !important;
    height: 34px !important;
    overflow-x: auto !important;
  }

  #scene-009 .fi3-cards {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(176px, auto)) !important;
    grid-auto-flow: row !important;
    gap: 8px !important;
    overflow: visible !important;
  }
  #scene-009 .fi3-card {
    min-height: 176px !important;
    height: auto !important;
    padding: 13px !important;
  }

  #scene-009 .fi3-right {
    display: grid !important;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr) !important;
    grid-template-rows: auto !important;
    gap: 8px !important;
    overflow: visible !important;
  }
  #scene-009 .fi3-intel,
  #scene-009 .fi3-health {
    display: grid !important;
    min-height: 360px !important;
    height: auto !important;
    overflow: visible !important;
  }

  #scene-009 .fi3-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(72px, auto)) !important;
    overflow: visible !important;
  }

  #scene-009 .fi3-footer {
    min-height: 76px !important;
    grid-template-columns: 1fr !important;
    padding: 10px 14px !important;
    text-align: center !important;
  }
}

/* Financial Instruments Responsive Rebuild v1.3 — Tablet Layout Isolation
   Tablet-only rules. Desktop/laptop and the approved mobile rules are untouched.
   The min-height condition prevents landscape phones from entering this layout. */
@media (min-width: 700px) and (max-width: 1100px) and (min-height: 700px) {
  html.financial-instruments-active,
  html.financial-instruments-active body {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  html.financial-instruments-active .app-shell,
  html.financial-instruments-active .scene-root,
  #scene-009.tc-fi-locked {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  #scene-009 .fi3-shell {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    overflow: visible !important;
    transform: none !important;
  }

  #scene-009 .suite-return-command {
    position: sticky !important;
    top: max(8px, env(safe-area-inset-top)) !important;
    left: 8px !important;
    float: none !important;
    align-self: flex-start !important;
    margin: 0 0 -42px 8px !important;
    z-index: 1000 !important;
  }

  #scene-009 .fi3-header {
    position: relative !important;
    width: 100% !important;
    min-height: 150px !important;
    height: auto !important;
    display: grid !important;
    grid-template-columns: minmax(130px, .85fr) minmax(330px, 2fr) minmax(190px, 1fr) !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 20px 16px 14px !important;
    overflow: hidden !important;
  }
  #scene-009 .fi3-status { padding-top: 24px !important; }
  #scene-009 .fi3-clocks { padding-top: 16px !important; }
  #scene-009 .fi3-brand > strong { font-size: clamp(34px, 5.2vw, 50px) !important; }
  #scene-009 .fi3-brand h1 { font-size: clamp(18px, 2.7vw, 26px) !important; }
  #scene-009 .fi3-brand small { font-size: clamp(7px, 1.05vw, 10px) !important; }

  #scene-009 .fi3-kpis {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(96px, auto)) !important;
    overflow: hidden !important;
  }
  #scene-009 .fi3-kpis article {
    min-height: 96px !important;
    padding: 10px 5px !important;
  }

  #scene-009 .fi3-body {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    overflow: visible !important;
  }

  #scene-009 .fi3-main {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    overflow: visible !important;
  }

  #scene-009 .fi3-map {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 16 / 7.2 !important;
    overflow: hidden !important;
  }
  #scene-009 .fi3-map-image {
    position: absolute !important;
    inset: 0 0 36px !important;
    width: auto !important;
    height: auto !important;
    background-size: cover !important;
    background-position: center center !important;
  }
  #scene-009 .fi3-legend {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 36px !important;
    display: flex !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  #scene-009 .fi3-cards {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: none !important;
    grid-auto-rows: minmax(190px, auto) !important;
    grid-auto-flow: row !important;
    gap: 8px !important;
    overflow: visible !important;
  }
  #scene-009 .fi3-card {
    position: relative !important;
    min-height: 190px !important;
    height: auto !important;
    padding: 14px !important;
    overflow: hidden !important;
  }
  #scene-009 .fi3-card h3 {
    min-height: 58px !important;
    font-size: clamp(12px, 1.8vw, 16px) !important;
  }
  #scene-009 .fi3-card em { font-size: clamp(8px, 1.15vw, 11px) !important; }

  #scene-009 .fi3-right {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr) !important;
    grid-template-rows: auto !important;
    align-items: stretch !important;
    gap: 8px !important;
    overflow: visible !important;
  }
  #scene-009 .fi3-intel,
  #scene-009 .fi3-health {
    position: relative !important;
    width: auto !important;
    height: auto !important;
    min-height: 390px !important;
    max-height: none !important;
    padding: 16px !important;
    overflow: hidden !important;
  }
  #scene-009 .fi3-intel {
    display: block !important;
  }
  #scene-009 .fi3-intel h2,
  #scene-009 .fi3-health h2 { font-size: clamp(16px, 2.2vw, 21px) !important; }
  #scene-009 .fi3-intel > p { font-size: clamp(12px, 1.55vw, 15px) !important; }
  #scene-009 .fi3-intel dl { font-size: clamp(11px, 1.45vw, 14px) !important; }
  #scene-009 .fi3-selected {
    grid-template-columns: 44px minmax(0, 1fr) minmax(110px, 24%) !important;
  }
  #scene-009 .fi3-actions { margin-top: 12px !important; }

  #scene-009 .fi3-health {
    display: grid !important;
    grid-template-columns: minmax(120px, 44%) minmax(0, 1fr) !important;
    grid-template-rows: auto 1fr !important;
    align-items: center !important;
  }
  #scene-009 .fi3-health .ring {
    width: min(18vw, 145px) !important;
    min-width: 105px !important;
  }
  #scene-009 .fi3-health ul { font-size: clamp(10px, 1.3vw, 13px) !important; }

  #scene-009 .fi3-nav {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    grid-template-rows: none !important;
    grid-auto-rows: minmax(82px, auto) !important;
    overflow: hidden !important;
  }
  #scene-009 .fi3-nav button {
    min-height: 82px !important;
    border-right: 1px solid #5b3d13 !important;
    border-bottom: 1px solid #5b3d13 !important;
  }
  #scene-009 .fi3-nav button:nth-child(5n) { border-right: 0 !important; }
  #scene-009 .fi3-nav button:nth-child(n+6) { border-bottom: 0 !important; }

  #scene-009 .fi3-footer {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 92px !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    padding: 14px !important;
    text-align: center !important;
    overflow: hidden !important;
  }
  #scene-009 .fi3-footer > strong,
  #scene-009 .fi3-footer em { text-align: center !important; }
}
