/* Isolated presentation: only activated by the current session's mode. */
[hidden] {
  display: none !important;
}
.realistic-dashboard {
  --accent: #49dda8;
}
.realistic-dashboard .app-shell {
  grid-template-rows: 38px 45px 64px minmax(0, 1fr);
}
.realistic-dashboard .event-banner {
  display: none;
}
.realistic-dashboard .run-bar {
  border-left: 3px solid #49dda8;
}
.research-panel {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 0;
}
.research-panel .panel-header h2 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.research-panel .panel-header > div {
  min-width: 0;
}
.research-panel .panel-header button {
  flex-shrink: 0;
}
.research-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.range-buttons {
  display: flex;
  gap: 3px;
}
.range-buttons button {
  color: var(--muted);
  border: 1px solid transparent;
  background: transparent;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 11px;
}
.range-buttons button[aria-pressed="true"] {
  color: #49dda8;
  background: #183a32;
  border-color: #32765d;
}
.research-controls select {
  width: auto;
  height: 30px;
  padding: 3px 8px;
  font-size: 11px;
}
.indicator-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: #f7c66f;
  margin: 0;
}
.indicator-toggle input {
  width: 14px;
  height: 14px;
  accent-color: #f7c66f;
}
.advanced-chart {
  flex: 1;
  min-height: 55px;
}
#historyChart {
  width: 100%;
  height: 100%;
  display: block;
}
#chartCursor {
  width: 100%;
  height: 14px;
  padding: 0;
  accent-color: #49dda8;
  flex-shrink: 0;
}
#researchStatus,
.bar-details {
  font-size: 10px;
  line-height: 1.35;
  min-height: 14px;
}
.bar-details {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.research-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.research-stats span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}
.research-stats strong {
  font-size: 12px;
}
.advanced-order-controls {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 5px;
}
.advanced-order-controls label {
  font-size: 10px;
  margin: 0;
}
.advanced-order-controls select,
.advanced-order-controls input {
  min-width: 0;
  width: 100%;
  height: 30px;
  padding: 4px 8px;
  font-size: 11px;
}
.realistic-dashboard .order-total {
  grid-row: 3;
}
.realistic-dashboard .trade-panel > .chart-figure,
.realistic-dashboard .trade-panel > .profile {
  display: none;
}
.realistic-dashboard .trade-panel {
  gap: 8px;
}
.realistic-dashboard #orderForm {
  margin-top: auto;
}
.realistic-dashboard .trade-actions .button {
  font-size: 11px;
  padding: 5px;
  white-space: nowrap;
}
.realistic-dashboard .market-toolbar {
  flex-wrap: wrap;
}
.realistic-dashboard .market-toolbar .field:last-child {
  display: none;
}
.realistic-dashboard .market-toolbar .field {
  flex: 1;
  min-width: 100px;
}
.realistic-dashboard .news-intro {
  display: none;
}
.real-news-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.real-news-body a {
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  text-decoration-color: #49dda8;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
#realNewsStatus {
  font-size: 10px;
  line-height: 1.35;
}
.pending-order {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
@media (min-width: 1100px) and (min-height: 541px) {
  .realistic-dashboard .layout {
    grid-template-columns:
      minmax(190px, 0.9fr) minmax(200px, 1.15fr) minmax(180px, 1fr)
      minmax(235px, 1fr);
    grid-template-rows: minmax(0, 1.4fr) minmax(0, 1fr);
  }
  .realistic-dashboard .market-panel {
    grid-column: 1;
    grid-row: 1/3;
  }
  .realistic-dashboard .research-panel {
    grid-column: 2/4;
    grid-row: 1;
  }
  .realistic-dashboard .trade-panel {
    grid-column: 4;
    grid-row: 1/3;
  }
  .realistic-dashboard .holdings-panel {
    grid-column: 2;
    grid-row: 2;
  }
  .realistic-dashboard .news-panel {
    grid-column: 3;
    grid-row: 2;
  }
  .realistic-dashboard .market-table th:last-child,
  .realistic-dashboard .market-table td:last-child {
    display: none;
  }
  .realistic-dashboard .holdings-panel th:nth-child(3),
  .realistic-dashboard .holdings-panel td:nth-child(3) {
    display: none;
  }
}
@media (max-width: 1099px), (max-height: 540px) {
  .realistic-dashboard .app-shell {
    grid-template-rows: 34px 42px 60px 34px minmax(0, 1fr);
  }
  .realistic-dashboard .view-tabs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .realistic-dashboard .layout[data-view="research"] > .research-panel {
    display: flex;
  }
}
@media (max-width: 600px) {
  .realistic-dashboard .app-shell {
    grid-template-rows: 38px 36px 66px 30px minmax(0, 1fr);
  }
  .realistic-dashboard .run-bar #objective,
  .realistic-dashboard #runScore {
    display: none;
  }
  .realistic-dashboard .trade-panel {
    gap: 5px;
  }
  .realistic-dashboard #orderForm {
    gap: 4px 8px;
  }
  .realistic-dashboard .quote > strong {
    font-size: 25px;
  }
  .realistic-dashboard .feedback {
    min-height: 14px;
  }
  .research-controls {
    gap: 5px;
  }
  .range-buttons button {
    padding: 5px 6px;
  }
  .research-panel .panel-header .eyebrow {
    display: none;
  }
  .research-panel .panel-header h2 {
    font-size: 15px;
  }
}
@media (max-width: 600px) and (max-height: 700px) {
  .realistic-dashboard .layout[data-view="trade"] > .trade-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto;
    align-content: start;
    gap: 3px 8px;
  }
  .realistic-dashboard .trade-panel > * {
    grid-column: 1/-1;
  }
  .realistic-dashboard .trade-panel > .quote {
    grid-column: 1;
    grid-row: 2;
  }
  .realistic-dashboard #refreshQuoteButton {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    font-size: 10px;
    padding: 3px 5px;
  }
  .realistic-dashboard #orderForm {
    margin-top: 0;
  }
  .realistic-dashboard .advanced-order-controls > label:first-child {
    grid-column: 1;
    grid-row: 1;
  }
  .realistic-dashboard #orderType {
    grid-column: 1;
    grid-row: 2;
  }
  .realistic-dashboard #triggerLabel {
    grid-column: 2;
    grid-row: 1;
  }
  .realistic-dashboard #triggerPrice {
    grid-column: 2;
    grid-row: 2;
  }
  .realistic-dashboard #openOrdersButton {
    min-height: 26px;
    padding: 3px 8px;
  }
}
@media (max-height: 700px) and (min-width: 1100px) {
  .realistic-dashboard .trade-panel .panel-header .eyebrow {
    display: none;
  }
  .realistic-dashboard .trade-panel #orderHint {
    font-size: 9px;
  }
  .realistic-dashboard .app-shell {
    grid-template-rows: 32px 38px 50px minmax(0, 1fr);
    gap: 5px;
  }
  .realistic-dashboard #objective,
  .realistic-dashboard #runScore {
    display: none;
  }
  .realistic-dashboard .trade-panel {
    gap: 2px;
  }
  .realistic-dashboard .research-panel {
    gap: 3px;
  }
  .research-stats {
    padding-top: 3px;
  }
}
@media (max-height: 540px) and (min-width: 600px) {
  .realistic-dashboard .app-shell {
    grid-template-rows: 28px 30px 40px 28px minmax(0, 1fr);
  }
  .realistic-dashboard .layout[data-view="trade"] > .trade-panel {
    grid-template-rows: 24px 30px 35px 32px minmax(0, 1fr);
    gap: 3px 14px;
  }
  .realistic-dashboard .trade-panel #orderForm {
    grid-column: 2;
    grid-row: 1/7;
    margin: 0;
  }
  .realistic-dashboard #refreshQuoteButton {
    grid-column: 1;
    grid-row: 3;
  }
  .realistic-dashboard #quoteStatus {
    grid-column: 1;
    grid-row: 4;
  }
  .realistic-dashboard .trade-panel .position-summary {
    display: none;
  }
  .realistic-dashboard #openOrdersButton {
    grid-column: 1;
    grid-row: 5;
    align-self: start;
  }
  .realistic-dashboard .trade-panel .feedback {
    display: block;
    grid-column: 1;
    grid-row: 6;
    min-height: 0;
    font-size: 9px;
  }
  .realistic-dashboard .research-panel {
    gap: 2px;
  }
  .realistic-dashboard .research-stats {
    display: none;
  }
  .realistic-dashboard .research-panel .eyebrow {
    display: none;
  }
}
/* Conditional orders share the same compact ticket in every mode. */
body:not(.realistic-dashboard) .order-total { grid-row: 3; }
body:not(.realistic-dashboard) .advanced-order-controls > label:first-child { grid-column: 1; grid-row: 1; }
body:not(.realistic-dashboard) #orderType { grid-column: 1; grid-row: 2; }
body:not(.realistic-dashboard) #triggerLabel { grid-column: 2; grid-row: 1; }
body:not(.realistic-dashboard) #triggerPrice { grid-column: 2; grid-row: 2; }
@media (max-height: 700px) {
  body:not(.realistic-dashboard) .trade-panel .order-hint { display: none; }
}
@media (max-height: 620px) and (max-width: 599px) {
  body:not(.realistic-dashboard) .trade-panel .chart-figure { display: none; }
  body:not(.realistic-dashboard) .trade-panel .panel-header .eyebrow { display: none; }
  body:not(.realistic-dashboard) .trade-panel .feedback { min-height: 0; }
}
@media (max-height: 540px) and (min-width: 600px) {
  body:not(.realistic-dashboard) .trade-panel #openOrdersButton { grid-column: 1; grid-row: 3; align-self: end; justify-self: start; }
  body:not(.realistic-dashboard) .trade-panel .chart-figure { padding-bottom: 35px; }
}
@media (max-height: 620px) and (max-width: 599px) {
  body:not(.realistic-dashboard) .trade-panel .presets { display: none; }
}
@media (max-height:620px) and (max-width:599px) {
  body:not(.realistic-dashboard) .trade-panel { gap:2px; }
  body:not(.realistic-dashboard) #orderForm { row-gap:3px; }
}
