/* Outcome share pages (/outcomes/<coin>-<id>), generated by tools/gen_outcome_pages.py.
   The card is a fixed 1200x630 composition: 1cqw = 12px at full size. The same
   markup is rendered into the page and into the link preview PNG. */

.oc-main { max-width: 900px; margin: 0 auto; padding: 40px 24px 72px; display: grid; gap: 22px; }
.oc-title { margin: 0; text-align: center; font-size: 28px; line-height: 1.2; font-weight: 800; text-wrap: balance; }

.oc-stage { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.oc-stage-single { grid-template-columns: minmax(0, 1fr); max-width: 760px; width: 100%; margin: 0 auto; }
.oc-arrow { display: grid; justify-items: center; gap: 6px; color: var(--text); text-decoration: none; }
.oc-arrow .oc-circ { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; transition: border-color .15s; }
.oc-arrow svg { width: 18px; height: 18px; }
.oc-arrow .oc-alb { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.oc-arrow:hover .oc-circ { border-color: var(--blue); }
.oc-arrow[aria-disabled="true"] { opacity: .3; pointer-events: none; }

.oc-frame { width: 100%; max-width: 100%; aspect-ratio: 1200 / 630; container-type: inline-size; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); position: relative; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); touch-action: pan-y; }
.oc-frame.oc-out-left { animation: ocOutL .15s ease-in forwards; }
.oc-frame.oc-out-right { animation: ocOutR .15s ease-in forwards; }
.oc-frame.oc-in-left { animation: ocInL .22s ease-out; }
.oc-frame.oc-in-right { animation: ocInR .22s ease-out; }
@keyframes ocOutL { to { transform: translateX(-24px); opacity: 0; } }
@keyframes ocOutR { to { transform: translateX(24px); opacity: 0; } }
@keyframes ocInL { from { transform: translateX(24px); opacity: 0; } }
@keyframes ocInR { from { transform: translateX(-24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .oc-frame { animation: none !important; } }

.oc-mobile-nav { display: none; justify-content: space-between; gap: 12px; }
.oc-mnav { flex: 1; text-align: center; background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius); padding: 9px 0; font-size: 14px; font-weight: 600; text-decoration: none; }
.oc-mnav[aria-disabled="true"] { opacity: .3; pointer-events: none; }
.oc-pos { text-align: center; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; margin: 0; }
.oc-pos a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }

.oc-share { display: grid; gap: 10px; justify-items: center; margin-top: 8px; }
.oc-share-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.oc-sbtn { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius); padding: 9px 16px; font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; text-decoration: none; transition: border-color .15s; }
.oc-sbtn:hover { border-color: var(--blue); }
.oc-sbtn svg { width: 16px; height: 16px; flex: none; }
/* Copy link is the catch-all for every other app, so it sits apart and quieter. */
.oc-sbtn-quiet { margin-left: 10px; background: transparent; color: var(--muted); }
.oc-sbtn-quiet:hover { color: var(--text); }
@media (max-width: 640px) { .oc-sbtn-quiet { margin-left: 0; } }
/* Touch devices get the native share sheet and its three-dot share icon. */
.oc-ico-copy, .oc-ico-share { display: inline-flex; }
.oc-ico-share, .oc-native .oc-ico-copy { display: none; }
.oc-native .oc-ico-share { display: inline-flex; }
.oc-url { font-size: 12px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; text-align: center; }
.oc-record { text-align: center; margin: 4px 0 0; }
.oc-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--surface); border: 1px solid var(--border); color: var(--text); padding: 8px 16px; border-radius: var(--radius); font-size: 13px; z-index: 200; }

.oc-pending { max-width: 640px; margin: 0 auto; padding: 96px 24px; text-align: center; display: grid; gap: 16px; justify-items: center; }
.oc-pending p { color: var(--muted); margin: 0; }

@media (max-width: 640px) {
  .oc-main { padding: 28px 16px 56px; }
  .oc-title { font-size: 22px; }
  .oc-stage { grid-template-columns: minmax(0, 1fr); }
  .oc-arrow { display: none; }
  .oc-mobile-nav { display: flex; }
  .oc-frame { border-radius: 8px; }
}

/* The card. Only cqw units inside, so it scales as one image. */
.oc-card { position: absolute; inset: 0; padding: 5.5cqw 6cqw 4.5cqw; display: grid; grid-template-rows: auto 1fr auto auto; gap: 2.4cqw; color: #f1f5f9; font-family: 'Inter', sans-serif; line-height: 1.2; font-variant-numeric: tabular-nums; background: radial-gradient(110% 90% at 90% 0%, rgba(59, 130, 246, .16), transparent 60%), #0f172a; }
.oc-card .oc-top { display: flex; justify-content: space-between; align-items: center; }
.oc-card .oc-pair { display: flex; align-items: center; gap: 1.4cqw; font-weight: 700; font-size: 3.6cqw; }
.oc-card .oc-pair img { width: 4.4cqw; height: 4.4cqw; }
.oc-card .oc-id { font-size: 2.6cqw; font-weight: 600; color: #94a3b8; }
.oc-card .oc-mid { align-self: center; display: grid; gap: 2.6cqw; }
.oc-card .oc-ret-box { display: grid; gap: .8cqw; }
.oc-card .oc-ret { font-size: 12cqw; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.oc-card .oc-ret.pos { color: #22c55e; }
.oc-card .oc-ret.neg { color: #f87171; }
.oc-card .oc-ret.zero { color: #94a3b8; }
.oc-card .oc-ret-sub { font-size: 2.2cqw; color: #94a3b8; }
.oc-card .oc-facts { display: flex; gap: 5cqw; }
.oc-card .oc-lbl { display: block; font-size: 1.7cqw; text-transform: uppercase; letter-spacing: .08em; color: #94a3b8; font-weight: 600; }
.oc-card .oc-val { display: block; font-size: 2.8cqw; font-weight: 600; }
.oc-card .oc-rec { font-size: 2.5cqw; }
.oc-card .oc-foot { display: flex; justify-content: space-between; align-items: end; gap: 3cqw; font-size: 1.75cqw; color: #94a3b8; border-top: .1cqw solid #334155; padding-top: 1.6cqw; }
.oc-card .oc-brand { color: #fff; font-size: 3cqw; font-weight: 800; white-space: nowrap; }
.oc-card .oc-brand span { color: #3b82f6; }

/* Monthly report card (/share/monthly-YYYY-MM): three equal coin rows.
   Neutral figures, colour only on the direction arrow and the outcome dots. */
.oc-card.oc-card-month { gap: 1.8cqw; }
.oc-card .oc-mrows { align-self: center; display: grid; gap: 1.8cqw; }
.oc-card .oc-mrow { display: grid; grid-template-columns: 12cqw 24cqw 10cqw minmax(0, 1fr); align-items: center; gap: 2cqw; }
.oc-card .oc-mcoin { display: flex; align-items: center; gap: 1.4cqw; font-weight: 700; font-size: 3.4cqw; }
.oc-card .oc-mver { font-size: 1.9cqw; font-weight: 700; color: #94a3b8; border: .1cqw solid #475569; border-radius: .5cqw; padding: .15cqw .6cqw; margin-left: -.4cqw; }
/* A month with a strategy version change has four rows: same card height. */
.oc-card .oc-mrows:has(> .oc-mrow:nth-child(4)) { gap: 1cqw; }
.oc-card .oc-mrows:has(.oc-mver) .oc-mrow { grid-template-columns: 17cqw 24cqw 10cqw minmax(0, 1fr); }
.oc-card .oc-mcoin img { width: 4.2cqw; height: 4.2cqw; }
.oc-card .oc-mret { display: flex; justify-content: flex-end; align-items: center; font-size: 4.1cqw; font-weight: 600; line-height: 1; letter-spacing: -.02em; color: #e8edf3; }
.oc-card .oc-mret.zero { color: #94a3b8; }
.oc-card .oc-mnum { min-width: 18.5cqw; text-align: right; }
.oc-card .oc-arrow { display: block; flex: none; width: 1.7cqw; height: 1.7cqw; margin-right: 1.3cqw; }
.oc-card .oc-mret.pos .oc-arrow { fill: #6bcb8b; }
.oc-card .oc-mret.neg .oc-arrow { fill: #e8908f; }
.oc-card .oc-dots { display: flex; gap: .6cqw; }
.oc-card .oc-dots i { flex: none; width: 1.15cqw; height: 1.15cqw; border-radius: 50%; }
.oc-card .oc-dots i.p { background: #6bcb8b; }
.oc-card .oc-dots i.n { background: #e8908f; }
.oc-card .oc-mfacts { font-size: 2.4cqw; color: #c3ccd8; white-space: nowrap; text-align: right; }
.oc-card .oc-mrow.empty .oc-mcoin, .oc-card .oc-mrow.empty .oc-mfacts { opacity: .55; }
.oc-card.oc-card-month .oc-rec { font-size: 2.1cqw; color: #cbd5e1; }
