/* Equyx — the Analyst home, built to AInvest's layout.
 *
 * Sizes here are the measured ones: 16px base in the box, a full-pill radius on
 * every button, a 24px card radius on the ask box, and the hero's pale blue
 * wash. Colours come from the theme variables, never from literals, so this one
 * screen does not become the reason a theme looks broken.
 */

.aime { max-width: 1180px; margin: 0 auto; padding: 0 20px 64px; }

/* ---- hero ---- */
.aime-hero {
  /* the wash is drawn from the accent so it follows the theme instead of
     being a hard-coded AInvest blue that would fight every other palette */
  background: linear-gradient(180deg, var(--accent-soft) 0%, transparent 78%);
  margin: 0 -20px; padding: 40px 20px 8px; border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.aime-head { display: flex; gap: 16px; align-items: center; justify-content: center; margin-bottom: 22px; }
.aime-mark {
  width: 56px; height: 56px; flex: 0 0 56px; border-radius: 16px;
  display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
}
.aime-mark .ico { width: 30px; height: 30px; }
.aime-h1 { font-size: 30px; line-height: 1.15; margin: 0; letter-spacing: -.02em; color: var(--text); }
.aime-sub { margin: 6px 0 0; color: var(--muted); font-size: 15px; }

/* ---- the ask box ---- */
.aime-box {
  position: relative; max-width: 780px; margin: 0 auto;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 24px; box-shadow: 0 8px 30px rgba(0,0,0,.08);
  padding: 20px 20px 74px;
}
.aime-input {
  width: 100%; border: 0; background: transparent; resize: vertical;
  font-size: 17px; line-height: 1.5; color: var(--text); outline: none; min-height: 96px;
}
.aime-input::placeholder { color: var(--faint); }
.aime-box-foot {
  position: absolute; right: 16px; bottom: 16px;
  display: flex; align-items: center; gap: 12px;
}
.aime-expert {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid transparent; background: transparent; color: var(--text-2);
  border-radius: 9999px; padding: 9px 16px; font-size: 15px; cursor: pointer;
}
.aime-expert:hover { background: var(--hover); }
.aime-expert.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.aime-send {
  width: 46px; height: 46px; border-radius: 9999px; border: 0; cursor: pointer;
  background: var(--text); color: var(--bg);
  display: grid; place-items: center;
}
.aime-send:hover { opacity: .85; }
.aime-send .ico { width: 21px; height: 21px; }

/* ---- the four modes ---- */
.aime-modes {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  max-width: 1080px; margin: 26px auto 0;
}
.aime-mode {
  border: 0; cursor: pointer; text-align: center; border-radius: 9999px;
  background: var(--surface); color: var(--text); padding: 14px 18px;
  display: flex; flex-direction: column; gap: 3px; min-width: 0;
}
.aime-mode:hover { background: var(--surface-2); }
.aime-mode b { font-size: 15px; font-weight: 650; }
/* A SUBTITLE THAT ENDS IN AN ELLIPSIS SAYS NOTHING. `nowrap` + ellipsis cut
   all four of these mid-word at full width, while the phone rule below
   already wrapped them - the wide screen had more room and used it worse.
   Two lines is the cap, so a long note cannot stretch the row. */
.aime-mode span { font-size: 12.5px; color: var(--muted); white-space: normal;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.aime-mode.on { background: var(--text); color: var(--bg); }
.aime-mode.on span { color: var(--bg); opacity: .72; }

/* ---- hot topics ---- */
.aime-topics { margin-top: 42px; }
.aime-h2 { font-size: 26px; margin: 0 0 16px; letter-spacing: -.01em; color: var(--text); }
.aime-toggles { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.aime-toggle {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 0; border-radius: 9999px; padding: 12px 22px; font-size: 15px; font-weight: 600;
  background: var(--surface); color: var(--text);
}
.aime-toggle:hover { background: var(--surface-2); }
.aime-toggle.on { background: var(--text); color: var(--bg); }

.aime-panel { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.aime-wait { padding: 26px 20px; color: var(--muted); font-size: 14px; }
.aime-wait.bad { color: var(--bad); }

.aime-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.aime-table th {
  text-align: left; padding: 13px 16px; color: var(--muted); font-weight: 600;
  border-bottom: 1px solid var(--border); background: var(--panel-2); white-space: nowrap;
}
.aime-table th.num, .aime-table td.num { text-align: right; }
.aime-table td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.aime-table tr:last-child td { border-bottom: 0; }
.aime-table tbody tr:hover td { background: var(--hover); }
.aime-table td.num.up { color: var(--good); }
.aime-table td.num.down { color: var(--bad); }

.aime-sym {
  border: 0; background: transparent; cursor: pointer; padding: 0;
  font-weight: 700; color: var(--accent); font-size: 14px;
  /* A TICKER IS A TARGET. Measured at 55x22 with a true height of 21.x -
     under the 22px pointer minimum, and the same miss already fixed on
     `a.st-sym` and `a.pc-sym`. Inline-flex keeps the baseline where it was
     while the box grows to something a thumb can find. */
  display: inline-flex; align-items: center; min-height: 24px;
}
.aime-sym:hover { text-decoration: underline; }
.aime-co { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; max-width: 280px; }
.aime-when { color: var(--faint); }
/* "not reported" must not read like a number, or it becomes one at a glance */
.aime-na { color: var(--faint); font-style: italic; font-size: 12.5px; }
.aime-src { margin: 14px 2px 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; }

/* ---- phone ---- */
@media (max-width: 900px) {
  .aime-modes { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .aime { padding: 0 14px 48px; }
  .aime-hero { margin: 0 -14px; padding: 24px 14px 8px; }
  .aime-head { gap: 12px; }
  .aime-mark { width: 44px; height: 44px; flex-basis: 44px; border-radius: 13px; }
  .aime-h1 { font-size: 22px; }
  .aime-sub { font-size: 13.5px; }
  .aime-box { padding: 16px 14px 68px; border-radius: 18px; }
  .aime-input { font-size: 16px; min-height: 76px; }
  .aime-modes { grid-template-columns: 1fr; gap: 10px; }
  .aime-mode { flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 8px; text-align: left; }
  .aime-mode span { white-space: normal; }
  .aime-h2 { font-size: 21px; }
  .aime-toggle { padding: 10px 16px; font-size: 13.5px; }
  /* a five-column table cannot fit a phone; let it scroll rather than crush */
  .aime-panel { overflow-x: auto; }
  .aime-table { min-width: 620px; }
}
/* one sentence of ordinary English under the hero: the screen named its modes
   and its topics and never said what pressing one actually does */
.aime-say {
  max-width: 640px; margin: 8px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--muted);
}
@media (max-width: 560px) { .aime-say { font-size: 12px; } }
