/* TRANSACTIONS page - builds on site.css + home-v3.css (proof band, board-top, svc rows).
   Brand tokens only: --aub, --plum, --heather, --royal, --mist, --line, --ink-soft. */

/* ---------- hero ---------- */
.tx-hero { padding-bottom: clamp(64px,8vw,104px); }
.tx-hero h1 { font-size: var(--title-size); max-width: none; }
.tx-hero .eyebrow { display: flex; align-items: center; gap: 18px; }
.tx-hero .eyebrow::after { content: ""; height: 1px; width: 72px; background: var(--heather); opacity: .6; }
.tx-hero-arcs-b { position: absolute; left: -22vw; bottom: -30vw; width: 44vw; min-width: 340px; opacity: .3; pointer-events: none; }
.tx-hero .hero-split { align-items: end; }
.tx-hero .hero-locs a { text-decoration: none; color: inherit; display: block; }
.tx-hero .hero-locs a:hover .loc-name { color: var(--heather); }
.tx-hero .loc-name { transition: color .25s ease; }
.tx-hero .loc-name b { font-family: 'Rebelton','Montserrat',sans-serif; font-weight: 400; color: var(--heather); margin-right: 10px; }

/* ---------- shared section head ---------- */
.tx-head { margin-bottom: clamp(36px,4.6vw,60px); }
.tx-head .sec-title { font-size: clamp(26px,3.4vw,46px); }
.tx-head .lede { justify-self: end; max-width: 46ch; text-wrap: balance; border-left: 2px solid var(--heather); padding-left: 20px; }
.tx-practices, .tx-ledger, .tx-group { scroll-margin-top: var(--nav-h); }

/* ---------- practice index (dark) ---------- */
.tx-practices { background: var(--aub); color: var(--white); position: relative; overflow: hidden; }
.tx-practices-arcs { position: absolute; right: -18vw; bottom: -26vw; width: 48vw; min-width: 380px; opacity: .3; pointer-events: none; }
.tx-practices .eyebrow { color: var(--heather); }
.tx-practices .lede { color: rgba(255,255,255,0.74); }
.tx-pr-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid rgba(199,155,232,0.25); }
.tx-pr { position: relative; width: 100%; display: grid; grid-template-columns: 72px minmax(0,1.2fr) minmax(0,1fr) 52px; gap: clamp(16px,3vw,40px); align-items: center; padding: clamp(24px,2.8vw,34px) 0; border: 0; border-bottom: 1px solid rgba(199,155,232,0.25); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; overflow: hidden; }
.tx-pr::before { content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 0; background: var(--heather); transition: width .6s cubic-bezier(.2,.6,.2,1); }
.tx-pr::after { content: ""; position: absolute; inset: 0; background: rgba(199,155,232,0.06); opacity: 0; transition: opacity .35s ease; pointer-events: none; }
.tx-pr:hover::before, .tx-pr:focus-visible::before { width: 100%; }
.tx-pr:hover::after, .tx-pr:focus-visible::after { opacity: 1; }
.tx-pr-n { font-family: 'Rebelton',sans-serif; font-size: clamp(30px,3.4vw,46px); line-height: 1; color: var(--heather); transition: color .35s ease; }
.tx-pr:hover .tx-pr-n { color: var(--white); }
.tx-pr-name { font-family: 'Rebelton','Montserrat',sans-serif; font-weight: 400; text-transform: uppercase; word-spacing: -0.14em; letter-spacing: 0.01em; font-size: clamp(18px,2vw,27px); line-height: 1.15; display: block; transition: transform .35s ease; }
.tx-pr:hover .tx-pr-name { transform: translateX(6px); }
.tx-pr-unit { display: block; margin-top: 10px; font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600; color: rgba(255,255,255,0.55); }
.tx-pr-top { display: block; }
.tx-pr-top .k { display: block; font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600; color: var(--heather); margin-bottom: 8px; }
.tx-pr-top .d { display: block; font-size: 15px; color: rgba(255,255,255,0.8); line-height: 1.45; }
.tx-pr-top .d b { font-family: 'Rebelton','Montserrat',sans-serif; font-weight: 400; word-spacing: -0.14em; color: var(--white); margin-right: 10px; }
.tx-pr-go { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.3); display: grid; place-items: center; justify-self: end; transition: background .3s ease, border-color .3s ease, transform .35s ease; }
.tx-pr-go svg { width: 17px; height: 17px; fill: none; stroke: #fff; stroke-width: 1.6; transition: stroke .3s ease; }
.tx-pr:hover .tx-pr-go { background: var(--heather); border-color: var(--heather); transform: rotate(90deg); }
.tx-pr:hover .tx-pr-go svg { stroke: var(--aub); }

/* ---------- ledger ---------- */
.tx-ledger { background: var(--mist); padding-top: clamp(36px,4.4vw,60px); }
.tx-bar { position: sticky; top: var(--nav-h); z-index: 20; background: rgba(246,244,248,0.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--aub); border-bottom: 1px solid var(--line); margin-bottom: clamp(40px,5vw,64px); }
.tx-bar-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; }
.tx-bar .chips { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.tx-bar .chip { font-family: inherit; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--ink-soft); cursor: pointer; white-space: nowrap; transition: border-color .2s, color .2s, background .2s; }
.tx-bar .chip:hover { border-color: var(--heather); color: var(--aub); }
.tx-bar .chip[aria-pressed="true"] { background: var(--aub); border-color: var(--aub); color: var(--white); }
.tx-bar .chip .cn { opacity: .55; margin-left: 7px; font-weight: 500; }
.tx-bar .chip[aria-pressed="true"] .cn { color: var(--heather); opacity: 1; }
.tx-bar-meta { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.tf-count { font-size: 12.5px; color: var(--ink-soft); letter-spacing: 0.04em; white-space: nowrap; max-width: none; margin: 0; }
.tf-count strong { color: var(--aub); }
.tf-reset { background: none; border: 0; font-family: inherit; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; color: var(--royal); cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 4px; }
.tf-reset[hidden] { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.tx-group + .tx-group { margin-top: clamp(64px,8vw,104px); }
.tx-group[hidden] { display: none; }
.tx-ghead { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); gap: clamp(24px,5vw,64px); align-items: end; padding-bottom: 22px; margin-bottom: clamp(26px,3vw,36px); border-bottom: 1px solid var(--line); }
.tx-ghead .eyebrow { margin-bottom: 14px; }
.tx-ghead .eyebrow::before { content: ""; display: inline-block; vertical-align: middle; width: 26px; height: 1.5px; background: var(--heather); margin: -2px 14px 0 0; }
.tx-ghead .sec-title { margin: 0; font-size: clamp(22px,2.6vw,34px); }
.tx-ghead .lede { margin: 0; justify-self: end; font-size: clamp(15px,1.3vw,16.5px); max-width: 48ch; }
.tx-gcount { font-family: 'Rebelton','Montserrat',sans-serif; color: var(--royal); margin-left: 12px; }

.tx-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: clamp(14px,1.6vw,22px); }
.tx { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: clamp(22px,2.2vw,30px); display: flex; flex-direction: column; min-height: 238px; overflow: hidden; transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease; }
.tx::before { content: ""; position: absolute; top: 0; left: 0; height: 3px; width: 44px; background: var(--heather); transition: width .5s cubic-bezier(.2,.6,.2,1); }
.tx:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(38,9,43,0.10); border-color: transparent; }
.tx:hover::before { width: 100%; }
.tx[hidden] { display: none; }
.tx-tag { display: flex; align-items: center; gap: 9px; font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; color: var(--royal); margin: 0 0 clamp(20px,2.4vw,30px); max-width: none; }
.tx-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--heather); flex-shrink: 0; }
.tx-value { font-family: 'Rebelton','Montserrat',sans-serif; font-weight: 400; word-spacing: -0.14em; font-size: clamp(30px,3vw,42px); line-height: 1; color: var(--aub); margin: 0 0 18px; max-width: none; }
.tx-name { font-family: 'Montserrat',sans-serif; font-size: 14px; font-weight: 600; letter-spacing: 0.08em; line-height: 1.35; color: var(--aub); margin: 0 0 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.tx-desc { font-size: 14px; color: var(--ink-soft); line-height: 1.55; margin: 0; max-width: none; }
.tx-empty { padding: 40px 0 10px; color: var(--ink-soft); font-size: 15px; }
.tx-empty[hidden] { display: none; }

/* ---------- notes ---------- */
.tx-notes { background: var(--white); border-top: 1px solid var(--line); padding: clamp(56px,7vw,88px) 0; }
.tx-notes-in { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.5fr); gap: clamp(24px,5vw,64px); align-items: start; }
.tx-notes .sec-title { font-size: clamp(22px,2.4vw,30px); margin: 0; max-width: 14ch; }
.tx-notes .principles { margin: 0; }
.tx-notes .f-note { margin-top: 22px; max-width: 70ch; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .tx-bar-in { flex-direction: column; align-items: stretch; gap: 12px; }
  .tx-bar-meta { justify-content: space-between; }
}
@media (max-width: 960px) {
  .tx-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .tx-pr { grid-template-columns: 56px minmax(0,1fr) 48px; }
  .tx-pr-top { grid-column: 2; grid-row: 2; }
  .tx-pr-go { grid-column: 3; grid-row: 1; }
}
@media (max-width: 900px) {
  .tx-head .lede, .tx-ghead .lede { justify-self: start; }
  .tx-ghead { grid-template-columns: 1fr; gap: 14px; }
  .tx-notes-in { grid-template-columns: 1fr; gap: 26px; }
}
@media (max-width: 760px) {
  .tx-bar .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gut) * -1); padding: 0 var(--gut); -webkit-overflow-scrolling: touch; }
  .tx-bar .chips::-webkit-scrollbar { display: none; }
  .tx-bar-in { padding: 12px 0; }
}
@media (max-width: 600px) {
  .tx-grid { grid-template-columns: 1fr; gap: 12px; }
  .tx { min-height: 0; padding: 18px 18px 20px; display: grid; grid-template-columns: minmax(0,1fr) auto; column-gap: 14px; align-items: center; }
  .tx-tag { margin: 0; grid-column: 1; grid-row: 1; }
  .tx-value { font-size: 26px; margin: 0; grid-column: 2; grid-row: 1; }
  .tx-name { grid-column: 1 / -1; padding-top: 14px; margin-top: 14px; }
  .tx-desc { grid-column: 1 / -1; }
  .tx-pr { grid-template-columns: 40px minmax(0,1fr) 40px; gap: 10px 14px; padding: 22px 0; }
  .tx-pr-n { font-size: 24px; }
  .tx-pr-name { font-size: 17px; }
  .tx-pr-go { width: 40px; height: 40px; }
  .tx-pr-top .d { font-size: 14px; }
  .tx-pr-top { grid-column: 2 / -1; }
  .tx-hero .hero-locs { gap: 28px; }
}

/* ---------- RTL (ar/transactions) ---------- */
html[dir="rtl"] .tx-hero-arcs-b { left: auto; right: -22vw; }
html[dir="rtl"] .tx-practices-arcs { right: auto; left: -18vw; }
html[dir="rtl"] .tx-head .lede { border-left: 0; padding-left: 0; border-right: 2px solid var(--heather); padding-right: 20px; }
html[dir="rtl"] .tx-pr { text-align: right; }
html[dir="rtl"] .tx-pr::before { left: auto; right: 0; }
html[dir="rtl"] .tx-pr:hover .tx-pr-name { transform: translateX(-6px); }
html[dir="rtl"] .tx-pr-name, html[dir="rtl"] .tx-name { font-family: 'Tajawal','Segoe UI',Tahoma,Arial,sans-serif; font-weight: 700; }
html[dir="rtl"] .tx-pr-name { font-size: clamp(19px,2vw,28px); }
html[dir="rtl"] .tx-name { font-size: 16px; }
html[dir="rtl"] .tx-pr-unit, html[dir="rtl"] .tx-pr-top .k, html[dir="rtl"] .tx-tag, html[dir="rtl"] .tx-bar .chip, html[dir="rtl"] .tf-count, html[dir="rtl"] .tf-reset { font-family: 'Tajawal','Segoe UI',Tahoma,Arial,sans-serif; font-size: 13px; }
html[dir="rtl"] .tx-bar .chip { font-size: 14px; font-weight: 500; }
html[dir="rtl"] .tx-pr-top .d b, html[dir="rtl"] .tx-pr-n, html[dir="rtl"] .tx-value, html[dir="rtl"] .tx-gcount { direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] .tx-pr-top .d b { margin-right: 0; margin-left: 10px; }
html[dir="rtl"] .tx-pr-go svg { transform: scaleX(-1); }
html[dir="rtl"] .tx-bar .chip .cn { margin-left: 0; margin-right: 7px; }
html[dir="rtl"] .tx::before { left: auto; right: 0; }
html[dir="rtl"] .tx-value { text-align: right; }
html[dir="rtl"] .tx-ghead .eyebrow::before { margin: -2px 0 0 14px; }
html[dir="rtl"] .tx-gcount { margin-left: 0; margin-right: 12px; }
html[dir="rtl"] .tx-name, html[dir="rtl"] .tx-pr-top .nm { unicode-bidi: plaintext; text-align: right; }
html[dir="rtl"] .tx-pr-top .nm { display: inline-block; }
html[dir="rtl"] .tx-proof .proof-item .v { direction: ltr; unicode-bidi: isolate; text-align: right; }

/* Malahide Partners own mandate */
.tx.tx-own { border-top-color: var(--heather); box-shadow: inset 0 0 0 1px rgba(199,155,232,0.55); }
.tx-own-badge { margin-top: 14px; display: inline-block; width: fit-content; align-self: flex-start; justify-self: start; padding: 5px 10px; border-radius: 999px; background: var(--aub, #26092B); color: #fff; font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }

/* Mobile legibility */
@media (max-width: 600px) {
  .tx-tag, .tx-pr-unit, .tx-pr-top .k, .tx-own-badge { font-size: 11.5px; }
}

/* Mobile polish */
@media (max-width: 600px) {
  .tx-own-badge { grid-column: 1 / -1; }
  .tx-hero .hero-locs a { display: flex; flex-direction: column; height: 100%; }
  .tx-hero .hero-locs .loc-name { margin-top: auto; }
}
