/* Phosphor console treatments for the local Pale Eye preview. */
:root {
    --bg: #060b08;
    --surface: #0a120d;
    --line: #24422d;
    --line-bright: #3e6c45;
    --text: #e4f3e4;
    --muted: #94ae96;
    --gold: #a9f87e;
    --green: #a9f68a;
    --red: #f0ad92;
    --screen-grid: rgba(100, 203, 103, .16);
}

body {
    background: radial-gradient(ellipse at 54% 6%, #0c1710 0, #060b08 49rem);
}

.masthead { background: #080f0a; }
.mast-inner { min-height: 55px; gap: 18px; }
.brand { font: 700 22px/1 var(--headline); letter-spacing: .11em; }
.mast-section { font: .68rem var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.feed-pill { border-color: var(--line-bright); background: #102416; color: #c7ffb0; letter-spacing: .045em; }
.feed-pill::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 7px; background: currentColor; vertical-align: .14em; }
.console-fullscreen {
    min-height: 28px;
    padding: 4px 8px;
    border: 1px solid var(--line);
    color: var(--muted);
    background: #0b160d;
    font: .68rem var(--mono);
    white-space: nowrap;
}
.console-fullscreen:hover { color: var(--gold); border-color: var(--line-bright); }

.workspace { padding-top: 26px; }
.intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(250px, 27vw, 347px);
    align-items: center;
    isolation: isolate;
    position: relative;
    overflow: hidden;
    gap: 24px;
    margin: 0 0 12px;
    min-height: 202px;
    padding: 21px 23px 20px 29px;
    border: 1px solid var(--line-bright);
    background: radial-gradient(ellipse at 68% 25%, #102819 0%, #0b180f 58%, #07110a 100%);
}
.intro::before, .intro::after {
    content: "";
    position: absolute;
    z-index: 1;
    width: 15px;
    height: 15px;
    pointer-events: none;
}
.intro::before { inset: 5px auto auto 5px; border: solid #82ba76; border-width: 1px 0 0 1px; }
.intro::after { inset: auto 5px 5px auto; border: solid #82ba76; border-width: 0 1px 1px 0; }
.intro-grid {
    position: absolute;
    z-index: -1;
    inset: 39% -6% -65%;
    pointer-events: none;
    background-image: linear-gradient(var(--screen-grid) 1px, transparent 1px), linear-gradient(90deg, var(--screen-grid) 1px, transparent 1px);
    background-size: 38px 30px;
    mask-image: linear-gradient(transparent, #000 48%, #000 75%, transparent);
    transform: perspective(230px) rotateX(48deg) scale(1.25);
    transform-origin: 50% 0%;
}
h1 {
    color: #d1ffb7;
    font: 600 clamp(3.45rem, 7vw, 6.4rem)/.87 var(--headline);
    letter-spacing: .06em;
    text-shadow: 0 0 22px #8afa6650;
}
.intro p { margin-top: 10px; color: #a8c2a6; }
.refresh {
    grid-auto-flow: column;
    justify-content: start;
    text-align: left;
    margin-top: 17px;
    gap: 0;
    font-size: .68rem;
}
.refresh span + span { margin-left: 11px; padding-left: 11px; border-left: 1px solid var(--line-bright); }
#signal-scope { position: relative; min-width: 0; }
.market-nav { gap: 4px; margin-top: 17px; }
.market-nav button {
    min-height: 36px;
    padding: 5px 13px;
    background: #0a160c;
    font: 500 .71rem var(--mono);
    letter-spacing: .035em;
    text-transform: uppercase;
}
.market-nav button[aria-pressed="true"] {
    border-color: #74ae65;
    background: #17351b;
    color: #caffae;
    box-shadow: inset 0 -2px #a9f87e, inset 0 0 15px #8dee7920;
}
.secondary-nav { margin-top: -4px; }
.secondary-nav button { min-height: 30px; font-size: .67rem; }
.panels { gap: 12px; }
.panel { box-shadow: inset 0 0 0 2px #0d1b11; }
.panel-head { border-top: 2px solid #2a4e33; }
.panel h2, .comparison-head h3 { color: #d4f2cd; letter-spacing: .045em; }
.periods button[aria-pressed="true"], .comparison-actions button[aria-pressed="true"] {
    background: #17311a;
    border-color: var(--line-bright);
    color: #b7f49a;
}
.comparison-actions button { background: #0d1a11; }
.comparison-actions button:hover:not(:disabled) { border-color: var(--line-bright); color: var(--gold); }
.chart-frame, .company-production-panel { position: relative; border-color: var(--line); background: #07110b; }
.chart {
    background-image: linear-gradient(90deg, #4a97531b 1px, transparent 1px);
    background-position: 2% 0;
    background-size: 9% 100%;
}
.chart-gridline { stroke: #21412b; }
.chart-line { filter: drop-shadow(0 0 3px #a8fb7070); }
.chart svg text { fill: #97ae94; }
.search input { border-color: var(--line); background: #060f09; }
th { color: #afd1ac; background: #112117; }
td, th { border-top-color: #1a3222; }
tbody tr:nth-child(2n) { background: #0c1610; }
.workspace-footer { border-top: 1px solid #132919; margin-top: 12px; }

@media (max-width: 680px) {
    .intro { gap: 14px; grid-template-columns: minmax(0, 1fr); padding: 18px 13px 12px; }
    .intro-grid { inset: 36% -36% -58%; }
    #signal-scope { max-width: none; }
    .mast-inner { gap: 8px; }
    .console-fullscreen { padding-inline: 5px; }
}
@media (max-width: 460px) {
    .mast-inner .brand { font-size: 18px; }
    .feed-pill, .console-fullscreen { font-size: .58rem; }
    .feed-pill { padding-inline: 5px; }
    .feed-pill::before { margin-right: 4px; }
    .refresh { gap: 0; grid-auto-flow: column; font-size: .59rem; }
    .refresh span + span { padding-left: 5px; margin-left: 5px; }
    .market-nav button { padding-inline: 8px; min-height: 31px; font-size: .65rem; }
}
@media (prefers-reduced-motion: reduce) {
}

.intro.intro--with-eye {
    grid-template-columns: minmax(0, 1fr) minmax(220px, .76fr) clamp(158px, 16vw, 226px);
}

.terminal-eye {
    display: grid;
    gap: 6px;
    min-width: 0;
    margin: 0;
}

.terminal-eye canvas {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    filter: drop-shadow(0 4px 7px rgb(0 0 0 / 62%));
}

.terminal-quote-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1px;
    margin: 0;
    border: 1px solid var(--line);
    background: var(--line);
}

.terminal-quote {
    min-width: 0;
    padding: 10px clamp(8px, 1.5vw, 19px);
    background: var(--surface);
}

.terminal-quote :is(dt, .terminal-quote-meta) { color: var(--muted); font: .7rem/1.4 var(--mono); }
.terminal-quote dt { font-weight: 600; text-transform: uppercase; }
.terminal-quote dd { margin: 0; }
.terminal-quote .terminal-quote-reading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 10px;
    margin: 3px 0;
    font: 600 clamp(.91rem, 2vw, 1.65rem)/1.1 var(--mono);
}

.terminal-quote-reading strong { font-weight: inherit; }

@media (max-width: 800px) {
    .terminal-quote-list { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .terminal-quote { grid-column: span 2; }
    .terminal-quote--oil { grid-column: span 3; }
    .intro.intro--with-eye { grid-template-columns: minmax(0, 1fr) clamp(132px, 34vw, 194px); gap: 14px; }
    .intro--with-eye > div:not(.intro-grid) { grid-column: 1 / -1; }
}

@media (max-width: 440px) {
    .terminal-quote :is(dt, .terminal-quote-meta) { font-size: .62rem; }
    .intro.intro--with-eye { gap: 12px; }
    .intro--with-eye :is(.scope-head, .scope-readings) { gap: 4px 6px; flex-wrap: wrap; }
}
