/* The console frame sits above the phosphor graphics and below the boot screen. */
:root {
  --bg: #030a05;
  --surface: #07140a;
  --line: #2b5334;
  --line-bright: #4a8050;
  --text: #d7f5cf;
  --muted: #9bb797;
  --gold: #b5ff95;
  --green: #b0f58a;
  --red: #ffac8d;
  --phosphor: #9df47c;
  --bezel: clamp(8px, 1.2vw, 19px);
  --console-edge: max(2.65vw, calc(var(--bezel) + 11px));
  scrollbar-color: #355d36 #050c07;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  min-width: 0;
  position: relative;
  isolation: isolate;
  background: radial-gradient(ellipse at 45% 8%, #132a13, #07130a 58%, #020704 100%);
}

body::before {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 38px, #4b894817 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 38px, #4b894817 39px 40px);
  mask-image: radial-gradient(ellipse at center, black 10%, transparent 80%);
}

.crt-bezel {
  --bezel-mark: #6aa86a;
  position: fixed;
  z-index: 12;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 56%, #0004 97%, #0009 115%);
  box-shadow: inset 0 0 0 3px #030805, inset 0 0 22px 10px #010503a8;
}

.crt-bezel::before {
  content: "";
  position: absolute;
  inset: calc(var(--bezel) / 2);
  border: 1px solid #31533688;
  border-radius: clamp(9px, 1.15vw, 19px);
}

.crt-bezel > * {
  position: absolute;
  width: clamp(12px, 1.5vw, 24px);
  height: clamp(12px, 1.5vw, 24px);
  border: solid var(--bezel-mark);
  border-width: 0;
}

.crt-bezel > :nth-child(1) {
  top: var(--bezel);
  left: var(--bezel);
  border-top-width: 1px;
  border-left-width: 1px;
}

.crt-bezel > :nth-child(2) {
  top: var(--bezel);
  right: var(--bezel);
  border-top-width: 1px;
  border-right-width: 1px;
}

.crt-bezel > :nth-child(3) {
  bottom: var(--bezel);
  left: var(--bezel);
  border-bottom-width: 1px;
  border-left-width: 1px;
}

.crt-bezel > :nth-child(4) {
  right: var(--bezel);
  bottom: var(--bezel);
  border-right-width: 1px;
  border-bottom-width: 1px;
}

.masthead {
  border: 0;
  background: transparent;
  padding: calc(var(--bezel) + 4px) var(--console-edge) 0;
}

.mast-inner, .workspace {
  width: 100%;
  max-width: none;
  margin: 0;
}

.mast-inner {
  min-height: 44px;
  padding: 6px clamp(8px, 1.3vw, 20px);
  gap: clamp(8px, 1.5vw, 20px);
  border: 1px solid #3b643f;
  background: linear-gradient(180deg, #132819, #08140c);
  box-shadow: inset 0 1px #5375493f;
}

.mast-inner .brand {
  flex: 0 0 auto;
  color: #e2f6da;
  text-shadow: 0 0 13px #96e27b51;
}

.mast-section {
  padding-left: clamp(8px, 1.5vw, 18px);
  color: #a4ca9f;
}

.feed-pill {
  min-width: 0;
  max-width: none;
  margin-left: auto;
  border-color: #527a50;
  background: #112312;
  box-shadow: inset 0 0 11px #07200b, 0 0 9px #8bf06414;
}

.feed-pill::before {
  transform: rotate(45deg);
  box-shadow: 0 0 9px currentColor;
}

.console-fullscreen {
  flex: 0 0 auto;
  border-color: #456648;
  box-shadow: inset 0 -2px #29442b;
}

.workspace {
  min-height: calc(100vh - 48px - var(--bezel));
  display: flex;
  flex-direction: column;
  padding: 10px var(--console-edge) max(23px, calc(var(--bezel) + 10px));
}

.intro {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 34%);
  min-height: clamp(155px, 13.6vw, 205px);
  margin: 0 0 8px;
  padding: 13px clamp(13px, 2.3vw, 34px);
  border-color: #426749;
  background:
    linear-gradient(90deg, #0b1d10 0, transparent 65%),
    radial-gradient(ellipse at 67% 31%, #19351b, #0b1b11 62%, #061009);
  box-shadow: inset 0 0 0 3px #020a0566;
}

.intro h1 {
  color: #d4ffc7;
  font-size: clamp(3.25rem, 6vw, 6.2rem);
  letter-spacing: .105em;
  text-shadow: 0 0 6px #97fb716b, 0 0 27px #76ee5c38;
}

.intro p {
  max-width: 58ch;
  color: #a9c9a6;
}

.intro-grid {
  inset: 31% -10% -77%;
  background-size: 33px 22px;
  mask-image: linear-gradient(transparent 5%, #000 29%, #000 70%, transparent);
  transform: perspective(280px) rotateX(47deg) scale(1.33);
  opacity: .74;
}

.refresh {
  margin-top: 12px;
}

#signal-scope.signal-scope {
  min-height: 137px;
  border-color: #49734b;
  box-shadow: 0 0 0 3px #0a1c0e, 0 0 14px #8eff6b0d;
}

.scope-display {
  border-color: #426f47;
}

.market-nav {
  gap: 5px;
  align-items: stretch;
  margin: 9px 0 8px;
  border-block: 1px solid #294b33;
  background: #08150c;
  padding: 5px;
}

.market-nav button {
  min-height: 31px;
  border-color: #2c5234;
  background: linear-gradient(#132718, #0b190e);
  box-shadow: inset 0 -2px #152c1a;
}

.market-nav button[aria-pressed="true"] {
  background: #1d3e20;
  box-shadow: inset 0 -2px #a9f87e, inset 0 0 15px #8dee7933;
}

.secondary-nav {
  margin-top: -4px;
  border-top: 0;
  background: #08140c;
}

.panels { gap: 8px; }
.panel {
  border-color: #406745;
  background: linear-gradient(150deg, #0c2012, #071309 50%);
  box-shadow: inset 0 0 0 2px #122b17;
}

.panel-head {
  padding-block: 11px 9px;
  border-top: 2px solid #4b784d;
  background: linear-gradient(90deg, #18351caa, #102a140d 82%);
}

.panel h2 { color: #dcf7d3; }
.panel-head p { margin-top: 4px; }
.comparison-head { padding-top: 10px; }
.chart-frame, .company-production-panel {
  border-color: #345e38;
  background: radial-gradient(ellipse at 50% 26%, #142719, #08140d 82%);
}

.chart { background-image: linear-gradient(90deg, #75c97b24 1px, transparent 1px); }

.chart-gridline { stroke: #315134; }
.chart-line { filter: drop-shadow(0 0 2px #8cf96b90); }
.chart-axis strong { color: #c9ecc1; }
.chart-note { padding-block: 6px 10px; }
.search input {
  border-color: #416746;
  background: #051009;
}
thead th { background: #132e19; }
tbody tr:nth-child(2n) { background: #0b1b10; }
tbody tr:hover { background: #17321a; }

.workspace-footer {
  margin: 8px 0 0;
  padding: 10px 6px 0;
  border-color: #294b33;
  color: #a5bf9f;
}

@media (min-width: 961px) {
  .panels { grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); align-items: stretch; }
  .panels.chart-expanded { grid-template-columns: minmax(0, 1fr); }
  .table-scroll { max-height: clamp(300px, 46vh, 540px); }
  .panel .chart svg { max-height: min(38vh, 390px); }
  .chart-expanded .chart svg { max-height: min(55vh, 520px); }
}

@media (max-width: 740px) {
  .intro { grid-template-columns: minmax(0, 1fr); padding: 13px; gap: 10px; }
  #signal-scope.signal-scope { min-height: 130px; }
  .intro h1 { margin-top: 1px; letter-spacing: .07em; }
  .intro p { margin-top: 7px; }
  .mast-inner { gap: 7px; }
}

@media (max-width: 470px) {
  :root { --console-edge: max(10px, calc(var(--bezel) + 3px)); }
  .mast-inner { justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 6px; }
  .mast-inner .brand { font-size: 1.02rem; }
  .feed-pill, .console-fullscreen { font-size: .57rem; }
  .feed-pill { margin-left: auto; text-overflow: ellipsis; overflow: hidden; }
  .intro .refresh { display: flex; flex-wrap: wrap; gap: 5px 0; font-size: .63rem; }
  .intro .refresh span { white-space: normal; }
  .intro .refresh span + span { margin-left: 5px; padding-left: 5px; }
  .market-nav { gap: 3px; padding: 4px; }
  .market-nav button { font-size: .62rem; padding-inline: 5px; }
  .table-scroll { scrollbar-width: thin; }
  .chart .chart-line { filter: none; }
  .crt-bezel { box-shadow: inset 0 0 0 2px #030805, inset 0 0 13px 5px #0105038c; }
}

@media (forced-colors: active) {
  .crt-bezel, body::before { display: none; }
}
