/*
 * COSPEND REBRAND V1
 * Paper / Ink / Seal
 *
 * Visual layer only.
 * Existing DOM and JavaScript remain authoritative.
 */

/* ============================================================
   FONTS
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans+Condensed:wght@500;600&family=IBM+Plex+Sans:wght@400;500;600&display=swap');


/* ============================================================
   DESIGN TOKENS
   ============================================================ */

:root {

    /* new design vocabulary */

    --paper: #FFFFFF;
    --wash: #FAFAF9;

    --ink: #111110;
    --ink2: #292524;
    --ink3: #57534E;

    --graphite: #57534E;
    --hairline: #E7E5E4;

    --seal: #D8261C;
    --amber: #B45309;
    --green: #15803D;

    --sans:
        'IBM Plex Sans',
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        sans-serif;

    --cond:
        'IBM Plex Sans Condensed',
        'Arial Narrow',
        var(--sans);

    --mono:
        'IBM Plex Mono',
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Consolas,
        monospace;

    --r: 2px;


    /*
     * Compatibility with current COSPEND vocabulary.
     * Existing components continue using their old variables,
     * but receive the new semantic palette.
     */

    --bg: #FFFFFF;
    --card: #FFFFFF;

    --line: #E7E5E4;
    --border: #E7E5E4;

    --sig: #D8261C;
    --moss: #15803D;
    --ochre: #B45309;
    --slate: #57534E;
}


/* ============================================================
   DOCUMENT
   ============================================================ */

html {
    background: var(--paper);
}

body {
    background: var(--paper) !important;
    color: var(--ink) !important;

    font-family: var(--sans) !important;
    font-size: 14px;
    line-height: 1.55;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

* {
    box-sizing: border-box;
}

::selection {
    background: rgba(216,38,28,.14);
    color: var(--ink);
}


/* ============================================================
   TYPOGRAPHY
   ============================================================ */

/*
 * Headlines = condensed sans.
 * No generic monospace-uppercase document look.
 */

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--ink) !important;

    font-family: var(--cond) !important;
    font-weight: 600 !important;

    text-transform: none !important;
    letter-spacing: -.01em !important;
}

h1 {
    line-height: 1.06;
}

h2 {
    line-height: 1.10;
}

h3,
h4 {
    line-height: 1.20;
}


/*
 * Sentences and labels = Sans.
 */

p,
li,
label,
summary,
legend,
button,
input,
select,
textarea {
    font-family: var(--sans);
}


/*
 * Data values only = Mono.
 */

code,
pre,
.mono,
.txid,
.address,
.hash,
.wallet-id,
.block-height {
    font-family: var(--mono) !important;
}


/* ============================================================
   LINKS
   ============================================================ */

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

:focus-visible {
    outline: 2px solid var(--seal) !important;
    outline-offset: 2px;
}


/* ============================================================
   GLOBAL SURFACES
   ============================================================ */

.card,
[class$="-card"],
[class*="-card "] {
    background: #fff !important;

    border-color: var(--hairline) !important;
    border-radius: var(--r) !important;

    box-shadow: none !important;
}


/*
 * Kill the "grey photocopy" appearance without changing layout.
 */

.panel,
.box,
.section-box {
    background: #fff;
    border-color: var(--hairline);
    box-shadow: none;
}


/* ============================================================
   MAIN COSPEND HEADER
   ============================================================ */

/*
 * Current main application uses .tab buttons.
 */

.tab {
    background: transparent !important;

    color: var(--graphite) !important;

    border: 0 !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;

    font-family: var(--sans) !important;
    font-size: 13px !important;
    font-weight: 500 !important;

    letter-spacing: 0 !important;
    text-transform: none !important;

    box-shadow: none !important;

    transition:
        color .12s ease,
        border-color .12s ease;
}

.tab:hover {
    color: var(--ink) !important;
    text-decoration: none;
}

.tab.on {
    color: var(--seal) !important;
    border-bottom-color: var(--seal) !important;
}


/*
 * Sanctions is external/static, but visually behaves as a tab.
 */

#tab-s {
    white-space: nowrap;
}


/* language switch */

#lg-ru,
#lg-en {
    background: transparent !important;

    color: var(--graphite) !important;

    border-color: var(--hairline) !important;
    border-radius: var(--r) !important;

    font-family: var(--sans) !important;
    font-size: 11px !important;
    font-weight: 600 !important;

    letter-spacing: .04em !important;
}


/* ============================================================
   SANCTIONS REGISTRY HEADER
   ============================================================ */

.nav {
    font-family: var(--sans) !important;
}

.nav a {
    color: var(--graphite) !important;

    font-family: var(--sans) !important;
    font-size: 13px !important;
    font-weight: 500 !important;

    letter-spacing: 0 !important;
    text-transform: none !important;

    border-color: transparent;
}

.nav a:hover {
    color: var(--ink) !important;
    text-decoration: none;
}

.nav a.on {
    color: var(--seal) !important;
}


/* ============================================================
   INPUTS
   ============================================================ */

input,
select,
textarea {
    background: #fff !important;
    color: var(--ink) !important;

    border-color: var(--hairline) !important;
    border-radius: var(--r) !important;

    box-shadow: none !important;

    font-family: var(--sans);
}

input[type="search"] {
    font-family: var(--mono);
}

input::placeholder,
textarea::placeholder {
    color: #A8A29E !important;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--ink) !important;
    outline: none;
}


/* ============================================================
   BUTTONS / PRIMARY ACTION
   ============================================================ */

button {
    border-radius: var(--r);
}

.go {
    background: var(--ink) !important;
    color: #fff !important;

    border-color: var(--ink) !important;
    border-radius: var(--r) !important;

    font-family: var(--sans) !important;
    font-weight: 500 !important;

    letter-spacing: 0 !important;
    text-transform: none !important;

    box-shadow: none !important;
}

.go:hover {
    background: #000 !important;
}


/* ============================================================
   TABLES
   ============================================================ */

table {
    border-collapse: collapse;
}

table th {
    color: var(--graphite) !important;

    font-family: var(--sans) !important;
    font-size: 11px !important;
    font-weight: 600 !important;

    letter-spacing: .07em !important;
    text-transform: uppercase !important;

    border-color: var(--ink) !important;
}

table td {
    color: var(--ink);

    border-color: var(--hairline) !important;

    font-family: var(--sans);
}

table tbody tr:hover td {
    background: var(--wash) !important;
}


/* numeric / technical cells */

table td.mono,
table td.v,
table td.r {
    font-family: var(--mono) !important;
}


/* ============================================================
   LABELS / MICROCOPY
   ============================================================ */

.label,
.kicker,
.eyebrow {
    color: var(--graphite) !important;

    font-family: var(--sans) !important;
    font-size: 11px !important;
    font-weight: 600 !important;

    letter-spacing: .08em !important;
    text-transform: uppercase !important;
}

.meta,
.note,
.sub,
.hint {
    color: var(--graphite);
    font-family: var(--sans) !important;
}


/* ============================================================
   BIG NUMBERS
   ============================================================ */

.num,
.num-s,
.metric-value,
.stat-value,
.market-stat b {
    color: var(--ink);

    font-family: var(--cond) !important;
    font-weight: 600 !important;

    font-variant-numeric: tabular-nums;
    letter-spacing: -.01em !important;
}


/*
 * Existing market page already uses .market-stat b.
 */

.market-stat b {
    font-size: 26px !important;
    line-height: 1.1 !important;
}


/* ============================================================
   STATUS / SEMANTIC COLOUR
   ============================================================ */

/*
 * Legal/direct = Seal red
 * association/exposure = Amber
 * clear/published = Green
 */

.chip-red,
.status-red,
.direct,
.designation {
    color: var(--seal);
    border-color: var(--seal);
}

.chip-amber,
.status-amber,
.association {
    color: var(--amber);
    border-color: var(--amber);
}

.chip-green,
.status-green,
.published,
.clear {
    color: var(--green);
    border-color: var(--green);
}


/*
 * Existing COSPEND semantics.
 */

.party-tag.sanction {
    color: var(--seal) !important;
}

.party-tag.sanction-link {
    color: var(--seal) !important;
}


/* ============================================================
   SECTIONS
   ============================================================ */

hr {
    border: 0;
    border-top: 1px solid var(--hairline);
}

section {
    border-color: var(--hairline);
}


/*
 * Strong section separators instead of grey boxed soup.
 */

.section-h,
.section-title {
    border-color: var(--ink) !important;
}


/* ============================================================
   SCROLLBARS — QUIET
   ============================================================ */

* {
    scrollbar-color: #D6D3D1 transparent;
    scrollbar-width: thin;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 900px) {

    body {
        font-size: 13px;
    }

    table th {
        font-size: 10px !important;
    }

    .tab {
        font-size: 12px !important;
    }

    .nav {
        overflow-x: auto;
        white-space: nowrap;
    }
}


/* ============================================================
   ACCESSIBILITY
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}


/* ============================================================
   COSPEND_REBRAND_V11_SANCTIONS
   Sanctions Registry — Paper / Ink / Seal
   ============================================================ */


/* ------------------------------------------------------------
   SANCTIONS TOKEN BRIDGE
   ------------------------------------------------------------ */

body {

    --paper: #FFFFFF !important;
    --paper2: #FAFAF9 !important;
    --white: #FFFFFF !important;

    --ink: #111110 !important;
    --muted: #57534E !important;

    --line: #E7E5E4 !important;
    --line2: #F0EEEB !important;

    --dark: #111110 !important;

    --red: #D8261C !important;
    --red2: #FFF3F1 !important;

    --amber: #B45309 !important;
    --amber2: #FFF7ED !important;

    --teal: #15803D !important;
    --teal2: #F0FDF4 !important;

    --blue: #57534E !important;
    --blue2: #F5F5F4 !important;
}


/* ------------------------------------------------------------
   CANVAS
   ------------------------------------------------------------ */

body {
    background: #FFFFFF !important;
    color: #111110 !important;

    font-family: var(--sans) !important;
    font-size: 14px !important;
    line-height: 1.55 !important;
}


/* ------------------------------------------------------------
   PAGE WIDTH
   ------------------------------------------------------------ */

body .shell {
    max-width: 1180px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}


/* ------------------------------------------------------------
   HEADER
   ------------------------------------------------------------ */

body .top {
    background: #FFFFFF !important;

    border: 0 !important;
    border-bottom: 1px solid #E7E5E4 !important;

    box-shadow: none !important;
}

body .top-inner {
    min-height: 60px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;

    display: flex !important;
    align-items: center !important;
}

body .brand {
    color: #111110 !important;
    text-decoration: none !important;
}

body .mark {
    width: 13px !important;
    height: 13px !important;

    min-width: 13px !important;

    border: 0 !important;
    border-radius: 0 !important;

    background: #D8261C !important;

    color: transparent !important;

    box-shadow: none !important;
}

body .brand-copy b {
    color: #111110 !important;

    font-family: var(--cond) !important;
    font-size: 17px !important;
    font-weight: 600 !important;

    line-height: 1 !important;
    letter-spacing: .02em !important;

    text-transform: none !important;
}

body .brand-copy span {
    color: #57534E !important;

    font-family: var(--sans) !important;
    font-size: 10px !important;
    font-weight: 600 !important;

    line-height: 1 !important;
    letter-spacing: .12em !important;

    text-transform: uppercase !important;
}


/* nav */

body .nav {
    margin-left: auto !important;

    display: flex !important;
    align-items: center !important;
    gap: 20px !important;

    font-family: var(--sans) !important;
}

body .nav a {
    padding: 22px 0 20px !important;

    color: #57534E !important;
    background: transparent !important;

    border: 0 !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;

    font-family: var(--sans) !important;
    font-size: 13px !important;
    font-weight: 500 !important;

    letter-spacing: 0 !important;
    text-transform: none !important;

    box-shadow: none !important;
}

body .nav a:hover {
    color: #111110 !important;
    text-decoration: none !important;
}

body .nav a.on {
    color: #D8261C !important;
    border-bottom-color: #D8261C !important;
}


/* ------------------------------------------------------------
   HERO
   ------------------------------------------------------------ */

body .hero {
    margin: 0 !important;

    padding-top: 54px !important;
    padding-bottom: 24px !important;

    background: #FFFFFF !important;

    border: 0 !important;
    border-radius: 0 !important;

    box-shadow: none !important;
}

body .hero h1 {
    max-width: 760px !important;

    margin: 0 !important;

    color: #111110 !important;

    font-family: var(--cond) !important;
    font-size: 42px !important;
    font-weight: 600 !important;

    line-height: 1.08 !important;
    letter-spacing: -.015em !important;

    text-transform: none !important;
}

body .hero-copy {
    max-width: 680px !important;

    margin-top: 12px !important;

    color: #57534E !important;

    font-family: var(--sans) !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
}

body .hero-meta {
    margin-top: 18px !important;
}


/* ------------------------------------------------------------
   PILLS / BADGES
   ------------------------------------------------------------ */

body .pill,
body .badge {
    display: inline-flex !important;
    align-items: center !important;

    padding: 5px 9px !important;

    background: #FFFFFF !important;

    color: #57534E !important;

    border: 1px solid #E7E5E4 !important;
    border-radius: 2px !important;

    font-family: var(--sans) !important;
    font-size: 11px !important;
    font-weight: 500 !important;

    line-height: 1 !important;
    letter-spacing: .02em !important;

    box-shadow: none !important;
}


/* ------------------------------------------------------------
   COUNTERS
   ------------------------------------------------------------ */

body .cards {
    margin-top: 18px !important;
    margin-bottom: 32px !important;

    gap: 14px !important;
}

body .metric {
    min-height: 128px !important;

    padding: 20px 22px !important;

    background: #FFFFFF !important;

    border: 1px solid #E7E5E4 !important;
    border-radius: 2px !important;

    box-shadow: none !important;
}

body .metric .n {
    color: #111110 !important;

    font-family: var(--cond) !important;
    font-size: 38px !important;
    font-weight: 600 !important;

    line-height: 1.05 !important;
    letter-spacing: -.01em !important;

    font-variant-numeric: tabular-nums !important;
}

body .metric .l {
    margin-top: 9px !important;

    color: #57534E !important;

    font-family: var(--sans) !important;
    font-size: 11px !important;
    font-weight: 600 !important;

    line-height: 1.3 !important;
    letter-spacing: .07em !important;

    text-transform: uppercase !important;
}


/*
 * Semantic colour lives in a small accent,
 * not across the whole card.
 */

body .metric.red {
    border-top: 2px solid #D8261C !important;
}

body .metric.red .n {
    color: #D8261C !important;
}

body .metric.teal {
    border-top: 2px solid #15803D !important;
}

body .metric.teal .n {
    color: #111110 !important;
}

body .metric.amber {
    border-top: 2px solid #B45309 !important;
}

body .metric.amber .n {
    color: #111110 !important;
}


/* ------------------------------------------------------------
   HOW / METHODOLOGY
   Keep it present in Phase 2, but visually quiet.
   Phase 4 will move this behind info popovers.
   ------------------------------------------------------------ */

body .how {
    margin-top: 0 !important;
    margin-bottom: 14px !important;

    background: #FAFAF9 !important;

    border: 1px solid #E7E5E4 !important;
    border-radius: 2px !important;

    box-shadow: none !important;
}

body .how-cell {
    padding: 16px 18px !important;

    color: #57534E !important;

    border-color: #E7E5E4 !important;

    font-family: var(--sans) !important;
    font-size: 12px !important;
    line-height: 1.55 !important;
}

body .how-cell b {
    display: block !important;

    margin-bottom: 5px !important;

    color: #111110 !important;

    font-family: var(--sans) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
}

body .attribution-note {
    margin-top: 10px !important;
    margin-bottom: 28px !important;

    padding: 11px 14px !important;

    background: #FFFFFF !important;

    color: #57534E !important;

    border: 1px solid #E7E5E4 !important;
    border-left: 2px solid #B45309 !important;
    border-radius: 0 !important;

    font-family: var(--sans) !important;
    font-size: 12px !important;
    line-height: 1.5 !important;

    box-shadow: none !important;
}

body .attribution-note b {
    color: #111110 !important;
}


/* ------------------------------------------------------------
   TOOLBAR
   ------------------------------------------------------------ */

body .toolbar {
    margin-top: 0 !important;
    margin-bottom: 14px !important;

    padding: 0 !important;

    background: transparent !important;

    border: 0 !important;

    box-shadow: none !important;

    gap: 8px !important;
}

body .search,
body .filter,
body .filter-select {
    min-height: 38px !important;

    background: #FFFFFF !important;
    color: #111110 !important;

    border: 1px solid #D6D3D1 !important;
    border-radius: 2px !important;

    font-family: var(--sans) !important;
    font-size: 13px !important;

    box-shadow: none !important;
}

body .search {
    font-family: var(--mono) !important;
    font-size: 12.5px !important;
}

body .search:focus,
body .filter:focus,
body .filter-select:focus {
    border-color: #111110 !important;
    outline: none !important;
}


/* buttons */

body .btn {
    min-height: 38px !important;

    padding: 0 14px !important;

    background: #FFFFFF !important;
    color: #111110 !important;

    border: 1px solid #111110 !important;
    border-radius: 2px !important;

    font-family: var(--sans) !important;
    font-size: 12px !important;
    font-weight: 500 !important;

    letter-spacing: 0 !important;
    text-transform: none !important;

    box-shadow: none !important;
}

body .btn:hover {
    background: #FAFAF9 !important;
}

body .btn.primary {
    background: #111110 !important;
    color: #FFFFFF !important;
}


/* ------------------------------------------------------------
   RESULT COUNT
   ------------------------------------------------------------ */

body .result-count {
    color: #57534E !important;

    font-family: var(--sans) !important;
    font-size: 12px !important;
}


/* ------------------------------------------------------------
   TABLE CONTAINER
   ------------------------------------------------------------ */

body .table-wrap {
    background: #FFFFFF !important;

    border: 1px solid #E7E5E4 !important;
    border-radius: 2px !important;

    box-shadow: none !important;
}

body .table-scroll {
    background: #FFFFFF !important;
}


/* ------------------------------------------------------------
   TABLE
   ------------------------------------------------------------ */

body table {
    width: 100% !important;

    background: #FFFFFF !important;

    border-collapse: collapse !important;

    font-family: var(--sans) !important;
    font-size: 12.5px !important;
}

body table th {
    padding: 10px 11px !important;

    background: #FFFFFF !important;
    color: #57534E !important;

    border-bottom: 1px solid #111110 !important;

    font-family: var(--sans) !important;
    font-size: 10.5px !important;
    font-weight: 600 !important;

    line-height: 1.25 !important;
    letter-spacing: .07em !important;

    text-transform: uppercase !important;
}

body table td {
    padding: 10px 11px !important;

    background: #FFFFFF !important;
    color: #111110 !important;

    border-bottom: 1px solid #E7E5E4 !important;

    font-family: var(--sans) !important;

    vertical-align: middle !important;
}

body tbody tr.data-row:hover td {
    background: #FAFAF9 !important;
}


/* ------------------------------------------------------------
   TECHNICAL VALUES
   ------------------------------------------------------------ */

body .addr,
body .addr-link,
body .subject,
body .source,
body .kv {
    font-family: var(--mono) !important;
    font-size: 11.5px !important;
}

body .addr-link {
    color: #111110 !important;
}

body .addr-link:hover {
    color: #D8261C !important;
}


/* ------------------------------------------------------------
   LEGAL CLAIM SEMANTICS
   ------------------------------------------------------------ */

body .badge.red,
body .badge.warn {
    background: #FFFFFF !important;
    color: #D8261C !important;
    border-color: #D8261C !important;
}

body .badge.amber {
    background: #FFFFFF !important;
    color: #B45309 !important;
    border-color: #B45309 !important;
}

body .badge.ok,
body .badge.teal {
    background: #FFFFFF !important;
    color: #15803D !important;
    border-color: #15803D !important;
}


/* ------------------------------------------------------------
   DETAILS / ROW ACTIONS
   ------------------------------------------------------------ */

body .detail {
    background: #FAFAF9 !important;
    border-color: #E7E5E4 !important;
}

body .detail-row {
    border-color: #E7E5E4 !important;
}

body .detail-actions,
body .row-actions {
    font-family: var(--sans) !important;
}

body .details-button {
    background: transparent !important;
    color: #111110 !important;

    border: 1px solid #D6D3D1 !important;
    border-radius: 2px !important;

    font-family: var(--sans) !important;
    font-size: 11px !important;
}


/* ------------------------------------------------------------
   PAGINATION
   ------------------------------------------------------------ */

body .pager {
    color: #57534E !important;

    font-family: var(--sans) !important;
    font-size: 12px !important;
}

body .pager button {
    background: #FFFFFF !important;
    color: #111110 !important;

    border: 1px solid #D6D3D1 !important;
    border-radius: 2px !important;

    font-family: var(--sans) !important;
}

body .pager button:hover {
    border-color: #111110 !important;
}


/* ------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------ */

body .footer {
    margin-top: 38px !important;

    background: #FFFFFF !important;
    color: #57534E !important;

    border-top: 1px solid #E7E5E4 !important;

    font-family: var(--mono) !important;
    font-size: 11px !important;

    box-shadow: none !important;
}


/* ------------------------------------------------------------
   MOBILE
   ------------------------------------------------------------ */

@media (max-width: 900px) {

    body .hero h1 {
        font-size: 34px !important;
    }

    body .cards {
        grid-template-columns: repeat(2,1fr) !important;
    }

    body .nav {
        overflow-x: auto !important;
        white-space: nowrap !important;
    }

    body .how {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 600px) {

    body .cards {
        grid-template-columns: 1fr !important;
    }

    body .hero {
        padding-top: 34px !important;
    }
}


/* ============================================================
   COSPEND_REBRAND_V12_SANCTIONS_TABLE
   Wide registry + dense evidence table
   ============================================================ */


/*
 * Header may stay document-width.
 * The sanctions working area needs more room because it has
 * eleven evidence columns.
 */

body main.shell {
    width: calc(100% - 48px) !important;
    max-width: 1520px !important;
}


/* Keep readable hero copy — don't stretch prose with the table. */

body main.shell .hero {
    max-width: 1180px !important;
}

body main.shell .hero-copy {
    max-width: 720px !important;
}


/* Counters can use the wider working canvas. */

body .cards {
    width: 100% !important;
}


/* ============================================================
   TABLE GEOMETRY
   ============================================================ */

body .table-wrap {
    width: 100% !important;
    max-width: none !important;
    overflow: hidden !important;
}

body .table-scroll {
    width: 100% !important;

    /*
     * Normally everything now fits.
     * Horizontal scroll remains a safety valve on smaller screens.
     */
    overflow-x: auto !important;
    overflow-y: visible !important;

    -webkit-overflow-scrolling: touch;
}

body .table-scroll table {
    width: 100% !important;
    min-width: 1180px !important;

    table-layout: fixed !important;
}


/* ============================================================
   COLUMN BUDGET — 11 columns = 100%
   ============================================================ */

/* Bitcoin address */
body .table-scroll th:nth-child(1),
body .table-scroll td:nth-child(1) {
    width: 18% !important;
}

/* Attribution / entity */
body .table-scroll th:nth-child(2),
body .table-scroll td:nth-child(2) {
    width: 13% !important;
}

/* Authority */
body .table-scroll th:nth-child(3),
body .table-scroll td:nth-child(3) {
    width: 8% !important;
}

/* Dataset */
body .table-scroll th:nth-child(4),
body .table-scroll td:nth-child(4) {
    width: 6% !important;
}

/* Claim */
body .table-scroll th:nth-child(5),
body .table-scroll td:nth-child(5) {
    width: 11% !important;
}

/* Status */
body .table-scroll th:nth-child(6),
body .table-scroll td:nth-child(6) {
    width: 6% !important;
}

/* Effective */
body .table-scroll th:nth-child(7),
body .table-scroll td:nth-child(7) {
    width: 8% !important;
}

/* Identity */
body .table-scroll th:nth-child(8),
body .table-scroll td:nth-child(8) {
    width: 7% !important;
}

/* Subject ID */
body .table-scroll th:nth-child(9),
body .table-scroll td:nth-child(9) {
    width: 8% !important;
}

/* Source */
body .table-scroll th:nth-child(10),
body .table-scroll td:nth-child(10) {
    width: 10% !important;
}

/* Actions */
body .table-scroll th:nth-child(11),
body .table-scroll td:nth-child(11) {
    width: 5% !important;
}


/* ============================================================
   DENSITY
   ============================================================ */

body .table-scroll table {
    font-size: 11.5px !important;
}

body .table-scroll table th {
    padding: 9px 9px !important;

    font-size: 9.5px !important;
    letter-spacing: .055em !important;

    white-space: nowrap !important;
}

body .table-scroll table td {
    padding: 9px 9px !important;
    line-height: 1.35 !important;
}


/* ============================================================
   FILTER ROW
   ============================================================ */

body .filter-row input,
body .filter-row select {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;

    padding-left: 7px !important;
    padding-right: 7px !important;

    font-size: 10.5px !important;
}


/* ============================================================
   LONG TECHNICAL VALUES
   ============================================================ */

/*
 * Full values remain in the DOM / link / detail view.
 * Main grid stays compact instead of forcing a 1700px table.
 */

body .table-scroll .addr,
body .table-scroll .addr-link,
body .table-scroll .source,
body .table-scroll .subject {
    display: block !important;

    max-width: 100% !important;

    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;

    font-family: var(--mono) !important;
    font-size: 10.5px !important;
}


/*
 * Attribution is useful prose, so permit two lines rather
 * than increasing column width.
 */

body .table-scroll .attr {
    white-space: normal !important;
    overflow-wrap: anywhere !important;

    line-height: 1.25 !important;
}


/* Claim badges must not inflate the whole table. */

body .table-scroll .badge {
    max-width: 100% !important;

    padding: 4px 6px !important;

    font-size: 9.5px !important;

    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}


/* Action buttons compact. */

body .row-actions {
    gap: 4px !important;
    white-space: nowrap !important;
}

body .details-button,
body .row-actions button {
    min-width: 0 !important;

    padding: 4px 6px !important;

    font-size: 9.5px !important;
}


/* Toolbar should use the same full working width. */

body .toolbar {
    width: 100% !important;
}

body .toolbar .search {
    min-width: 280px !important;
}


/* ============================================================
   RESPONSIVE FALLBACK
   ============================================================ */

@media (max-width: 1200px) {

    body main.shell {
        width: calc(100% - 24px) !important;
    }

    body .table-scroll table {
        min-width: 1180px !important;
    }
}


/* ============================================================
   COSPEND_REBRAND_V13
   - sanctions registry table geometry
   - transaction explorer Paper / Ink / Seal
   ============================================================ */


/* ============================================================
   A. SANCTIONS REGISTRY — CORRECT TABLE GEOMETRY
   ============================================================ */

/*
 * v1.2 used table-layout:fixed.
 * That is wrong for a heterogeneous evidence table:
 * addresses, entities, claims and source URLs have very
 * different natural widths.
 */

body main.shell {
    width: calc(100% - 40px) !important;
    max-width: 1600px !important;
}


/* Let the browser size evidence columns from content. */

body .table-scroll {
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
}

body .table-scroll table {
    width: 100% !important;
    min-width: 1490px !important;

    table-layout: auto !important;

    border-collapse: collapse !important;
}


/*
 * IMPORTANT:
 * cancel percentage widths introduced by v1.2.
 */

body .table-scroll th,
body .table-scroll td {
    width: auto !important;
    max-width: none !important;
}


/* ------------------------------------------------------------
   Real minimum budgets per evidence column.
   They sum to roughly the natural desktop width.
   ------------------------------------------------------------ */

/* Bitcoin address */
body .table-scroll th:nth-child(1),
body .table-scroll td:nth-child(1) {
    min-width: 255px !important;
}

/* Attribution / entity */
body .table-scroll th:nth-child(2),
body .table-scroll td:nth-child(2) {
    min-width: 185px !important;
}

/* Authority */
body .table-scroll th:nth-child(3),
body .table-scroll td:nth-child(3) {
    min-width: 105px !important;
}

/* Dataset */
body .table-scroll th:nth-child(4),
body .table-scroll td:nth-child(4) {
    min-width: 78px !important;
}

/* Claim */
body .table-scroll th:nth-child(5),
body .table-scroll td:nth-child(5) {
    min-width: 165px !important;
}

/* Status */
body .table-scroll th:nth-child(6),
body .table-scroll td:nth-child(6) {
    min-width: 82px !important;
}

/* Effective */
body .table-scroll th:nth-child(7),
body .table-scroll td:nth-child(7) {
    min-width: 112px !important;
}

/* Identity */
body .table-scroll th:nth-child(8),
body .table-scroll td:nth-child(8) {
    min-width: 105px !important;
}

/* Subject ID */
body .table-scroll th:nth-child(9),
body .table-scroll td:nth-child(9) {
    min-width: 118px !important;
}

/* Source */
body .table-scroll th:nth-child(10),
body .table-scroll td:nth-child(10) {
    min-width: 170px !important;
}

/* Actions */
body .table-scroll th:nth-child(11),
body .table-scroll td:nth-child(11) {
    min-width: 92px !important;
}


/* ------------------------------------------------------------
   Table typography
   ------------------------------------------------------------ */

body .table-scroll table {
    font-family: var(--sans) !important;
    font-size: 11.5px !important;
}

body .table-scroll table th {
    padding: 10px 9px !important;

    white-space: nowrap !important;

    color: #57534E !important;
    background: #FFFFFF !important;

    font-family: var(--sans) !important;
    font-size: 9.5px !important;
    font-weight: 600 !important;

    letter-spacing: .055em !important;
    text-transform: uppercase !important;

    border-bottom: 1px solid #111110 !important;
}

body .table-scroll table td {
    padding: 10px 9px !important;

    color: #111110 !important;
    background: #FFFFFF !important;

    line-height: 1.35 !important;

    border-bottom: 1px solid #E7E5E4 !important;
}


/* ------------------------------------------------------------
   Never clip IDs.
   ------------------------------------------------------------ */

body .table-scroll td:nth-child(8),
body .table-scroll td:nth-child(9) {
    font-family: var(--mono) !important;

    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
}


/* Address = technical value */

body .table-scroll .addr,
body .table-scroll .addr-link {
    display: block !important;

    width: auto !important;
    max-width: 245px !important;

    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;

    font-family: var(--mono) !important;
    font-size: 10.5px !important;
}


/* Entity can wrap to two lines. */

body .table-scroll .attr {
    white-space: normal !important;
    overflow: visible !important;

    font-family: var(--sans) !important;
    line-height: 1.25 !important;
}


/* Source domain: readable, no collision with actions. */

body .table-scroll td:nth-child(10) {
    overflow: hidden !important;
}

body .table-scroll .source {
    display: block !important;

    max-width: 160px !important;

    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;

    font-family: var(--sans) !important;
    font-size: 10.5px !important;
    font-weight: 500 !important;
}


/* Actions are their own clean column. */

body .table-scroll td:nth-child(11) {
    white-space: nowrap !important;
}

body .row-actions {
    display: flex !important;
    align-items: center !important;

    gap: 4px !important;

    overflow: visible !important;
    white-space: nowrap !important;
}

body .details-button,
body .row-actions button {
    min-width: auto !important;

    padding: 4px 6px !important;

    background: #FFFFFF !important;
    color: #111110 !important;

    border: 1px solid #D6D3D1 !important;
    border-radius: 2px !important;

    font-family: var(--sans) !important;
    font-size: 9.5px !important;

    box-shadow: none !important;
}


/* ------------------------------------------------------------
   Filter row follows column size.
   ------------------------------------------------------------ */

body .filter-row input,
body .filter-row select {
    display: block !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;

    height: 38px !important;

    padding: 0 8px !important;

    background: #FFFFFF !important;
    color: #111110 !important;

    border: 1px solid #D6D3D1 !important;
    border-radius: 2px !important;

    font-family: var(--sans) !important;
    font-size: 10.5px !important;

    box-shadow: none !important;
}


/* Subject ID filter should not collapse. */

body .filter-row td:nth-child(9) input {
    min-width: 100px !important;
}


/* Hover */

body .table-scroll tbody tr.data-row:hover td {
    background: #FAFAF9 !important;
}


/* ============================================================
   B. TRANSACTION EXPLORER — FULL REBRAND
   ============================================================ */

/*
 * Explorer has a substantial private CSS system inside
 * #tx-explorer-overlay. Bridge its local colour vocabulary.
 */

#tx-explorer-overlay {

    --paper: #FFFFFF !important;
    --paper2: #FAFAF9 !important;
    --white: #FFFFFF !important;

    --ink: #111110 !important;
    --ink2: #292524 !important;
    --ink3: #57534E !important;

    --line: #E7E5E4 !important;
    --line2: #F0EEEB !important;

    --sig: #D8261C !important;
    --red: #D8261C !important;
    --ochre: #B45309 !important;
    --moss: #15803D !important;
    --slate: #57534E !important;

    background: #FFFFFF !important;
    color: #111110 !important;

    font-family: var(--sans) !important;
}


/* Main workspace */

#tx-explorer-overlay .txe-main,
#tx-explorer-overlay .txe-grid {
    background: #FFFFFF !important;
    color: #111110 !important;
}


/* Kill cream surfaces everywhere except graph wash. */

#tx-explorer-overlay > div,
#tx-explorer-overlay section {
    border-color: #E7E5E4;
}


/* ------------------------------------------------------------
   Explorer heading
   ------------------------------------------------------------ */

#tx-explorer-overlay h1,
#tx-explorer-overlay h2,
#tx-explorer-overlay h3,
#tx-explorer-overlay h4 {
    color: #111110 !important;

    font-family: var(--cond) !important;
    font-weight: 600 !important;

    letter-spacing: -.01em !important;
    text-transform: none !important;
}


/*
 * Existing page title is intentionally fairly compact,
 * Swiss technical-document rather than dashboard billboard.
 */

#tx-explorer-overlay h1,
#tx-explorer-overlay h2 {
    line-height: 1.05 !important;
}


/* ------------------------------------------------------------
   Main/native navigation
   ------------------------------------------------------------ */

#tx-explorer-overlay .txe-main-nav,
#tx-explorer-overlay .txe-native-nav {
    background: #FFFFFF !important;

    border-color: #E7E5E4 !important;

    font-family: var(--sans) !important;
}

#tx-explorer-overlay .txe-main-nav a,
#tx-explorer-overlay .txe-native-nav a,
#tx-explorer-overlay .txe-main-nav button,
#tx-explorer-overlay .txe-native-nav button {
    background: transparent !important;
    color: #57534E !important;

    border-radius: 0 !important;

    font-family: var(--sans) !important;
    font-size: 12px !important;
    font-weight: 500 !important;

    letter-spacing: 0 !important;
    text-transform: none !important;

    box-shadow: none !important;
}

#tx-explorer-overlay .txe-main-nav a:hover,
#tx-explorer-overlay .txe-native-nav a:hover {
    color: #111110 !important;
}

#tx-explorer-overlay .txe-native-explorer-tab {
    color: #D8261C !important;

    border-bottom-color: #D8261C !important;
}


/* ------------------------------------------------------------
   Labels are Sans, not terminal text.
   ------------------------------------------------------------ */

#tx-explorer-overlay label,
#tx-explorer-overlay legend,
#tx-explorer-overlay summary,
#tx-explorer-overlay [class*="label"],
#tx-explorer-overlay [class*="kicker"] {
    color: #57534E !important;

    font-family: var(--sans) !important;
    font-weight: 500 !important;

    letter-spacing: .035em !important;
}


/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */

#tx-explorer-overlay button {
    border-radius: 2px !important;

    font-family: var(--sans) !important;
    font-weight: 500 !important;

    letter-spacing: 0 !important;

    box-shadow: none !important;
}


/* Mode switch */

#tx-explorer-overlay .txe-modebar {
    display: flex !important;
    gap: 8px !important;
}

#tx-explorer-overlay .txe-modebar button {
    padding: 11px 16px !important;

    background: #FFFFFF !important;
    color: #57534E !important;

    border: 1px solid #E7E5E4 !important;
    border-radius: 2px !important;

    font-family: var(--sans) !important;
    font-size: 12px !important;
    font-weight: 600 !important;

    text-transform: none !important;
}

#tx-explorer-overlay .txe-modebar button:first-child {
    background: #111110 !important;
    color: #FFFFFF !important;

    border-color: #111110 !important;
}


/* ------------------------------------------------------------
   Inputs / selectors
   ------------------------------------------------------------ */

#tx-explorer-overlay input,
#tx-explorer-overlay select {
    min-height: 38px !important;

    background: #FFFFFF !important;
    color: #111110 !important;

    border: 1px solid #D6D3D1 !important;
    border-radius: 2px !important;

    font-family: var(--sans) !important;

    box-shadow: none !important;
}

#tx-explorer-overlay input:focus,
#tx-explorer-overlay select:focus {
    border-color: #111110 !important;
    outline: none !important;
}


/* ------------------------------------------------------------
   Primary trace action
   ------------------------------------------------------------ */

#tx-explorer-overlay .txe-primary,
#tx-explorer-overlay button.go {
    background: #111110 !important;
    color: #FFFFFF !important;

    border-color: #111110 !important;

    font-family: var(--sans) !important;

    box-shadow: none !important;
}


/* ------------------------------------------------------------
   Summary / current transaction certificate-like card
   ------------------------------------------------------------ */

#tx-explorer-summary {
    background: #FFFFFF !important;

    border: 1px solid #E7E5E4 !important;
    border-top: 2px solid #D8261C !important;
    border-radius: 2px !important;

    color: #111110 !important;

    box-shadow: none !important;
}

#tx-explorer-summary .txe-side-kicker {
    color: #57534E !important;

    font-family: var(--sans) !important;
    font-size: 10px !important;
    font-weight: 600 !important;

    letter-spacing: .08em !important;
    text-transform: uppercase !important;
}

#tx-explorer-summary .txe-side-title,
#tx-explorer-summary .txe-side-txid,
#tx-explorer-overlay .txe-header-txid,
#tx-explorer-overlay .txe-v23-top-txid {
    color: #D8261C !important;

    font-family: var(--mono) !important;
    font-weight: 500 !important;

    letter-spacing: 0 !important;
    text-transform: none !important;
}


/* Current badge */

#tx-explorer-overlay .txe-current-badge {
    background: #FFFFFF !important;
    color: #D8261C !important;

    border: 1px solid #D8261C !important;
    border-radius: 2px !important;

    font-family: var(--sans) !important;
    font-size: 10px !important;
    font-weight: 600 !important;
}


/* ------------------------------------------------------------
   Technical values remain Mono
   ------------------------------------------------------------ */

#tx-explorer-overlay code,
#tx-explorer-overlay pre,
#tx-explorer-overlay .mono,
#tx-explorer-overlay [class*="txid"],
#tx-explorer-overlay [class*="hash"] {
    font-family: var(--mono) !important;
}


/* ------------------------------------------------------------
   Graph area
   ------------------------------------------------------------ */

#tx-explorer-overlay svg {
    background: #FAFAF9 !important;
}

#tx-explorer-overlay svg text {
    fill: #111110 !important;

    font-family: var(--mono) !important;
    font-size: 10px;
}

#tx-explorer-overlay svg rect {
    fill: #FFFFFF !important;

    stroke: #57534E !important;
    stroke-width: 1.1px;
}

#tx-explorer-overlay svg line,
#tx-explorer-overlay svg path {
    stroke: #57534E;
}


/*
 * Current selected transaction = Seal.
 */

#tx-explorer-overlay svg rect[class*="current"],
#tx-explorer-overlay svg rect.selected,
#tx-explorer-overlay svg rect.cur {
    stroke: #D8261C !important;
    stroke-width: 2px !important;
}

#tx-explorer-overlay svg text.tx-id-accent {
    fill: #D8261C !important;
}


/* ------------------------------------------------------------
   Explanatory / methodology boxes
   ------------------------------------------------------------ */

#tx-explorer-overlay .txe-method,
#tx-explorer-overlay details {
    background: #FFFFFF !important;

    border-color: #E7E5E4 !important;

    color: #57534E !important;

    font-family: var(--sans) !important;

    box-shadow: none !important;
}

#tx-explorer-overlay .txe-method {
    border-left: 2px solid #B45309 !important;
}


/* ------------------------------------------------------------
   Generic cards inside Explorer
   ------------------------------------------------------------ */

#tx-explorer-overlay [class*="card"],
#tx-explorer-overlay [class*="panel"] {
    background: #FFFFFF !important;

    border-color: #E7E5E4 !important;
    border-radius: 2px !important;

    box-shadow: none !important;
}


/* ------------------------------------------------------------
   Links
   ------------------------------------------------------------ */

#tx-explorer-overlay a {
    color: #111110 !important;
}

#tx-explorer-overlay a:hover {
    color: #D8261C !important;

    text-decoration: underline !important;
    text-underline-offset: 3px;
}


/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */

@media (max-width: 1200px) {

    body main.shell {
        width: calc(100% - 24px) !important;
    }

    body .table-scroll table {
        min-width: 1490px !important;
    }
}




/* ============================================================
   COSPEND_UNIFIED_HEADER_V2_EXTERNAL
   Shadow DOM owns visual header styling.
   ============================================================ */

#cospend-header-main,
#cospend-header-sanctions,
#cospend-header-transaction {
    display: block !important;

    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    background: #FFFFFF !important;

    box-sizing: border-box !important;
}


/* Old main compatibility nodes must never affect layout. */

#cospend-header-compat {
    display: none !important;
}


/*
 * Transaction Explorer no longer has its own copy
 * of global navigation.
 */

#tx-explorer-overlay .txe-main-nav,
#tx-explorer-overlay .txe-native-nav {
    display: none !important;
}


/*
 * Header inserted in Explorer must remain a full-width
 * global component rather than inherit Explorer card styles.
 */

#tx-explorer-overlay
#cospend-header-transaction {
    position: relative !important;
    z-index: 100 !important;

    width: 100% !important;

    margin-top: 0 !important;
    margin-bottom: 24px !important;
}

