/* ═══════════════════════════════════════════════════════════════════════════════
   TRADEFINANCEAI — HOMEPAGE REDESIGN
   Approved reference: black-and-charcoal surfaces, gold accents, global trade imagery.

   SCOPE
   -----
   Every section selector is new and prefixed `.th-*`, or scoped to #TFA_HOME /
   #TFA_FOOTER. The few rules that reach existing elements are in the VIEWS and
   HEADER blocks and are documented there: which view shows #CONTENT / #FOOT /
   #TFS, and which assistant-only header chips are tucked away outside the
   assistant. Loaded after experience.css, so it is the last word on both.

   The page is dark-only, exactly as the root document has always been; the
   LC Drafting Studio and Match Deal Pro applications keep their own themes.
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────────────────────────────────────
   VIEWS — html[data-th-view] = home (default, also when absent) | assistant | solutions
   The default (attribute absent) is the homepage, so a controller failure lands on
   the homepage with the chat hidden — and experience.js's fallback scroll targets
   still exist in the DOM.
   ─────────────────────────────────────────────────────────────────────────────── */
html:not([data-th-view='assistant']) #CONTENT,
html:not([data-th-view='assistant']) #FOOT { display: none !important; }
html:not([data-th-view='solutions']) #TFS { display: none !important; }
html[data-th-view='assistant'] #TFA_HOME,
html[data-th-view='assistant'] #TFA_FOOTER,
html[data-th-view='solutions'] #TFA_HOME { display: none !important; }
/* #APP holds only the header in the Solutions view; without this its 100vh floor
   would put an empty screen above the portal. */
html[data-th-view='solutions'] #APP { min-height: 0; }
html[data-th-view='solutions'] #TFS { padding-top: clamp(40px, 6vw, 72px); }

/* ───────────────────────────────────────────────────────────────────────────────
   HEADER
   QUICK (AI level), New chat and the API status chip describe the chat, so they
   appear in the assistant view; everywhere else the header carries the approved
   navigation, the Match Deal Pro menu, AI credits, Upgrade and the account controls.
   `Get Started` is added by home.js beside Sign In and shows only when signed out.
   ─────────────────────────────────────────────────────────────────────────────── */
html:not([data-th-view='assistant']) #TB .tb-new,
html:not([data-th-view='assistant']) #TB #TB_MODE,
html:not([data-th-view='assistant']) #TB .api-badge { display: none; }

.th-getstarted {
  padding: 7px 18px; border: 0; border-radius: 100px; cursor: pointer; white-space: nowrap;
  background: linear-gradient(135deg, #D4A832, #F0CC5A); color: #0A0B0F;
  font: 700 12.5px/1.2 'Inter', system-ui, sans-serif; letter-spacing: -.1px;
  transition: transform 190ms cubic-bezier(.16,1,.3,1), box-shadow 190ms;
}
.th-getstarted:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(212,168,50,.35); }
.th-getstarted:focus-visible { outline: 2px solid #F0CC5A; outline-offset: 2px; }
html[data-tfa-auth='in'] .th-getstarted { display: none; }
@media (max-width: 560px) { .th-getstarted { display: none; } }

/* ═══════════════════════════════════════════════════════════════════════════════
   TOKENS & PRIMITIVES
   ═══════════════════════════════════════════════════════════════════════════════ */
#TFA_HOME, #TFA_FOOTER {
  --th-max: 1240px;
  --th-gut: clamp(18px, 4vw, 40px);
  --th-card: linear-gradient(180deg, rgba(24,25,30,.92), rgba(15,16,20,.92));
  --th-card-2: #121318;
  --th-bd: rgba(255,255,255,.085);
  --th-bd-2: rgba(255,255,255,.15);
  --th-gold: #D4A832;
  --th-gold-2: #F0CC5A;
  --th-gold-bd: rgba(212,168,50,.38);
  --th-gold-soft: rgba(212,168,50,.10);
  --th-text: #F4F1EA;
  --th-text-2: rgba(244,241,234,.70);
  --th-text-3: rgba(244,241,234,.48);
  --th-sans: 'Geist', 'Inter', system-ui, sans-serif;
  --th-mono: 'JetBrains Mono', ui-monospace, monospace;
  --th-ease: cubic-bezier(.16,1,.3,1);
}
#TFA_HOME [hidden], #TFA_FOOTER [hidden] { display: none !important; }

.th-wrap { max-width: var(--th-max); margin: 0 auto; padding: 0 var(--th-gut); width: 100%; }

.th-eyebrow {
  display: flex; align-items: center; gap: 14px; margin: 0 0 14px;
  font: 700 10.5px/1 var(--th-mono); letter-spacing: .32em; text-transform: uppercase; color: var(--th-gold);
}
.th-eyebrow--line::after,
.th-eyebrow--both::before, .th-eyebrow--both::after {
  content: ''; width: 26px; height: 1px; background: currentColor; opacity: .8;
}
.th-eyebrow--both { justify-content: center; }

.th-h2 {
  margin: 0; font: 700 clamp(23px, 2.6vw, 31px)/1.15 var(--th-sans);
  letter-spacing: -.025em; color: #FFF; text-align: center;
}
.th-head { text-align: center; margin-bottom: clamp(22px, 3vw, 30px); }
.th-head--tight { margin-bottom: 16px; }
.th-head--tight .th-eyebrow { margin: 0; }

.th-sec { position: relative; padding: clamp(34px, 4.4vw, 46px) 0 0; }

/* Icon badge: gold line icon in a dark circle with a gold ring. */
.th-ic {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--th-gold-2);
  background: radial-gradient(circle at 35% 30%, rgba(212,168,50,.16), rgba(212,168,50,.03) 70%);
  border: 1px solid var(--th-gold-bd);
}
.th-ic svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.th-ic--lg { width: 50px; height: 50px; }
.th-ic--lg svg { width: 22px; height: 22px; }
.th-ic--ring {
  width: 56px; height: 56px;
  background: radial-gradient(circle at 50% 35%, rgba(212,168,50,.18), rgba(10,11,14,.9) 72%);
  border: 1.5px solid rgba(212,168,50,.55);
  box-shadow: 0 0 0 4px rgba(212,168,50,.05), 0 0 22px rgba(212,168,50,.12);
}
.th-ic--ring svg { width: 24px; height: 24px; }

.th-soon {
  display: inline-flex; align-items: center; vertical-align: middle; margin-inline-start: 8px;
  padding: 3px 8px; border-radius: 100px; white-space: nowrap;
  font: 800 9px/1.2 var(--th-sans); letter-spacing: .08em; text-transform: uppercase;
  color: #F0CC5A; background: rgba(212,168,50,.12); border: 1px solid rgba(212,168,50,.55);
}

/* Buttons */
.th-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.th-cta--center { justify-content: center; }
.th-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 24px; border-radius: 7px; cursor: pointer; text-decoration: none;
  font: 700 14px/1 var(--th-sans); letter-spacing: -.005em; white-space: nowrap;
  color: #0B0C10; background: linear-gradient(135deg, #D9AE3A 0%, #F2CF63 55%, #D9AE3A 100%);
  border: 1px solid rgba(240,204,90,.6);
  box-shadow: 0 6px 22px rgba(212,168,50,.18);
  transition: transform 200ms var(--th-ease), box-shadow 200ms var(--th-ease), background 200ms;
}
.th-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(212,168,50,.32); }
.th-btn--ghost {
  color: #FFF; background: rgba(255,255,255,.02); border-color: rgba(255,255,255,.55); box-shadow: none;
}
.th-btn--ghost:hover { background: rgba(255,255,255,.06); border-color: #FFF; box-shadow: none; }
.th-btn--ghost svg { color: var(--th-gold-2); }
.th-btn--sm { min-height: 40px; padding: 0 20px; font-size: 13px; }
.th-btn:focus-visible, .th-task:focus-visible, .th-step:focus-visible, .th-rule:focus-visible,
#TFA_FOOTER a:focus-visible, #TFA_FOOTER button:focus-visible {
  outline: 2px solid var(--th-gold-2); outline-offset: 3px;
}

/* Signed-in / signed-out swaps (independent of experience.js's .tfa-public). */
.th-in, .th-in-inline { display: none; }
html[data-tfa-auth='in'] .th-out, html[data-tfa-auth='in'] .th-out-inline { display: none; }
html[data-tfa-auth='in'] .th-in { display: block; }
html[data-tfa-auth='in'] .th-in-inline { display: inline-flex; }

/* ═══════════════════════════════════════════════════════════════════════════════
   B · HERO
   ═══════════════════════════════════════════════════════════════════════════════ */
.th-hero {
  position: relative; overflow: hidden;
  padding: clamp(36px, 5vw, 56px) 0 clamp(34px, 4.5vw, 50px);
  background:
    radial-gradient(60% 90% at 78% 40%, rgba(212,168,50,.14), transparent 70%),
    linear-gradient(180deg, #0A0A0C 0%, #07080A 100%);
  border-bottom: 1px solid transparent;
}
/* The thin gold horizon under the hero, brightest beneath the globe. */
.th-hero::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(212,168,50,.25) 25%, rgba(240,204,90,.9) 62%, rgba(212,168,50,.25) 90%, transparent 100%);
  box-shadow: 0 0 18px rgba(240,204,90,.5);
}
.th-hero-grid {
  position: relative; display: grid; align-items: center;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, .78fr); gap: clamp(16px, 2.5vw, 32px);
}
.th-hero-copy { position: relative; z-index: 1; padding-inline-start: clamp(0px, 3vw, 44px); }
.th-h1 {
  margin: 0; font: 800 clamp(32px, 3.9vw, 50px)/1.08 var(--th-sans);
  letter-spacing: -.035em; color: #FFF;
}
.th-h1 span {
  background: linear-gradient(92deg, #E2B640 0%, #F6D46A 45%, #D9A92E 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: #F0CC5A;
}
.th-lede {
  margin: 20px 0 0; max-width: 560px;
  font: 400 clamp(14px, 1.2vw, 15.5px)/1.62 var(--th-sans); color: var(--th-text-2);
}
.th-lede strong { color: #FFF; font-weight: 650; font-size: 1.1em; }
.th-hero-vis { position: relative; display: flex; justify-content: center; }
.th-hero-vis img {
  display: block; width: 112%; max-width: 540px; height: auto;
  /* The render sits on black; screen blending dissolves its edge into the hero. */
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(closest-side, #000 78%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 78%, transparent 100%);
  animation: th-float 9s ease-in-out infinite;
}
@keyframes th-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ── Hero · scale, margins and the golden Earth ─────────────────────────────────
   Composition: 55 / 45, inside a container with generous, balanced side margins —
   clamp(24px, 6.5vw, 128px) each side and a 1560px cap — so nothing runs toward
   the screen edges (≈94px a side at 1440, 180px at 1920). The headline scales with
   the viewport and keeps its two approved lines: 3.75vw is the largest size at
   which "The Operating System for" fits one line of the 55% column; it reaches
   68px on large screens.

   Globe: a transparent still (alpha extracted from the render, colour
   un-premultiplied, corners exactly 0) — no canvas, no blend mode, no rectangle.
   The image, the atmosphere and the route SVG share ONE grid cell and one size
   rule, so the routes stay on their cities at every width. Sphere ≈79% of the box:
   ≈570px at 1920, ≈470px at 1440, ≈420px at 1280. */
.th-hero { padding: clamp(34px, 3.8vw, 60px) 0 clamp(34px, 3.6vw, 56px); }
.th-hero > .th-wrap { max-width: 1560px; width: calc(100% - 2 * clamp(24px, 6.5vw, 128px)); padding: 0; }
.th-hero-grid { grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); gap: clamp(16px, 2.6vw, 56px); }
.th-hero-copy { padding-inline-start: 0; }
.th-hero .th-eyebrow { font-size: clamp(10.5px, .72vw, 12.5px); margin-bottom: clamp(14px, 1.3vw, 22px); }
.th-hero .th-eyebrow--line::after { width: clamp(26px, 2vw, 38px); }
.th-h1 { font-size: clamp(34px, 3.75vw, 68px); line-height: 1.05; letter-spacing: -.036em; }
.th-lede { max-width: 33em; margin-top: clamp(18px, 1.5vw, 28px); font-size: clamp(14.5px, 1.08vw, 19px); line-height: 1.62; }
.th-hero .th-cta { margin-top: clamp(24px, 2.2vw, 38px); gap: clamp(12px, 1vw, 16px); }
.th-hero .th-btn { min-height: clamp(46px, 3.2vw, 58px); padding: 0 clamp(22px, 1.9vw, 34px); font-size: clamp(14px, 1vw, 16.5px); border-radius: 8px; }
.th-hero .th-btn svg { width: clamp(15px, 1.05vw, 18px); height: auto; }

.th-hero-vis { display: grid; grid-template-columns: 100%; place-items: center; }
.th-hero-vis > * {
  grid-area: 1 / 1; display: block;
  width: min(106%, 84vh, 720px); height: auto; aspect-ratio: 1 / 1;
  margin-block: -10%;
}
.th-earth-pic { display: contents; }
.th-hero-vis .th-globe-still { grid-area: 1 / 1; display: block; width: min(106%, 84vh, 720px); height: auto; aspect-ratio: 1 / 1; margin-block: -10%; }
/* Override the original still's screen blend, mask and float: this image carries
   its own transparency, and the globe does not move. */
.th-hero-vis .th-globe-still { mix-blend-mode: normal; -webkit-mask-image: none; mask-image: none; animation: none; max-width: none; }

/* Atmosphere: a warm halo hugging the limb, breathing between two close
   brightnesses over 11 s — opacity only, on the compositor. */
.th-atmo {
  position: relative; z-index: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(0,0,0,0) 70%, rgba(236,186,84,.20) 78%, rgba(212,160,60,.08) 88%, rgba(212,160,60,0) 100%);
  opacity: .75; animation: th-atmo 11s ease-in-out infinite;
}
@keyframes th-atmo { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }

/* Routes: fine hairlines; a short glow travels along four of them in turn. */
.th-routes { position: relative; z-index: 2; overflow: visible; pointer-events: none; }
.th-routes .rs { fill: none; stroke: rgba(30, 18, 4, .38); stroke-width: 3.6; stroke-linecap: round; }
.th-routes .rt { fill: none; stroke: url(#thRtG); stroke-width: 1.4; stroke-linecap: round; opacity: .85; }
.th-routes .lt {
  fill: none; stroke: #FFF6DC; stroke-width: 2.6; stroke-linecap: round;
  stroke-dasharray: 13 100; stroke-dashoffset: 113; opacity: 0;
  animation: th-light var(--t, 7s) cubic-bezier(.45, 0, .25, 1) var(--d, 0s) infinite;
}
/* Travel during the first 60% of each cycle, fading in and out; then rest. */
.th-routes .lt.lg { stroke: #FFD978; stroke-width: 8; mix-blend-mode: screen; animation-name: th-light-glow; }
@keyframes th-light-glow {
  0%   { stroke-dashoffset: 113; opacity: 0; }
  8%   { opacity: .32; }
  52%  { opacity: .32; }
  60%  { stroke-dashoffset: 0; opacity: 0; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes th-light {
  0%   { stroke-dashoffset: 113; opacity: 0; }
  8%   { opacity: .95; }
  52%  { opacity: .95; }
  60%  { stroke-dashoffset: 0; opacity: 0; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
.th-routes .hh { fill: rgba(255, 226, 150, .28); stroke: rgba(255, 236, 190, .55); stroke-width: .8; }
.th-routes .hc { fill: #FFF8E6; stroke: rgba(40, 24, 4, .5); stroke-width: .8; }
.th-routes .hb { animation: th-hub 6s ease-in-out var(--d, 0s) infinite; }
@keyframes th-hub { 0%, 100% { opacity: .72; } 50% { opacity: 1; } }

@media (max-width: 820px) {
  .th-hero > .th-wrap { width: 100%; padding: 0 var(--th-gut); }
  .th-hero-vis > *, .th-hero-vis .th-globe-still { width: min(92vw, 460px); margin-block: -6% -8%; }
}
@media (prefers-reduced-motion: reduce) {
  .th-atmo, .th-routes .hb { animation: none; opacity: .9; }
  .th-routes .lt, .th-routes .lt.lg { animation: none; opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   C · START HERE
   ═══════════════════════════════════════════════════════════════════════════════ */
.th-start-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.th-task {
  position: relative; display: flex; gap: 16px; align-items: flex-start;
  min-height: 112px; padding: 20px 22px; border-radius: 10px; text-decoration: none; color: inherit;
  background: var(--th-card); border: 1px solid var(--th-bd);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
  transition: border-color 220ms var(--th-ease), transform 220ms var(--th-ease), box-shadow 220ms var(--th-ease);
}
a.th-task:hover {
  border-color: var(--th-gold-bd); transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0,0,0,.45), 0 0 0 1px rgba(212,168,50,.08), inset 0 1px 0 rgba(240,204,90,.08);
}
.th-task-tx { display: flex; flex-direction: column; min-width: 0; }
.th-task b { font: 700 16.5px/1.25 var(--th-sans); letter-spacing: -.015em; color: #FFF; }
.th-task i { margin-top: 7px; font: 400 13px/1.5 var(--th-sans); font-style: normal; color: var(--th-text-2); }
.th-go {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 11px;
  font: 700 13px/1 var(--th-sans); font-style: normal; color: var(--th-gold-2);
}
.th-go::after { content: '\2192'; transition: transform 200ms var(--th-ease); }
a.th-task:hover .th-go::after { transform: translateX(3px); }
/* experience.css dims every aria-disabled node in #TFA_HOME to .45; the approved
   reference shows COMING SOON items legible and quietly muted, so they set their own. */
#TFA_HOME .th-task.is-soon, #TFA_HOME .th-step.is-soon { opacity: 1; }
.th-task.is-soon { cursor: not-allowed; background: linear-gradient(180deg, rgba(30,31,36,.9), rgba(20,21,25,.9)); }
.th-task.is-soon b { color: rgba(255,255,255,.92); }
.th-task.is-soon i { color: rgba(244,241,234,.55); }

/* The workspace's own launcher repeats Start Here's six actions for signed-in
   customers; Start Here is the one that stays. */
#TFA_WORK .tfa-panel:has(> .tfa-panel-bd > .tfa-launch-grid--six) { display: none; }
html[data-tfa-auth='in'] #TFA_WORK { padding-top: clamp(28px, 3.6vw, 40px); }

/* ═══════════════════════════════════════════════════════════════════════════════
   D · FLAGSHIP PRODUCTS
   ═══════════════════════════════════════════════════════════════════════════════ */
.th-flag-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.th-prod {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: center;
  min-height: 180px; padding: 26px 24px; border-radius: 12px;
  background: #0E0F12; border: 1px solid rgba(212,168,50,.42);
  box-shadow: 0 0 0 1px rgba(212,168,50,.05), 0 18px 50px rgba(0,0,0,.4), inset 0 1px 0 rgba(240,204,90,.08);
  transition: border-color 240ms var(--th-ease), box-shadow 240ms var(--th-ease);
}
/* Port imagery, faded so the copy always reads. */
.th-prod::before {
  content: ''; position: absolute; inset: 0; z-index: -2;
  background: url('/assets/tfa/img/flagship-port.webp') right 30% / cover no-repeat;
  opacity: .55;
}
.th-prod::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(12,12,14,.97) 0%, rgba(12,12,14,.86) 45%, rgba(12,12,14,.55) 100%),
    radial-gradient(70% 80% at 0% 0%, rgba(212,168,50,.12), transparent 70%);
}
.th-prod--live:hover { border-color: rgba(240,204,90,.7); box-shadow: 0 0 0 1px rgba(212,168,50,.12), 0 22px 60px rgba(0,0,0,.5), 0 0 40px rgba(212,168,50,.08); }
.th-prod-main { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.th-prod-id { display: flex; align-items: center; gap: 14px; }
.th-prod h3 { margin: 0; font: 700 19px/1.2 var(--th-sans); letter-spacing: -.02em; color: #FFF; }
.th-prod-cap { margin: 4px 0 0; font: 400 13px/1.3 var(--th-sans); color: var(--th-text-2); }
.th-prod-desc { margin: 18px 0 18px; font: 400 13px/1.6 var(--th-sans); color: var(--th-text-2); max-width: 340px; }
.th-prod .th-prod-desc:last-child { margin-bottom: 0; }

.th-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.th-checks li {
  position: relative; padding-inline-start: 26px;
  font: 500 12.5px/1.35 var(--th-sans); color: #F4F1EA;
}
.th-checks li::before {
  content: ''; position: absolute; inset-inline-start: 0; top: 50%; width: 16px; height: 16px; margin-top: -8px;
  border-radius: 50%; border: 1.4px solid var(--th-gold-2);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F0CC5A' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 10px no-repeat;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   E · LIFECYCLE
   ═══════════════════════════════════════════════════════════════════════════════ */
.th-steps {
  list-style: none; margin: 0; padding: 0 0 clamp(26px, 3.5vw, 38px);
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px;
  border-bottom: 1px solid var(--th-bd);
}
.th-steps > li { position: relative; display: flex; justify-content: center; }
/* Arrow between steps, centred on the icon row. */
.th-steps > li + li::before {
  content: ''; position: absolute; top: 27px; inset-inline-start: -14px; width: 22px; height: 1px;
  background: var(--th-gold); opacity: .8;
}
.th-steps > li + li::after {
  content: ''; position: absolute; top: 24px; inset-inline-start: 2px; width: 6px; height: 6px;
  border-top: 1px solid var(--th-gold); border-right: 1px solid var(--th-gold); transform: rotate(45deg); opacity: .8;
}
.th-step {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0;
  max-width: 170px; text-decoration: none; color: inherit; border-radius: 10px; padding: 0 4px 4px;
}
.th-step .th-ic--ring { transition: transform 220ms var(--th-ease), box-shadow 220ms var(--th-ease), border-color 220ms; }
a.th-step:hover .th-ic--ring { transform: translateY(-2px); border-color: var(--th-gold-2); box-shadow: 0 0 0 5px rgba(212,168,50,.08), 0 0 28px rgba(212,168,50,.28); }
.th-step b { margin-top: 12px; font: 700 15px/1.2 var(--th-sans); color: #FFF; }
.th-step i { margin-top: 6px; font: 400 12.5px/1.45 var(--th-sans); font-style: normal; color: var(--th-text-2); }
.th-step .th-soon { margin: 6px 0 0; font-size: 8.5px; padding: 2px 7px; }
.th-step.is-soon { cursor: not-allowed; }
.th-step.is-soon .th-ic--ring { box-shadow: 0 0 0 4px rgba(212,168,50,.08), 0 0 30px rgba(212,168,50,.22); }

/* ═══════════════════════════════════════════════════════════════════════════════
   F · TRUSTED RULES
   ═══════════════════════════════════════════════════════════════════════════════ */
.th-trust-row { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 30px); }
.th-rules {
  list-style: none; margin: 0; padding: 0; flex: 1 1 auto;
  display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px;
}
.th-rule {
  width: 100%; aspect-ratio: 1 / .98; min-height: 76px; padding: 10px 6px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px;
  border-radius: 7px; background: var(--th-card-2); border: 1px solid rgba(255,255,255,.14);
  color: #FFF; font: inherit; text-align: center;
  transition: border-color 220ms var(--th-ease), transform 220ms var(--th-ease), background 220ms;
}
.th-rule:hover { border-color: var(--th-gold-bd); transform: translateY(-2px); background: #16171C; }
.th-rule svg { width: 24px; height: 24px; fill: none; stroke: var(--th-gold-2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.th-rule b { font: 700 12px/1.2 var(--th-sans); letter-spacing: -.005em; }
.th-assure {
  list-style: none; margin: 0; padding: 0 0 0 clamp(18px, 2.4vw, 28px); flex: 0 0 auto; width: 270px;
  border-inline-start: 1px solid var(--th-bd); display: flex; flex-direction: column; gap: 11px;
}
.th-assure li { position: relative; padding-inline-start: 26px; display: flex; flex-direction: column; }
.th-assure li::before {
  content: ''; position: absolute; inset-inline-start: 0; top: 1px; width: 16px; height: 16px;
  border-radius: 50%; border: 1.4px solid var(--th-gold-2);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F0CC5A' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 10px no-repeat;
}
.th-assure b { font: 600 13px/1.3 var(--th-sans); color: #F4F1EA; }
.th-assure i { margin-top: 2px; font: 400 11.5px/1.4 var(--th-sans); font-style: normal; color: var(--th-text-3); }

/* ═══════════════════════════════════════════════════════════════════════════════
   G · FINAL CTA
   ═══════════════════════════════════════════════════════════════════════════════ */
.th-final { padding-bottom: clamp(36px, 4.5vw, 52px); }
.th-final-card {
  position: relative; overflow: hidden; isolation: isolate; border-radius: 14px;
  min-height: 150px; padding: clamp(24px, 3vw, 32px) clamp(20px, 3vw, 36px);
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.6fr); align-items: center;
  border: 1px solid rgba(212,168,50,.5);
  background: #0B0B0D;
  box-shadow: 0 0 0 1px rgba(212,168,50,.06), 0 24px 70px rgba(0,0,0,.5), inset 0 1px 0 rgba(240,204,90,.12);
}
.th-final-card::before {
  content: ''; position: absolute; inset: 0; z-index: -2;
  background: url('/assets/tfa/img/cta-port.webp') left center / auto 100% no-repeat;
}
.th-final-card::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(11,11,13,0) 0%, rgba(11,11,13,.25) 24%, rgba(11,11,13,.9) 40%, #0B0B0D 60%),
    radial-gradient(60% 120% at 70% 50%, rgba(212,168,50,.10), transparent 70%);
}
.th-final-tx { grid-column: 2; text-align: center; }
.th-final .th-h2 { font-size: clamp(22px, 2.5vw, 30px); }
.th-final .th-h2 span {
  background: linear-gradient(92deg, #E2B640 0%, #F6D46A 50%, #D9A92E 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: #F0CC5A;
}
.th-final p { margin: 10px 0 0; font: 400 14px/1.5 var(--th-sans); color: var(--th-text-2); }
.th-final .th-cta { margin-top: 20px; }

/* ═══════════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════════ */
#TFA_FOOTER {
  position: relative; z-index: 20; color: var(--th-text);
  background: linear-gradient(180deg, #08090B, #060709);
  border-top: 1px solid var(--th-bd);
  padding: clamp(32px, 4vw, 44px) 0 18px;
  font-family: var(--th-sans);
}
#TFA_FOOTER *, #TFA_FOOTER *::before, #TFA_FOOTER *::after { box-sizing: border-box; }
.th-foot-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr)); gap: 28px; }
.th-foot-logo { display: flex; align-items: center; gap: 11px; }
.th-foot-logo .tb-logo { width: 34px; height: 34px; border-radius: 50%; font-size: 13px; }
.th-foot-name { font-size: 18px; font-weight: 700; letter-spacing: -.4px; color: #FFF; }
.th-foot-name span { color: #F0CC5A; }
.th-foot-brand p { margin: 14px 0 0; max-width: 240px; font-size: 13px; line-height: 1.55; color: var(--th-text-2); }
.th-foot-col { display: flex; flex-direction: column; gap: 9px; }
.th-foot-col h3 { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: #FFF; }
.th-foot-col a, .th-foot-col button, .th-foot-soon {
  align-self: flex-start; padding: 0; background: none; border: 0; cursor: pointer; text-align: start;
  font: 400 12.5px/1.35 var(--th-sans); color: var(--th-text-2); text-decoration: none;
  transition: color 180ms;
}
.th-foot-col a:hover, .th-foot-col button:hover { color: #F0CC5A; }
.th-foot-soon { cursor: default; color: var(--th-text-3); }
.th-foot-soon em { font-style: normal; font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #F0CC5A; margin-inline-start: 4px; }
.th-foot-bar {
  margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--th-bd);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  font-size: 11.5px; color: var(--th-text-3);
}
.th-foot-legal { display: flex; flex-wrap: wrap; }
.th-foot-legal a { color: var(--th-text-3); text-decoration: none; padding: 0 12px; }
.th-foot-legal a + a { border-inline-start: 1px solid var(--th-bd-2); }
.th-foot-legal a:last-child { padding-inline-end: 0; }
.th-foot-legal a:hover { color: #F0CC5A; }

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1180px) {
  .th-rules { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .th-rule { aspect-ratio: auto; min-height: 84px; }
}
@media (max-width: 1080px) {
  .th-prod { grid-template-columns: minmax(0, 1fr); }
  .th-prod-desc { margin-bottom: 16px; }
  .th-trust-row { flex-direction: column; align-items: stretch; }
  .th-assure { width: auto; border-inline-start: 0; padding: 18px 0 0; border-top: 1px solid var(--th-bd);
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; }
  .th-foot-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .th-foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .th-start-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .th-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 28px; }
  .th-steps > li:nth-child(3n+1)::before, .th-steps > li:nth-child(3n+1)::after { display: none; }
}
@media (max-width: 820px) {
  .th-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .th-hero-copy { padding-inline-start: 0; text-align: center; }
  .th-hero .th-eyebrow { justify-content: center; }
  .th-lede { margin-inline: auto; }
  .th-hero .th-cta { justify-content: center; }
  .th-hero-vis { order: -1; margin-bottom: -8px; }
  .th-hero-vis img { max-width: min(450px, 100vw); }
  .th-flag-grid { grid-template-columns: minmax(0, 1fr); }
  .th-final-card { grid-template-columns: minmax(0, 1fr); padding-top: 150px; }
  .th-final-card::before { background-size: 100% auto; background-position: center top; }
  .th-final-card::after { background: linear-gradient(180deg, rgba(11,11,13,0) 0%, rgba(11,11,13,.2) 25%, rgba(11,11,13,.92) 55%, #0B0B0D 70%); }
  .th-final-tx { grid-column: 1; }
}
@media (max-width: 640px) {
  .th-start-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .th-task { min-height: 0; padding: 18px; }
  .th-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .th-steps > li::before, .th-steps > li::after { display: none; }
  .th-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .th-rule { flex-direction: row; justify-content: flex-start; min-height: 54px; padding: 12px 14px; gap: 12px; }
  .th-rule svg { width: 20px; height: 20px; flex: 0 0 auto; }
  .th-assure { grid-template-columns: minmax(0, 1fr); }
  .th-prod { padding: 22px 18px; }
  .th-foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 18px; }
  .th-foot-bar { flex-direction: column; }
  .th-foot-legal a:first-child { padding-inline-start: 0; }
  .th-cta { gap: 10px; }
  .th-cta .th-btn { flex: 1 1 100%; }
  .th-final .th-cta .th-btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .th-hero-vis img { animation: none; }
  #TFA_HOME .th-task, #TFA_HOME .th-btn, #TFA_HOME .th-rule, #TFA_HOME .th-ic--ring, #TFA_HOME .th-prod { transition: none; }
  a.th-task:hover, .th-btn:hover, .th-rule:hover, a.th-step:hover .th-ic--ring { transform: none; }
}
@media (prefers-contrast: more) {
  #TFA_HOME, #TFA_FOOTER { --th-text-2: rgba(244,241,234,.9); --th-text-3: rgba(244,241,234,.75); --th-bd: rgba(255,255,255,.3); }
}

/* Match Deal Pro menu at ≤400px. VERIFIED: at 360×740 the 296px panel (opacity 0
   until opened, but still laid out) ended at x=374, giving the page 14px of
   horizontal scroll. The 390/430px fix in experience.css §2 positions the wrap;
   this caps the panel's width on the narrowest phones so it ends inside the viewport.
   Position, rows, behaviour and keyboard handling are unchanged. */
@media (max-width: 400px) { #TB .tb-md-menu { width: min(296px, calc(100vw - 96px)); } }

/* Assistant view header. QUICK, New and the API chip return here, so the signed-out
   Get Started and the API chip give way where the bar would otherwise collide with
   the navigation (measured: Match Deal overlapped Pricing at 1280px). Sign In stays. */
@media (max-width: 1520px) {
  html[data-th-view='assistant'] #TB .api-badge,
  html[data-th-view='assistant'] .th-getstarted { display: none; }
  html[data-th-view='assistant'] #TB .tb-new span { display: none; }
}

/* Navigation collapse, 1081–1239px. The approved nav has six items (Pricing was
   added), and measured at 1081–1180px the header row wrapped the Match Deal and
   Sign In labels onto two lines. experience.css collapses at ≤1080px; this applies
   the same disclosure panel through 1239px so the row stays on one line at every
   width. Same declarations as experience.css's ≤1080 block, nothing new. */
@media (min-width: 1081px) and (max-width: 1239px) {
  .tfa-navzone { flex: 0 0 auto; justify-content: flex-start; }
  .tfa-navtog { display: inline-flex; }
  .tfa-nav {
    position: absolute; top: var(--tfa-nav-h); inset-inline: 8px; z-index: 55;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 8px;
    border-radius: 13px; border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(10, 12, 17, .98); backdrop-filter: blur(26px) saturate(140%);
    box-shadow: 0 22px 58px rgba(0, 0, 0, .62);
    display: none;
  }
  .tfa-nav.open { display: flex; }
  .tfa-nav-item { min-height: 42px; justify-content: flex-start; font-size: 13.5px; padding: 0 12px; }
  .tfa-nav-item[aria-current='page']::after { display: none; }
  .tfa-sub, .tfa-submenu { position: static; }
  .tfa-submenu {
    opacity: 1; visibility: visible; transform: none; min-width: 0; box-shadow: none;
    background: none; border: 0; border-top: 1px solid rgba(255, 255, 255, .07);
    border-radius: 0; padding: 4px 0 4px 12px; margin: 2px 0 4px; display: none;
  }
  .tfa-sub.open .tfa-submenu { display: block; }
}

/* Sign In measured wrapping to two lines ("Sign / In") at 360–390px. */
@media (max-width: 560px) { #TB .tb-signin { white-space: nowrap; padding-inline: 13px; } }

/* ═══════════════════════════════════════════════════════════════════════════════
   B · HERO — global trade intelligence dashboard
   Appended last, so it layers over the earlier hero rules without rewriting them.
   The globe is gone. Its classes (.th-hero-vis, .th-atmo, .th-routes) are no longer
   in the markup, so their rules above are inert.

   Composition follows the approved reference at 1860 px. The copy sits in the left
   55% column. The artwork is 70vw wide, anchored to the hero's bottom-right corner
   and laid out of flow. Its own alpha clears the area behind the copy and fades
   every outer edge, so the glass dashboard starts at ≈51% of the width and its data
   wave runs back under the CTAs, as in the reference. The page colour matches the
   artwork's backdrop (#0C0E0F), so no seam or rectangle ever shows.
   ═══════════════════════════════════════════════════════════════════════════════ */
.th-hero {
  display: flex; flex-direction: column; justify-content: center;
  min-height: calc(min(70vw, 1500px) * .5769 + 1vw);
  padding: clamp(40px, 4vw, 72px) 0 clamp(48px, 5vw, 96px);
  background:
    radial-gradient(40% 55% at 78% 30%, rgba(232,180,72,.06), rgba(232,180,72,0) 70%),
    #0C0E0F;
}
.th-hero::after { display: none; }
.th-hero > .th-wrap { max-width: 1720px; width: calc(100% - 2 * clamp(24px, 5.2vw, 128px)); }
.th-hero-grid { position: static; }
.th-hero-copy { z-index: 2; }
.th-hero .th-eyebrow { font-size: clamp(10.5px, .86vw, 16px); letter-spacing: .36em; }
.th-hero .th-eyebrow--line::after { width: clamp(26px, 2.3vw, 44px); }
.th-lede { max-width: 31em; font-size: clamp(14.5px, 1.25vw, 23px); line-height: 1.5; }
.th-hero .th-btn { min-height: clamp(46px, 3.7vw, 70px); padding: 0 clamp(22px, 2.3vw, 44px); font-size: clamp(14px, 1.14vw, 21px); }
.th-hero .th-btn svg { width: clamp(15px, 1.2vw, 22px); }

.th-hero-art {
  position: absolute; z-index: 0; bottom: 0;
  right: max(0px, calc((100% - 2143px) / 2));
  width: min(70vw, 1500px); aspect-ratio: 1300 / 750; pointer-events: none;
}
.th-art-stage {
  position: absolute; inset: 0;
  animation: th-depth 16s ease-in-out infinite;
  will-change: transform;
}
@keyframes th-depth {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(0, -5px, 0) scale(1.006); }
}
.th-art-img, .th-art-wave img { display: block; width: 100%; height: auto; }
.th-art-fx { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

/* Data-wave sheen: a brighter copy of the artwork, clipped to the wave band and
   revealed by a soft mask that drifts slowly from left to right. */
.th-art-wave {
  position: absolute; inset: 0; clip-path: inset(74% 0 0 0); opacity: .5;
}
.th-art-wave img {
  filter: brightness(1.9) saturate(1.1);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 50%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 50%, transparent);
  -webkit-mask-size: 32% 100%; mask-size: 32% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  animation: th-wave 14s linear infinite;
}
@keyframes th-wave {
  0%   { -webkit-mask-position: -40% 0; mask-position: -40% 0; }
  100% { -webkit-mask-position: 140% 0; mask-position: 140% 0; }
}

/* Route lights: a short bright dash with a broad soft companion. They travel
   the arcs already drawn in the artwork, each in turn, then rest. */
.th-art-fx .lc, .th-art-fx .lg {
  fill: none; stroke-linecap: round; stroke-dasharray: 9 100; stroke-dashoffset: 109; opacity: 0;
  animation: th-route var(--t, 10s) cubic-bezier(.45, 0, .3, 1) var(--d, 0s) infinite;
}
.th-art-fx .lc { stroke: #FFF6DC; stroke-width: 2.2; --o: .95; }
.th-art-fx .lg { stroke: #FFCB5C; stroke-width: 10; --o: .28; }
@keyframes th-route {
  0%   { stroke-dashoffset: 109; opacity: 0; }
  6%   { opacity: var(--o); }
  42%  { opacity: var(--o); }
  48%  { stroke-dashoffset: 0; opacity: 0; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
/* Commercial hubs: a warm bloom breathing over each lit city. */
.th-art-fx .hub { fill: url(#thHubG); opacity: .4; animation: th-hubglow 7s ease-in-out var(--d, 0s) infinite; }
@keyframes th-hubglow { 0%, 100% { opacity: .3; } 50% { opacity: .85; } }

@media (max-width: 820px) {
  .th-hero { min-height: 0; padding-top: 8px; }
  .th-hero > .th-wrap { width: 100%; padding: 0 var(--th-gut); }
  /* Stacked: the dashboard leads, cropped to the glass panels (artwork x 340–1300). */
  .th-hero-art {
    position: relative; order: -1; right: auto; bottom: auto;
    width: calc(100% + 2 * var(--th-gut)); margin: 0 calc(-1 * var(--th-gut)) -4%;
    aspect-ratio: 960 / 750; overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 95%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 7%, #000 95%, transparent);
  }
  .th-art-stage { inset: 0 auto auto -35.42%; width: 135.42%; aspect-ratio: 1300 / 750; }
}
@media (prefers-reduced-motion: reduce) {
  .th-art-stage, .th-art-wave img, .th-art-fx .hub { animation: none; }
  .th-art-wave { display: none; }
  .th-art-fx .lc, .th-art-fx .lg { animation: none; opacity: 0; }
  .th-art-fx .hub { opacity: .55; }
}
