/* V3 keeps the V2 notebook presentation inside the canonical shared student economy shell. */
body[data-economy-step="market"] .student-stocks-shell {
  display: grid;
  gap: 16px;
  padding-bottom: 34px;
  overflow-anchor: none;
  scroll-padding-bottom: 34px;
}

@media (max-width: 980px) {
  body[data-economy-step="market"] .economy-market-stage-holding-head {
    display: none;
  }

  body[data-economy-step="market"] .economy-market-stage-holding-table > button {
    grid-template-areas:
      "logo name quantity"
      "logo value pnl";
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 4px 10px;
    padding: 10px 12px;
    text-align: left;
  }

  body[data-economy-step="market"] .economy-market-stage-holding-table > button > span.economy-market-company-logo {
    grid-area: logo;
    margin-left: 0;
  }

  body[data-economy-step="market"] .economy-market-stage-holding-table > button > span.economy-market-stage-holding-name { grid-area: name; }
  body[data-economy-step="market"] .economy-market-stage-holding-table > button > span.economy-market-stage-holding-quantity { grid-area: quantity; }
  body[data-economy-step="market"] .economy-market-stage-holding-table > button > span:nth-of-type(4) { grid-area: value; }
  body[data-economy-step="market"] .economy-market-stage-holding-table > button > em.is-up,
  body[data-economy-step="market"] .economy-market-stage-holding-table > button > em.is-down { grid-area: pnl; }
}

@media (max-width: 520px) {
  body[data-economy-step="market"] .economy-market-stage-holding-table > button {
    grid-template-areas:
      "logo name"
      "logo quantity"
      "logo value"
      "logo pnl";
    grid-template-columns: 48px minmax(0, 1fr);
  }
}
