/* Transaction detail page — extends dashboard shell */

:root {
  --txd-purple: var(--color-cosmos-accent);
  --txd-purple-soft: var(--dash-surface-hover);
  --txd-card-elevated: var(--dash-elevated);
  --txd-border: var(--dash-border);
  --txd-text: var(--dash-text, #f4f4f5);
  --txd-success: var(--color-success);
  --txd-warning: var(--color-warning);
  --txd-success-soft: var(--color-success-soft);
  --txd-success-border: color-mix(in srgb, var(--color-success) 28%, transparent);
  --txd-danger: #ef4444;
  --txd-right-w: 320px;
  --txd-avatar-bg: var(--dash-avatar-bg, #2c2c2e);
  --txd-avatar-fg: var(--dash-avatar-fg, #f4f4f5);
}

body.txd-page {
  --dash-purple: var(--txd-purple);
  --dash-purple-soft: var(--txd-purple-soft);
}


.txd-page .dash-new-btn,
.txd-page .dash-pro__btn,
.txd-page .txd-btn--primary {
  background: var(--txd-purple);
}

.txd-page .dash-pro__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.txd-page .dash-search input:focus {
  border-color: var(--dash-border-strong);
  box-shadow: 0 0 0 3px var(--dash-surface-hover);
}

.txd-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Layout */
.txd-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: var(--dash-content-y, 32px) var(--dash-page-x, 32px);
  padding-left: calc(var(--dash-page-x, 32px) + var(--dash-mobile-nav-gutter, 0px));
  padding-bottom: calc(var(--dash-content-y, 32px) + var(--dash-content-pad-bottom, 0px));
  flex: 1;
  min-width: 0;
}

.txd-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--txd-right-w);
  gap: 24px;
  align-items: start;
}

.txd-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.txd-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 24px;
}

.txd-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--dash-text-muted);
}

.txd-crumb a {
  color: var(--dash-text-muted);
  text-decoration: none;
  transition: color 150ms ease;
}

.txd-crumb a:hover { color: var(--txd-purple); }

.txd-crumb__sep { opacity: 0.5; }

.txd-crumb [aria-current="page"] { color: var(--txd-text); }

/* Cards */
.txd-card {
  background: var(--dash-card);
  border: none;
  border-radius: 20px;
  box-shadow: var(--dash-shadow);
  padding: 20px;
  transition: box-shadow 150ms ease;
}

.txd-card:hover {
  box-shadow: var(--dash-shadow-hover, none);
}

.txd-card__title {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--txd-text);
}

/* Hero */
.txd-hero {
  position: relative;
  display: block;
  container: txd-receipt / inline-size;
  padding: var(--spacing-4xl);
}

.txd-hero:hover {
  box-shadow: var(--dash-shadow);
}

.txd-hero__receipt {
  display: grid;
  justify-items: center;
  inline-size: min(100%, 36rem);
  margin-inline: auto;
  padding-block: var(--spacing-lg);
  text-align: center;
}

.txd-hero__direction {
  width: var(--button-height-lg);
  height: var(--button-height-lg);
  border-radius: var(--radius-circle, 50%);
  display: grid;
  place-items: center;
  background: var(--txd-success-soft);
  color: var(--txd-success);
}

.txd-hero[data-txd-direction="outgoing"] .txd-hero__direction {
  background: var(--txd-purple-soft);
  color: var(--txd-purple);
}

.txd-hero__direction-icon--outgoing,
.txd-hero[data-txd-direction="outgoing"] .txd-hero__direction-icon--incoming {
  display: none;
}

.txd-hero[data-txd-direction="outgoing"] .txd-hero__direction-icon--outgoing {
  display: block;
}

.txd-hero__counterparty {
  margin: var(--spacing-lg) 0 0;
  color: var(--txd-text);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-tight);
}

.txd-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.txd-badge--success {
  background: var(--txd-success-soft);
  color: var(--txd-success);
}

.txd-badge--muted {
  background: var(--dash-inner-surface);
  color: var(--dash-text-muted);
}

.txd-badge--verified {
  background: var(--txd-purple-soft);
  color: var(--txd-purple);
}

.txd-hero__amount {
  margin: var(--spacing-sm) 0 0;
  font-family: var(--font-numeric, var(--font-primary));
  font-size: clamp(calc(var(--font-size-3xl) + var(--spacing-sm)), 6cqi, var(--font-size-4xl));
  font-variant-numeric: tabular-nums;
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--color-number-primary, var(--txd-text));
  overflow-wrap: anywhere;
}

.txd-hero__desc {
  margin: var(--spacing-sm) 0 0;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-normal);
  color: var(--dash-text-muted);
}

.txd-hero__status-line {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-lg);
  font-size: var(--font-size-base);
  color: var(--dash-text-muted);
}

.txd-hero__status {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  color: var(--txd-success);
  font-weight: var(--font-weight-medium);
}

.txd-hero__status-separator {
  color: var(--dash-text-subtle, var(--dash-text-muted));
}

.txd-hero__actions {
  position: absolute;
  inset-block-start: var(--spacing-xl);
  inset-inline-end: var(--spacing-xl);
  display: flex;
  flex-direction: row;
  gap: var(--spacing-sm);
  align-items: center;
}

.txd-hero-action {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 13px;
  background: var(--dash-surface);
  color: var(--dash-text);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.txd-hero-action:hover:not(:disabled) {
  background: var(--dash-surface-hover);
}

.txd-hero-action:focus-visible {
  outline: var(--button-focus-width) solid var(--color-button-primary-focus, var(--txd-purple));
  outline-offset: var(--button-focus-offset);
}

.txd-hero-action:disabled {
  cursor: default;
  opacity: 0.72;
}

@container txd-receipt (max-width: 30rem) {
  .txd-hero__receipt {
    padding-block-start: var(--spacing-sm);
  }

  .txd-hero__actions {
    position: static;
    justify-content: center;
    margin-block-start: var(--spacing-xl);
  }
}

/* Buttons */
.txd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--button-radius, 9999px);
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.txd-btn--primary { color: #fff; }

.txd-btn--primary:hover:not(:disabled) {
  opacity: 0.9;
}

.txd-btn--secondary {
  background: var(--color-well);
  border: none;
  color: var(--txd-text);
}

.txd-btn--secondary:hover:not(:disabled) {
  background: var(--color-well-hover);
}

.txd-btn--ghost {
  background: transparent;
  border: none;
  color: var(--dash-text-muted);
}

.txd-btn--ghost:hover:not(:disabled) {
  color: var(--txd-text);
  background: var(--color-well);
}

.txd-btn--warning {
  background: var(--color-warning-soft);
  border: none;
  color: var(--txd-warning);
}

.txd-btn--warning:hover:not(:disabled) {
  background: color-mix(in srgb, var(--txd-warning) 20%, transparent);
}

.txd-btn--block { width: 100%; }

.txd-btn--sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.txd-btn.is-copied,
.txd-copy-btn.is-copied {
  color: var(--txd-success);
}

/* Summary rows */
.txd-rows {
  display: flex;
  flex-direction: column;
}

.txd-row {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  padding: 6px 0;
  border-bottom: 1px solid var(--dash-table-row-border, var(--txd-border));
}

.txd-row:last-child {
  border-bottom: none;
}

.txd-row__label {
  font-size: var(--font-size-base);
  color: var(--dash-text-subtle, var(--dash-text-muted));
}

.txd-row__value {
  min-width: 0;
  font-size: var(--font-size-md);
  font-weight: 500;
  color: var(--txd-text);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.txd-copy-btn {
  height: 28px;
  padding: 0 12px;
  border: none;
  border-radius: var(--button-radius, 9999px);
  background: var(--color-well);
  color: var(--txd-text);
  font: inherit;
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.txd-copy-btn:hover {
  background: var(--color-well-hover);
}

/* Timeline */
.txd-timeline {
  --txd-timeline-dot: 28px;
  --txd-timeline-axis: calc(var(--txd-timeline-dot) / 2);
  --txd-timeline-gap: 4px;
  --txd-timeline-row-pad: 10px;
  list-style: none;
  margin: 0;
  padding: 2px 0 0;
  position: relative;
}

.txd-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: var(--txd-timeline-dot) 58px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: var(--txd-timeline-row-pad) 8px var(--txd-timeline-row-pad) 0;
}

.txd-timeline li:not(:last-child)::before {
  content: '';
  position: absolute;
  left: var(--txd-timeline-axis);
  top: calc(var(--txd-timeline-row-pad) + var(--txd-timeline-dot) + var(--txd-timeline-gap));
  bottom: calc(var(--txd-timeline-gap) - var(--txd-timeline-row-pad));
  width: 1px;
  background: var(--txd-border);
  transform: translateX(-0.5px);
}

.txd-timeline__dot {
  width: var(--txd-timeline-dot);
  height: var(--txd-timeline-dot);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--txd-card-elevated);
  border: none;
  color: var(--dash-text-muted);
  z-index: 1;
}

.txd-timeline__dot svg {
  width: 13px;
  height: 13px;
}

.txd-timeline li.is-done .txd-timeline__dot {
  background: var(--txd-success-soft);
  color: var(--txd-success);
}

.txd-timeline li.is-current .txd-timeline__dot {
  background: var(--dash-surface);
  color: var(--txd-text);
}

.txd-timeline__time {
  font-size: 12px;
  font-weight: 500;
  color: var(--dash-text-muted);
  padding-top: 5px;
}

.txd-timeline__label {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--txd-text);
}

.txd-timeline__sub {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--dash-text-muted);
}

/* Related table */
.txd-table-wrap,
body.dash-page .txd-table-wrap {
  overflow-x: auto;
  max-inline-size: none;
  margin: 0 -20px;
  scrollbar-gutter: auto;
}

.txd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.txd-table thead th {
  padding: 14px 20px;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: var(--dash-text-subtle);
  white-space: nowrap;
}

.txd-table tbody td {
  padding: 16px 20px;
  color: var(--txd-text);
  border-bottom: 1px solid var(--dash-table-row-border, var(--txd-border));
  vertical-align: middle;
}

.txd-table tbody tr {
  transition: background 150ms ease;
}

.txd-table tbody tr:hover {
  background: var(--dash-table-row-hover, var(--color-surface-muted-hover, var(--dash-inner-surface)));
}

.txd-table tbody tr:last-child td {
  border-bottom: none;
}

.txd-table__amount--in { color: var(--color-number-primary, var(--txd-text)); font-weight: 500; }
.txd-table__amount--out { color: var(--txd-text); font-weight: 500; }

.txd-card__foot {
  padding-top: 16px;
  margin-top: 4px;
  border-top: 1px solid var(--txd-border);
}

.txd-link-btn {
  display: inline-flex;
  padding: 0;
  color: var(--dash-text-muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: color 150ms ease;
}

.txd-link-btn:hover { color: var(--txd-purple); }

/* Right panel */
.txd-aside {
  container: txd-aside / inline-size;
}

.txd-panel {
  background: var(--dash-card);
  border: none;
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  box-shadow: var(--dash-shadow);
  transition: box-shadow 150ms ease;
}

.txd-panel:hover {
  box-shadow: var(--dash-shadow-hover, none);
}

.txd-side-sheet {
  display: grid;
  gap: var(--spacing-4xl);
}

.txd-side-sheet:hover {
  box-shadow: var(--dash-shadow);
}

.txd-side-section {
  min-inline-size: 0;
}

.txd-panel__title {
  margin: 0 0 var(--spacing-lg);
  font-size: var(--font-size-md);
  line-height: var(--line-height-tight);
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.02em;
  color: var(--txd-text);
}

@container txd-aside (min-width: 44rem) {
  .txd-side-sheet {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--spacing-4xl);
  }
}

/* Counterparty */
.txd-party {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 32px;
  gap: var(--spacing-md);
  align-items: center;
  text-align: left;
}

.txd-party__logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-circle, 50%);
  display: grid;
  place-items: center;
  margin: 0;
  background: var(--txd-avatar-bg);
  color: var(--txd-avatar-fg);
}

.txd-party__body {
  min-width: 0;
}

.txd-party__name {
  margin: 0;
  font-size: var(--font-size-md);
  line-height: var(--line-height-tight);
  font-weight: var(--font-weight-semibold);
  color: var(--txd-text);
  min-width: 0;
  overflow-wrap: anywhere;
}

.txd-party__meta {
  margin: var(--spacing-xs) 0 0;
  font-size: var(--font-size-base);
  color: var(--dash-text-muted);
}

.txd-party__verified {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  margin-block-start: var(--spacing-sm);
  color: var(--txd-success);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.txd-party__link {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: var(--button-radius, 9999px);
  background: transparent;
  color: var(--dash-text-muted);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.txd-party__link:hover {
  background: var(--color-well);
  color: var(--txd-text);
}

.txd-party__link:active {
  transform: scale(var(--button-press-scale));
}

.txd-party__link:focus-visible,
.txd-disclosure > summary:focus-visible,
.txd-action-tile:focus-visible,
.txd-action-row:focus-visible {
  outline: var(--button-focus-width) solid var(--color-button-primary-focus, var(--txd-purple));
  outline-offset: var(--button-focus-offset);
}

/* Risk */
.txd-risk-score {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: var(--spacing-md);
  margin: 0 0 var(--spacing-md);
  padding: 0;
  background: transparent;
  border: none;
  text-align: start;
}

.txd-risk-score__icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-circle);
  background: var(--txd-success-soft);
  color: var(--txd-success);
}

.txd-risk-score__copy {
  display: grid;
  gap: var(--spacing-xs);
  min-inline-size: 0;
}

.txd-risk-score__copy strong {
  color: var(--txd-text);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
}

.txd-risk-score__copy span {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-tight);
  color: var(--dash-text-muted);
}

/* Compact native disclosures keep low-frequency detail available without crowding the rail. */
.txd-disclosure > summary {
  min-height: var(--button-height-md, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  padding-inline: var(--spacing-lg) var(--spacing-md);
  border-radius: var(--button-radius, 9999px);
  background: var(--color-well);
  color: var(--txd-text);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  list-style: none;
  transition: background 150ms ease;
}

.txd-disclosure > summary::-webkit-details-marker {
  display: none;
}

.txd-disclosure > summary:hover {
  background: var(--color-well-hover);
}

.txd-disclosure__chevron {
  flex: 0 0 auto;
  color: var(--dash-text-subtle, var(--dash-text-muted));
  transition: transform 150ms ease;
}

.txd-disclosure[open] > summary .txd-disclosure__chevron {
  transform: rotate(90deg);
}

.txd-checks {
  margin: var(--spacing-md) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.txd-checks__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: var(--spacing-md);
  padding-block: var(--spacing-sm);
  border-top: none;
}

.txd-checks__row:first-child {
  padding-block-start: 0;
}

.txd-checks__row:last-child {
  padding-block-end: 0;
}

.txd-checks__label,
.txd-checks__meta {
  margin: 0;
}

.txd-checks__label {
  color: var(--txd-text);
  font-size: var(--font-size-base);
  font-weight: 500;
  line-height: 1.3;
}

.txd-checks__meta {
  color: var(--dash-text-muted);
  font-size: var(--font-size-base);
  line-height: 1.3;
  text-align: end;
}

/* Attachments */
.txd-files {
  list-style: none;
  margin: var(--spacing-md) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.txd-file {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--spacing-md);
  padding-block: var(--spacing-sm);
  border-top: none;
  background: transparent;
}

.txd-file:first-child {
  padding-block-start: 0;
}

.txd-file:last-child {
  padding-block-end: 0;
}

.txd-file__icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: var(--color-well);
  color: var(--dash-text-muted);
}

.txd-file__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--font-size-base);
  color: var(--txd-text);
}

.txd-file .txd-btn {
  height: 28px;
  padding: 0 12px;
  font-size: var(--font-size-sm);
}

/* Actions list */
.txd-actions {
  display: grid;
  gap: var(--spacing-md);
}

.txd-actions button {
  font-family: inherit;
  cursor: pointer;
}

.txd-actions__quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-sm);
}

.txd-action-tile,
.txd-action-row {
  border: none;
  color: var(--txd-text);
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.txd-action-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  min-height: var(--button-height-md, 40px);
  padding-inline: var(--spacing-lg);
  border-radius: var(--button-radius, 9999px);
  background: var(--color-well);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
}

.txd-action-tile:hover:not(:disabled) {
  background: var(--color-well-hover);
}

.txd-action-tile:active:not(:disabled) {
  transform: scale(var(--button-press-scale, 0.98));
}

.txd-actions__list {
  display: grid;
  gap: var(--spacing-xs);
  padding-block-start: var(--spacing-sm);
}

.txd-action-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: var(--spacing-sm);
  min-height: var(--button-height-lg);
  padding: var(--spacing-sm);
  border-radius: var(--radius-md);
  background: transparent;
  text-align: left;
}

.txd-action-row:hover:not(:disabled) {
  background: var(--color-well);
}

.txd-action-row:hover:not(:disabled) .txd-action-icon {
  background: var(--dash-surface-hover);
}

.txd-action-row:hover:not(:disabled) .txd-action-copy > span:first-child {
  color: var(--txd-text);
}

.txd-action-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--txd-text);
}

.txd-action-tile .txd-action-icon {
  width: auto;
  height: auto;
  border-radius: 0;
}

.txd-action-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.txd-action-copy > span:first-child {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  line-height: 1.2;
}

.txd-action-copy > span:last-child {
  overflow: hidden;
  color: var(--dash-text-muted);
  font-size: var(--font-size-xs);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.txd-action-row--warning {
  color: var(--txd-warning);
}

.txd-action-row--warning .txd-action-icon {
  border-color: color-mix(in srgb, var(--txd-warning) 28%, transparent);
  background: var(--color-warning-soft);
  color: var(--txd-warning);
}

.txd-action-row--warning .txd-action-copy > span:last-child {
  color: var(--txd-warning);
}

@media (max-width: 1180px) {
  :root {
    --txd-right-w: minmax(0, 1fr);
  }

  .txd-content {
    padding: 24px;
  }

  .txd-layout {
    grid-template-columns: 1fr;
  }

  .txd-aside {
    position: static;
    display: block;
  }

  .txd-aside .txd-panel {
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .txd-content {
    padding: 20px;
  }

  .txd-main {
    gap: 18px;
  }

  .txd-card {
    border-radius: 16px;
    padding: 16px;
  }

  .txd-panel {
    border-radius: 16px;
  }
}

@media (max-width: 800px) {
  .txd-page .dash-header {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .txd-page .dash-header__left {
    grid-column: 2;
    min-width: 0;
  }

  .txd-page .dash-header__right {
    display: none;
  }

  .txd-content {
    padding-bottom: calc(24px + var(--dash-content-pad-bottom, 0px));
  }
}

@media (max-width: 640px) {
  .txd-content {
    padding: 16px 12px 24px;
    padding-bottom: calc(24px + var(--dash-content-pad-bottom, 0px));
  }

  .txd-layout,
  .txd-main,
  .txd-aside {
    gap: 14px;
  }

  .txd-crumb {
    font-size: 12px;
    overflow: hidden;
    white-space: nowrap;
  }

  .txd-page .dash-header__left .dash-new-wrap {
    display: none;
  }

  .txd-crumb a,
  .txd-crumb [aria-current="page"] {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .txd-card,
  .txd-panel {
    padding: 14px;
    border-radius: 14px;
  }

  .txd-card__title,
  .txd-panel__title {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .txd-hero-action {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .txd-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 12px;
    padding: 10px 0;
  }

  .txd-row__label {
    min-width: 0;
  }

  .txd-row__value {
    grid-column: 1;
    grid-row: 2;
  }

  .txd-row .txd-copy-btn {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
  }

  .txd-timeline {
    --txd-timeline-dot: 26px;
  }

  .txd-timeline li {
    grid-template-columns: var(--txd-timeline-dot) 44px minmax(0, 1fr);
    gap: 10px;
    padding-right: 0;
  }

  .txd-timeline__time {
    font-size: 11px;
  }

  .txd-timeline__label {
    font-size: 13px;
  }

  .txd-timeline__sub {
    font-size: 12px;
    line-height: 1.35;
  }

  .txd-table-wrap,
  body.dash-page .txd-table-wrap {
    overflow: visible;
    margin: 0;
  }

  .txd-table,
  .txd-table tbody,
  .txd-table tr,
  .txd-table td {
    display: block;
    width: 100%;
  }

  .txd-table thead {
    display: none;
  }

  .txd-table tbody {
    display: grid;
    gap: 8px;
  }

  .txd-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    padding: 12px;
    border-radius: 12px;
    background: var(--dash-inner-surface);
  }

  .txd-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0;
    border: 0;
    font-size: 13px;
  }

  .txd-table td::before {
    content: attr(data-label);
    color: var(--dash-text-muted);
    font-size: 11px;
    font-weight: 500;
  }

  .txd-table td:nth-child(1),
  .txd-table td:nth-child(2) {
    grid-column: 1 / -1;
  }

  .txd-table td:nth-child(3) {
    grid-column: 1;
    justify-content: flex-start;
  }

  .txd-table td:nth-child(4) {
    grid-column: 2;
    justify-content: flex-end;
  }

  .txd-table td:nth-child(4)::before {
    display: none;
  }

  .txd-party__actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .txd-content {
    padding-inline: 10px;
  }

  .txd-timeline li {
    grid-template-columns: var(--txd-timeline-dot) minmax(0, 1fr);
  }

  .txd-timeline__time {
    grid-column: 2;
    grid-row: 1;
    padding-top: 0;
  }

  .txd-timeline li > div {
    grid-column: 2;
  }
}

/* Light: one white sheet. Counterparty marks are a wash, not a gray disc. Right rail is hairline, not stacked wells. */
html.light-theme,
html.light,
html.dash-landing-preview.light-theme,
html.dash-landing-preview.light {
  --txd-avatar-bg: var(--color-surface-muted, rgba(7, 7, 7, 0.045));
  --txd-avatar-fg: var(--dash-text, #070707);
}

html.light-theme .txd-party__logo,
html.light .txd-party__logo,
html.dash-landing-preview.light-theme .txd-party__logo,
html.dash-landing-preview.light .txd-party__logo {
  background: var(--txd-avatar-bg);
  color: var(--txd-avatar-fg);
}

html.light-theme .txd-panel,
html.light .txd-panel,
html.dash-landing-preview.light-theme .txd-panel,
html.dash-landing-preview.light .txd-panel,
html.light-theme .txd-panel:hover,
html.light .txd-panel:hover,
html.dash-landing-preview.light-theme .txd-panel:hover,
html.dash-landing-preview.light .txd-panel:hover {
  background: #ffffff;
  border: none;
  box-shadow: none;
}

html.light-theme .txd-party__actions .txd-btn--ghost,
html.light .txd-party__actions .txd-btn--ghost,
html.dash-landing-preview.light-theme .txd-party__actions .txd-btn--ghost,
html.dash-landing-preview.light .txd-party__actions .txd-btn--ghost,
html.light-theme .txd-btn--secondary,
html.light .txd-btn--secondary,
html.dash-landing-preview.light-theme .txd-btn--secondary,
html.dash-landing-preview.light .txd-btn--secondary {
  background: var(--color-well);
  border: none;
}

html.light-theme .txd-action-row:hover:not(:disabled),
html.light .txd-action-row:hover:not(:disabled),
html.dash-landing-preview.light-theme .txd-action-row:hover:not(:disabled),
html.dash-landing-preview.light .txd-action-row:hover:not(:disabled) {
  background: var(--color-surface-muted-hover);
}

html.light-theme .txd-party__actions .txd-btn--ghost:hover,
html.light .txd-party__actions .txd-btn--ghost:hover,
html.dash-landing-preview.light-theme .txd-party__actions .txd-btn--ghost:hover,
html.dash-landing-preview.light .txd-party__actions .txd-btn--ghost:hover,
html.light-theme .txd-btn--secondary:hover:not(:disabled),
html.light .txd-btn--secondary:hover:not(:disabled),
html.dash-landing-preview.light-theme .txd-btn--secondary:hover:not(:disabled),
html.dash-landing-preview.light .txd-btn--secondary:hover:not(:disabled) {
  background: var(--color-surface-muted-hover);
}

html.light-theme .txd-party__actions .txd-btn--ghost:active,
html.light .txd-party__actions .txd-btn--ghost:active,
html.dash-landing-preview.light-theme .txd-party__actions .txd-btn--ghost:active,
html.dash-landing-preview.light .txd-party__actions .txd-btn--ghost:active,
html.light-theme .txd-btn--secondary:active:not(:disabled),
html.light .txd-btn--secondary:active:not(:disabled),
html.dash-landing-preview.light-theme .txd-btn--secondary:active:not(:disabled),
html.dash-landing-preview.light .txd-btn--secondary:active:not(:disabled) {
  background: var(--color-surface-muted-active);
}

html.light-theme .txd-action-icon,
html.light .txd-action-icon,
html.dash-landing-preview.light-theme .txd-action-icon,
html.dash-landing-preview.light .txd-action-icon {
  background: transparent;
}

html.light-theme .txd-risk-score,
html.light .txd-risk-score,
html.dash-landing-preview.light-theme .txd-risk-score,
html.dash-landing-preview.light .txd-risk-score {
  background: transparent;
  border: none;
  padding: 0;
}
