:root {
    color-scheme: dark;
    --bg: #10151e;
    --panel: #19212e;
    --line: #303d50;
    --text: #ecf1f8;
    --muted: #a7b5ca;
    --accent: #86b6ff;
    --positive: #82dbad;
    --negative: #ffa8a8;
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.6 system-ui,sans-serif;
}

a {
    color: var(--accent);
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px max(24px,calc((100vw - 1400px)/2));
    border-bottom: 1px solid var(--line);
}

.brand {
    text-decoration: none;
    font-size: 22px;
    font-weight: 750;
    color: var(--text);
}

.brand span {
    font-weight: 400;
    color: var(--muted);
}

main {
    max-width: 1448px;
    padding: 36px 24px;
    margin: auto;
}

h1 {
    font-size: clamp(26px,4vw,36px);
    line-height: 1.2;
    margin: 4px 0 14px;
}

h2 {
    font-size: 22px;
    margin: 30px 0 16px;
}

h3 {
    font-size: 19px;
    margin: 8px 0;
}

p {
    margin: 10px 0;
}

.eyebrow {
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent);
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 13px;
}

.heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}

.summary-grid,.strategy-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 18px;
}

.summary-grid strong {
    display: block;
    font-size: 30px;
    margin-top: 6px;
}

.summary-grid .small-value {
    font-size: 22px;
}

.balance {
    font-size: 32px;
    font-weight: 650;
}

.balance span {
    font-size: 14px;
    color: var(--muted);
}

.positive {
    color: var(--positive);
}

.negative {
    color: var(--negative);
}

dl {
    margin: 18px 0 0;
}

dl div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid var(--line);
}

dt {
    color: var(--muted);
    font-size: 13px;
}

dd {
    margin: 0;
    font-variant-numeric: tabular-nums;
}

.button {
    display: inline-block;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--accent);
    color: var(--bg);
    padding: 10px 18px;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: filter .15s;
}

.button: hover {
    filter: brightness(1.12);
}

.secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--line);
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

.notice {
    border: 1px solid var(--accent);
    background: var(--panel);
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.notice.error {
    border-color: var(--negative);
    color: var(--negative);
}

.table-wrap {
    padding: 0;
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    width: 100%;
    font-size: 13px;
    text-align: left;
}

th,td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

thead th {
    color: var(--muted);
    font-weight: 500;
    white-space: nowrap;
}

tbody tr: last-child td,tbody tr:last-child th {
    border-bottom: 0;
}

td {
    font-variant-numeric: tabular-nums;
}

td .negative {
    display: block;
    min-width: 150px;
    max-width: 300px;
    overflow-wrap: anywhere;
}

.empty {
    padding: 32px;
    color: var(--muted);
    text-align: center;
}

.rules {
    margin-top: 18px;
    padding: 16px 24px;
}

.rules summary {
    cursor: pointer;
}

.rules li {
    margin: 10px 0;
    color: var(--muted);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px;
}

.login-panel {
    max-width: 460px;
    margin: 6vh auto;
}

.login-form {
    display: grid;
    gap: 10px;
    margin: 24px 0;
}

.login-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
}

.login-form button {
    margin-top: 12px;
}

@media(max-width:1000px) {
    .strategy-grid {
        grid-template-columns: 1fr;
    }
    .summary-grid {
        gap: 10px;
    }
    .summary-grid .panel {
        padding: 16px;
    }
}

@media(max-width:600px) {
    main {
        padding: 24px 14px;
    }
    .site-header {
        padding: 14px;
    }
    .heading {
        align-items: flex-start;
        flex-direction: column;
    }
    .summary-grid {
        grid-template-columns: 1fr;
    }
    .panel {
        padding: 18px;
    }
    .table-wrap {
        padding: 0;
    }
    .brand {
        font-size: 18px;
    }
    .login-panel {
        margin: 20px auto;
    }
}
