/* =====================================================================
   help.tranxact.ai

   Not a palette of its own. Every colour, radius, font and spacing step
   here resolves to a token in theme.css, which is lifted verbatim from
   the console's styles.css — so this site is the product's design system
   applied to prose, and rebranding the product rebrands the docs.

   The signature is carried over intact: the MODULE SPINE. Each module has
   a hue, exposed as --mc on the page shell, and it runs down the left of
   the page header, the section heads and the tiles, and along the bottom
   of the current module tab. A reader in Supply Chain sees the same amber
   they see in the console.

   Right-to-left is handled with logical properties rather than a second
   sheet, so Arabic and Urdu mirror without anything being maintained
   twice.
   ===================================================================== */

/* --mc is the module hue. It falls back to the house accent, exactly as
   the console's own rules do: var(--mc, var(--accent)) everywhere. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
}

a { color: var(--mc, var(--accent)); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

code, .mono { font-family: var(--font-mono); font-size: 0.88em; }
code {
  background: var(--wash-2);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: .08em .38em;
  word-break: break-word;
}
pre {
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
pre code { background: none; border: 0; padding: 0; }

.skip {
  position: absolute; inset-inline-start: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--on-brand); padding: 10px 16px;
}
.skip:focus { inset-inline-start: 0; }

/* =====================================================================
   TOP BAR — the console's two-row topbar, with search in place of the
   org switcher.
   ===================================================================== */
.top {
  position: sticky; top: 0; z-index: 30;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 0 20px;
}
.topline {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 9px 0;
}

/* --- the mark --------------------------------------------------------
   The hexagon and the wordmark exactly as components/Logo.jsx draws
   them: TRANXACT in the display face, .AI in the brand red. */
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.brand svg { display: block; flex: none; }
.logo-word {
  font-family: var(--font-display); font-weight: 700; letter-spacing: 0.08em;
  color: var(--ink); line-height: 1; white-space: nowrap; font-size: 15px;
}
.logo-word-ai { color: var(--brand-red); }
.brand-sub {
  font-family: var(--font-display); font-size: 11px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim);
  padding-inline-start: 10px; margin-inline-start: 2px;
  border-inline-start: 1px solid var(--line);
  white-space: nowrap;
}

.find { position: relative; flex: 1 1 240px; min-width: 170px; max-width: 520px; }
.find input {
  width: 100%; padding: 7px 13px;
  font-family: inherit; font-size: 13px; color: var(--text);
  background: var(--paper);
  border: 1px solid var(--line); border-radius: 8px;
}
.find input:focus { outline: 2px solid var(--mc, var(--accent)); outline-offset: 0; border-color: transparent; }

.findout {
  position: absolute; inset-inline: 0; top: calc(100% + 6px);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 26px rgba(var(--shadow-rgb), 0.14);
  max-height: 62vh; overflow-y: auto; padding: 5px;
}
.findout a {
  display: block; padding: 7px 10px; border-radius: 7px;
  color: var(--text); text-decoration: none; font-size: 13.5px;
}
.findout a:hover, .findout a.on { background: var(--ink-soft); color: var(--ink); }
.findout small { display: block; color: var(--text-dim); font-size: 11.5px; }
.findout .none { padding: 10px; color: var(--text-dim); font-size: 13px; }

.topnav { display: flex; gap: 2px; margin-inline-start: auto; }
.topnav a {
  padding: 6px 11px; border-radius: 7px;
  font-size: 13px; font-weight: 600; color: var(--text-dim); text-decoration: none;
}
.topnav a:hover { color: var(--ink); background: var(--ink-soft); }

.langpick, .themepick {
  font-family: inherit; font-size: 12.5px; color: var(--text-dim);
  background: var(--card); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 8px; cursor: pointer;
}
.langpick:hover, .themepick:hover { color: var(--ink); border-color: var(--line-strong); }

/* --- module tabs, exactly as the console draws them ------------------ */
.modtabs {
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
  border-top: 1px solid var(--line); margin: 0 -20px; padding: 0 20px;
}
.modtabs::-webkit-scrollbar { display: none; }
.modtab {
  padding: 10px 13px 8px; text-decoration: none; white-space: nowrap;
  font-size: 12.5px; font-weight: 600; color: var(--text-dim);
  border-bottom: 3px solid transparent;
}
.modtab:hover { color: var(--ink); }
.modtab.current { color: var(--mc, var(--accent)); border-bottom-color: var(--mc, var(--accent)); }

/* =====================================================================
   SHELL
   ===================================================================== */
.shell {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 34px;
  max-width: 1460px; margin: 0 auto;
  padding: 24px 30px 60px;
}
.shell.nosidebar { grid-template-columns: minmax(0, 1fr); }

.side {
  position: sticky; top: 92px; align-self: start;
  max-height: calc(100vh - 118px); overflow-y: auto;
  padding-inline-end: 8px; font-size: 13.5px;
}
.sidehead {
  font-family: var(--font-display); font-weight: 700; font-size: 13.5px;
  margin-bottom: 10px; padding-inline-start: 10px;
  border-inline-start: 3px solid var(--mc, var(--accent));
}
.sidehead a { color: var(--ink); text-decoration: none; }
.sgroup {
  margin: 15px 0 4px;
  font-family: var(--font-display); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim);
}
.slist, .sscreens { list-style: none; margin: 0; padding: 0; }
.slist > li > a {
  display: block; padding: 4px 9px; border-radius: 6px;
  color: var(--text-dim); text-decoration: none;
  border-inline-start: 2px solid transparent;
}
.slist > li > a:hover { background: var(--ink-soft); color: var(--ink); }
.slist > li.on > a {
  color: var(--mc, var(--accent)); font-weight: 600;
  background: var(--ink-soft); border-inline-start-color: var(--mc, var(--accent));
}
.sscreens { margin: 3px 0 8px; padding-inline-start: 11px; border-inline-start: 1px solid var(--line); }
.sscreens a {
  display: block; padding: 3px 9px; border-radius: 5px;
  color: var(--text-dim); text-decoration: none; font-size: 13px;
}
.sscreens a:hover { color: var(--ink); background: var(--ink-soft); }
.sscreens li.on a { color: var(--mc, var(--accent)); font-weight: 600; }

main { min-width: 0; }

/* =====================================================================
   TEXT
   ===================================================================== */
h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 30px; line-height: 1.18; color: var(--ink);
  margin: 2px 0 8px;
}
h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 19px; line-height: 1.3; color: var(--ink);
  margin: 34px 0 10px; scroll-margin-top: 100px;
}
h3 { font-family: var(--font-display); font-weight: 700; font-size: 15.5px; margin: 22px 0 6px; }
p { margin: 0 0 13px; max-width: 76ch; }
ul, ol { max-width: 76ch; }
li { margin-bottom: 5px; }

.lede { font-size: 17px; line-height: 1.55; color: var(--text-dim); max-width: 72ch; }
.factline { font-size: 12.5px; color: var(--text-dim); margin-bottom: 18px; }
.fineprint, .hint { font-size: 12.5px; color: var(--text-dim); }

/* --- the page head, with its spine ---------------------------------- */
.page-head {
  border-inline-start: 4px solid var(--mc, var(--accent));
  padding-inline-start: 14px;
  margin-bottom: 20px;
}
.page-head .eyebrow {
  font-family: var(--font-display); font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--mc, var(--accent));
}
.page-head h1 { margin: 3px 0 4px; }
.page-head .lede { font-size: 14.5px; }

.crumbs { margin-bottom: 12px; font-size: 12px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "›"; color: var(--text-dim); margin-inline-end: 5px; }
.crumbs a { color: var(--text-dim); text-decoration: none; }
.crumbs a:hover { color: var(--mc, var(--accent)); text-decoration: underline; }

.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding-inline-start: 36px; margin-bottom: 11px; }
.steps li::before {
  content: counter(s);
  position: absolute; inset-inline-start: 0; top: 1px;
  width: 24px; height: 24px; display: grid; place-items: center;
  border-radius: 50%;
  background: var(--ink-soft); color: var(--mc, var(--accent));
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
}

/* =====================================================================
   CALLOUTS — the console's state washes
   ===================================================================== */
.callout {
  display: flex; gap: 11px;
  padding: 13px 15px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--card);
  margin: 16px 0; max-width: 80ch;
}
.callout p:last-child { margin-bottom: 0; }
.callout .ci {
  flex: none; width: 20px; height: 20px; margin-top: 2px;
  display: grid; place-items: center; border-radius: 50%;
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  color: var(--on-brand);
}
.note { background: var(--info-wash); border-color: var(--info-line); }
.note .ci { background: var(--info); }
.warn { background: var(--warn-wash); border-color: var(--warn-line); }
.warn .ci { background: var(--warn); }

/* =====================================================================
   TABLES — ledger-grade: mono for codes and figures
   ===================================================================== */
.tw {
  overflow-x: auto; margin: 13px 0 20px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card);
}
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td {
  text-align: start; padding: 8px 13px;
  border-bottom: 1px solid var(--line-soft); vertical-align: top;
}
thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--wash-2); color: var(--text-dim);
  font-family: var(--font-display); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--wash); }
td.num, th.num { text-align: end; font-family: var(--font-mono); font-size: 12.5px; white-space: nowrap; }

.req {
  font-family: var(--font-display); font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--bad); background: var(--bad-wash); border: 1px solid var(--bad-line);
  border-radius: 3px; padding: 0 5px; white-space: nowrap;
}
.src { color: var(--text-dim); font-size: 12.5px; }

/* =====================================================================
   TILES AND CARDS — the console's tile, spine and all
   ===================================================================== */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(256px, 1fr)); gap: 12px; margin: 14px 0 26px; }
.card {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius);
  border-inline-start: 3px solid var(--mc, var(--accent));
  padding: 13px 15px; text-decoration: none; color: var(--text);
}
.card:hover {
  border-color: var(--mc, var(--accent));
  box-shadow: 0 2px 10px rgba(var(--shadow-rgb), 0.07);
}
.card h3 {
  margin: 0; font-family: var(--font-display); font-weight: 700;
  font-size: 14px; color: var(--ink);
}
.card p { margin: 0; font-size: 12.5px; color: var(--text-dim); line-height: 1.45; }
.cardmeta {
  margin-top: auto; padding-top: 8px;
  font-family: var(--font-display); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim);
}

.group { margin-bottom: 34px; }
.group > h2 {
  font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--mc, var(--accent));
  border-inline-start: 4px solid var(--mc, var(--accent));
  padding-inline-start: 12px; margin: 30px 0 4px;
}
.group > .lede { font-size: 13px; padding-inline-start: 16px; margin-bottom: 14px; }

.secs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.sec {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); padding: 13px 15px;
}
.sec h3 { margin: 0 0 3px; font-size: 14px; }
.sec h3 a { color: var(--ink); text-decoration: none; }
.sec h3 a:hover { color: var(--mc, var(--accent)); }
.count {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-dim);
  background: var(--wash-2); border-radius: 99px; padding: 1px 8px;
  margin-inline-start: 4px;
}
.secblurb { font-size: 12.5px; color: var(--text-dim); margin: 0 0 8px; line-height: 1.45; }

.tiles { list-style: none; margin: 0; padding: 0; }
.tiles li { margin: 0; border-top: 1px solid var(--line-soft); }
.tiles li:first-child { border-top: 0; }
.tiles a { display: inline-block; padding: 5px 0; font-size: 13px; text-decoration: none; color: var(--text); }
.tiles a:hover { color: var(--mc, var(--accent)); }
.tiles em {
  font-style: normal; font-family: var(--font-display);
  font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-dim); margin-inline-start: 7px;
}
.tiles.wide { columns: 210px 3; column-gap: 26px; }

/* =====================================================================
   SCREEN PAGE
   ===================================================================== */
.whereis {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--wash); padding: 14px 16px; margin: 18px 0;
}
.whereis h2 {
  margin: 0 0 9px; font-size: 10.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-dim);
}
.path {
  list-style: none; margin: 0 0 9px; padding: 0;
  display: flex; flex-wrap: wrap; gap: 5px 13px; font-size: 13.5px;
}
.path li { position: relative; padding-inline-end: 13px; }
.path li:not(:last-child)::after { content: "›"; position: absolute; inset-inline-end: 0; color: var(--text-dim); }
.addr { font-size: 13px; margin-bottom: 5px; }
.whereis .factline { margin: 0; }

.actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.action {
  border: 1px solid var(--line); border-radius: var(--radius);
  border-inline-start: 3px solid var(--mc, var(--accent));
  background: var(--card); padding: 12px 15px;
}
.action.danger { border-inline-start-color: var(--bad); }
.action h3 { margin: 0 0 3px; font-size: 14px; color: var(--ink); }
.action p { font-size: 13px; margin-bottom: 6px; }
.ameta { color: var(--text-dim); font-size: 12.5px !important; }
.confirm { color: var(--warn); }
.tag {
  font-family: var(--font-display); font-size: 9.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--mc, var(--accent)); color: var(--on-brand);
  border-radius: 3px; padding: 1px 6px; vertical-align: 2px;
}
.asks .ask {
  display: inline-block; font-family: var(--font-mono); font-size: 11.5px;
  background: var(--wash-2); border: 1px solid var(--line-soft);
  border-radius: 5px; padding: 1px 7px; margin: 2px 3px 2px 0;
}
.crosslinks { font-size: 14px; }
.trainlink { margin-top: 32px; }

/* =====================================================================
   HOME
   ===================================================================== */
.hero { padding: 18px 0 10px; }
.hero h1 { font-size: 40px; letter-spacing: -0.01em; }
.herofind { display: flex; gap: 8px; max-width: 600px; margin: 18px 0 14px; }
.herofind input {
  flex: 1; padding: 11px 15px;
  font-family: inherit; font-size: 14px; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: 9px;
}
.herofind input:focus { outline: 2px solid var(--mc, var(--accent)); outline-offset: 0; border-color: transparent; }
.herofind button {
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  padding: 11px 22px; border: 1px solid var(--accent); border-radius: 9px;
  background: var(--accent); color: var(--on-brand); cursor: pointer;
}
.pills { display: flex; flex-wrap: wrap; gap: 7px; }
.pill {
  font-size: 12.5px; padding: 5px 12px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--card);
  color: var(--text-dim); text-decoration: none;
}
.pill:hover { border-color: var(--accent); color: var(--accent); }

.btn {
  display: inline-block; font-family: var(--font-display); font-weight: 700;
  font-size: 13.5px; padding: 9px 18px; border-radius: 8px;
  background: var(--accent); color: var(--on-brand);
  border: 1px solid var(--accent); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--petrol-dark); border-color: var(--petrol-dark); }
.btn.ghost { background: transparent; color: var(--mc, var(--accent)); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--ink-soft); border-color: var(--mc, var(--accent)); }

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 30px; margin-top: 32px; }

/* =====================================================================
   SEARCH RESULTS
   ===================================================================== */
.results { margin-top: 16px; }
.results a {
  display: block; padding: 11px 14px;
  border: 1px solid var(--line); border-inline-start: 3px solid var(--line-strong);
  border-radius: var(--radius); background: var(--card);
  margin-bottom: 7px; text-decoration: none; color: var(--text);
}
.results a:hover { border-color: var(--accent); border-inline-start-color: var(--accent); }
.results strong {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: 14.5px; color: var(--ink);
}
.results small { color: var(--text-dim); font-size: 11.5px; }
.results p { margin: 3px 0 0; font-size: 13px; color: var(--text-dim); }

/* =====================================================================
   FOOTER
   ===================================================================== */
.foot {
  border-top: 1px solid var(--line);
  padding: 22px 30px 40px; color: var(--text-dim); font-size: 12.5px;
}
.foot p { max-width: 1460px; margin: 0 auto 5px; }
.foot .meta { font-family: var(--font-mono); font-size: 11.5px; }

/* =====================================================================
   LANGUAGE CHOOSER AT THE SITE ROOT
   ===================================================================== */
body.chooser { display: grid; place-items: center; min-height: 100vh; }
body.chooser main { text-align: center; padding: 30px; }
body.chooser .brand { justify-content: center; margin-bottom: 14px; }
body.chooser h1 { font-size: 26px; }
.langs {
  list-style: none; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px; max-width: 620px;
}
.langs a {
  display: block; padding: 10px 14px;
  border: 1px solid var(--line); border-inline-start: 3px solid var(--accent);
  border-radius: 8px; background: var(--card); text-decoration: none; color: var(--text);
}
.langs a:hover { border-color: var(--accent); }
.langs span { display: block; font-size: 11.5px; color: var(--text-dim); }

/* =====================================================================
   NARROW
   ===================================================================== */
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 18px 18px 50px; }
  .side {
    position: static; max-height: none;
    border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--card); padding: 13px;
  }
  .topnav { order: 5; margin-inline-start: 0; }
  .find { order: 9; flex-basis: 100%; max-width: none; }
  h1 { font-size: 25px; }
  .hero h1 { font-size: 30px; }
  .tiles.wide { columns: 1; }
  .foot { padding: 20px 18px 36px; }
}

@media print {
  .top, .side, .foot, .trainlink, .skip { display: none !important; }
  .shell { display: block; padding: 0; }
  a { text-decoration: none; color: inherit; }
  .tw { border: 0; }
}
