:root {
    color-scheme: dark;
    --bg: #11130f;
    --panel: #191d17;
    --panel-2: #20271e;
    --line: #3d4938;
    --text: #e7f0dc;
    --muted: #93a38b;
    --buy: #62d77b;
    --sell: #ff6f61;
    --accent: #d9b45f;
    --cyan: #79d8dc;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top, #1a2118 0, var(--bg) 42rem);
    color: var(--text);
    font-family: "Courier New", monospace;
}

button,
input {
    font: inherit;
}

button {
    min-height: 36px;
    border: 1px solid var(--line);
    background: #252d22;
    color: var(--text);
    cursor: pointer;
}

button:hover:not(:disabled) {
    border-color: var(--accent);
    color: #fff6cf;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.terminal {
    width: min(1480px, calc(100vw - 24px));
    margin: 0 auto;
    padding: 12px 0 24px;
}

.topbar,
.panel,
.metric,
.notice {
    border: 1px solid var(--line);
    background: rgba(25, 29, 23, 0.94);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
}

h1,
h2,
p {
    margin: 0;
}

h1 {
    font-size: 28px;
    letter-spacing: 0;
    color: var(--accent);
}

h2 {
    font-size: 15px;
    font-weight: 700;
}

.topbar p,
.panel-head span,
.metric span,
.timeline,
.ticket-message {
    color: var(--muted);
    font-size: 12px;
}

.notice {
    margin-top: 10px;
    padding: 10px 12px;
    color: #ffe3a1;
}

.hidden {
    display: none;
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.career-grid {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 8px;
}

.career-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(210px, 0.55fr) minmax(220px, 0.75fr);
    align-items: stretch;
}

.metric {
    padding: 12px;
    min-width: 0;
}

.metric strong {
    display: block;
    margin-top: 8px;
    color: var(--cyan);
    font-size: 18px;
    overflow-wrap: anywhere;
}

.career-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: rgba(61, 73, 56, 0.65);
    border-left: 1px solid var(--line);
}

.career-metrics div {
    min-width: 0;
    padding: 8px 10px;
    background: var(--panel);
}

.career-metrics span {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.career-metrics strong {
    display: block;
    margin-top: 3px;
    color: var(--cyan);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.career-graph {
    display: block;
    width: 100%;
    height: 56px;
    background: #0d100c;
    border-left: 1px solid var(--line);
}

.career-panel .panel-head {
    min-height: 56px;
    border-bottom: 0;
}

.prompt-text {
    padding: 12px;
    min-height: 58px;
    color: var(--text);
    line-height: 1.4;
    font-size: 13px;
    border-bottom: 1px solid var(--line);
}

.prompt-options {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.prompt-option {
    min-height: 42px;
    padding: 8px 10px;
    text-align: left;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
}

.prompt-option span {
    color: var(--muted);
    font-size: 12px;
}

.offer-option {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 14px;
    align-items: start;
}

.offer-option strong {
    grid-column: 1 / -1;
    color: var(--text);
    overflow-wrap: anywhere;
}

.offer-option .offer-meta {
    grid-column: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.offer-option .offer-salary {
    grid-column: 2;
    color: var(--cyan);
    font-weight: 700;
    white-space: nowrap;
}

.lifestyle-store {
    gap: 10px;
}

.lifestyle-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: rgba(61, 73, 56, 0.65);
    border: 1px solid var(--line);
}

.lifestyle-summary div {
    min-width: 0;
    padding: 8px 10px;
    background: #151914;
}

.lifestyle-summary span,
.lifestyle-section-head span,
.lifestyle-stats span {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.lifestyle-summary strong {
    display: block;
    margin-top: 3px;
    color: var(--cyan);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.lifestyle-section {
    border: 1px solid var(--line);
    background: rgba(17, 20, 15, 0.7);
}

.lifestyle-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    background: #20271e;
}

.lifestyle-section-head h3 {
    margin: 0;
    color: #fff6cf;
    font-size: 13px;
}

.lifestyle-items {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
}

.lifestyle-card {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(61, 73, 56, 0.9);
    background: #141812;
}

.lifestyle-card.owned {
    border-color: rgba(217, 180, 95, 0.72);
    background: #1f1d14;
}

.lifestyle-card-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 8px;
}

.lifestyle-card-head strong {
    color: var(--text);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.lifestyle-card-head span {
    flex: 0 0 auto;
    color: var(--accent);
    font-size: 11px;
    white-space: nowrap;
}

.lifestyle-card p {
    min-height: 34px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.lifestyle-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.lifestyle-card button {
    width: 100%;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(8, 10, 7, 0.78);
}

.modal.hidden {
    display: none;
}

.modal-box {
    width: min(720px, 100%);
    max-height: min(88vh, 720px);
    overflow: auto;
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.modal-close {
    min-width: 86px;
}

.workspace {
    display: grid;
    grid-template-columns: minmax(145px, 0.48fr) minmax(210px, 0.72fr) minmax(500px, 2.35fr) minmax(260px, 0.9fr);
    gap: 10px;
    margin-top: 10px;
}

.panel {
    min-width: 0;
}

.panel-head {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    background: var(--panel-2);
}

.compact-head {
    min-height: 44px;
}

.watchlist {
    display: grid;
    gap: 1px;
}

.watch-item {
    width: 100%;
    min-height: 48px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px;
    padding: 8px 10px;
    border: 0;
    border-bottom: 1px solid rgba(61, 73, 56, 0.8);
    text-align: left;
    background: transparent;
}

.watch-label {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.watch-item.active {
    background: #313a2d;
    color: #fff6cf;
}

.watch-name {
    color: var(--muted);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.watch-price {
    align-self: center;
    color: var(--cyan);
    text-align: right;
    white-space: nowrap;
}

.chart-panel canvas {
    width: 100%;
    height: auto;
    display: block;
    background: #0d100c;
}

.timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 10px;
    flex-wrap: wrap;
}

.newspaper-box {
    width: min(1040px, 100%);
    max-height: min(92vh, 860px);
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
}

.newspaper-body {
    position: relative;
    min-height: 0;
    max-height: calc(min(92vh, 860px) - 50px);
    overflow: auto;
    padding: 18px;
    color: #1e211a;
    background: #efe5c8;
    background-image: linear-gradient(rgba(61, 73, 56, 0.08) 1px, transparent 1px);
    background-size: 100% 9px;
}

.news-loading-overlay {
    position: absolute;
    inset: 18px;
    z-index: 2;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    min-height: 260px;
    border: 3px double #2d2a20;
    background: rgba(239, 229, 200, 0.94);
    color: #241e14;
    text-align: center;
}

.news-loading-overlay.hidden {
    display: none;
}

.news-loading-overlay strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
}

.news-loading-overlay p {
    max-width: 360px;
    color: #4f4a39;
    line-height: 1.4;
}

.press-loader {
    width: min(320px, 72vw);
    height: 82px;
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 2px solid #241e14;
    background: #d9c89e;
    overflow: hidden;
}

.press-loader span {
    display: block;
    height: 10px;
    background: repeating-linear-gradient(90deg, #241e14 0 12px, transparent 12px 20px);
    animation: press-roll 900ms steps(8) infinite;
}

.press-loader span:nth-child(2) {
    animation-delay: 120ms;
}

.press-loader span:nth-child(3) {
    animation-delay: 240ms;
}

@keyframes press-roll {
    from {
        transform: translateX(-24px);
    }

    to {
        transform: translateX(24px);
    }
}

.newspaper-mast {
    display: grid;
    gap: 6px;
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 4px double #2d2a20;
    color: #2d2a20;
    text-align: center;
}

.newspaper-edition {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    font-weight: 700;
}

.newspaper-name {
    color: #11130f;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 42px;
    font-weight: 900;
    line-height: 0.95;
}

.newspaper-deck {
    color: #4f4a39;
    font-size: 12px;
    font-weight: 700;
}

.newspaper-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(240px, 0.9fr);
    gap: 18px;
    align-items: start;
}

.newspaper-main-column,
.newspaper-side-column {
    min-width: 0;
}

.newspaper-side-column {
    display: grid;
    gap: 12px;
    border-left: 1px solid rgba(45, 42, 32, 0.35);
    padding-left: 14px;
}

.newspaper-lead {
    display: grid;
    gap: 12px;
}

.newspaper-lead h3 {
    margin: 0;
    color: #11130f;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 34px;
    line-height: 1.02;
}

.newspaper-abstract {
    color: #4f4a39;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    font-style: italic;
    line-height: 1.35;
}

.newspaper-byline {
    color: #5b5848;
    font-size: 12px;
    font-weight: 700;
}

.newspaper-copy {
    line-height: 1.5;
    column-count: 2;
    column-gap: 18px;
    text-align: justify;
}

.newspaper-lead a {
    color: #244f64;
    font-size: 12px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.newspaper-meta-block,
.newspaper-related {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(45, 42, 32, 0.45);
}

.newspaper-meta-line,
.newspaper-empty {
    margin: 0 0 6px;
    color: #3c3a2e;
    font-size: 12px;
}

.newspaper-meta-block a {
    color: #244f64;
    font-size: 12px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.newspaper-event {
    padding: 10px;
    border: 2px solid #7d2e25;
    background: #f4d8bf;
    color: #321b16;
}

.newspaper-event strong {
    display: block;
    margin-bottom: 6px;
    color: #7d2e25;
}

.newspaper-event p {
    line-height: 1.4;
}

.newspaper-related {
    display: grid;
    gap: 8px;
}

.newspaper-related h3 {
    margin: 0;
    color: #11130f;
    font-size: 14px;
}

.newspaper-related article {
    display: grid;
    gap: 3px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(45, 42, 32, 0.25);
}

.newspaper-related article:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.newspaper-related strong {
    color: #1d2118;
    overflow-wrap: anywhere;
}

.newspaper-related span {
    color: #5b5848;
    font-size: 11px;
}

.order-panel form {
    display: grid;
    gap: 12px;
    padding: 12px;
}

.action-stack {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.action-stack button {
    width: 100%;
    min-height: 42px;
    text-align: left;
    padding: 8px 10px;
}

.action-stack button:nth-of-type(2) {
    color: #fff6cf;
    border-color: rgba(217, 180, 95, 0.65);
    background: #2d2718;
}

.action-stack button:nth-of-type(3) {
    color: #d8fbff;
    border-color: rgba(121, 216, 220, 0.6);
    background: #18282a;
}

.action-rule {
    height: 1px;
    margin: 3px 0;
    background: rgba(61, 73, 56, 0.9);
}

.side-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.side-switch label {
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    border: 1px solid var(--line);
    background: #141812;
}

.field {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
}

.field input {
    width: 100%;
    min-height: 36px;
    border: 1px solid var(--line);
    background: #0d100c;
    color: var(--text);
    padding: 0 10px;
}

.ticket-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
}

.ticket-row strong {
    color: var(--cyan);
    text-align: right;
}

.ticket-message {
    min-height: 34px;
    line-height: 1.35;
}

.tables {
    display: grid;
    grid-template-columns: 1.1fr 1.25fr 0.9fr;
    gap: 10px;
    margin-top: 8px;
}

.table-wrap {
    max-height: 260px;
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

th,
td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(61, 73, 56, 0.7);
    text-align: right;
    white-space: nowrap;
}

td small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.2;
}

th:first-child,
td:first-child,
th:nth-child(2),
td:nth-child(2) {
    text-align: left;
}

th {
    color: var(--muted);
    background: #151914;
    position: sticky;
    top: 0;
}

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

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

.activity {
    list-style: none;
    margin: 0;
    padding: 10px 12px;
    display: grid;
    gap: 8px;
    max-height: 260px;
    overflow: auto;
    font-size: 12px;
    color: var(--muted);
}

@media (max-width: 1050px) {
    .account-grid,
    .workspace,
    .tables {
        grid-template-columns: 1fr 1fr;
    }

    .career-panel {
        grid-template-columns: minmax(260px, 1fr) minmax(220px, 0.8fr);
    }

    .chart-panel,
    .career-graph,
    .tables .panel:last-child {
        grid-column: 1 / -1;
    }

    .career-graph {
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .lifestyle-summary {
        grid-template-columns: 1fr 1fr;
    }

    .lifestyle-items {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .terminal {
        width: calc(100vw - 12px);
        padding-top: 6px;
    }

    .topbar,
    .account-grid,
    .career-grid,
    .workspace,
    .tables {
        grid-template-columns: 1fr;
    }

    .career-panel {
        grid-template-columns: 1fr;
    }

    .career-metrics {
        grid-template-columns: 1fr 1fr;
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .career-graph {
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .topbar {
        display: grid;
    }

    .metric strong {
        font-size: 16px;
    }

    .newspaper-body {
        padding: 12px;
        max-height: calc(92vh - 50px);
    }

    .newspaper-layout {
        grid-template-columns: 1fr;
    }

    .newspaper-side-column {
        border-left: 0;
        padding-left: 0;
        border-top: 1px solid rgba(45, 42, 32, 0.35);
        padding-top: 12px;
    }

    .newspaper-name {
        font-size: 28px;
    }

    .newspaper-lead h3 {
        font-size: 23px;
    }

    .newspaper-copy {
        column-count: 1;
        text-align: left;
    }
}
