/* TradeTexts core product (/my): sign in, pick stocks, trade texts.
   Built on the site design system (DESIGN.md §3): theme tokens only (light +
   dark come from cursor_light/cursor_dark), Inter Tight, JetBrains Mono
   kickers, hairline borders, no shadows, 8px buttons, 10/14px cards. Same
   component language as the TradeTexts homepage (alerts/home.html .tt2-*):
   gray iMessage bubbles for sample texts and the wordmark green as a small
   highlight only, never as text on white. */

.my {
  --my-green: #10ff32;
  --my-bubble: #e9e9eb;
  --my-bubble-fg: #000;
  font-family: var(--font);
  color: var(--fg);
  padding: 1.5rem 0 3rem;
}
.my-narrow { max-width: 560px; margin: 0 auto; }
.my-wide { max-width: 760px; margin: 0 auto; }
.my .sr-only, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.my :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.my svg { flex: none; }

/* ── type ─────────────────────────────────────────────────────────────── */
.my-kicker {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-mono); font-size: .75rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 .75rem;
}
.my-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--my-green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--my-green) 25%, transparent); }
.my-h1 {
  font-size: clamp(1.9rem, 6vw, 2.5rem); line-height: 1.08; font-weight: 800;
  letter-spacing: -0.02em; margin: 0 0 .75rem; color: var(--fg); text-wrap: balance;
}
.my-sub { font-size: 1.05rem; line-height: 1.55; color: var(--muted); margin: 0 0 1.75rem; text-wrap: pretty; }
.my-h2 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.my-mark { background: linear-gradient(var(--my-green), var(--my-green)) left 92% / 100% .09em no-repeat; }
.my-num { font-variant-numeric: tabular-nums; }

/* ── flow chrome ──────────────────────────────────────────────────────── */
.my-top { display: flex; align-items: center; gap: .75rem; min-height: 44px; margin-bottom: 1.5rem; }
.my-iconbtn {
  width: 44px; height: 44px; flex: none;
  display: inline-grid; place-items: center;
  border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--fg); cursor: pointer; text-decoration: none;
  transition: background-color .15s ease;
}
.my-iconbtn:hover { background: var(--bg-soft); text-decoration: none; }
.my-iconbtn svg { width: 18px; height: 18px; }
.my-iconbtn[hidden] { visibility: hidden; display: inline-grid; }
.my-progress { flex: 1; height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; }
.my-progress > span { display: block; height: 100%; background: var(--fg); border-radius: inherit; transition: width .25s ease; }
.my-steplabel { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

.my-flow { display: block; }
.js .my-flow > .my-step:not(.is-active) { display: none; }
.my-step-foot {
  position: sticky; bottom: 0; z-index: 2;
  margin-top: 1.5rem; padding: 1rem 0 max(1rem, env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, transparent 0, var(--bg) 14px);
}

/* ── buttons (site .btn family, sized for the flow) ───────────────────── */
.my-cta {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  width: 100%; min-height: 48px; padding: 0 1.35rem;
  border-radius: 8px; border: 1px solid transparent;
  background: var(--accent); color: var(--accent-fg);
  font: 600 1rem/1 var(--font); text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, opacity .15s ease;
}
.my-cta:hover { background: var(--accent-deep); text-decoration: none; }
.my-cta:disabled { opacity: .4; cursor: not-allowed; }
.my-cta svg { width: 18px; height: 18px; }
.my-cta--ghost { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.my-cta--ghost:hover { background: var(--bg-soft); }
.my-link {
  display: flex; align-items: center; justify-content: center;
  min-height: 44px; margin-top: .5rem; padding: 0 .75rem;
  color: var(--muted); font-weight: 600; font-size: .92rem;
  background: none; border: 0; cursor: pointer; font-family: inherit;
}
.my-link:hover { color: var(--fg); }

/* ── welcome ─────────────────────────────────────────────────────────── */
.my-welcome { display: grid; gap: 2rem; align-items: center; }
.my-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; margin: 0; }
.my-facts > div { padding: .9rem 1rem; border-right: 1px solid var(--line); background: var(--surface); }
.my-facts > div:last-child { border-right: 0; }
.my-facts small { display: block; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.my-facts strong { display: block; font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; margin-top: .2rem; }

/* ── stock picker ─────────────────────────────────────────────────────── */
.my-search { position: relative; margin-bottom: 1rem; }
.my-search input {
  width: 100%; min-height: 48px; padding: 0 1rem 0 2.75rem;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--surface); color: var(--fg); font: 500 1rem var(--font);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.my-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.my-search input::placeholder { color: var(--muted); }
.my-search > svg { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.my-results {
  position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-lg);
}
.my-results[hidden] { display: none; }
.my-result {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: .75rem;
  width: 100%; min-height: 52px; padding: .45rem .9rem;
  border: 0; border-top: 1px solid var(--line); background: none; color: var(--fg);
  text-align: left; cursor: pointer; font: .95rem var(--font);
}
.my-result:first-child { border-top: 0; }
.my-result:hover, .my-result:focus-visible { background: var(--bg-soft); }
.my-result strong { font-variant-numeric: tabular-nums; }
.my-result small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-result em { font-style: normal; font-weight: 600; font-size: .8rem; padding: .25rem .65rem; border-radius: 999px; border: 1px solid var(--line-strong); }
.my-result[aria-selected="true"] em { background: var(--accent); color: var(--accent-fg); border-color: transparent; }
.my-result-empty { padding: 1rem; color: var(--muted); }

.my-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.my-tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .35rem;
  min-height: 96px; padding: .85rem .8rem .75rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--fg); cursor: pointer; text-align: left;
  font: .85rem var(--font);
  transition: border-color .15s ease, background-color .15s ease;
}
.my-tile:hover { border-color: var(--line-strong); }
.my-tile[aria-pressed="true"] { border-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }
.my-tile strong { font-size: .95rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.my-tile small { color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-logo {
  position: relative; width: 30px; height: 30px; border-radius: 8px; overflow: hidden;
  display: inline-grid; place-items: center; flex: none;
  background: var(--bg-soft); border: 1px solid var(--line);
  font: 700 .75rem/1 var(--font); color: var(--muted);
}
.my-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--surface); }
.my-check {
  position: absolute; top: .6rem; right: .6rem;
  width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--surface);
  display: grid; place-items: center; color: var(--accent-fg);
}
.my-check svg { width: 12px; height: 12px; opacity: 0; }
[aria-pressed="true"] > .my-check,
.my-option input:checked ~ .my-check { background: var(--accent); border-color: var(--accent); }
[aria-pressed="true"] > .my-check svg,
.my-option input:checked ~ .my-check svg { opacity: 1; }
.my-count { text-align: center; color: var(--muted); font-size: .88rem; margin: 0 0 .6rem; font-variant-numeric: tabular-nums; }

/* ── category options ─────────────────────────────────────────────────── */
.my-options { display: grid; gap: .6rem; border: 0; padding: 0; margin: 0; }
.my-option {
  position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr) 22px; gap: .85rem;
  align-items: start; padding: 1rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); cursor: pointer;
  transition: border-color .15s ease;
}
.my-option:hover { border-color: var(--line-strong); }
.my-option:has(input:checked) { border-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }
.my-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.my-option input { position: absolute; opacity: 0; pointer-events: none; }
.my-option .my-check { position: static; margin-top: .45rem; width: 22px; height: 22px; }
.my-opt-ico {
  width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--fg);
}
.my-opt-ico svg { width: 18px; height: 18px; }
.my-option b { display: block; font-size: .98rem; font-weight: 700; letter-spacing: -.01em; }
.my-option .desc { display: block; color: var(--muted); font-size: .88rem; line-height: 1.45; margin-top: .2rem; }
.my-sample {
  display: block; width: fit-content; max-width: 100%; margin-top: .65rem;
  padding: .45rem .7rem; border-radius: 14px;
  background: var(--my-bubble); color: var(--my-bubble-fg);
  font-size: .8rem; line-height: 1.4;
}
.my-sample i { display: block; font-style: normal; font-family: var(--font-mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: #6e6e73; margin-bottom: .1rem; }
.my-note {
  display: flex; gap: .6rem; align-items: flex-start;
  margin: 1rem 0 0; padding: .85rem 1rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-soft);
  color: var(--muted); font-size: .88rem; line-height: 1.5;
}
.my-note svg { width: 16px; height: 16px; margin-top: .15rem; color: var(--fg); }

/* ── forms / account ──────────────────────────────────────────────────── */
.my-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.25rem; margin-bottom: 1rem;
}
.my-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 1.25rem; }
.my-chip {
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 36px; padding: .2rem .75rem .2rem .25rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-weight: 700; font-size: .88rem; color: var(--fg); text-decoration: none;
  font-variant-numeric: tabular-nums;
}
a.my-chip:hover { border-color: var(--line-strong); text-decoration: none; }
.my-chip .my-logo { width: 26px; height: 26px; border-radius: 50%; font-size: .65rem; }
.my-field { display: grid; gap: .4rem; margin: 0 0 .85rem; }
.my-field label { font-weight: 600; font-size: .88rem; }
.my-input {
  width: 100%; min-height: 48px; padding: 0 .95rem;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--bg); color: var(--fg); font: 500 1rem var(--font);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.my-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.my-input::placeholder { color: var(--muted); opacity: .7; }
.my-input[aria-invalid="true"] { border-color: var(--bad); }
.my-input--code { text-align: center; letter-spacing: .35em; font: 700 1.5rem var(--font-mono); }
.my-help { color: var(--muted); font-size: .82rem; }
.my-or { display: flex; align-items: center; gap: .75rem; margin: 1rem 0; color: var(--muted); font-size: .8rem; }
.my-or::before, .my-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.my-error {
  margin: 0 0 1rem; padding: .75rem .9rem; border-radius: 8px;
  background: var(--bad-soft); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 25%, transparent);
  font-weight: 600; font-size: .9rem;
}
.my-consent { font-size: .78rem; line-height: 1.5; color: var(--muted); margin: 0 0 .85rem; }
.my-consent a { color: var(--fg); font-weight: 600; }
.my-google {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  width: 100%; min-height: 48px; padding: 0 1rem;
  border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--fg); font: 600 1rem var(--font);
  text-decoration: none; cursor: pointer; transition: background-color .15s ease;
}
.my-google:hover { background: var(--bg-soft); text-decoration: none; }
.my-google svg { width: 18px; height: 18px; }

/* ── member home ──────────────────────────────────────────────────────── */
.my-hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.my-hello .my-h1 { margin-bottom: .35rem; }
.my-hello p { margin: 0; color: var(--muted); }
.my-card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.my-card-head a, .my-pill-link {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 .85rem;
  border: 1px solid var(--line-strong); border-radius: 8px;
  font-weight: 600; font-size: .85rem; color: var(--fg); text-decoration: none;
}
.my-card-head a:hover, .my-pill-link:hover { background: var(--bg-soft); text-decoration: none; }
.my-card .my-chips { margin: 0; }
.my-empty { color: var(--muted); margin: 0 0 1rem; }
.my-status {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  padding: .75rem .9rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-soft); font-size: .92rem; margin-bottom: .75rem;
}
.my-status > svg { width: 16px; height: 16px; }
.my-status strong { font-variant-numeric: tabular-nums; }
.my-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase;
  padding: .2rem .55rem; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted);
}
.my-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.my-badge--ok { color: var(--good); background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 30%, transparent); }
.my-badge--wait { color: var(--mid-fg); background: var(--mid-bg); border-color: color-mix(in srgb, var(--mid-fg) 30%, transparent); }
.my-switch-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem;
  min-height: 56px; padding: .6rem 0; border-top: 1px solid var(--line); cursor: pointer;
}
.my-switch-row:first-of-type { border-top: 0; }
.my-switch-row b { display: block; font-size: .95rem; }
.my-switch-row small { color: var(--muted); font-size: .84rem; }
.my-switch { position: relative; width: 44px; height: 26px; flex: none; }
.my-switch input { position: absolute; inset: -9px; width: calc(100% + 18px); height: calc(100% + 18px); opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.my-switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: background-color .18s ease; }
.my-switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--bg); transition: transform .18s ease;
}
.my-switch input:checked + span { background: var(--accent); }
.my-switch input:checked + span::after { transform: translateX(18px); background: var(--accent-fg); }
.my-switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.my-switch input:disabled + span { opacity: .45; }
.my-feed { list-style: none; margin: 0; padding: 0; }
.my-feed li + li { border-top: 1px solid var(--line); }
.my-feed a {
  display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: .75rem; align-items: start;
  padding: .75rem 0; color: var(--fg); text-decoration: none;
}
.my-feed a:hover .title { text-decoration: underline; }
.my-feed .tag { display: block; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .15rem; }
.my-feed .title { display: block; font-weight: 600; font-size: .95rem; line-height: 1.4; }
.my-toast {
  display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; padding: .65rem .9rem;
  border: 1px solid color-mix(in srgb, var(--good) 30%, transparent); border-radius: 8px;
  background: var(--good-soft); color: var(--good); font-weight: 600; font-size: .9rem;
}
.my-toast svg { width: 16px; height: 16px; }
.my-signout { display: flex; justify-content: center; align-items: center; gap: .25rem; color: var(--muted); font-size: .85rem; margin-top: 1.5rem; flex-wrap: wrap; }
.my-signout form { display: inline; }
.my-signout .my-link { margin: 0; display: inline-flex; padding: 0 .4rem; }
.my-cols { display: grid; gap: 1rem; }

/* ── done sheet ───────────────────────────────────────────────────────── */
.my-sheet { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem;
  background: color-mix(in srgb, #000 45%, transparent); }
.my-sheet[hidden] { display: none; }
.my-sheet-card {
  width: min(440px, 100%); background: var(--surface); color: var(--fg);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem 1.25rem; text-align: center; box-shadow: var(--shadow-lg);
  animation: my-pop .22s ease-out;
}
.my-sheet-card .my-sub { margin-bottom: 1.25rem; }
.my-done-ico { width: 48px; height: 48px; margin: 0 auto 1rem; border-radius: 12px; background: var(--fg); display: grid; place-items: center; }
.my-done-ico svg { width: 22px; height: 22px; color: var(--my-green); }
@keyframes my-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes my-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.js .my-flow > .my-step.is-active { animation: my-in .2s ease-out; }

@media (min-width: 880px) {
  .my-welcome { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 3rem; }
  .my-welcome .my-phone { order: 2; }
  .my-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .my-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .my-step-foot { position: static; background: none; padding-bottom: 0; }
}
@media (max-width: 540px) {
  .my { padding-top: 1rem; }
  .my-facts strong { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .my *, .my *::before, .my *::after, .my-sheet-card { animation: none !important; transition: none !important; }
}
.my-pill-link { gap: .35rem; white-space: nowrap; }
.my-pill-link svg, .my-card-head a svg { width: 16px; height: 16px; }

/* Step layouts that pair a form with a phone on wide screens. */
.my-pair { display: grid; gap: 2rem; }
.my-pair-side { display: none; }
@media (min-width: 880px) {
  .my-pair { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 3.5rem; align-items: start; max-width: 1040px; margin: 0 auto; }
  .my-pair > .my-narrow { margin: 0; max-width: none; width: 100%; }
  .my-pair-side { display: block; position: sticky; top: 5.5rem; }
}

/* Setup flow: steps on the left, one phone on the right (wide screens). */
.my-flow-side { display: none; }
@media (min-width: 880px) {
  .my-flow--pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); column-gap: 3.5rem; align-items: start; max-width: 1080px; margin: 0 auto; }
  .my-flow--pair > .my-step { grid-column: 1; grid-row: 1; }
  .my-flow--pair > .my-step[data-step="0"] { grid-column: 1 / -1; }
  .my-flow--pair > .my-step.my-narrow { max-width: 560px; margin: 0; }
  .my-flow--pair > .my-flow-side { display: block; grid-column: 2; grid-row: 1; position: sticky; top: 5.5rem; }
  .my-flow--pair[data-step="0"] > .my-flow-side { display: none; }
}
.my-only-wide { display: none !important; }
@media (min-width: 880px) {
  .my-only-wide { display: block !important; }
  .my-only-narrow { display: none !important; }
}

/* ── phones (templates/my/_device.html) ───────────────────────────────────
   Each phone is one AI-generated photo (gpt-image-2): device + screen
   content, background keyed out to transparent. */
/* No drop shadow: DESIGN.md is shadow-free, and a soft shadow reads as a gray box on white. */
.my-phone-img { display: block; height: auto; margin: 0 auto; width: min(320px, 82vw); }
.my-phone-img--hand { width: min(560px, 100%); }
.my-flow-side .my-phone-img, .my-pair-side .my-phone-img { width: min(330px, 100%); }
.my-preview .my-phone-img { width: min(280px, 100%); }
.my-device-cap { text-align: center; color: var(--muted); font-size: .78rem; margin: .5rem 0 0;
  font-family: var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.my-flow-side [hidden] { display: none; }

