/* User calls (/calls, /trader/:permalink)
   A person's own record, built with the influencer profile's parts: the same
   masthead and scoreboard strip, and a tape that reads one dated call per
   line instead of one asset per line. */

/* ============ Identity ============ */
.profile-avatar-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-muted);
}

.trader-url {
  margin-left: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
}
.trader-url:hover { text-decoration: underline; }

/* ============ Tape ============ */
.tape {
  --tape-cols: minmax(6rem, 1.6fr) 4.5rem 6.5rem 6rem 6rem 6rem 6rem;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}
.tape--editable {
  --tape-cols: minmax(6rem, 1.6fr) 4.5rem 6.5rem 6rem 6rem 6rem 6rem 5.5rem;
}

.tape-head,
.tape-row {
  display: grid;
  grid-template-columns: var(--tape-cols);
  align-items: center;
  gap: 0 1rem;
  padding: 0.8rem 1.1rem;
}

.tape-head {
  border-bottom: 1px solid var(--border);
  background: var(--bg-darker);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--text-muted);
}
.tape-col--right { text-align: right; }

.tape-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tape-row + .tape-row { border-top: 1px solid var(--border-light); }

.tape-asset {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.tape-ticker {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-bright);
  text-decoration: none;
}
.tape-ticker:hover { color: var(--primary); }
.tape-exchange {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
/* The caller's own words, kept quiet: the numbers are the record, the note
   is its footnote. */
.tape-note {
  margin-top: 0.15rem;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.tape-date,
.tape-price {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  color: var(--text);
  white-space: nowrap;
}
.tape-price { text-align: right; }
.tape-pending { color: var(--text-dim); }

.tape-move {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}
.tape-move.positive { color: var(--success); }
.tape-move.negative { color: var(--danger); }
.tape-move--waiting {
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.tape-alpha {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}
.tape-alpha.positive { color: var(--success); }
.tape-alpha.negative { color: var(--danger); }
.tape-alpha.is-absent { color: var(--text-dim); }

.tape-tools { text-align: right; }
.tape-tools form { display: inline; }
/* Doubled up to outrank home.css's ".home .button_to button", which resets
   every button_to on these pages to the body font. */
.tape-tools .button_to .tape-withdraw {
  background: none;
  border: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  cursor: pointer;
}
.tape-tools .button_to .tape-withdraw:hover { color: var(--danger); text-decoration: underline; }

.tape-cell-label { display: none; }

/* ============ Form ============ */
.call-stance {
  border: 0;
  margin: 0;
  min-width: 0;
}
/* A legend is drawn on the fieldset's border line by default; floated, it
   sits in the flow like every other field label. */
.call-stance legend {
  float: left;
  width: 100%;
  padding: 0;
}
.call-stance-options {
  clear: both;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
/* Two flat plates; the chosen side lights in its own color so buy and sell
   never read as the same button in a different state. */
.call-stance-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.call-stance-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.call-stance-option:hover { color: var(--text-bright); }
.call-stance-option:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--ring); }
.call-stance-option--buy:has(input:checked) {
  border-color: var(--success);
  color: var(--success);
  background: color-mix(in srgb, var(--success) 10%, transparent);
}
.call-stance-option--sell:has(input:checked) {
  border-color: var(--danger);
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
}

.call-note-input {
  resize: vertical;
  min-height: 4.5rem;
  font-family: inherit;
}

.call-form-terms {
  margin: 0;
  padding: 1rem 1.35rem 1.2rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-muted);
}

/* ============ Small screens ============ */
/* One call reflows to three lines: ticker and return first, the dated
   entry beneath, then the stance and the tools. Column headers give way to
   inline labels so no bare figure loses its name. */
@media (max-width: 768px) {
  .tape-head { display: none; }
  .tape-row,
  .tape--editable .tape-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "asset  move"
      "asset  alpha"
      "date   entry"
      "action last"
      "tools  tools";
    gap: 0.5rem 0.75rem;
    padding: 0.95rem 1rem;
  }
  .tape-asset  { grid-area: asset; align-self: center; }
  .tape-move   { grid-area: move; }
  .tape-alpha  { grid-area: alpha; }
  .tape-date   { grid-area: date; }
  .tape-price--entry { grid-area: entry; }
  .tape-price--last  { grid-area: last; }
  .tape-action { grid-area: action; }
  .tape-tools  { grid-area: tools; text-align: left; }
  .tape-cell-label {
    display: inline;
    margin-right: 0.4rem;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
  }
  .tape-move .tape-cell-label { display: none; }
}
