:root {
    color-scheme: light;
    --ink: #202924;
    --muted: #7b817d;
    --line: #e4e8e2;
    --green: #35734b;
    --paper: #f7f8f5
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 14px -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif
}

/* Боковое меню скрыто: в нём один пункт, а место оно занимает во всю высоту.
   Разметка оставлена — вернуть можно одной строкой, убрав display: none. */
aside {
    display: none;
    width: 218px;
    position: fixed;
    inset: 0 auto 0 0;
    background: #fff;
    border-right: 1px solid var(--line);
    padding: 37px 24px
}

.brand {
    font-size: 35px;
    font-weight: 750;
    letter-spacing: -2px;
    color: var(--ink);
    text-decoration: none
}

.brand span {
    color: #87b951;
    font-size: 17px;
    padding-left: 4px
}

.nav-label {
    color: #919a93;
    font-size: 10px;
    letter-spacing: 1.5px;
    margin: 61px 0 18px 11px
}

.nav {
    display: flex;
    gap: 13px;
    padding: 14px;
    border-radius: 9px;
    text-decoration: none;
    color: var(--green);
    background: #eff5e8;
    font-weight: 600
}

.sidebar-bottom {
    position: absolute;
    bottom: 32px;
    font-size: 11px;
    line-height: 2.3;
    color: #536958
}

.sidebar-bottom small {
    color: var(--muted);
    padding-left: 13px
}

.dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #69a06c;
    border-radius: 50%;
    margin-right: 5px
}

main {
    max-width: 1470px;
    margin: 0 auto;
    padding: 0 5%
}

header {
    height: 91px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    color: var(--muted)
}

.badge {
    font-size: 10px;
    font-weight: 500;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 20px;
    white-space: nowrap
}

.intro {
    margin: 48px 0 26px
}

.eyebrow {
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: 600;
    color: var(--green)
}

h1 {
    font-size: 48px;
    line-height: 1.08;
    letter-spacing: -2px;
    font-weight: 550;
    margin: 19px 0
}

h1 span {
    color: #74916a
}

.intro > p:last-child, .welcome p {
    color: var(--muted);
    line-height: 1.8
}

form {
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid #d7ded2;
    background: white;
    padding: 8px 8px 8px 20px;
    border-radius: 11px;
    box-shadow: 0 3px 10px #253b2204
}

form > span {
    font-size: 25px;
    color: var(--muted)
}

input {
    font: inherit
}

form input {
    flex: 1;
    min-width: 0;
    padding: 12px 0;
    border: 0;
    background: transparent;
    outline: 0
}

form:focus-within {
    outline: 2px solid #a3bc8f
}

button {
    font: inherit;
    cursor: pointer;
    border: 0;
    border-radius: 7px;
    background: #284e37;
    color: #fff;
    padding: 15px 21px
}

button:hover {
    background: #3b6243
}

button:disabled {
    opacity: .5;
    cursor: wait
}

button:focus-visible, a:focus-visible {
    outline: 3px solid #98b67b;
    outline-offset: 3px
}

.welcome {
    text-align: center;
    padding: 62px 0 70px
}

.orb {
    margin: auto;
    background: #eaf0e2;
    border: 1px solid #dae4cf;
    width: 70px;
    height: 70px;
    border-radius: 21px;
    display: grid;
    place-items: center;
    color: #729457;
    font-size: 35px
}

.welcome h2 {
    margin-top: 23px;
    font-weight: 550;
    font-size: 20px
}

.chain-list {
    margin-top: 30px;
    font-size: 11px;
    color: #7c857b
}

.chain-list b {
    margin: 0 10px;
    color: #b3bead
}

footer {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    padding: 24px 0;
    color: #939990;
    font-size: 10px;
    letter-spacing: 1px
}

.notice {
    padding: 16px 19px;
    background: #fff7e6;
    border: 1px solid #eddfbe;
    border-radius: 8px;
    margin: 18px 0;
    line-height: 1.7;
    color: #786332
}

#status {
    margin: 15px 0;
    color: #7b6339
}

h2 {
    font-size: 18px;
    letter-spacing: -.4px
}

.wallet-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 33px
}

.wallet-heading span {
    font-size: 11px;
    color: var(--muted)
}

.mono {
    font-family: monospace;
    color: #798475;
    overflow-wrap: anywhere;
    font-size: 12px
}

.stats {
    display: grid;
    grid-template-columns:2fr 1fr 1fr;
    gap: 16px;
    margin: 25px 0
}

.stats article {
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 25px
}

.stats .total {
    background: #eef3e6;
    border-color: #dce6cd
}

.stats p {
    color: #6b7965;
    font-size: 12px;
    margin: 0
}

.stats h2 {
    font-size: 34px;
    font-weight: 550;
    margin: 17px 0 9px;
    overflow-wrap: anywhere
}

.stats small {
    font-size: 10px;
    color: #84907c
}

.filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 26px 0 18px
}

.filters button {
    font-size: 11px;
    background: white;
    color: #707b69;
    border: 1px solid var(--line);
    padding: 10px 15px;
    border-radius: 20px
}

.filters button.selected {
    color: #fff;
    background: #355d3f;
    border-color: #355d3f
}

.panel {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    overflow: hidden
}

/* Заголовок, который сам себе переключатель: кнопка, чтобы работали клавиатура и скринридер,
   но выглядящая ровно как остальные заголовки панелей — иначе раздел читается как чужеродный. */
.disclosure {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px
}

.disclosure::before {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(-45deg);
    transition: transform .15s ease
}

.disclosure[aria-expanded="true"]::before {
    transform: rotate(45deg)
}

/* Базовая кнопка здесь — тёмно-зелёная плашка, и её `button:hover` перебивает класс по
   специфичности: заголовок на наведении заливался цветом. Реагирует пусть только галочка. */
.disclosure:hover,
.disclosure:focus {
    background: none
}

.disclosure:hover::before {
    border-color: var(--ink)
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* На широком экране переноса не происходит; на узком заголовок забирает строку себе целиком,
       иначе «История входов и выходов» ломается на три строки, лишь бы пропустить фильтры рядом. */
    flex-wrap: wrap;
    padding: 10px 23px;
    border-bottom: 1px solid var(--line);
    gap: 12px
}

.check {
    font-size: 11px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px
}

/* Состав пула GM. Держатель одновременно в длинной и короткой стороне, и в какой пропорции —
   двумя суммами в разных токенах не увидишь, а полоской видно сразу. */
.composition {
    padding: 0 23px 14px
}

.composition-bar {
    display: flex;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    background: var(--line)
}

.composition-bar i:first-child {
    background: #c98a3c
}

.composition-bar i:last-child {
    background: #4a7fa5
}

.composition-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin-top: 7px;
    font-size: 11px;
    color: var(--muted)
}

#history-search {
    width: 190px;
    max-width: 100%
}

.checks {
    display: flex;
    gap: 18px;
    flex-wrap: wrap
}

.table-wrap {
    overflow-x: auto
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
    white-space: nowrap
}

th {
    font-size: 10px;
    color: #92988e;
    font-weight: 500;
    padding: 17px 22px
}

td {
    padding: 19px 22px;
    border-top: 1px solid #eff1ec;
    font-size: 12px
}

th:first-child, td:first-child {
    text-align: left
}

td:first-child a {
    font-weight: 600;
    color: var(--ink);
    text-decoration: none
}

td small {
    display: block;
    font-size: 10px;
    color: #959e8f;
    margin-top: 5px
}

.footnote {
    font-size: 11px;
    color: #939b8d;
    line-height: 1.7;
    padding: 0 3px
}

.aave {
    margin: 28px 0 36px
}

.aave .footnote {
    padding: 0 23px 13px
}

.secondary {
    background: #edf2e7;
    color: #48633b;
    font-size: 11px
}

.secondary:hover {
    background: #dce6cf
}

#aave-status {
    padding: 20px 23px;
    color: var(--muted);
    font-size: 12px
}

.aave-grid {
    display: grid;
    grid-template-columns:repeat(4, 1fr);
    padding: 24px;
    gap: 15px
}

.aave-grid span {
    font-size: 11px;
    color: var(--muted)
}

.aave-grid strong {
    display: block;
    font-size: 21px;
    font-weight: 550;
    margin-top: 9px
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0)
}

[hidden] {
    display: none !important
}

@media (min-width: 1500px) {
    main {
        padding: 0 80px
    }
}

@media (max-width: 900px) {
    aside {
        width: 80px;
        padding: 30px 15px
    }

    .brand {
        font-size: 23px
    }

    .brand span, .nav span, .nav-label, .sidebar-bottom {
        display: none
    }

    .nav {
        margin-top: 40px;
        padding: 13px;
        justify-content: center
    }

    main {
        padding: 0 25px
    }

    .stats article {
        padding: 19px
    }

    .stats h2 {
        font-size: 26px
    }
}

@media (max-width: 600px) {
    aside {
        display: none
    }

    main {
        margin: 0;
        padding: 0 18px
    }

    header {
        height: 65px
    }

    .intro {
        margin-top: 30px
    }

    h1 {
        font-size: 39px
    }

    form {
        flex-wrap: wrap;
        gap: 5px;
        padding: 10px
    }

    form input {
        font-size: 12px
    }

    form button {
        width: 100%;
        padding: 12px
    }

    .stats {
        grid-template-columns:1fr 1fr;
        gap: 10px
    }

    .stats .total {
        grid-column: 1/-1
    }

    .wallet-heading {
        align-items: start;
        gap: 10px
    }

    .wallet-heading span {
        max-width: 120px
    }

    .panel-heading {
        padding: 10px 14px
    }

    .panel-heading h2 {
        font-size: 16px
    }

    .aave-grid {
        grid-template-columns:1fr 1fr
    }

    .aave .panel-heading {
        align-items: start;
        flex-direction: column;
        padding-bottom: 18px
    }

    .chain-list {
        line-height: 2
    }

    footer {
        gap: 15px;
        font-size: 9px
    }

    .welcome {
        padding: 45px 0
    }
}

#defi-network {
    font: inherit;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: white;
    color: var(--ink)
}

.breakdown {
    display: grid;
    grid-template-columns:repeat(auto-fit, minmax(135px, 1fr));
    gap: 9px;
    margin: -13px 0 25px
}

/* Итоги стоят особняком: это не слагаемые портфеля, а выводы из них, и в одном ряду со слагаемыми
   они читались как ещё одна его часть. Черта сверху отделяет вывод от того, из чего он сделан. */
.summary {
    border-top: 1px solid var(--line);
    padding-top: 14px;
    margin: 0 0 25px
}

.summary .breakdown {
    margin: 0
}

.summary-title {
    margin: 0 0 9px;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted)
}

.aave-market {
    border-top: 1px solid #eff1ec
}

.aave-market:first-child {
    border-top: 0
}

.market-label {
    font-size: 11px;
    color: var(--muted);
    padding: 17px 24px 0
}

.aave-market .aave-grid {
    padding-top: 14px
}

.group-label {
    font-size: 10px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--green);
    padding: 18px 0 4px;
    border-top: 1px solid #eff1ec;
    margin-top: 6px
}

.position-row + .group-label {
    margin-top: 0
}

.chip {
    display: inline-block;
    font-size: 9px !important;
    letter-spacing: .4px;
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 3px 8px;
    margin-top: 7px;
    color: var(--muted)
}

.breakdown div {
    font-size: 11px;
    color: var(--muted);
    padding: 11px 14px;
    border-left: 2px solid #cedbc3;
    background: #fff
}

.breakdown strong {
    display: block;
    color: var(--ink);
    font-size: 14px;
    margin-top: 5px
}

.protocol-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    margin: 35px 0 15px
}

.protocol-toolbar > div {
    margin-right: auto
}

.protocol-toolbar h2 {
    margin: 5px 0
}

.protocol {
    margin-bottom: 16px
}

.protocol .panel-heading > span {
    font-size: 11px;
    color: var(--muted)
}

.position-list {
    padding: 5px 22px
}

.position-row {
    display: grid;
    grid-template-columns:1.5fr repeat(4, 1fr);
    gap: 12px;
    align-items: center;
    padding: 17px 0;
    border-bottom: 1px solid #eff1ec
}

.position-row.wide {
    grid-template-columns:1.5fr repeat(5, 1fr)
}

.position-row:last-child {
    border-bottom: 0
}

.position-row span {
    font-size: 11px;
    color: var(--muted)
}

.position-row strong {
    display: block;
    margin-top: 5px;
    font-size: 14px
}

.position-card {
    border-bottom: 1px solid #eff1ec
}

.position-card:last-child {
    border-bottom: 0
}

.position-card .position-row {
    border-bottom: 0
}

.pos-analytics {
    margin: 0 0 18px;
    padding: 16px 18px 18px;
    background: #f7f9f4;
    border: 1px solid #e8ede3;
    border-radius: 10px
}

.pos-analytics-heading,
.pos-range-labels {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px
}

.pos-analytics-heading > strong {
    font-size: 13px
}

.pos-analytics-heading > span,
.pos-range-labels span,
.pos-range small {
    color: var(--muted);
    font-size: 10px
}

.pos-metrics {
    display: grid;
    /* Set per block: twelve figures want six across, eight want four. */
    grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr));
    gap: 1px;
    margin: 14px 0 18px;
    overflow: hidden;
    border: 1px solid #e3e8de;
    border-radius: 8px;
    background: #e3e8de
}

.pos-metrics > div {
    min-width: 0;
    padding: 11px 12px;
    background: white
}

.pos-metrics span {
    display: block;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.35
}

.pos-metrics strong {
    display: block;
    margin-top: 7px;
    font-size: 12px;
    overflow-wrap: anywhere
}

.pos-range {
    padding-top: 2px
}

.pos-range-labels strong {
    font-size: 11px
}

.pos-range-track {
    position: relative;
    height: 6px;
    margin: 9px 5px 8px;
    border-radius: 6px;
    background: linear-gradient(90deg, #dce8d2, #6f9b63, #dce8d2)
}

.pos-range-track i {
    position: absolute;
    top: 50%;
    width: 12px;
    height: 12px;
    border: 2px solid white;
    border-radius: 50%;
    background: #355d3f;
    box-shadow: 0 0 0 1px #355d3f;
    transform: translate(-50%, -50%)
}

.side {
    font-size: 9px !important;
    border-radius: 13px;
    padding: 4px 7px;
    background: #edf3e7;
    color: #4e7747 !important
}

.side.short {
    background: #f7eae7;
    color: #a05246 !important
}

.activity-enter {
    color: #35734b
}

.activity-exit {
    color: #a05246
}

.row-enter {
    background: #f3f8ef
}

.row-exit {
    background: #fdf4f2
}

.row-enter td:first-child {
    box-shadow: inset 3px 0 0 #5c9163
}

.row-exit td:first-child {
    box-shadow: inset 3px 0 0 #c2776a
}

.row-enter .units, .row-enter .delta {
    color: #2f6944;
    font-weight: 600
}

.row-exit .units, .row-exit .delta {
    color: #96453a;
    font-weight: 600
}

.gain {
    color: #2f6944
}

.loss {
    color: #96453a
}

td.gain, td.loss {
    font-weight: 600
}

.chart-wrap {
    padding: 18px 22px 4px
}

.chart {
    width: 100%;
    height: auto;
    display: block
}

.chart .grid {
    stroke: #e9ece5;
    stroke-width: 1
}

.chart .grid.zero {
    stroke: #c7d0c0;
    stroke-dasharray: 4 4
}

.chart .axis {
    font-size: 11px;
    fill: #939b8d
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 6px 22px 18px
}

.progress {
    height: 4px;
    margin: 2px 0 6px;
    border-radius: 4px;
    background: #e8ede3;
    overflow: hidden
}

.progress > i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 4px;
    background: #5c9163;
    transition: width .35s ease
}

/* Когда источник прогресса недоступен, полоса честно показывает не долю, а просто работу. */
.progress.waiting > i {
    width: 35%;
    animation: progress-slide 1.2s ease-in-out infinite
}

@keyframes progress-slide {
    from { margin-left: -35% }
    to { margin-left: 100% }
}

.legend-action {
    font: inherit;
    font-size: 10px;
    letter-spacing: .3px;
    text-transform: uppercase;
    color: var(--muted);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 4px 11px;
    cursor: pointer
}

.legend-action:hover:not(:disabled) {
    color: var(--ink);
    border-color: #c7d2c0
}

.legend-action:disabled {
    opacity: .4;
    cursor: default
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
    padding: 2px 6px;
    margin: -2px -6px;
    border-radius: 6px
}

.legend-item:hover,
.legend-item:focus-visible {
    background: #eef2ea;
    outline: none
}

/* Скрытая линия: подпись гаснет, но остаётся читаемой — по ней же её и возвращают. */
.legend-item.off {
    opacity: .45
}

.legend-item.off b {
    text-decoration: line-through
}

.legend-item i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block
}

.legend-item b {
    color: var(--ink)
}

#perf-total {
    font-weight: 600
}

.heading-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end
}

.fees-note {
    font-size: 11px;
    color: var(--green) !important
}

#hyperliquid-data > .pos-analytics:first-child {
    margin-top: 17px
}

.hl-fills {
    margin: 0 -22px
}

.hl-fills td.gain,
.hl-fills td.loss {
    font-weight: 600
}

.position-row small {
    display: block;
    font-size: 10px;
    color: #959e8f;
    margin-top: 4px
}

@media (max-width: 700px) {
    .breakdown {
        grid-template-columns:1fr 1fr
    }

    .protocol-toolbar {
        align-items: flex-start;
        flex-wrap: wrap
    }

    .position-row {
        grid-template-columns:1fr 1fr
    }

    .position-row > div:first-child {
        grid-column: 1/-1
    }

    .pos-metrics {
        --cols: 2
    }
}

@media (min-width: 701px) and (max-width: 1100px) {
    .pos-metrics {
        --cols: 3
    }
}

.chart .area {
    fill: #5c9163;
    opacity: .10
}

.chart-wrap {
    position: relative
}

.chart .line {
    transition: opacity .12s, stroke-width .12s
}

.chart .line.dimmed {
    opacity: .15
}

.chart .line.focused {
    stroke-width: 3
}

.chart .guide {
    stroke: #b9c4b2;
    stroke-width: 1;
    stroke-dasharray: 3 3
}

.chart .marker {
    stroke: #fff;
    stroke-width: 2
}

.chart-tip {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    transform: translate(-50%, calc(-100% - 14px));
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 8px 12px;
    white-space: nowrap;
    box-shadow: 0 5px 16px #253b2218;
    font-size: 11px;
    line-height: 1.5
}

.chart-tip b {
    display: block;
    font-size: 12px
}

.chart-tip div {
    font-weight: 600
}

.chart-tip span {
    color: var(--muted)
}

.legend-item {
    cursor: default;
    transition: opacity .12s
}

.legend-item.dimmed {
    opacity: .35
}

.chart-tip.below {
    transform: translate(-50%, 14px)
}
.reserve-table{border-top:1px solid #eff1ec;margin-top:4px}.reserve-table table{text-align:right}.reserve-table th{padding:12px 24px 8px}.reserve-table td{padding:11px 24px;border-top:1px solid #f5f7f3}.reserve-table td small{color:#959e8f}.reserve-table strong{font-size:13px}
.perf-table{border-top:1px solid #e4e8e2}.perf-table th{padding-top:16px}
.analysis-note{padding:16px 24px;font-size:11px;text-align:left;border-top:1px solid #eff1ec}
.exact-units{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;white-space:normal;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
