/* /stocks — the equities desk. Tokens from app.css; nothing here invents a colour. */

.eq-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.eq-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.eq-title {
  font-size: var(--fs-h2);
  letter-spacing: -0.01em;
}
/* Prose gets a measure. A lede that runs the full width of a 1600px screen is
   a paragraph nobody finishes. */
.eq-lede {
  color: var(--ink-2);
  font-size: 14px;
  max-width: 62ch;
  margin-top: 4px;
}
.eq-sortwrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.eq-panel {
  overflow: hidden;
}
.eq-table {
  width: 100%;
}
.eq-row {
  cursor: pointer;
}
.eq-row:hover {
  background: var(--raised);
}
.eq-row.on {
  background: var(--green-tint);
}

.eq-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
/* The two lines share one grid cell, so the company name truncates instead of
   pushing the price column off the table (the overprint trap from /pools). */
.eq-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.eq-text .tok-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eq-desk {
  padding: 1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.eq-desk-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.eq-desk-head h2 {
  font-size: var(--fs-h3);
}
.eq-desk-head .btn {
  margin-left: auto;
}

.eq-form {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 12px;
  align-items: end;
}
.eq-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.eq-input {
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: var(--f-mono);
  font-size: 15px;
  padding: 10px 12px;
  width: 100%;
  min-height: 44px;
}
.eq-input:focus-visible {
  border-color: var(--green);
  outline: none;
}
.eq-sides {
  display: flex;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.eq-side {
  background: none;
  border: 0;
  color: var(--ink-2);
  cursor: pointer;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: var(--track);
  min-height: 44px;
  padding: 0 16px;
  text-transform: uppercase;
}
.eq-side.on {
  background: var(--green);
  color: var(--on-green);
  font-weight: 700;
}

.eq-plan {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.eq-plan-title {
  font-size: var(--fs-micro);
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--ink-3);
}
.eq-plan-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.eq-plan-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  font-size: 14px;
}
.eq-plan-list span {
  color: var(--ink-2);
}
.eq-plan-list b {
  font-family: var(--f-mono);
  text-align: right;
  color: var(--ink-bright);
}

.eq-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.55;
  max-width: 74ch;
}
.eq-note svg {
  flex: 0 0 auto;
  margin-top: 3px;
}
.eq-note.neg {
  color: var(--neg);
}
.eq-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.eq-go {
  align-self: flex-start;
}
@media (max-width: 560px) {
  .eq-actions .eq-go {
    flex: 1 1 100%;
    text-align: center;
  }
}

/* Shed columns rather than let the table scroll sideways: the phone keeps the
   company, the price and the change, which is what an order is decided on. */
@media (max-width: 1024px) {
  .eq-hide-md {
    display: none;
  }
}
@media (max-width: 720px) {
  .eq-hide-sm {
    display: none;
  }
  .eq-form {
    grid-template-columns: 1fr;
  }
  .eq-desk-head .btn {
    min-height: 44px;
  }
  .eq-plan-list li {
    flex-direction: column;
    gap: 2px;
  }
  .eq-plan-list b {
    text-align: left;
  }
}
