.tf-invest {
    --tf-white: #fff;
    --tf-muted: #6d6d6d;
    --tf-ink: #1a1a1a;
    --tf-blue: #1558f0;
    --tf-line: rgba(16, 24, 40, 0.08);
    max-width: 1120px;
    padding: 8px 8px 72px;
}

.tf-invest h1 {
    font-size: 32px;
    line-height: 40px;
    font-weight: 500;
    margin: 0 0 8px;
}

.tf-invest > p {
    color: var(--tf-muted);
    margin: 0 0 24px;
    max-width: 52ch;
}

.tf-invest .notice {
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--tf-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

.tf-invest .invest-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.tf-invest .invest-stat {
    background: var(--tf-white);
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 1px 4px rgba(16, 24, 40, 0.04);
}

.tf-invest .invest-stat small {
    display: block;
    font-size: 13px;
    color: var(--tf-muted);
    margin-bottom: 6px;
}

.tf-invest .invest-stat strong {
    font-size: 28px;
    font-weight: 500;
    line-height: 36px;
}

.tf-invest .invest-layout {
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    gap: 28px;
    align-items: start;
}

.tf-invest .invest-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 32px;
}

.tf-invest .invest-card,
.tf-invest .panel {
    background: var(--tf-white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(16, 24, 40, 0.04);
}

.tf-invest .invest-card {
    display: grid;
    gap: 10px;
}

.tf-invest .invest-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tf-invest .invest-card h3,
.tf-invest .page-head {
    font-size: 16px;
    font-weight: 600;
    line-height: 22px;
    margin: 0;
}

.tf-invest .invest-card p {
    color: var(--tf-muted);
    font-size: 14px;
    margin: 0;
}

.tf-invest .invest-rate {
    font-size: 32px;
    font-weight: 500;
    line-height: 40px;
}

.tf-invest .invest-rate small {
    font-size: 13px;
    font-weight: 600;
    color: var(--tf-muted);
    margin-left: 4px;
}

.tf-invest .fiat-icon,
.tf-invest .asset-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tf-invest .fiat-icon {
    background: var(--tf-blue);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 700;
}

.tf-invest .form-stack {
    display: grid;
    gap: 16px;
}

.tf-invest .field {
    display: grid;
    gap: 6px;
}

.tf-invest .field label {
    font-size: 13px;
    font-weight: 600;
}

.tf-invest .field input,
.tf-invest .field select {
    height: 44px;
    border: 1px solid var(--tf-line);
    border-radius: 10px;
    padding: 0 12px;
    font: inherit;
}

.tf-invest .field-hint,
.tf-invest .muted {
    color: var(--tf-muted);
    font-size: 13px;
}

.tf-invest .quote {
    display: grid;
    gap: 8px;
    margin: 0;
}

.tf-invest .quote div {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.tf-invest .quote dt {
    color: var(--tf-muted);
}

.tf-invest .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.tf-invest .btn-primary {
    background: var(--tf-blue);
    color: #fff;
}

.tf-invest .btn-secondary {
    background: rgba(21, 88, 240, 0.08);
    color: var(--tf-blue);
}

.tf-invest .form-status {
    min-height: 1.2em;
    font-size: 13px;
    margin: 0;
}

.tf-invest .form-status[data-state="error"] { color: #c0392b; }
.tf-invest .form-status[data-state="ok"] { color: #1e7a46; }

.tf-invest .position-list { display: grid; }

.tf-invest .position-row {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr 0.9fr 0.8fr auto;
    gap: 12px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--tf-line);
    font-size: 14px;
}

.tf-invest .position-row small {
    display: block;
    color: var(--tf-muted);
    font-size: 12px;
}

.tf-invest .position-row > span:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tf-invest .position-empty { padding: 20px 0; }

@media (max-width: 1024px) {
    .tf-invest .invest-summary,
    .tf-invest .invest-layout,
    .tf-invest .invest-grid,
    .tf-invest .position-row {
        grid-template-columns: 1fr;
    }
}
