* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Times New Roman", Times, serif;
    background: #d9d9d9;
    color: #111111;
    min-height: 100vh;
    padding-bottom: 66px;
}

.top-banner {
    background: #000;
    color: #fff;
    min-height: 58px;
    padding: 6px 10px;
    position: relative;
}

.link-box {
    position: absolute;
    right: 10px;
    top: 6px;
    background: #ffeb3b;
    color: #111111;
    font-size: 13px;
    line-height: 1.25;
    padding: 3px 8px;
    text-align: right;
}

.link-box a {
    color: #111111;
}

.intro-line {
    font-family: "Courier New", Courier, monospace;
    font-size: 13px;
    padding-top: 32px;
}

.container {
    width: 430px;
    margin: 14px 0 50px 10px;
}

h1 {
    font-size: 70px;
    line-height: 0.95;
    font-weight: normal;
    margin-bottom: 6px;
}

h2 {
    font-size: 24px;
    font-weight: normal;
    margin-bottom: 4px;
}

hr {
    border: 0;
    border-top: 1px solid #808080;
    margin: 0 0 8px;
}

.headline-value {
    font-size: 26px;
    margin-bottom: 8px;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
}

.turn-label {
    font-size: 16px;
}

.panel {
    margin-bottom: 14px;
}

.panel p {
    font-size: 17px;
    line-height: 1.35;
    margin-bottom: 2px;
}

.quantity-input {
    width: 52px;
    font-family: "Times New Roman", Times, serif;
    font-size: 14px;
    line-height: 1.2;
    border: 1px solid #777777;
    background: #fff;
    text-align: center;
    padding: 1px 2px;
}

.quantity-input:focus {
    outline: 1px solid #444444;
}

.action-btn,
.buy-btn,
.sell-btn {
    font-family: "Times New Roman", Times, serif;
    font-size: 14px;
    padding: 1px 6px;
    border: 1px solid #8a8a8a;
    background: #e7e7e7;
    color: #111111;
    cursor: pointer;
}

.action-btn:hover,
.buy-btn:hover,
.sell-btn:hover {
    background: #dddddd;
}

.stock-list,
.holdings,
.event-log {
    display: grid;
    gap: 5px;
}

.stock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.stock-info {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
}

.stock-name {
    font-size: 17px;
    line-height: 1.15;
}

.stock-price {
    font-size: 14px;
    line-height: 1.1;
}

.stock-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.holding-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.holding-info {
    flex: 1;
}

.holding-name {
    font-size: 17px;
    line-height: 1.15;
}

.holding-details {
    font-size: 14px;
    line-height: 1.15;
}

.holding-value {
    font-size: 14px;
    min-width: 72px;
}

.empty-state {
    font-size: 14px;
}

.event-item {
    font-size: 13px;
    line-height: 1.2;
}

.event-item.success {
    color: #0f6c0f;
}

.event-item.error {
    color: #8f1111;
}

.event-item.info {
    color: #111;
}

.healthbar-shell {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f1f1f1;
    border-top: 1px solid #8a8a8a;
    padding: 6px 10px 8px;
}

.healthbar-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 4px;
}

.healthbar-track {
    width: 100%;
    height: 12px;
    background: #d0d0d0;
    border: 1px solid #7a7a7a;
}

.healthbar-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #a30f0f, #d68300 50%, #2f7f12 100%);
    transition: width 0.2s ease;
}

.healthbar-fill.warn {
    filter: saturate(1.25);
}

.healthbar-fill.critical {
    animation: pulseHealth 0.9s ease-in-out infinite;
}

@keyframes pulseHealth {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.55;
    }
}

@media (max-width: 768px) {
    .link-box {
        position: static;
        margin-top: 4px;
        text-align: left;
        width: fit-content;
    }

    .intro-line {
        font-size: 12px;
        padding-top: 0;
    }

    .container {
        width: calc(100% - 16px);
        margin-right: 8px;
    }

    h1 {
        font-size: 52px;
    }

    .headline-value {
        font-size: 20px;
    }

    h2 {
        font-size: 20px;
    }

    .panel p,
    .stock-name,
    .holding-name {
        font-size: 16px;
    }

    .stock-price,
    .holding-details,
    .holding-value,
    .empty-state,
    .quantity-input,
    .action-btn,
    .buy-btn,
    .sell-btn,
    .turn-label,
    .event-item {
        font-size: 13px;
    }

    .stock-item,
    .holding-item {
        flex-wrap: wrap;
    }

    .healthbar-meta {
        font-size: 12px;
    }
}