/* HK Global Impex. Turmeric, black and white. iOS-style Light, Dark and Auto. */

@font-face { font-family: "Bricolage"; src: url(/fonts/display.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Instrument"; src: url(/fonts/body.woff2) format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument"; src: url(/fonts/body-ext.woff2) format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* Turmeric, black and white. Greys are only tints of black. Turmeric marks action and "where it is now". */
  --bg: #F2F2F7;
  --surface: #FFFFFF;
  --surface-2: #F2F2F7;
  --ink: #0A0A0A;
  --ink-2: #3A3A3F;
  --ink-3: #6B6B72;
  --line: #E4E4EA;
  --line-strong: #C6C6CD;
  --green: #0A0A0A;          /* structural black (name kept from the first palette) */
  --green-line: #0A0A0A;
  --green-soft: #EDEDF2;
  --green-ink: #0A0A0A;
  --accent: #F5B316;         /* turmeric: primary actions */
  --on-accent: #0A0A0A;
  --link: #7A5200;
  --brass: #F5B316;          /* turmeric: current position, focus */
  --brass-soft: #FFF0C7;
  --brass-ink: #6B4A00;
  --ok-soft: #EDEDF2;
  --ok-ink: #0A0A0A;
  --red: #C8281A;
  --red-soft: #FBE3E0;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 8px 24px rgba(0, 0, 0, .07);
  --r-panel: 16px;
  --r-ctl: 12px;
  --font-d: "Bricolage", "Segoe UI", system-ui, sans-serif;
  --font-b: "Instrument", "Segoe UI", system-ui, -apple-system, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --surface: #1C1C1E; --surface-2: #2C2C2E; --ink: #FFFFFF; --ink-2: #D4D4D9; --ink-3: #94949B;
    --line: #38383C; --line-strong: #4A4A50; --green: #F5B316; --green-line: #F5B316; --green-soft: #2C2C2E; --green-ink: #FFFFFF;
    --accent: #F5B316; --on-accent: #0A0A0A; --link: #FFC93C; --brass: #F5B316; --brass-soft: #3A2C06; --brass-ink: #FFD36B;
    --ok-soft: #2C2C2E; --ok-ink: #FFFFFF; --red: #FF7A70; --red-soft: #3D1814; --shadow: 0 1px 2px rgba(0,0,0,.5), 0 10px 30px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --surface: #1C1C1E; --surface-2: #2C2C2E; --ink: #FFFFFF; --ink-2: #D4D4D9; --ink-3: #94949B;
  --line: #38383C; --line-strong: #4A4A50; --green: #F5B316; --green-line: #F5B316; --green-soft: #2C2C2E; --green-ink: #FFFFFF;
  --accent: #F5B316; --on-accent: #0A0A0A; --link: #FFC93C; --brass: #F5B316; --brass-soft: #3A2C06; --brass-ink: #FFD36B;
  --ok-soft: #2C2C2E; --ok-ink: #FFFFFF; --red: #FF7A70; --red-soft: #3D1814; --shadow: 0 1px 2px rgba(0,0,0,.5), 0 10px 30px rgba(0,0,0,.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font-b); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body.noscroll { overflow: hidden; }
h1, h2, h3 { font-family: var(--font-d); margin: 0; font-weight: 640; letter-spacing: -.015em; line-height: 1.15; }
h1 { font-size: 1.75rem; letter-spacing: -.025em; }
p { margin: 0; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.num, .t-count, .figures b, .stmt td { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.late { color: var(--red) !important; }
.hint { color: var(--ink-3); font-size: .85rem; margin-top: 6px; }
.ic { flex: none; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 6px; }
#view:focus { outline: none; }

/* ---------- shell ---------- */
.rail { display: none; }
.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; background: var(--bg); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 650 1.02rem var(--font-d); letter-spacing: -.01em; min-width: 0; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-mono { width: 34px; height: 34px; border-radius: 10px; background: #0A0A0A; color: #F5B316; display: grid; place-items: center; font: 700 .85rem var(--font-d); letter-spacing: .02em; flex: none; }
.brand-logo { height: 34px; width: auto; max-width: 120px; border-radius: 8px; object-fit: contain; flex: none; }
.brand-mono.lg { width: 60px; height: 60px; border-radius: 16px; font-size: 1.3rem; }
.brand-logo.lg { height: 60px; max-width: 200px; }
.top-search { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--ink-3); text-decoration: none; padding: 8px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: .9rem; }
.top-search span { display: none; }
#view { padding: 20px 16px calc(112px + var(--safe-b)); max-width: 760px; margin: 0 auto; }
.tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 8px 2px calc(16px + var(--safe-b)); background: var(--surface); border-top: 1px solid var(--line); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; min-height: 48px; color: var(--ink-3); text-decoration: none; font-size: .72rem; font-weight: 560; border-radius: 12px; }
.tab { position: relative; min-width: 0; }
.tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 380px) { .tab { font-size: .66rem; } }
.tab.on { color: var(--ink); }
.tab.on .ic { stroke-width: 2.3; }
.tab.on::before { content: ""; position: absolute; top: -6px; left: 50%; width: 26px; height: 3px; margin-left: -13px; border-radius: 0 0 3px 3px; background: var(--brass); }

@media (min-width: 900px) {
  #app:not([hidden]) { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; min-height: 100dvh; }
  .rail { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; height: 100dvh; padding: 22px 14px 18px; background: #000; color: #E8E8ED; overflow-y: auto; border-right: 1px solid #1f1f22; }
  .rail .brand { color: #fff; padding: 4px 8px 22px; }
  .rail .brand-mono { background: var(--brass); color: #0A0A0A; }
  .rail nav { display: flex; flex-direction: column; gap: 2px; }
  .nav-i { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: #B9B9C0; text-decoration: none; font-weight: 520; font-size: .96rem; background: none; border: 0; width: 100%; text-align: left; cursor: pointer; }
  .nav-i:hover { background: rgba(255,255,255,.07); color: #fff; }
  .nav-i.on { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 3px 0 0 #F5B316; }
  .rail > .nav-i { margin-top: auto; }
  .rail-user { padding: 12px 12px 0; display: flex; flex-direction: column; border-top: 1px solid rgba(255,255,255,.14); margin-top: 8px; }
  .rail-user small { color: #94949B; }
  .topbar .brand { display: none; }
  .topbar { padding: 14px 40px; background: transparent; border: 0; backdrop-filter: none; position: static; }
  .top-search { margin-left: 0; min-width: 320px; padding: 10px 16px; }
  .top-search span { display: inline; }
  #view { max-width: 1120px; padding: 8px 40px 64px; margin: 0; }
  .tabbar { display: none; }
  h1 { font-size: 2.1rem; }
}

/* ---------- page parts ---------- */
.page-h, .detail-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 16px; margin-bottom: 18px; }
.page-h .muted { font-size: .92rem; margin-top: 2px; }
.home-h > div > .muted { font-size: 1.2rem; font-weight: 700; color: var(--ink); margin: 0 0 4px; letter-spacing: -.01em; }
@media (min-width: 700px) { .home-h > div > .muted { font-size: 1.4rem; } }
.page-a { display: flex; align-items: center; gap: 8px; flex: none; }
.detail-h { align-items: flex-start; margin-top: 4px; }
.detail-t { min-width: 0; }
.detail-t h1 { overflow-wrap: anywhere; }
.detail-t .muted { margin-top: 4px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 2px; color: var(--ink-3); text-decoration: none; font-size: .9rem; margin: 0 0 6px -4px; padding: 4px 4px; }
.back:hover { color: var(--ink); }
.block { margin-top: 28px; }
.block-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; min-height: 36px; }
.block-h h2 { font-size: 1.02rem; font-weight: 620; }
.block-a { display: flex; align-items: center; gap: 8px; }
.link-sm { font-size: .9rem; }
.tag-admin { font-size: .78rem; color: var(--brass-ink); background: var(--brass-soft); padding: 3px 10px; border-radius: 99px; font-weight: 600; }
.notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-ctl); margin: 6px 0 4px; font-size: .92rem; }
.notice.warn { background: var(--brass-soft); color: var(--brass-ink); }
.ok-note { display: flex; align-items: center; gap: 8px; padding: 6px 2px; }
.home-h h1 { max-width: 20ch; }

/* ---------- buttons, fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: var(--r-ctl); border: 1px solid transparent; font-weight: 600; font-size: .98rem; text-decoration: none; cursor: pointer; background: var(--surface-2); color: var(--ink); white-space: nowrap; transition: transform .08s ease, background .15s ease; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.soft { background: var(--surface-2); }
.btn.ghost { background: transparent; border-color: var(--line-strong); }
.btn.danger { background: var(--red); color: #fff; }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: .9rem; border-radius: 10px; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.btn-row.start { justify-content: flex-start; margin-top: 14px; }
.btn-row.wrap { flex-wrap: wrap; }
.btn-row > .btn:only-child { flex: 0 0 auto; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.danger-i:hover { color: var(--red); }
.pill-btn { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; cursor: pointer; }
.pb-hint { font-size: .82rem; color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.as-btn { background: none; border: 0; width: 100%; text-align: left; cursor: pointer; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .88rem; font-weight: 580; color: var(--ink-2); }
.req { color: var(--red); }
input:not([type=checkbox]):not([type=file]), select, textarea, .input { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--r-ctl); border: 1px solid var(--line-strong); background: var(--surface); font-size: 1rem; appearance: none; -webkit-appearance: none; }
textarea { resize: vertical; line-height: 1.45; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 38px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brass); outline-offset: 0; border-color: var(--brass); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fields .field { grid-column: 1 / -1; }
.fields .field.half { grid-column: auto; }
.field-section { grid-column: 1 / -1; margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.field-section h3 { font-size: 1rem; }
.form-err { color: var(--red); background: var(--red-soft); padding: 10px 12px; border-radius: 10px; margin-top: 14px; font-size: .92rem; }
.form.inline { margin-top: 16px; }
.check { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--green); }
.check small { display: block; color: var(--ink-3); }
.searchbar { position: relative; margin-bottom: 14px; }
.searchbar .ic, .searchbar > svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.searchbar input:not([type=checkbox]):not([type=file]) { padding-left: 46px; padding-right: 16px; border-radius: 99px; }
.searchbar input[type=search]::-webkit-search-decoration { -webkit-appearance: none; }
.searchbar.big input { min-height: 54px; font-size: 1.05rem; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 12px; margin: 0 -16px 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--ink-2); text-decoration: none; font-size: .88rem; font-weight: 560; background: var(--surface); }
.chip.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
@media (min-width: 900px) { .chips { margin: 0 0 8px; padding: 2px 0 12px; flex-wrap: wrap; } }
@media (max-width: 520px) { .hide-sm { display: none; } .fields { gap: 12px; } }

/* ---------- lists and rows ---------- */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; }
.row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; min-height: 66px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.list > .row:last-child, .list > :last-child { border-bottom: 0; }
a.row:hover, button.row:hover { background: var(--surface-2); background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.row.static { cursor: default; }
.row.stack { flex-direction: column; align-items: stretch; gap: 8px; padding-bottom: 8px; }
.r-line { display: flex; align-items: center; gap: 14px; }
.r-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.r-main b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-main small, .r-end small { color: var(--ink-3); font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; max-width: 40%; }
.tile { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); color: var(--green); display: grid; place-items: center; font: 650 .95rem var(--font-d); overflow: hidden; }
:root[data-theme="dark"] .tile { color: var(--green); }
.tile.photo { padding: 0; }
.tile.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile.warn { background: var(--red-soft); color: var(--red); }
.tile.date { display: flex; flex-direction: column; justify-content: center; align-items: center; line-height: 1; gap: 2px; }
.tile.date b { font: 700 1.1rem var(--font-d); }
.tile.date i { font-style: normal; font-size: .68rem; color: var(--ink-3); font-weight: 600; }
.stars { display: inline-flex; align-items: center; gap: 3px; color: var(--brass-ink); font-weight: 600; font-size: .88rem; }
.stars.big { font-size: .95rem; }
.stars .ic { fill: var(--brass); stroke: var(--brass); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 99px; font-size: .8rem; font-weight: 620; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill.t-b { background: var(--brass-soft); color: var(--brass-ink); }
.pill.t-g { background: var(--ink); color: var(--bg); }
.pill.t-ok { background: var(--ok-soft); color: var(--ok-ink); }
.pill.t-x { background: var(--red-soft); color: var(--red); }
.empty { text-align: left; padding: 28px 4px; }
.empty h3 { font-size: 1.1rem; margin-bottom: 6px; }
.empty p { color: var(--ink-3); max-width: 46ch; margin-bottom: 14px; }

/* ---------- the journey track ---------- */
.track { --node: 14px; list-style: none; display: flex; margin: 0; padding: 0; }
.t-stage { flex: 1 1 0; min-width: 0; position: relative; }
.t-hit { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; padding: 4px 0; background: none; border: 0; color: inherit; font: inherit; text-decoration: none; }
button.t-hit, a.t-hit { cursor: pointer; }
.t-node { position: relative; display: block; width: 100%; height: var(--node); }
.t-node::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--line-strong); }
.t-stage:first-child .t-node::before { left: 50%; }
.t-stage:last-child .t-node::before { right: 50%; }
.t-node::after { content: ""; position: absolute; left: 50%; top: 0; width: var(--node); height: var(--node); margin-left: calc(var(--node) / -2); border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); }
.t-label { font-size: .7rem; line-height: 1.15; color: var(--ink-3); text-align: center; font-weight: 560; letter-spacing: -.005em; }
.is-done .t-node::before { background: var(--green-line); }
.is-done .t-node::after { background: var(--green-line); border-color: var(--green-line); }
.is-done .t-label { color: var(--ink-2); }
.is-now .t-node::before { background: linear-gradient(90deg, var(--green-line) 50%, var(--line-strong) 50%); }
.is-now:first-child .t-node::before { background: var(--line-strong); }
.is-now:last-child .t-node::before { background: var(--green-line); }
.is-now .t-node::after { background: var(--brass); border-color: var(--brass); box-shadow: 0 0 0 5px var(--brass-soft); }
.is-now .t-label { color: var(--ink); font-weight: 700; }
button.t-hit:hover .t-node::after, a.t-hit:hover .t-node::after { border-color: var(--brass); }
.track.is-cancelled { opacity: .45; filter: grayscale(1); }
.track.compact { --node: 9px; }
.track.compact .t-label { display: none; }
.track.compact .t-hit { padding: 0; }
.track.counts .t-hit { gap: 6px; }
.t-count { font: 650 1.55rem/1 var(--font-d); letter-spacing: -.03em; color: var(--ink); }
.counts .is-empty .t-count { color: var(--line-strong); }
.counts .is-has .t-node::after { background: var(--brass); border-color: var(--brass); }
.counts .is-has .t-label { color: var(--ink-2); }
.counts a.t-hit:hover .t-label { color: var(--ink); text-decoration: underline; }
.route-block, .hero-track { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 20px 8px 14px; margin-top: 8px; }
.hero-track { padding: 20px 10px 16px; }
.hero-track .btn-row, .hero-track .hint { padding: 0 8px; }
.route-cap { color: var(--ink-3); font-size: .86rem; padding: 12px 12px 0; }
@media (min-width: 560px) { .t-label { font-size: .8rem; letter-spacing: 0; } .track { --node: 16px; } .track.compact { --node: 10px; } }
@media (max-width: 430px) { .t-label { font-size: .625rem; letter-spacing: -.01em; } .track:not(.compact) { --node: 14px; } }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
@keyframes rise { from { transform: translateY(4px); opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .route-block .t-node::after { animation: pop .5s cubic-bezier(.2, .9, .3, 1.3) backwards; }
  .route-block .t-count { animation: rise .5s ease-out backwards; }
  .route-block .t-stage:nth-child(1) * { animation-delay: .05s; } .route-block .t-stage:nth-child(2) * { animation-delay: .13s; }
  .route-block .t-stage:nth-child(3) * { animation-delay: .21s; } .route-block .t-stage:nth-child(4) * { animation-delay: .29s; }
  .route-block .t-stage:nth-child(5) * { animation-delay: .37s; } .route-block .t-stage:nth-child(6) * { animation-delay: .45s; }
  .route-block .t-stage:nth-child(7) * { animation-delay: .53s; }
}

/* ---------- home ---------- */
.figures { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); }
.figures > div { padding: 14px 14px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.figures > div + div { border-left: 1px solid var(--line); }
.figures span { font-size: .78rem; color: var(--ink-3); line-height: 1.25; }
.figures b { font: 650 1.35rem var(--font-d); letter-spacing: -.02em; }
.figures small { color: var(--ink-3); font-size: .8rem; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 28px; }
.home-grid > .col { min-width: 0; }
@media (min-width: 900px) { .home-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; } .figures b { font-size: 1.7rem; } .figures > div { padding: 18px 22px; } }
.funnel { list-style: none; margin: 0; padding: 6px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); }
.funnel a { display: grid; grid-template-columns: 96px 1fr 28px; align-items: center; gap: 12px; padding: 8px 0; text-decoration: none; color: inherit; }
.f-l { font-size: .9rem; color: var(--ink-2); }
.f-bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.f-bar i { display: block; height: 100%; background: var(--green-line); border-radius: 4px; min-width: 0; }
.f-n { text-align: right; font-weight: 620; }
.feed { list-style: none; margin: 0; padding: 4px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); }
.feed li { border-bottom: 1px solid var(--line); }
.feed li:last-child { border: 0; }
.feed a, .feed li > div { display: flex; gap: 12px; padding: 11px 0; text-decoration: none; color: inherit; align-items: flex-start; }
.feed-ic { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-2); flex: none; }
.feed-main { display: flex; flex-direction: column; font-size: .93rem; min-width: 0; }
.feed-main small { color: var(--ink-3); }

/* ---------- detail ---------- */
.dl { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 2px 16px; }
.dl > div { display: grid; grid-template-columns: minmax(96px, 34%) 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dl > div:last-child { border: 0; }
.dl dt { color: var(--ink-3); font-size: .9rem; }
.dl dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.stmt { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; border-spacing: 0; }
.stmt th, .stmt td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.stmt tr:last-child th, .stmt tr:last-child td { border-bottom: 0; }
.stmt th { text-align: left; font-weight: 450; color: var(--ink-2); }
.stmt td { text-align: right; font-weight: 600; }
.stmt td small { display: block; font-weight: 400; color: var(--ink-3); font-size: .82rem; }
.stmt tr.sum th { color: var(--ink); font-weight: 650; }
.stmt tr.sum { background: var(--surface-2); background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.pay-grid { display: grid; gap: 18px; margin-top: 18px; }
@media (min-width: 640px) { .pay-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
.pay-h { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; margin-bottom: 8px; flex-wrap: wrap; }
.pay-h span { color: var(--ink-3); }
.bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin-bottom: 10px; }
.bar i { display: block; height: 100%; width: var(--p); background: var(--green-line); border-radius: 4px; }
.pays { list-style: none; margin: 16px 0 0; padding: 0 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); }
.pays li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pays li:last-child { border: 0; }
.p-main { display: flex; flex-direction: column; min-width: 0; }
.p-main small { color: var(--ink-3); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-bottom: 8px; }
.ph { padding: 0; border: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 1; background: var(--surface-2); cursor: pointer; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.docs { list-style: none; margin: 0 0 8px; padding: 0 12px 0 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); }
.docs li { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.docs li:last-child { border: 0; }
.docs a { flex: 1; display: flex; gap: 12px; align-items: center; padding: 11px 0; text-decoration: none; color: inherit; min-width: 0; }
.doc-main { display: flex; flex-direction: column; min-width: 0; }
.doc-main b { font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-main small { color: var(--ink-3); }
.lightbox { display: block; width: 100%; max-height: 70dvh; object-fit: contain; border-radius: 12px; background: var(--surface-2); }
.logo-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.logo-prev { height: 56px; max-width: 160px; border-radius: 12px; object-fit: contain; background: var(--surface-2); }
.logo-prev.mono { width: 56px; display: grid; place-items: center; font: 700 1.1rem var(--font-d); background: var(--green); color: var(--on-accent); }

/* ---------- sheet, toast ---------- */
.scrim { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .5); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .18s ease; }
.scrim.open { opacity: 1; }
.sheet { width: 100%; max-width: 560px; max-height: 92dvh; background: var(--bg); border-radius: 22px 22px 0 0; display: flex; flex-direction: column; transform: translateY(24px); transition: transform .22s cubic-bezier(.2, .8, .2, 1); box-shadow: var(--shadow); outline: none; }
.scrim.open .sheet { transform: none; }
.sheet.small { max-width: 440px; }
.sheet.full { max-width: 760px; }
.sheet-h { display: flex; justify-content: space-between; align-items: center; padding: 14px 12px 6px 20px; }
.sheet-h h2 { font-size: 1.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-b { overflow-y: auto; padding: 8px 20px calc(20px + var(--safe-b)); overscroll-behavior: contain; }
@media (min-width: 640px) { .scrim { align-items: center; } .sheet { border-radius: 22px; max-height: 88dvh; } }
.opt-list { display: flex; flex-direction: column; gap: 6px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; padding: 13px 14px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 560; }
.opt > span { flex: 1; }
.opt.on { border-color: var(--green-line); background: var(--green-soft); color: var(--green-ink); }
.opt:hover { border-color: var(--line-strong); }
.pick-list { margin: 12px 0 0; display: flex; flex-direction: column; max-height: 46dvh; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); }
.pick-row { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.pick-row:last-child { border: 0; }
.pick-row input { width: 22px; height: 22px; accent-color: var(--green); flex: none; }
.pick-main { display: flex; flex-direction: column; min-width: 0; }
.pick-main small { color: var(--ink-3); }
#toasts { position: fixed; z-index: 200; left: 0; right: 0; bottom: calc(104px + var(--safe-b)); display: flex; justify-content: center; pointer-events: none; padding: 0 16px; }
@media (min-width: 900px) { #toasts { bottom: 28px; } }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 14px; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-size: .94rem; box-shadow: var(--shadow); animation: rise .2s ease-out; max-width: 520px; }
.toast button { background: none; border: 0; color: var(--brass); font-weight: 700; cursor: pointer; padding: 0; }
:root[data-theme="dark"] .toast button { color: #7A5200; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast button { color: #7A5200; } }

/* ---------- sign in ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 36px; padding: 24px 16px; background: radial-gradient(110% 70% at 50% -10%, #3b2c05 0%, #120e03 45%, #000 100%); }
.login-route { width: 100%; max-width: 560px; opacity: .8; }
.login-route .t-label { display: none; }
.login-route .t-node::before { background: rgba(255,255,255,.22); }
.login-route .is-done .t-node::before, .login-route .is-now .t-node::before { background: linear-gradient(90deg, #F5B316 50%, rgba(255,255,255,.22) 50%); }
.login-route .is-done .t-node::before { background: #F5B316; }
.login-route .t-node::after { background: #000; border-color: rgba(255,255,255,.4); }
.login-route .is-done .t-node::after { background: #F5B316; border-color: #F5B316; }
.login-route .is-now .t-node::after { background: #FFF; border-color: #FFF; box-shadow: 0 0 0 6px rgba(245,179,22,.45); }
.login-card { width: 100%; max-width: 400px; background: var(--surface); color: var(--ink); border-radius: 24px; padding: 28px 24px 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.login-card h1 { font-size: 1.6rem; margin-top: 4px; }
.login-card .brand-mono, .login-card .brand-logo { align-self: flex-start; }
.login-card .btn { margin-top: 4px; }
.login-card .form-err { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .tabbar, .rail, .topbar, .btn, .icon-btn { display: none !important; } }

/* ---------- logo ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.brand-img { display: block; flex: none; object-fit: contain; }
.brand-img.mark { height: 24px; width: auto; }
.brand-img.logo { height: 132px; width: auto; align-self: flex-start; margin: -6px 0 2px -6px; }
.brand-img.rail-logo { width: 120px; height: auto; margin: 2px 0 10px 4px; }
.on-dark { display: none; }
:root[data-theme="dark"] .on-light { display: none; }
:root[data-theme="dark"] .on-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .on-light { display: none; }
  :root:not([data-theme="light"]) .on-dark { display: block; }
}
.rail .brand { padding: 4px 8px 14px; }

/* ---------- appearance control (iOS-style segmented) ---------- */
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 3px; border-radius: 12px; background: var(--line); }
.seg-b { border: 0; background: none; padding: 9px 4px; border-radius: 9px; font-weight: 620; font-size: .92rem; color: var(--ink-2); cursor: pointer; }
.seg-b.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.seg-note { margin-top: 8px; font-size: .88rem; }

/* ---------- trade lane: factory country to destination country ---------- */
.lane-block { margin-top: 16px; }
.route-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(70px, 1.1fr) minmax(0, 1fr); align-items: start; gap: 6px 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); color: inherit; text-decoration: none; }
a.route-card:hover { border-color: var(--line-strong); }
.rc-end { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rc-end.right { align-items: flex-end; text-align: right; }
.rc-flag { font-size: 1.7rem; line-height: 1.15; }
.rc-end b { font: 650 .98rem var(--font-d); overflow-wrap: anywhere; }
.rc-end small { color: var(--ink-3); font-size: .78rem; }
.rc-lane { position: relative; height: 38px; margin-top: 2px; }
.rc-line { position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed var(--line-strong); }
.rc-done { position: absolute; left: 0; top: 50%; width: var(--p); border-top: 3px solid var(--brass); margin-top: -1px; }
.rc-veh { position: absolute; left: clamp(19px, var(--p), calc(100% - 19px)); top: 50%; transform: translate(-50%, -50%); width: 36px; height: 36px; border-radius: 50%; background: var(--brass); color: #0A0A0A; display: grid; place-items: center; box-shadow: 0 0 0 4px var(--surface); }
.rc-cap { grid-column: 1 / -1; text-align: center; font-size: .9rem; font-weight: 620; margin-top: 4px; color: var(--ink-2); }
.route-card.compact { padding: 12px 14px; }
.route-card.compact .rc-flag { font-size: 1.35rem; }
.route-card.compact .rc-end small { display: none; }
.route-list { display: flex; flex-direction: column; gap: 12px; }
.rc-head { display: flex; justify-content: space-between; gap: 12px; padding: 0 4px 6px; font-size: .88rem; color: var(--ink-3); }
.rc-head b { color: var(--ink); font-weight: 620; overflow-wrap: anywhere; }
.lanes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.lanes-h { font-size: .85rem; color: var(--ink-3); font-weight: 620; margin-right: 4px; }
.lane-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 8px 7px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: .88rem; }
.lane-chip small { background: var(--brass); color: #0A0A0A; border-radius: 99px; min-width: 22px; text-align: center; padding: 1px 7px; font-weight: 700; }
.now-cn { margin-top: 12px; font-size: .92rem; color: var(--ink-2); }
.now-cn span { color: var(--ink-3); margin-left: 4px; }
@media (prefers-reduced-motion: no-preference) {
  .rc-veh { animation: sail .9s cubic-bezier(.2, .8, .2, 1) backwards; }
  .rc-done { animation: grow .9s cubic-bezier(.2, .8, .2, 1) backwards; }
  @keyframes sail { from { left: 19px; } }
  @keyframes grow { from { width: 0; } }
}

/* ---------- photos and videos ---------- */
.ph { position: relative; }
.ph-blank { display: grid; place-items: center; width: 100%; height: 100%; color: var(--ink-3); background: var(--surface-2); }
.ph-play { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0, 0, 0, .68); color: #fff; display: grid; place-items: center; }
.ph-tag { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 7px 5px; font-size: .68rem; font-weight: 650; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); }
.tag-chips { margin-bottom: 4px; }
.up-box { margin-top: 12px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); display: flex; flex-direction: column; gap: 12px; }
.up-box .field { margin: 0; }
.up-prog .bar i { width: 0; transition: width .15s linear; background: var(--brass); }
.up-prog small { display: block; margin-top: 6px; color: var(--ink-2); }
.up-note { font-size: .82rem; }
.viewer { display: flex; flex-direction: column; gap: 12px; }
.v-stage { background: #000; border-radius: 12px; overflow: hidden; display: grid; place-items: center; max-height: 64dvh; }
.v-stage .lightbox { max-height: 64dvh; width: 100%; object-fit: contain; background: #000; border-radius: 0; }
.v-stage.zoom { overflow: auto; place-items: start; touch-action: pan-x pan-y pinch-zoom; }
.v-stage.zoom .lightbox { max-height: none; width: auto; max-width: none; }
.v-cap { display: flex; flex-direction: column; overflow-wrap: anywhere; }
.v-cap small { color: var(--ink-3); }
.v-nav { justify-content: space-between; align-items: center; }
.danger-t { color: var(--red); }

@media (max-width: 520px) {
  .detail-h { flex-direction: column; align-items: stretch; gap: 10px; }
  .detail-h .page-a { justify-content: flex-start; }
}

/* ---- phone with country code ---------------------------------------------------------------- */
.phone { display: grid; grid-template-columns: minmax(0, 11.5rem) minmax(0, 1fr); gap: 8px; }
.phone select { padding-right: 28px; text-overflow: ellipsis; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
@media (max-width: 380px) { .phone { grid-template-columns: 1fr; } }

/* ---- passport, visa, KYC ---------------------------------------------------------------------- */
.kyc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.kyc-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 2px; }
.kyc-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kyc-list li:last-child { border-bottom: 0; }
.kyc-list .ck { flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; border: 1.5px dashed var(--line-strong); color: var(--ink-3); }
.kyc-list li.ok .ck { border: 0; background: var(--accent); color: var(--on-accent); }
.ck-main { display: grid; gap: 1px; min-width: 0; }
.ck-main small { color: var(--ink-3); font-size: .86rem; overflow-wrap: anywhere; }

/* ---- trip itinerary -------------------------------------------------------------------------- */
.itin { display: grid; gap: 14px; }
.it-day h3 { font: 650 .98rem var(--font-d); display: flex; align-items: baseline; gap: 8px; padding-bottom: 6px; margin-bottom: 2px; border-bottom: 1px solid var(--line-strong); }
.it-day h3 small { color: var(--ink-3); font: 500 .82rem var(--font-b); }
.it-row { display: grid; grid-template-columns: 3.1rem 36px minmax(0, 1fr) 40px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.it-row:last-child { border-bottom: 0; }
.it-time { font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 600; font-size: .9rem; text-align: right; }
.tile.sm { width: 36px; height: 36px; border-radius: 10px; }
.it-main { display: grid; gap: 1px; text-align: left; background: none; border: 0; padding: 4px 0; min-height: 44px; align-content: center; cursor: pointer; min-width: 0; }
.it-main b { font-weight: 620; overflow-wrap: anywhere; }
.it-main small { color: var(--ink-3); font-size: .86rem; overflow-wrap: anywhere; }
a.pill { text-decoration: none; }
a.pill::before { display: none; }
.bs { display: inline-flex; vertical-align: -2px; margin-right: 5px; color: var(--accent); }
:root:not([data-theme="dark"]) .bs { color: #B07F00; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bs { color: var(--accent); } }

/* ---- every phone and tablet: no zoom on focus, steady touch, tidy date fields ------------------- */
html { -webkit-tap-highlight-color: transparent; }
a, button, label, select, summary, [role=button] { touch-action: manipulation; }
input[type=date], input[type=time] { display: block; min-width: 0; text-align: left; -webkit-min-logical-width: calc(100% - 2px); }
input[type=date]::-webkit-date-and-time-value, input[type=time]::-webkit-date-and-time-value { text-align: left; min-height: 1.4em; }
input[type=date]::-webkit-calendar-picker-indicator, input[type=time]::-webkit-calendar-picker-indicator { opacity: .6; }
select, input, textarea { max-width: 100%; }
body { overflow-wrap: break-word; }
@supports (-webkit-touch-callout: none) { .login, #app:not([hidden]) { min-height: -webkit-fill-available; } }

/* ---- maps, travel party papers, order products, architects, container desk ------------------------ */
.map-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 2px; }
.dl dd .map-acts { margin-top: 8px; }
.driver { padding: 8px 4px 24px; text-align: center; }
.driver-cn { font: 700 clamp(1.9rem, 8vw, 3rem)/1.3 var(--font-b); margin: 12px 0; overflow-wrap: anywhere; }
.driver-en { font-size: 1.1rem; color: var(--ink-2); margin: 0 0 16px; overflow-wrap: anywhere; }
.v-line { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; margin-bottom: 8px; }
.ab-h { font: 650 .92rem var(--font-d); margin: 14px 0 4px; color: var(--ink-2); }
.ab.plain { margin-top: 12px; }
.ab.plain .up-box { margin-top: 6px; }
.photos.sm { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; margin: 8px 0 4px; }

.people { display: grid; gap: 14px; }
.person { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 14px 14px 12px; }
.pc-h { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.pc-t { flex: 1; min-width: 0; display: grid; }
.pc-t b { font-weight: 650; overflow-wrap: anywhere; }
.pc-t small { color: var(--ink-3); }
.person .dl { margin-top: 6px; }
.person .btn-row { margin: 10px 0 4px; }
.danger-t { color: var(--red); }
.slots { display: grid; gap: 2px; margin-top: 6px; }
.slot { padding: 10px 0; border-top: 1px solid var(--line); }
.slot-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.slot-h b { font-weight: 620; }
.slot-h small { color: var(--ink-3); flex: 1; min-width: 4.5rem; }
.slot-add { display: flex; gap: 6px; margin-left: auto; }
.slot .ck { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1.5px dashed var(--line-strong); color: var(--ink-3); }
.slot .ck.ok { border: 0; background: var(--accent); color: var(--on-accent); }
.slot .docs { margin-top: 8px; }

.items { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.item { min-width: 0; }
.item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 12px 14px 8px; }
.item-h { display: flex; align-items: flex-start; gap: 12px; }
.item-t { flex: 1; min-width: 0; display: grid; gap: 1px; }
.item-t b { font-weight: 650; overflow-wrap: anywhere; }
.item-t small { color: var(--ink-3); overflow-wrap: anywhere; }
.item-a { display: flex; }

.sels { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.sel { display: grid; gap: 2px; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 8px; align-content: start; }
.sel-img { aspect-ratio: 4 / 3; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; color: var(--ink-3); margin-bottom: 4px; }
.sel-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sel b { font-weight: 620; font-size: .92rem; overflow-wrap: anywhere; }
.sel small { color: var(--ink-3); font-size: .8rem; overflow-wrap: anywhere; }

.seg.two { grid-template-columns: repeat(2, 1fr); margin: 4px 0 12px; }
a.seg-b { text-align: center; text-decoration: none; display: block; }
.figures.sm b { font-size: 1.1rem; }
.stmt.tight th, .stmt.tight td { padding: 10px 12px; font-size: .92rem; }
.stmt.tight thead th, .stmt.tight tr:first-child th { font-weight: 600; color: var(--ink-3); font-size: .8rem; }
.stmt.tight .r { text-align: right; }
.stmt.tight td:first-child { text-align: left; font-weight: 600; }
.stmt.tight td small { display: block; }
.dl > div { grid-template-columns: minmax(96px, 34%) minmax(0, 1fr); }
.dl dd { min-width: 0; }
.dl dd .map-acts .btn { white-space: normal; text-align: left; height: auto; min-height: 38px; padding-top: 6px; padding-bottom: 6px; }
@media (max-width: 420px) { .dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
.block-h { flex-wrap: wrap; }
.block-a { flex-wrap: wrap; justify-content: flex-end; }

/* ---- money in and out, by currency; deliveries ---------------------------------------------------- */
.cur-tbl { margin: 0 0 12px; }
.cur-tbl thead th { font-size: 13px; color: var(--ink-2); font-weight: 500; padding: 10px 16px; text-align: right; }
.cur-tbl thead th:first-child { text-align: left; }
.cur-tbl td { text-align: right; }
.cur-tbl td small { display: block; color: var(--ink-2); font-size: 13px; }
.cur-tbl tr.sum th, .cur-tbl tr.sum td { font-weight: 640; background: color-mix(in srgb, var(--surface) 92%, var(--ink) 8%); }
.pay-in { font-weight: 640; }
.pays .p-main { display: grid; gap: 2px; min-width: 0; }
.pays .p-main small { color: var(--ink-2); overflow-wrap: anywhere; }
.pays a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.inb-groups { display: grid; gap: 12px; margin-top: 12px; }
.inb-g .ab-h { margin: 0 0 4px; }
.inb-l { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.inb-l li { display: grid; gap: 1px; }
.inb-l a { text-decoration: none; color: inherit; }
.inb-l small { color: var(--ink-2); }
.item.inbound { display: grid; gap: 4px; }
.item.inbound .btn-row { margin-top: 8px; }
@media (max-width: 380px) {
  .cur-tbl th, .cur-tbl td { padding: 10px 8px; font-size: 14px; }
  .cur-tbl thead th { padding: 8px; }
}

/* Clear partitions: vendor parts and each section of an order */
.vpart { padding: 14px 0 6px; border-top: 1px solid var(--line); margin-top: 12px; }
.vpart .ab-h { margin: 0 0 6px; }
.vpart.vfirst { border-top: 0; margin-top: 0; padding-top: 0; }
.sectioned > .block { margin-top: 0; padding: 26px 0 8px; border-top: 1px solid var(--line-strong); }
.sectioned > .lane-block, .sectioned > .hero-track { border-top: 0; padding-top: 18px; }
.sectioned > .hero-track { padding-top: 6px; }

/* bill codes, line amounts, container table */
.code { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; padding: 1px 6px; border-radius: 6px; background: var(--soft, rgba(127,127,127,.14)); color: var(--muted, inherit); vertical-align: 2px; }
.item-t .amt { color: inherit; }
.cont-tbl th small, .cont-tbl td small { display: block; font-weight: 400; }
.cont-tbl td, .cont-tbl th[scope=col]:not(:first-child) { text-align: right; }
