/* Dark UI, right rail */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Helvetica, Arial, sans-serif;
    background: #070708;
    color: #ececf1;
    line-height: 1.65;
    min-height: 100vh;
    padding: 28px 18px 64px;
}

.app-wrapper {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    max-width: 1080px;
    width: 100%;
    margin: 0 auto;
    background: #101114;
    border: 1px solid #2c2e36;
    box-shadow: none;
    border-radius: 10px;
    min-height: 70vh;
    overflow: hidden;
}

.sidebar {
    order: 2;
    width: 220px;
    flex-shrink: 0;
    background: #0c0d10;
    padding: 26px 16px 28px;
    border-right: none;
    border-left: 1px solid #2c2e36;
    border-bottom: none;
    display: block;
}

.sidebar-brand {
    padding: 0 8px 14px;
    margin: 0 0 8px;
    border-bottom: 1px solid #2c2e36;
}

.sidebar-brand h1 {
    font-family: "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 1.25rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #ffffff;
    line-height: 1.15;
}

.sidebar-brand h1 span {
    color: #ffffff;
}

.sidebar-brand .sub {
    font-family: "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8d8d99;
    margin-top: 4px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 2px;
    padding: 10px 0 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 8px 10px;
    margin: 0;
    border-radius: 6px;
    border-left: none;
    border-bottom: none;
    color: #b7b7c2;
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    background: transparent;
    box-shadow: none;
}

.sidebar-nav a .icon {
    display: none;
}

.sidebar-nav a:hover {
    color: #ffffff;
    background: #1a1c22;
    border-left-color: transparent;
    border-bottom-color: transparent;
}

.sidebar-nav a.active {
    color: #ffffff;
    background: #23262e;
    border-left-color: transparent;
    border-bottom-color: transparent;
    box-shadow: none;
}

.sidebar-footer {
    display: none;
}

.main-content {
    order: 1;
    flex: 1;
    min-width: 0;
    padding: 36px 40px 48px;
    background: #101114;
}

.main-content h2 {
    font-family: "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 1.85rem;
    font-weight: 650;
    line-height: 1.25;
    color: #ffffff;
    margin-bottom: 18px;
    padding-bottom: 0;
    border-bottom: none;
}

.main-content h3 {
    font-family: "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 1.15rem;
    font-weight: 650;
    color: #ffffff;
    margin-top: 28px;
    margin-bottom: 10px;
}

.main-content h4 {
    font-size: 1rem;
    color: #d8d8e0;
    margin: 16px 0 8px;
}

.main-content p,
.main-content li {
    color: #d0d0d8;
}

.main-content p {
    margin-bottom: 14px;
}

.main-content ul,
.main-content ol {
    margin: 0 0 16px 1.2rem;
}

.main-content li {
    margin-bottom: 6px;
}

.main-content a {
    color: #f2f2f6;
    text-decoration: none;
    border-bottom: 1px solid #5c5e6a;
}

.main-content a:hover {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

.warning-box,
.info-box {
    background: #16171c;
    border: 1px solid #2c2e36;
    border-left: 3px solid #c45c56;
    border-radius: 8px;
    padding: 12px 14px;
    margin: 18px 0;
}

.info-box {
    border-left-color: #8d8d99;
}

.warning-box strong,
.info-box strong {
    color: #ffffff;
}

.mirror-link,
.onion-card {
    background: #0c0d10;
    border: 1px solid #2c2e36;
    border-left: 3px solid #8d8d99;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 8px 0;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.92rem;
    line-height: 1.45;
    color: #f4f4f8;
    word-break: break-all;
}

.onion-card small {
    display: block;
    margin-bottom: 2px;
    color: #8d8d99;
    font-family: "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mark {
    margin: 0 0 18px;
}

.mark img {
    width: 100%;
    max-width: 640px;
    height: auto;
    display: block;
    background: #070708;
    border: 1px solid #2c2e36;
    border-radius: 8px;
}

.mark figcaption {
    margin-top: 6px;
    color: #8d8d99;
    font-size: 0.82rem;
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 8px 0 20px;
    border: none;
}

.stat {
    background: #0c0d10;
    border: 1px solid #2c2e36;
    border-radius: 8px;
    padding: 12px 14px;
}

.stat b {
    display: block;
    color: #ffffff;
    font-family: "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 1.35rem;
    font-weight: 650;
}

.stat span {
    display: block;
    margin-top: 2px;
    color: #8d8d99;
    font-size: 0.78rem;
}

a.desk-card,
a.desk-card:hover {
    display: grid;
    grid-template-columns: 148px 1fr;
    gap: 16px;
    align-items: center;
    margin: 0 0 10px;
    padding: 10px;
    background: #0c0d10;
    border: 1px solid #2c2e36;
    border-bottom: 1px solid #2c2e36;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
}

a.desk-card:hover {
    background: #16171c;
    border-color: #3c3e48;
}

a.desk-card:hover strong {
    color: #ffffff;
}

a.desk-card img {
    width: 148px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #2c2e36;
    display: block;
}

a.desk-card strong {
    color: #ffffff;
    font-weight: 650;
}

a.desk-card em {
    display: block;
    margin-top: 3px;
    color: #8d8d99;
    font-style: normal;
    font-size: 0.84rem;
}

code {
    background: #0c0d10;
    border: 1px solid #2c2e36;
    border-radius: 4px;
    padding: 1px 5px;
    color: #f4f4f8;
    font-size: 0.88rem;
}

.news-card {
    background: #0c0d10;
    border: 1px solid #2c2e36;
    border-top: 1px solid #2c2e36;
    border-radius: 8px;
    padding: 14px 16px;
    margin: 0 0 10px;
}

.news-card time,
.article-meta {
    color: #8d8d99;
    font-size: 0.82rem;
}

.news-card time {
    display: block;
    margin-bottom: 4px;
}

.news-card h3 {
    margin: 0 0 6px;
}

.article-meta {
    margin-bottom: 12px;
}

.market-list {
    list-style: none;
    margin: 8px 0 28px;
    padding: 0;
    border-top: none;
}

.main-content ol.market-list {
    margin-left: 0;
    padding-left: 0;
}

.market-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px 24px;
    align-items: center;
    padding: 14px 16px;
    margin: 0 0 8px;
    background: #0c0d10;
    border: 1px solid #2c2e36;
    border-bottom: 1px solid #2c2e36;
    border-radius: 8px;
}

.market-row h3 {
    margin: 0 0 4px;
    font-size: 1.05rem;
}

.market-row p {
    margin: 0;
    color: #c4c4ce;
}

.market-meta {
    display: block;
    margin-top: 6px;
    color: #8d8d99;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.market-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

a.btn,
a.btn:hover {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #ececf1;
    border-bottom: 1px solid #ececf1;
    background: #ececf1;
    color: #101114;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    line-height: 1.2;
    border-radius: 6px;
}

a.btn:hover {
    background: #ffffff;
    color: #070708;
}

a.btn-quiet,
a.btn-quiet:hover {
    background: transparent;
    color: #ececf1;
    border-color: #3c3e48;
    border-bottom-color: #3c3e48;
}

a.btn-quiet:hover {
    border-color: #ececf1;
    border-bottom-color: #ececf1;
    color: #ffffff;
    background: #1a1c22;
}

.market-row.is-closed h3 {
    color: #8d8d99;
}

.home-line {
    list-style: none;
    margin: 8px 0 28px;
    padding: 0;
}

.main-content ul.home-line {
    margin-left: 0;
}

.home-line li {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid #2c2e36;
    white-space: nowrap;
}

.home-line li > a:first-child {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    border-bottom: none;
}

.home-line li span {
    color: #8d8d99;
    font-size: 0.82rem;
}

.home-line li .btn {
    margin-left: auto;
}

.disclaimer {
    margin-top: 36px;
    padding-top: 14px;
    border-top: 1px solid #2c2e36;
    color: #8d8d99;
    font-size: 0.78rem;
    text-align: left;
}

table.grid {
    width: 100%;
    border-collapse: collapse;
}

table.grid th,
table.grid td {
    border-bottom: 1px solid #2c2e36 !important;
    padding: 8px 6px;
    text-align: left;
    color: #d0d0d8;
}

table.grid th {
    color: #ffffff;
    font-weight: 650;
}

@media (max-width: 720px) {
    body {
        padding: 0;
    }
    .app-wrapper {
        flex-direction: column;
        border-left: none;
        border-right: none;
        border-radius: 0;
    }
    .sidebar {
        order: 1;
        width: 100%;
        border-left: none;
        border-bottom: 1px solid #2c2e36;
    }
    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .main-content {
        order: 2;
    }
    .sidebar,
    .main-content {
        padding-left: 18px;
        padding-right: 18px;
    }
    .stat-row,
    a.desk-card,
    a.desk-card:hover {
        grid-template-columns: 1fr;
    }
    a.desk-card img {
        width: 100%;
        height: 110px;
    }
    .main-content h2 {
        font-size: 1.55rem;
    }
    .market-row {
        grid-template-columns: 1fr;
    }
    .market-actions {
        justify-content: flex-start;
    }
}
