/* ============================================================
   فِضّتي · Feda — Component CSS
   Atomic, semantic-class based. RTL-correct.
   ============================================================ */

/* =========== App chrome ====================================== */

.app {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

/* Mobile shell — wraps trader screens */
.shell-m {
  width: 390px;
  height: 844px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Status bar (mock) */
.status {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.status .right { display:flex; gap: 6px; align-items:center;}
.status svg { display: block; }

/* App header (mobile) */
.appbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--hairline);
}
.appbar .title {
  font-size: var(--t-h3);
  font-weight: 600;
  letter-spacing: -.01em;
}
.appbar .subtitle { font-size: var(--t-xs); color: var(--ink-3); margin-top: 1px; }

.icon-btn {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  display: inline-flex; align-items:center; justify-content:center;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink-2);
  cursor: pointer;
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink);}
.icon-btn[aria-pressed="true"] { color: var(--gold);}

/* Bottom tab bar */
.tabbar {
  margin-top: auto;
  height: 76px;
  display: grid;
  grid-template-columns: repeat(5,1fr);
  border-top: 1px solid var(--hairline);
  background: var(--bg-elev-0);
}
.tab {
  display:flex; flex-direction:column; gap: 3px;
  align-items:center; justify-content:center;
  color: var(--ink-3);
  font-size: 10.5px;
  border: 0; background: transparent;
  position: relative;
}
.tab[aria-current="page"] { color: var(--gold);}
.tab[aria-current="page"]::before{
  content:""; position:absolute; top:0; height:2px; width: 28px;
  background: var(--gold); border-radius: 0 0 2px 2px;
}

/* Desktop sidebar */
.sidebar {
  width: 248px; flex: 0 0 248px;
  background: var(--bg-elev-0);
  border-inline-end: 1px solid var(--hairline);
  display: flex; flex-direction: column;
  padding: 16px 12px;
  gap: 4px;
}
.sidebar .brand { padding: 10px 12px 18px; }
.side-section {
  font-size: var(--t-xs);
  color: var(--ink-4);
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 16px 12px 6px;
}
.side-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-size: var(--t-body);
  cursor: pointer;
  text-decoration: none;
}
.side-item:hover { background: var(--surface); color: var(--ink); }
.side-item[aria-current="page"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 3px 0 0 var(--gold);
}
.side-item .badge { margin-inline-start: auto;}

.workspace {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}
.topbar {
  height: 64px;
  border-bottom: 1px solid var(--hairline);
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px;
}
.topbar .crumb {
  display:flex; align-items:center; gap: 8px;
  font-size: var(--t-body); color: var(--ink-3);
}
.topbar .crumb strong { color: var(--ink); font-weight: 600; }
.topbar .right { margin-inline-start: auto; display:flex; gap: 8px; align-items:center; }

/* =========== Brand wordmark =================================== */

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  user-select: none;
}
.brand .mark {
  width: 28px; height: 28px; border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, #E8C66E 0%, var(--gold) 40%, var(--gold-soft) 70%),
    linear-gradient(135deg, var(--gold) 0%, var(--silver) 100%);
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 0 0 1px var(--hairline);
}
.brand .mark::after {
  content: "";
  position: absolute; inset: 5px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,.35);
  background: radial-gradient(circle at 70% 70%, var(--silver) 0%, #8e94a0 70%);
  opacity: .85;
}
.brand .word {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
}
.brand .word::after {
  /* tiny hallmark dot — a "fineness mark" */
  content: "";
  display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--silver));
  vertical-align: middle;
  margin-inline-start: 4px;
  transform: translateY(-6px);
}

/* =========== Buttons ========================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  height: 44px; min-width: 44px;
  padding: 0 18px;
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: var(--t-body);
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: .5;
}

.btn-primary {
  background: var(--gold);
  color: var(--ink-on-gold);
  box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-primary:hover { background: #DDB672; }

.btn-secondary {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--hairline);
}
.btn-secondary:hover { background: var(--surface-3); border-color: var(--hairline-strong);}

.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface); color: var(--ink);}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
  opacity: .9;
}
.btn-danger:hover {
  background: var(--danger-soft);
  opacity: 1;
}

.btn-block { width: 100%; }
.btn-sm    { min-height: 44px; padding: 0 14px; font-size: var(--t-sm); }
.btn-lg    { height: 52px; padding: 0 24px; font-size: var(--t-h3); }

/* =========== Inputs =========================================== */

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: var(--t-sm);
  color: var(--ink-2);
  font-weight: 500;
}
.field-hint  { font-size: var(--t-xs); color: var(--ink-3); }
.field-error { font-size: var(--t-xs); color: var(--danger); display:flex; gap:6px; align-items:center;}

.input,
.select,
.textarea {
  appearance: none;
  background: var(--inset);
  border: 1px solid var(--hairline);
  color: var(--ink);
  height: 48px;
  padding: 0 14px;
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: var(--t-body);
  width: 100%;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.textarea { height: auto; padding: 12px 14px; min-height: 96px; resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--hairline-strong); }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); opacity: 1; }
.input:focus, .select:focus, .textarea:focus {
  outline: 0;
  border-color: var(--gold-soft);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
.input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft);
}

.input-group {
  display: flex; align-items: stretch;
  background: var(--inset);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  overflow: hidden;
}
.input-group:focus-within { border-color: var(--gold-soft); box-shadow: 0 0 0 3px var(--gold-glow);}
.input-group .input { background: transparent; border: 0; box-shadow: none; }
.input-group .adornment {
  display:flex; align-items:center; padding: 0 14px;
  color: var(--ink-3); font-size: var(--t-sm);
  border-inline-start: 1px solid var(--hairline);
  background: var(--surface);
}
.input-group .adornment.lead {
  border-inline-start: 0;
  border-inline-end: 1px solid var(--hairline);
}

/* Amount input (money) — large numerals */
.amount-input {
  background: var(--inset);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: flex; flex-direction: column;
  gap: 4px;
}
.amount-input:focus-within { border-color: var(--gold-soft); box-shadow: 0 0 0 3px var(--gold-glow);}
.amount-input label { font-size: var(--t-xs); color: var(--ink-3); }
.amount-input .row { display:flex; align-items:baseline; gap:6px; direction: ltr;}
.amount-input input {
  flex: 1;
  background: transparent; border: 0; outline: 0;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  width: 100%;
  text-align: left;
  letter-spacing: -.01em;
}
.amount-input .unit {
  color: var(--ink-3);
  font-size: var(--t-h3);
  font-weight: 500;
}

/* Segmented control */
.segmented {
  display: inline-flex;
  background: var(--inset);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 4px;
  gap: 2px;
}
.segmented button {
  border: 0; background: transparent;
  color: var(--ink-2);
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font-family: inherit; font-size: var(--t-sm);
  cursor: pointer;
}
.segmented button[aria-pressed="true"] {
  background: var(--surface-2);
  color: var(--ink);
  box-shadow: var(--shadow-1);
}

/* Checkbox / radio / switch */
.check {
  appearance:none;
  width: 20px; height: 20px;
  border: 1.5px solid var(--hairline-strong);
  border-radius: 5px;
  background: var(--inset);
  position: relative; cursor: pointer;
}
.check:checked { background: var(--gold); border-color: var(--gold);}
.check:checked::after {
  content:"";
  position: absolute; left: 5px; top: 1px;
  width: 6px; height: 11px;
  border: solid var(--ink-on-gold);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.switch {
  appearance:none;
  width: 38px; height: 22px; border-radius: 999px;
  background: var(--surface-3);
  position: relative; cursor: pointer;
  transition: background var(--dur);
}
.switch::after{
  content: ""; position: absolute; top: 2px;
  inset-inline-end: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--ink);
  transition: inset-inline-end var(--dur);
}
.switch:checked { background: var(--gold);}
.switch:checked::after { inset-inline-end: 18px; background: var(--ink-on-gold);}

/* =========== Cards & containers =============================== */

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--shadow-1);
}
.card-2 { background: var(--surface-2);}
.card-pad-lg { padding: 24px; }
.card-flush  { padding: 0; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 12px;
}
.section-head h2, .section-head h3 {
  margin: 0; font-size: var(--t-h3); font-weight: 600; color: var(--ink);
  letter-spacing: -.01em;
}
.section-head .meta { font-size: var(--t-xs); color: var(--ink-3); }

/* List rows */
.row-list { display: flex; flex-direction: column; }
.row-list > * + * { border-top: 1px solid var(--hairline); }
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  min-height: 64px;
}
.row .leading { flex: 0 0 auto; }
.row .main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px;}
.row .main .t1 { font-size: var(--t-body); color: var(--ink); }
.row .main .t2 { font-size: var(--t-xs); color: var(--ink-3); }
.row .trailing { flex: 0 0 auto; text-align: end; display: flex; flex-direction: column; gap: 3px; align-items: flex-end;}

/* Whole physical-lot identity and selection */
.lot-account-details { grid-column: 1 / -1; display: grid; gap: var(--s-3); padding-top: var(--s-3); }
.lot-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-2); margin: 0; }
.lot-metrics div { padding: var(--s-2); border: 1px solid var(--hairline); border-radius: var(--r-sm); background: var(--inset); }
.lot-metrics dt { color: var(--ink-3); font-size: var(--t-xs); }
.lot-metrics dd { margin: var(--s-1) 0 0; color: var(--ink); font-family: var(--font-mono); font-size: var(--t-sm); }
.lot-warning { margin: 0; padding: var(--s-2) var(--s-3); border-inline-start: var(--s-1) solid var(--warn); color: var(--ink-2); background: var(--warn-soft); font-size: var(--t-sm); }
.lot-list { display: grid; gap: var(--s-2); }
.lot-identity { display: grid; gap: var(--s-1); min-width: 0; padding: var(--s-2); border: 1px solid var(--hairline); border-radius: var(--r-sm); background: var(--inset); }
.lot-reference, .lot-facts { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); }
.lot-label { color: var(--ink-3); font-size: var(--t-xs); }
.lot-facts { color: var(--ink-2); font-size: var(--t-xs); }
.lot-price { color: var(--ink-2); font-size: var(--t-xs); }
.lot-selector { min-width: 0; margin: 0; padding: 0; border: 0; }
.lot-selector legend { margin-bottom: var(--s-2); color: var(--ink); font-size: var(--t-h3); font-weight: 600; }
.lot-choice-list { display: grid; gap: var(--s-2); margin-top: var(--s-3); }
.lot-choice { display: flex; align-items: center; gap: var(--s-3); min-height: var(--s-9); padding: var(--s-2); border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--surface-2); cursor: pointer; transition: border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.lot-choice:hover, .lot-choice:focus-within { border-color: var(--hairline-strong); }
.lot-choice:focus-within { box-shadow: var(--focus); }
.lot-choice:has(input:checked) { border-color: var(--gold); transform: translateY(calc(var(--s-1) * -0.25)); }
.lot-choice:has(input:disabled) { cursor: not-allowed; opacity: .5; }
.lot-choice input { flex: 0 0 auto; width: var(--s-5); height: var(--s-5); accent-color: var(--gold); }
.lot-choice-copy { flex: 1 1 auto; min-width: 0; }
.lot-selection-summary { display: flex; justify-content: space-between; gap: var(--s-3); padding: var(--s-3); border-radius: var(--r-sm); color: var(--ink-2); background: var(--surface-2); font-size: var(--t-sm); }

@media (max-width: 700px) {
  .lot-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lot-selection-summary { align-items: stretch; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .lot-choice:has(input:checked) { transform: none; }
}

/* Asset glyph: round, gold or silver, with engraved purity ring */
.asset {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #E8C66E, var(--gold) 55%, var(--gold-soft) 100%);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  color: rgba(20,15,5,.7);
  font-family: var(--font-serif);
  font-size: 14px; font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), inset 0 -1px 2px rgba(0,0,0,.3);
}
.asset.silver { background: radial-gradient(circle at 30% 30%, #E8ECF1, var(--silver) 55%, var(--silver-soft) 100%);}
.asset.cash {
  background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
  color: var(--ink-2);
  font-family: var(--font-mono); font-size: 12px;
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
}
.asset.lg { width: 44px; height: 44px; font-size: 16px;}
.asset.sm { width: 28px; height: 28px; font-size: 11px;}

/* =========== Status pills / badges ============================ */

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px;
  padding: 0 9px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.pill .dot { width:6px; height:6px; border-radius: 50%; background: currentColor; }

.pill-ok    { color: var(--ok);    background: var(--ok-soft);    border-color: rgba(79,169,135,.3); }
.pill-warn  { color: var(--warn);  background: var(--warn-soft);  border-color: rgba(217,162,74,.3); }
.pill-danger{ color: var(--danger);background: var(--danger-soft);border-color: rgba(225,96,91,.3); }
.pill-info  { color: var(--info);  background: var(--info-soft);  border-color: rgba(110,148,201,.3); }
.pill-neutral{color: var(--ink-2); background: var(--surface-2);  border-color: var(--hairline); }
.pill-gold  { color: var(--gold);  background: var(--gold-glow);  border-color: rgba(207,167,87,.3); }

.pill-lg { height: 28px; padding: 0 12px; font-size: 12px;}

/* =========== Money block (the most-repeated atom) ============= */

.money {
  display: inline-flex; align-items: baseline; gap: 4px;
  direction: ltr; unicode-bidi: isolate;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}
.money .v { font-weight: 500; color: var(--ink); letter-spacing: -.01em; }
.money .u { color: var(--ink-3); font-size: .85em; }
.money.size-xl .v { font-size: 32px; font-weight: 500; }
.money.size-lg .v { font-size: 22px; }
.money.size-md .v { font-size: 17px; }
.money.size-sm .v { font-size: var(--t-sm); }
.money.size-xs .v { font-size: 11.5px; }
.money.pos .v { color: var(--ok); }
.money.neg .v { color: var(--danger); }

/* Available/Reserved/Total split */
.balance-split {
  display: grid;
  grid-template-columns: repeat(3,1fr);
}
.balance-split > div {
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
  border-inline-start: 1px solid var(--hairline);
}
.balance-split > div:first-child { border-inline-start: 0; }
.balance-split .lbl { font-size: var(--t-xs); color: var(--ink-3);}
.balance-split.compact > div { padding: 8px 10px; }

/* =========== Tables (ledger) ================================== */

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: var(--hairline-strong) var(--surface);
}
table.ledger {
  width: 100%;
  min-width: 680px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--t-sm);
}
table.ledger.ledger-summary { min-width: 0; }
table.ledger thead th {
  position: sticky; top: 0;
  background: var(--surface-2);
  color: var(--ink-3);
  font-weight: 500;
  text-align: start;
  padding: 10px 14px;
  font-size: var(--t-xs);
  letter-spacing: .04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--hairline);
  border-inline-start: 1px solid var(--hairline);
}
table.ledger thead th:first-child { border-inline-start: 0; }
table.ledger tbody td {
  padding: 12px 14px;
  color: var(--ink);
  border-bottom: 1px solid var(--hairline);
  border-inline-start: 1px solid var(--hairline);
  vertical-align: middle;
}
table.ledger tbody td:first-child { border-inline-start: 0; }
table.ledger tbody tr:last-child td { border-bottom: 0; }
table.ledger tbody tr:hover td { background: rgba(255,255,255,.015);}
table.ledger .num { font-family: var(--font-mono); white-space: nowrap; }
table.ledger td.right { text-align: end; }
table.ledger .id    { font-family: var(--font-mono); color: var(--ink-3); font-size: 11.5px; }
table.ledger .muted { color: var(--ink-3); }
table.ledger .sub   { font-size: var(--t-xs); color: var(--ink-3); }

/* =========== Modals =========================================== */

.scrim {
  position: absolute; inset: 0;
  background: rgba(8,10,14,.66);
  backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 50;
}
.sheet {
  width: 100%;
  background: var(--surface-2);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border-top: 1px solid var(--hairline);
  padding: 14px 16px 24px;
  box-shadow: var(--shadow-modal);
}
.sheet-handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: var(--hairline-strong);
  margin: 2px auto 14px;
}
.sheet h2 { margin: 0 0 6px; font-size: var(--t-h2); font-weight: 600; letter-spacing: -.01em; }
.sheet p  { margin: 0 0 16px; color: var(--ink-2); font-size: var(--t-sm); }

.modal {
  width: min(520px, calc(100% - 32px));
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-modal);
  padding: 24px;
  margin: auto;
}
.scrim.center { align-items: center; }

/* =========== Toast / flash ==================================== */

.toast {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-2);
  font-size: var(--t-sm);
  max-width: 380px;
}
.toast .icon { width: 22px; height: 22px; flex: 0 0 auto;}
.toast.ok     { border-color: rgba(79,169,135,.4); }
.toast.warn   { border-color: rgba(217,162,74,.4); }
.toast.danger { border-color: rgba(225,96,91,.4); }

.toast .title { color: var(--ink); font-weight: 600; }
.toast .body  { color: var(--ink-2); }

/* =========== Empty / loading / error states =================== */

.empty {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 10px;
  padding: 40px 24px;
  color: var(--ink-3);
}
.empty .glyph {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px dashed var(--hairline-strong);
  display:flex; align-items:center; justify-content:center;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.empty h3 { color: var(--ink); margin: 4px 0 0; font-size: var(--t-h3); font-weight: 600;}
.empty p  { margin: 0; font-size: var(--t-sm); max-width: 32ch; }

/* =========== Trust / integrity widget ========================= */

/* "Vault Seal" — a circular dial showing reconciliation health */
.seal {
  position: relative;
  width: 140px; height: 140px;
  flex: 0 0 auto;
}
.seal .ring { width: 100%; height: 100%; transform: rotate(-90deg);}
.seal .ring circle { fill: transparent; }
.seal .ring .track { stroke: var(--hairline); stroke-width: 6; }
.seal .ring .arc   { stroke: var(--ok); stroke-width: 6; stroke-linecap: round;
                     transition: stroke-dasharray .8s var(--ease-out); }
.seal .center {
  position:absolute; inset: 0;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap: 2px;
  font-family: var(--font-mono);
}
.seal .center .num { font-size: 19px; color: var(--ink); }
.seal .center .lbl { font-size: 10.5px; color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase;}

.integrity-block {
  display: flex; gap: 20px; align-items: center;
}
.integrity-block .meta { display:flex; flex-direction:column; gap: 6px; min-width:0; }
.integrity-block .meta h3 { margin: 0; font-size: var(--t-h2); font-weight: 600;}

/* "Hallmark" chip — small stamped status marker */
.hallmark {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  background: var(--inset);
  border: 1px solid var(--hairline);
  font-size: var(--t-xs);
  color: var(--ink-2);
  font-family: var(--font-mono);
}
.hallmark .stamp {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: inset 0 0 0 2px var(--inset);
  flex: 0 0 auto;
}
.hallmark.warn .stamp { background: var(--warn);}
.hallmark.danger .stamp { background: var(--danger);}

/* =========== Escrow visualisation ============================= */

/* Two-column "held" indicator — the trade has two sides locked at once */
.scale {
  display: grid;
  grid-template-columns: 1fr 36px 1fr;
  align-items: stretch;
  gap: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--inset);
  border: 1px solid var(--hairline);
}
.scale .side {
  padding: 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.scale .side.gold { background: linear-gradient(180deg, var(--gold-glow), transparent);}
.scale .side.silver { background: linear-gradient(180deg, var(--silver-glow), transparent);}
.scale .side.cash { background: linear-gradient(180deg, rgba(110,148,201,.08), transparent);}
.scale .lbl { font-size: var(--t-xs); color: var(--ink-3);}
.scale .pivot {
  display: flex; align-items: center; justify-content: center;
  border-inline: 1px solid var(--hairline);
  background: var(--surface-2);
  color: var(--ink-3);
}

/* Countdown timer chip */
.countdown {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 12px;
  border-radius: var(--r-full);
  background: var(--warn-soft);
  color: var(--warn);
  font-family: var(--font-mono);
  font-size: var(--t-sm); font-weight: 600;
  border: 1px solid rgba(217,162,74,.35);
}

/* =========== Misc ============================================= */

/* Hallmark/assay border accent — subtle precious-metal cue on hero cards */
.with-hallmark {
  position: relative;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
              linear-gradient(135deg, var(--gold), transparent 25%, transparent 75%, var(--silver)) border-box;
  border: 1px solid transparent;
}

.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--inset);
  border: 1px solid var(--hairline);
  color: var(--ink-2);
}

.code-tag {
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--ink-3);
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* Stamped seal decoration — a corner "999.9 fine" stamp for high-trust cards */
.fineness-stamp {
  position: absolute; inset-inline-end: 16px; top: 16px;
  width: 64px; height: 64px;
  border: 1px dashed rgba(207,167,87,.5);
  border-radius: 50%;
  display:flex; flex-direction: column; align-items:center; justify-content:center;
  font-family: var(--font-mono);
  color: var(--gold-soft);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .8;
  rotate: -8deg;
  pointer-events: none;
}
.fineness-stamp b { color: var(--gold); font-size: 14px; letter-spacing: 0; }

/* Vertical stack utility */
.stack { display: flex; flex-direction: column; }
.stack > * + * { margin-top: var(--gap, 12px); }

.row-flex { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }

.grow { flex: 1; }
.muted { color: var(--ink-3); }
.muted-2 { color: var(--ink-4); }
.gold { color: var(--gold);}
.silver { color: var(--silver);}

.p-4 { padding: 16px;}
.p-6 { padding: 24px;}
.gap-2 { gap: 8px;} .gap-3 { gap: 12px;} .gap-4 { gap: 16px;}

.scroll { overflow: auto;}
