@font-face {
  font-family: "TradeFlow Display";
  src: url("/assets/tradeflow-display.woff2") format("woff2");
  font-weight: 650;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #16364a;
  --ocean: #27627a;
  --mist: #eaf1f5;
  --paper: #fcfdfe;
  --line: #c9d9e3;
  --orange: #c66a42;
  --muted: #526f82;
  --display: "TradeFlow Display", "Trebuchet MS", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --utility: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--body); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--orange); outline-offset: 5px; }
button { touch-action: manipulation; }
svg { display: block; }
a { color: inherit; }

.site-header { height: 100px; display: flex; align-items: center; justify-content: space-between; padding: 0 5.6%; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; white-space: nowrap; }
.brand-mark { width: 35px; height: 35px; }
.brand-lsh { font-family: var(--display); font-size: 26px; letter-spacing: -.8px; }
.brand-divider { height: 23px; width: 1px; background: var(--line); margin: 0 2px 0 5px; }
.brand-product { font-size: 21px; font-weight: 500; letter-spacing: -.65px; }
.header-caption { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.header-caption svg { width: 18px; height: 18px; }

.workspace { display: grid; grid-template-columns: 55% 45%; min-height: max(700px, calc(100svh - 163px)); }
.story { background: var(--mist); position: relative; display: flex; flex-direction: column; padding: 66px 9.5% 34px 10.2%; overflow: hidden; border-right: 1px solid var(--line); }
.story-copy { position: relative; z-index: 1; }
.eyebrow { font-family: var(--utility); font-size: 10px; letter-spacing: 1.25px; font-weight: 400; display: flex; align-items: center; gap: 9px; margin: 0; line-height: 1.6; color: var(--ocean); }
.eyebrow-rule { display: inline-block; width: 19px; height: 2px; background: var(--orange); flex-shrink: 0; }
h1 { font-family: var(--display); font-weight: 650; font-size: clamp(44px, 4.35vw, 68px); letter-spacing: -2.4px; line-height: 1.06; margin: 22px 0 22px; }
.story-description { font-size: 14px; line-height: 1.85; color: var(--muted); margin: 0; }
.cargo-scene { width: calc(100% + 50px); margin: 9px 0 3px -25px; flex: 1; display: flex; align-items: center; justify-content: center; min-height: 265px; }
.cargo-art { width: 100%; max-width: 680px; overflow: visible; }
.cargo-art text { font-family: var(--body); }
.trade-cycle { display: flex; align-items: center; gap: 22px; font-family: var(--utility); font-size: 10px; letter-spacing: 1.3px; color: var(--muted); margin-top: 8px; }
.trade-cycle svg { width: 29px; height: 12px; stroke: #8faebf; fill: none; stroke-width: 1; }

.access { display: flex; justify-content: center; align-items: center; padding: 48px 10.8%; }
.login-panel { width: 100%; max-width: 384px; }
.login-eyebrow { font-size: 9px; letter-spacing: 1.3px; margin-bottom: 24px; }
.login-eyebrow svg { width: 18px; height: 18px; }
h2 { font-family: var(--display); font-size: 36px; font-weight: 650; letter-spacing: -.85px; margin: 0 0 11px; line-height: 1.2; }
.login-intro { color: var(--muted); line-height: 1.6; margin: 0; font-size: 13px; }
.login-fields { margin-top: 34px; }
.field + .field { margin-top: 22px; }
.field label { font-size: 12px; font-weight: 600; display: block; margin-bottom: 9px; }
.input-wrap { position: relative; }
.input-wrap > svg { position: absolute; width: 18px; height: 18px; top: 18px; left: 16px; color: var(--muted); pointer-events: none; }
input { width: 100%; height: 54px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink); font-size: 14px; padding: 0 15px 0 46px; outline: none; transition: border-color .15s, box-shadow .15s; }
input::placeholder { color: #657e8f; opacity: 1; font-size: 13px; }
input:focus-visible { border-color: var(--ocean); box-shadow: 0 0 0 3px #27627a1a; }
.password-wrap input { padding-right: 50px; }
.password-toggle { position: absolute; right: 3px; top: 5px; width: 44px; height: 44px; border: 0; color: var(--muted); background: transparent; display: grid; place-items: center; border-radius: 4px; }
.password-toggle:hover { color: var(--ink); background: var(--mist); }
.password-toggle svg { width: 19px; height: 19px; }
.eye-slash { display: none; }
.password-toggle[aria-pressed="true"] .eye-slash { display: block; }
.primary-button { border: 1px solid var(--ink); border-radius: 5px; background: var(--ink); color: #fff; min-height: 54px; font-size: 13px; font-weight: 600; letter-spacing: .15px; transition: background .15s, transform .15s; }
.primary-button:hover { background: var(--ocean); border-color: var(--ocean); }
.primary-button:active { transform: translateY(1px); }
.sign-in { width: 100%; display: flex; align-items: center; justify-content: center; gap: 17px; margin-top: 26px; }
.sign-in svg { width: 19px; height: 19px; transition: transform .15s; }
.sign-in:hover svg { transform: translateX(3px); }
.access-help { display: flex; align-items: center; gap: 12px; padding-top: 27px; margin-top: 28px; border-top: 1px solid var(--line); }
.help-icon { width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; font-size: 12px; color: var(--muted); flex-shrink: 0; }
.access-help p { margin: 0; font-size: 11px; line-height: 1.8; font-weight: 600; }
.access-help p span { font-weight: 400; color: var(--muted); }
.member-note { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; margin-top: 43px; }
.member-note svg { width: 15px; height: 15px; }
.site-footer { min-height: 63px; padding: 18px 5.6%; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted); }
.footer-dot { margin: 0 10px; color: #8faebf; }
.no-script { font-size: 13px; color: var(--ink); line-height: 1.7; padding: 12px; background: var(--mist); }

dialog { color: var(--ink); width: min(440px, calc(100% - 40px)); max-height: calc(100svh - 40px); border: 1px solid var(--line); border-radius: 12px; padding: 43px 34px 32px; text-align: center; background: var(--paper); box-shadow: 0 20px 90px #16364a29; }
dialog::backdrop { background: #102f496b; backdrop-filter: blur(5px); }
.dialog-close { position: absolute; right: 8px; top: 8px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 5px; background: transparent; color: var(--muted); }
.dialog-close:hover { background: var(--mist); color: var(--ink); }
.dialog-close svg { width: 20px; height: 20px; }
.dialog-symbol { width: 68px; height: 68px; border-radius: 17px; background: var(--mist); display: grid; place-items: center; color: var(--ocean); margin: 0 auto 24px; }
.dialog-symbol svg { width: 40px; height: 40px; }
.dialog-eyebrow { justify-content: center; font-size: 8px; letter-spacing: 1.1px; margin-bottom: 13px; }
dialog h2 { font-family: var(--body); font-size: 28px; letter-spacing: 1px; font-weight: 600; margin-bottom: 18px; }
#dialog-description p { font-size: 13px; color: var(--muted); line-height: 1.8; margin: 0 0 12px; }
#dialog-description .dialog-chinese { font-size: 12px; }
.dialog-confirm { width: 100%; margin-top: 13px; }
body:has(dialog[open]) { overflow: hidden; }

@media (prefers-reduced-motion: no-preference) {
  .story-copy, .login-panel { animation: arrive .55s ease-out both; }
  .login-panel { animation-delay: .08s; }
  .cargo-art { animation: arrive .7s .12s ease-out both; }
  dialog[open] { animation: arrive .18s ease-out both; }
  @keyframes arrive { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
}

@media (min-width: 1700px) {
  .story { padding-left: max(90px, calc((100vw - 1510px) / 2)); padding-top: 80px; }
  .story-copy { max-width: 680px; }
  .cargo-scene { flex-grow: 0; margin-top: auto; margin-bottom: auto; max-width: 730px; }
  .access { justify-content: flex-start; padding-left: 100px; }
}
@media (max-width: 1100px) and (min-width: 761px) {
  .story { padding: 56px 8% 32px; }
  h1 { font-size: 49px; letter-spacing: -2px; }
  .story-description { font-size: 12px; }
  .eyebrow { font-size: 8px; letter-spacing: .9px; }
  .access { padding: 42px 9%; }
  .login-intro { font-size: 12px; }
  .cargo-scene { min-height: 220px; }
  .trade-cycle { gap: 12px; font-size: 8px; }
}
@media (max-width: 760px) {
  .site-header { height: 77px; padding: 0 26px; }
  .brand { gap: 9px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-lsh { font-size: 23px; }
  .brand-product { font-size: 19px; }
  .brand-divider { height: 20px; margin-left: 3px; }
  .header-caption { display: none; }
  .workspace { display: flex; flex-direction: column; min-height: calc(100svh - 152px); }
  .story { padding: 31px 26px 30px; border-right: 0; border-bottom: 1px solid var(--line); }
  .eyebrow { font-size: 8px; letter-spacing: 1px; }
  h1 { font-size: 39px; letter-spacing: -1.5px; line-height: 1.08; margin: 13px 0 14px; }
  .story-description { font-size: 12px; line-height: 1.7; max-width: 400px; }
  .story-description br { display: none; }
  .cargo-scene, .trade-cycle { display: none; }
  .access { padding: 37px 26px 30px; }
  .login-panel { max-width: 420px; }
  .login-eyebrow { margin-bottom: 17px; font-size: 8px; }
  h2 { font-size: 30px; margin-bottom: 9px; }
  .login-intro { font-size: 12px; }
  .login-fields { margin-top: 27px; }
  input { font-size: 16px; }
  .access-help { padding-top: 22px; margin-top: 25px; }
  .member-note { margin-top: 28px; }
  .site-footer { min-height: 75px; padding: 18px 26px; flex-wrap: wrap; gap: 8px; font-size: 9px; }
}
@media (max-width: 360px) {
  .site-header { padding: 0 20px; }
  .story { padding-left: 20px; padding-right: 20px; }
  .access { padding-left: 20px; padding-right: 20px; }
  h1 { font-size: 36px; }
  dialog { padding: 39px 22px 24px; }
}
