/* Readability-first component layer for the SDBC interface. */
:root {
    --sdbc-ink: #10231f;
    --sdbc-muted: #547066;
    --sdbc-mint: #effcf4;
    --sdbc-line: #d7e8de;
    --sdbc-green: #02a66a;
}

body {
    color: var(--sdbc-ink);
    font-size: 16px;
    letter-spacing: -.012em;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
}

p,
li,
td,
th,
label,
input,
textarea,
select,
button {
    font-size: 1rem;
}

.btn {
    border-radius: .8rem;
    font-size: .94rem;
    font-weight: 800;
    min-height: 2.8rem;
    padding-left: 1rem;
    padding-right: 1rem;
    transition: box-shadow .2s ease, transform .2s ease, background-color .2s ease;
}

.btn:hover:not(:disabled) {
    box-shadow: 0 .55rem 1.15rem rgba(2, 166, 106, .16);
    transform: translateY(-1px);
}

.btn-sm,
.btn-xs {
    min-height: 2.3rem;
}

.site-header {
    backdrop-filter: blur(12px);
}

.desktop-navigation a {
    font-size: .98rem;
}

.language-select {
    font-size: .88rem;
    font-weight: 800;
    min-height: 2.6rem;
}

.page-home .language-select {
    background-color: rgba(8, 47, 36, .88);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a7ffd0' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    border-color: rgba(167, 255, 208, .62);
    color: #effff5;
}

.page-home .language-select:hover {
    background-color: rgba(15, 68, 51, .96);
    border-color: #a7ffd0;
}

.page-home .language-select:focus {
    outline-color: #a7ffd0;
}

.page-home .language-select option {
    background: #0b3025;
    color: #effff5;
}

.sub-hero.compact .eyebrow,
.panel-kicker,
.home-label,
.home-kicker {
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .13em;
}

.sub-hero.compact .hero-copy,
.hero-copy,
.section-copy,
.muted-copy {
    color: var(--sdbc-muted);
    font-size: 1.08rem;
    line-height: 1.78;
}

.dashboard-card,
.account-card,
.swap-card {
    border-color: var(--sdbc-line);
    border-radius: 1.5rem;
    box-shadow: 0 1.2rem 3.2rem rgba(17, 54, 41, .07);
}

.dashboard-card h3,
.account-card h2 {
    font-size: clamp(1.5rem, 2vw, 1.85rem);
    line-height: 1.12;
}

.table-toolbar h2 {
    font-size: clamp(1.85rem, 3vw, 2.4rem);
    letter-spacing: -.06em;
}

.table :where(th, td) {
    font-size: .94rem;
    padding-bottom: .9rem;
    padding-top: .9rem;
}

.table th {
    color: #476258;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .025em;
}

.official-contract-panel {
    border-radius: 1.25rem;
    padding: 1.15rem 1.25rem;
}

.official-contract-heading > span {
    font-size: .92rem;
    height: 2.15rem;
    width: 2.15rem;
}

.official-contract-heading strong {
    font-size: .98rem;
}

.official-contract-heading small {
    font-size: .72rem;
}

.official-contract-actions code {
    font-size: .82rem;
    max-width: 31rem;
    min-width: 0;
    padding: .62rem .72rem;
}

.contract-copy,
.contract-explorer-link {
    font-size: .86rem;
    min-height: 2.65rem;
}

.wallet-row {
    border-radius: 1rem;
    padding: 1.2rem;
}

.wallet-title-line > strong {
    font-size: 1rem;
}

.wallet-row small {
    color: #3f5b51;
    font-size: .8rem;
    line-height: 1.5;
    margin-top: .3rem;
}

.wallet-address-line > span {
    color: #567369;
    font-size: .86rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.wallet-address-line,
.header-wallet-address-line {
    align-items: center;
    display: flex;
    gap: .32rem;
    margin-top: .35rem;
    min-width: 0;
}

.wallet-address-copy {
    align-items: center;
    background: transparent;
    border: 0;
    color: #648177;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    font-family: Manrope, sans-serif;
    font-size: 1.08rem;
    justify-content: center;
    line-height: 1;
    min-height: 1.35rem;
    padding: .1rem;
}

.wallet-address-copy:hover,
.wallet-address-copy:focus-visible,
.wallet-address-copy.is-copied {
    color: #02a66a;
}

.wallet-address-copy:focus-visible {
    border-radius: .25rem;
    outline: 2px solid rgba(2, 166, 106, .42);
    outline-offset: 2px;
}

.wallet-address-copy:disabled {
    cursor: default;
    opacity: .36;
}

.copy-icon {
    display: block;
    height: .82rem;
    position: relative;
    width: .72rem;
}

.copy-icon::before,
.copy-icon::after {
    border: 1.5px solid currentColor;
    border-radius: .12rem;
    content: '';
    height: .55rem;
    position: absolute;
    width: .47rem;
}

.copy-icon::before {
    left: 0;
    top: .18rem;
}

.copy-icon::after {
    background: #fff;
    right: 0;
    top: 0;
}

.wallet-row-active .copy-icon::after {
    background: #ebfbf3;
}

.header-wallet-summary .copy-icon::after,
.mobile-wallet-summary .copy-icon::after {
    background: #f3faf6;
}

.header-wallet-address-line {
    margin-top: 0;
}

.header-wallet-status {
    color: #02a66a;
    font-size: .72rem;
    line-height: 1;
    text-shadow: 0 0 .35rem rgba(2, 166, 106, .48);
}

.mobile-wallet-summary .header-wallet-status {
    color: #02a66a;
    font-size: .72rem;
}

.header-wallet-address-line a {
    color: #193b30;
    flex: 0 0 auto;
    min-width: 0;
}

.header-wallet-address-line [data-wallet-address] {
    white-space: nowrap;
}

.header-wallet-address-line a:hover strong {
    color: #02a66a;
}

.header-wallet-summary .header-wallet-copy,
.mobile-wallet-summary .header-wallet-copy {
    font-size: .9rem;
    min-height: 1rem;
    padding: 0;
}

.wallet-state {
    font-size: .72rem;
    padding: .28rem .58rem;
}

.wallet-assets {
    gap: .6rem;
    margin-top: .85rem;
}

.asset-chip {
    border-radius: .75rem;
    gap: .55rem;
    min-width: 5.3rem;
    padding: .55rem .65rem;
}

.asset-chip span {
    font-size: .72rem;
}

.asset-chip strong {
    font-size: 1rem;
}

.header-wallet-summary {
    border-radius: .9rem;
    min-width: 10rem;
    padding: .55rem .7rem;
}

.header-wallet-summary .header-wallet-label {
    font-size: .66rem;
}

.header-wallet-summary strong {
    font-size: .82rem;
}

.header-wallet-summary small {
    font-size: .68rem;
}

.header-wallet-summary .asset-chip {
    border-radius: .45rem;
    padding: .25rem .35rem;
}

.header-wallet-summary .asset-chip span {
    font-size: .57rem;
}

.header-wallet-summary .asset-chip strong {
    font-size: .68rem;
}

.form-control .label-text,
.label-text {
    font-size: .9rem;
    font-weight: 800;
}

.input,
.textarea,
.select {
    font-size: 1rem;
    min-height: 3rem;
}

@media (max-width: 900px) {
    body {
        font-size: 15px;
    }
}

@media (max-width: 767px) {
    .sub-hero.compact .hero-copy,
    .hero-copy,
    .section-copy,
    .muted-copy {
        font-size: 1rem;
    }

    .official-contract-panel {
        padding: 1rem;
    }

    .official-contract-actions code {
        font-size: .73rem;
    }

    .asset-chip {
        flex: 1 1 30%;
        min-width: 0;
    }

    .explorer-table-shell {
        background: transparent;
        box-shadow: none;
        overflow: visible;
    }

    .explorer-table {
        display: block;
        min-width: 0;
        width: 100%;
    }

    .explorer-table thead {
        display: none;
    }

    .explorer-table tbody {
        display: grid;
        gap: .8rem;
    }

    .explorer-table tbody tr {
        background: #fff;
        border: 1px solid var(--sdbc-line);
        border-radius: 1rem;
        box-shadow: 0 .6rem 1.5rem rgba(17, 54, 41, .06);
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: hidden;
        padding: .15rem .25rem;
    }

    .explorer-table tbody td {
        border-bottom: 1px solid #e6f0ea;
        display: flex;
        flex-direction: column;
        gap: .15rem;
        min-width: 0;
        padding: .65rem .55rem;
        white-space: normal;
    }

    .explorer-table tbody td:nth-child(odd) {
        border-right: 1px solid #e6f0ea;
    }

    .explorer-table tbody td::before {
        color: #648077;
        content: attr(data-label);
        font-size: .68rem;
        font-weight: 800;
        letter-spacing: .03em;
    }

    .explorer-table tbody .explorer-cell-short_hash,
    .explorer-table tbody .explorer-cell-created_at {
        grid-column: 1 / -1;
    }

    .explorer-table tbody .explorer-cell-short_hash {
        overflow-wrap: anywhere;
    }

    .explorer-table tbody .explorer-cell-created_at,
    .explorer-table tbody td:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .explorer-table tbody tr.explorer-empty {
        display: block;
        padding: 0;
    }

    .explorer-table tbody tr.explorer-empty td {
        border: 0;
        display: block;
        padding: 1.35rem 1rem;
    }

    .explorer-table tbody tr.explorer-empty td::before {
        display: none;
    }
}

@media (max-width: 900px) {
    .mobile-navigation-panel nav,
    .page-home .mobile-navigation-panel nav {
        align-items: stretch;
        gap: .2rem;
        justify-content: stretch;
    }

    .mobile-navigation-panel nav a,
    .page-home .mobile-navigation-panel nav a {
        padding: .65rem .8rem;
    }
}

/* Wallet-app inspired balance rows: identity left, amount right. */
.wallet-assets {
    display: grid;
    gap: .15rem;
    margin-top: .9rem;
    max-width: 32rem;
}

.wallet-asset-row {
    align-items: center;
    display: grid;
    gap: .7rem;
    grid-template-columns: 2.15rem minmax(0, 1fr) auto;
    padding: .48rem 0;
}

.wallet-asset-icon {
    align-items: center;
    border-radius: 50%;
    display: inline-flex;
    font-size: 1rem;
    font-style: normal;
    font-weight: 900;
    height: 2.15rem;
    justify-content: center;
    width: 2.15rem;
}

.wallet-asset-info,
.wallet-asset-amount {
    display: grid;
    line-height: 1.2;
}

.wallet-asset-info strong {
    color: #17362c;
    font-size: .9rem;
    font-weight: 900;
}

.wallet-asset-info span,
.wallet-asset-amount span {
    color: #648077;
    font-size: .72rem;
    margin-top: .15rem;
}

.wallet-asset-amount {
    justify-items: end;
    text-align: right;
}

.wallet-asset-amount strong {
    color: #10231f;
    font-family: 'DM Mono', monospace;
    font-size: .98rem;
    font-weight: 900;
}

.asset-eth .wallet-asset-icon { background: #ebe9ff; color: #6256ca; }
.asset-usdt .wallet-asset-icon { background: #dff8eb; color: #078958; }
.asset-sdbc .wallet-asset-icon { background: #d9f8e8; color: #009b65; }

.header-wallet-summary [data-wallet-assets] {
    align-items: center;
    display: flex;
    gap: .5rem;
}

.header-asset {
    align-items: center;
    display: inline-flex;
    font-family: 'DM Mono', monospace;
    font-size: .66rem;
    font-weight: 800;
    gap: .18rem;
}

.header-asset i {
    font-size: .52rem;
    font-style: normal;
}

.header-asset b {
    color: #193b30;
    font-weight: 900;
}

.header-asset-usdt { color: #078958; }
.header-asset-sdbc { color: #009b65; }

/* Keep the contract reference in the home hero within its dark visual system. */
.home-stage .official-contract-panel {
    background: rgba(8, 47, 36, .64);
    border-color: rgba(167, 255, 208, .36);
    box-shadow: 0 .8rem 2.2rem rgba(0, 0, 0, .12);
}

.home-stage .official-contract-heading strong {
    background: transparent;
    color: #f3fff7;
}

.home-stage .official-contract-heading small {
    color: #a7d8bf;
}

.home-stage .official-contract-heading > span {
    background: #a7ffd0;
    color: #073a2b;
}

.home-stage .official-contract-actions code {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(167, 255, 208, .26);
    color: #a7ffd0;
}

.home-stage .contract-copy {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(167, 255, 208, .32);
    color: #ecfff4;
}

.home-stage .contract-explorer-link {
    background: #a7ffd0;
    border-color: #a7ffd0;
    color: #09251e;
}

.home-stage .contract-copy:hover {
    background: rgba(167, 255, 208, .16);
    color: #fff;
}

.home-stage .contract-explorer-link:hover {
    background: #d4ffe7;
    color: #09251e;
}

/* Compact balances: a single readable line. */
.wallet-assets {
    align-items: center;
    display: flex;
    gap: .5rem;
    margin-top: .8rem;
}

.wallet-inline-asset {
    font-family: 'DM Mono', monospace;
    font-size: .84rem;
    font-weight: 800;
}

.wallet-inline-asset b {
    color: #193b30;
    font-size: 1rem;
    font-weight: 900;
}

.wallet-inline-asset.asset-eth,
.wallet-inline-asset.asset-usdt,
.wallet-inline-asset.asset-sdbc {
    background: transparent;
    border: 0;
}

.wallet-inline-asset.asset-eth,
.wallet-inline-asset.asset-usdt,
.wallet-inline-asset.asset-sdbc {
    color: #078958;
}

.wallet-inline-separator,
.header-asset-separator {
    color: #9aaba4;
    font-style: normal;
}

.header-wallet-summary [data-wallet-assets] {
    gap: .3rem;
}

.header-asset {
    font-size: .68rem;
}

/* Wallet information follows the site typography, not a terminal-style face. */
.wallet-row,
.wallet-inline-asset,
.header-asset {
    font-family: Manrope, sans-serif;
}

.wallet-row {
    align-items: start;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.wallet-card-footer {
    border-top: 1px solid rgba(21, 104, 70, .14);
    display: flex;
    gap: .55rem;
    grid-column: 1 / -1;
    margin-top: .2rem;
    padding-top: .85rem;
}

.wallet-card-footer .btn {
    min-width: 5.25rem;
}

.modal-box.wallet-transfer-modal,
.modal-box.wallet-receive-modal {
    position: relative;
}

.wallet-network-notice {
    align-items: center;
    background: #edf9f3;
    border: 1px solid #b7e6ca;
    border-radius: .75rem;
    color: #356b54;
    display: flex;
    font-size: .84rem;
    gap: .55rem;
    line-height: 1.5;
    margin: 1rem 0 0;
    padding: .7rem .8rem;
}

.wallet-network-notice strong {
    color: #087f50;
    flex: 0 0 auto;
    font-size: .78rem;
    font-weight: 900;
}

.wallet-transfer-fields {
    display: grid;
    gap: .8rem;
    grid-template-columns: 1fr 1fr;
    margin-top: 1rem;
}

.wallet-transfer-copy {
    color: #5d736a;
    font-size: .82rem;
    line-height: 1.55;
    margin: 1rem 0 0;
}

.wallet-receive-modal {
    text-align: center;
}

.wallet-receive-modal .wallet-network-notice {
    text-align: left;
}

.wallet-receive-qr {
    background: #fff;
    border: 1px solid #d6e9de;
    border-radius: .85rem;
    display: block;
    height: 13.75rem;
    margin: 1.35rem auto;
    padding: .55rem;
    width: 13.75rem;
}

.wallet-receive-address {
    align-items: center;
    background: #f4faf6;
    border-radius: .65rem;
    display: flex;
    gap: .45rem;
    justify-content: center;
    padding: .7rem;
}

.wallet-receive-address code {
    color: #365e4e;
    font-family: Manrope, sans-serif;
    font-size: .78rem;
    overflow-wrap: anywhere;
    text-align: left;
}

@media (max-width: 767px) {
    .wallet-row {
        grid-template-columns: 1fr;
    }

    .wallet-actions {
        grid-row: 2;
        grid-column: 1;
    }

    .wallet-card-footer .btn {
        flex: 1;
    }

    .wallet-transfer-fields {
        grid-template-columns: 1fr;
    }
}
