diff --git a/apps/web/app/[locale]/arena/page.tsx b/apps/web/app/[locale]/arena/page.tsx index 81406ee..9aa9079 100644 --- a/apps/web/app/[locale]/arena/page.tsx +++ b/apps/web/app/[locale]/arena/page.tsx @@ -1,7 +1,7 @@ "use client"; import { useEffect, useRef, useState } from "react"; -import { useTranslations } from "next-intl"; +import { useLocale, useTranslations } from "next-intl"; import { getArena, getArenaLimits, @@ -17,6 +17,7 @@ import { Button, Card } from "../../../components/ui"; import { laneView, arenaVerdict, arenaCost, costLabel, manifestView, previewView, promptArenaView, canFollowUp, promptChainView } from "../../../lib/arenaStatus"; import { SandboxedPreview } from "../../../components/SandboxedPreview"; import { PromptBar } from "../../../components/PromptBar"; +import { shareUrl } from "../../../lib/share"; const BENCHMARK_TASKS: Record<"v1" | "v2" | "v3" | "v4" | "v5", { id: string; goal: string }[]> = { v5: [ @@ -99,6 +100,7 @@ function StatusPill({ status, passed, n }: { status: string; passed?: number; n? export default function ArenaPage() { const t = useTranslations("arena"); + const locale = useLocale(); const tp = useTranslations("plan"); const [suiteVersion, setSuiteVersion] = useState<"v1" | "v2" | "v3" | "v4" | "v5">("v5"); const [selectedTaskId, setSelectedTaskId] = useState("SV5-AO-01"); @@ -473,6 +475,9 @@ export default function ArenaPage() { Model: {activeArena.model} + {(activeArena.status === "succeeded" || activeArena.status === "failed") && ( + {t("open-result")} → + )} diff --git a/apps/web/app/[locale]/layout.tsx b/apps/web/app/[locale]/layout.tsx index db29066..c1fe0bb 100644 --- a/apps/web/app/[locale]/layout.tsx +++ b/apps/web/app/[locale]/layout.tsx @@ -1,6 +1,7 @@ import { NextIntlClientProvider } from 'next-intl'; import { getMessages, getTranslations } from 'next-intl/server'; import { notFound } from 'next/navigation'; +import { headers } from 'next/headers'; import { FeatureRail } from '../../components/FeatureRail'; import { LanguageSwitcher } from '../../components/LanguageSwitcher'; import { StudioBreadcrumb } from '../../components/StudioBreadcrumb'; @@ -20,9 +21,16 @@ export async function generateMetadata({ const t = await getTranslations({ locale, namespace: 'titles' }); const tLayout = await getTranslations({ locale, namespace: 'layout' }); + // Absolute URLs for link previews (og:image) come from the host that served the page, so a shared + // link shows its card on any deployment without a configured site URL. + const h = await headers(); + const host = h.get('x-forwarded-host') ?? h.get('host'); + const proto = h.get('x-forwarded-proto') ?? (host && /^(localhost|127\.0\.0\.1)(:|$)/.test(host) ? 'http' : 'https'); return { + ...(host ? { metadataBase: new URL(`${proto}://${host}`) } : {}), title: t('home'), description: tLayout('description'), + openGraph: { siteName: 'EvoForge', title: t('home'), description: tLayout('description') }, }; } diff --git a/apps/web/app/[locale]/share/[id]/layout.tsx b/apps/web/app/[locale]/share/[id]/layout.tsx new file mode 100644 index 0000000..4a1445b --- /dev/null +++ b/apps/web/app/[locale]/share/[id]/layout.tsx @@ -0,0 +1,33 @@ +import { getTranslations } from 'next-intl/server'; +import { fetchArenaForPreview, laneScore } from '../../../../lib/serverArena'; + +// Link-preview text for one shared result: the verdict and both scores, so the message that carries +// the link already says who won. +export async function generateMetadata({ + params, +}: { + params: Promise<{ locale: string; id: string }>; +}) { + const { locale, id } = await params; + const t = await getTranslations({ locale, namespace: 'titles' }); + const ts = await getTranslations({ locale, namespace: 'share' }); + const doc = await fetchArenaForPreview(id); + if (!doc) return { title: t('share') }; + const evo = laneScore(doc, 'evoforge'); + const single = laneScore(doc, 'single'); + const winner = doc.verdict?.winner; + const verdict = winner && ts.has(`winner-${winner}`) ? ts(`winner-${winner}`) : t('share'); + const scores = `EvoForge ${evo ? `${evo.passed}/${evo.n}` : '—'} · ${ts('single')} ${single ? `${single.passed}/${single.n}` : '—'}`; + const prompt = (doc.prompt || doc.goal || '').replace(/\s+/g, ' ').trim().slice(0, 140); + const description = [scores, prompt].filter(Boolean).join(' — '); + return { + title: `${verdict} · ${t('share')}`, + description, + openGraph: { title: verdict, description, type: 'article' }, + twitter: { card: 'summary_large_image', title: verdict, description }, + }; +} + +export default function ShareResultLayout({ children }: { children: React.ReactNode }) { + return <>{children}; +} diff --git a/apps/web/app/[locale]/share/[id]/opengraph-image.tsx b/apps/web/app/[locale]/share/[id]/opengraph-image.tsx new file mode 100644 index 0000000..342675a --- /dev/null +++ b/apps/web/app/[locale]/share/[id]/opengraph-image.tsx @@ -0,0 +1,63 @@ +import { ImageResponse } from "next/og"; +import { fetchArenaForPreview, laneScore } from "../../../../lib/serverArena"; + +// The picture a chat app or social post shows for a shared result: the verdict, both hidden-test +// scores as bars and the costs, read from the stored match. Text stays in Latin script because the +// bundled image font has no Korean glyphs; a prompt in another script is left out rather than garbled. +export const alt = "EvoForge match result"; +export const size = { width: 1200, height: 630 }; +export const contentType = "image/png"; + +const VERDICT: Record = { + evoforge: "EvoForge wins", + single: "Single AI call wins", + tie: "Tie", + inconclusive: "Needs another check", + unscorable: "Not scorable", +}; + +export default async function Image({ params }: { params: Promise<{ id: string }> }) { + const { id } = await params; + const doc = await fetchArenaForPreview(id); + const evo = laneScore(doc, "evoforge"); + const single = laneScore(doc, "single"); + const winner = doc?.verdict?.winner ?? ""; + const headline = VERDICT[winner] ?? "Same model, two builds, hidden tests decide"; + const rawPrompt = (doc?.prompt || doc?.goal || "").replace(/\s+/g, " ").trim(); + const prompt = /^[\x20-\x7E]*$/.test(rawPrompt) ? (rawPrompt.length > 110 ? `${rawPrompt.slice(0, 107)}...` : rawPrompt) : ""; + const cost = (side: "evoforge" | "single") => { + const c = doc?.lanes?.[side]?.cost_cents; + return Number.isInteger(c) ? `${c} cents` : ""; + }; + const lane = (label: string, s: { passed: number; n: number } | null, color: string, track: string, costText: string) => ( +
+
+ {label} + + {costText} + {s ? `${s.passed}/${s.n}` : "-"} + +
+
+
+
+
+ ); + return new ImageResponse( + ( +
+
+
+ EvoForge + Hidden tests decide · signed result +
+
{headline}
+ {prompt ?
{prompt}
: null} + {lane("EvoForge", evo, "#12a66e", "#e8f8f1", cost("evoforge"))} + {lane("Single AI call", single, "#3182f6", "#eaf2fe", cost("single"))} +
+
+ ), + size, + ); +} diff --git a/apps/web/app/[locale]/share/[id]/page.tsx b/apps/web/app/[locale]/share/[id]/page.tsx index 6223e02..b4cb8b4 100644 --- a/apps/web/app/[locale]/share/[id]/page.tsx +++ b/apps/web/app/[locale]/share/[id]/page.tsx @@ -1,10 +1,38 @@ "use client"; import { use, useEffect, useState } from "react"; import { useLocale, useTranslations } from "next-intl"; -import { getArena, getArenaProof, type ArenaDoc } from "../../../../lib/api"; +import { getArena, getArenaProof, type ArenaDoc, type ArenaLane } from "../../../../lib/api"; import { manifestView, previewView } from "../../../../lib/arenaStatus"; +import { shareText } from "../../../../lib/share"; import { SandboxedPreview } from "../../../../components/SandboxedPreview"; +type Side = "evoforge" | "single"; + +// One lane of the result: its hidden-test score as a number and a bar, its cost, and why it lost +// points when the patch never ran. +function LaneScore({ side, lane, leading }: { side: Side; lane: ArenaLane | undefined; leading: boolean }) { + const t = useTranslations("share"); + const tc = useTranslations("canvas"); + const held = lane?.heldout; + const scored = held && Number.isInteger(held.passed) && Number.isInteger(held.n) && held.n > 0; + const pct = scored ? Math.round((100 * held.passed) / held.n) : 0; + const note = lane?.outcome === "apply_failed" ? tc("patch-not-applied") + : lane?.outcome === "empty_diff" ? tc("no-patch") + : null; + return ( +
+ {side === "evoforge" ? "EvoForge" : t("single")} + {scored ? `${held.passed}/${held.n}` : "—"} +
+ ); +} + +// An arena certificate is verified by the arena id itself (GET /v1/proof/). function ShareDetails({ doc, certificateId }: { doc: ArenaDoc; certificateId: string | null }) { const t = useTranslations("share"); const locale = useLocale(); @@ -17,68 +45,74 @@ function ShareDetails({ doc, certificateId }: { doc: ArenaDoc; certificateId: st const singleHtml = singlePreview.html ?? singleLane?.preview_html ?? null; const prompt = doc.prompt || doc.goal || doc.task_id || doc.arena_id; const verdict = doc.verdict; - const homeHref = locale === "ko" ? "/ko" : "/"; + const winner = verdict?.winner ?? null; + const prefix = locale === "ko" ? "/ko" : ""; + const homeHref = prefix || "/"; + const proofId = certificateId ? doc.arena_id : null; + const [copied, setCopied] = useState(false); + const share = async () => { + const url = window.location.href; + const nav = navigator as Navigator & { share?: (data: { url?: string; text?: string }) => Promise }; + if (typeof nav.share === "function") { + try { await nav.share({ url, text: shareText(doc, locale) }); } catch {} + return; + } + try { + await navigator.clipboard.writeText(url); + setCopied(true); + setTimeout(() => setCopied(false), 2000); + } catch {} + }; + const when = typeof doc.created_at === "number" + ? new Intl.DateTimeFormat(locale === "ko" ? "ko-KR" : "en-US", { dateStyle: "medium", timeZone: locale === "ko" ? "Asia/Seoul" : "UTC" }).format(new Date(doc.created_at * 1000)) + : null; return ( -
-

{t("title")}

-

{prompt}

-
-
-
- EvoForge -
- {evoLane?.heldout ? `${evoLane.heldout.passed}/${evoLane.heldout.n}` : "—"} - - {Number.isInteger(evoLane?.cost_cents) ? `${evoLane?.cost_cents}¢` : "—"} -
-
-
- {evoHtml ? ( - - ) : ( -
—
- )} -
-
- {t("hidden-tests")} {evoLane?.heldout ? `${evoLane.heldout.passed}/${evoLane.heldout.n}` : "—"} - {t("cost")} {Number.isInteger(evoLane?.cost_cents) ? `${evoLane?.cost_cents}¢` : "—"} -
-
-
-
- {t("single")} -
- {singleLane?.heldout ? `${singleLane.heldout.passed}/${singleLane.heldout.n}` : "—"} - - {Number.isInteger(singleLane?.cost_cents) ? `${singleLane?.cost_cents}¢` : "—"} -
-
-
- {singleHtml ? ( - - ) : ( -
—
- )} -
-
- {t("hidden-tests")} {singleLane?.heldout ? `${singleLane.heldout.passed}/${singleLane.heldout.n}` : "—"} - {t("cost")} {Number.isInteger(singleLane?.cost_cents) ? `${singleLane?.cost_cents}¢` : "—"} -
-
-
-
-

- {t("result")}: - {verdict?.winner && t.has(`winner-${verdict.winner}`) ? t(`winner-${verdict.winner}`) : "—"} - {evoLane?.heldout && singleLane?.heldout ? ` (EvoForge ${evoLane.heldout.passed} : ${singleLane.heldout.passed} ${t("single")})` : ""} -

- {manifest?.disclosure &&

{manifest.disclosure}

} - {certificateId &&

{t("certificate")}: {certificateId}

} -

- {t("try-own")} -

+
+
+

EvoForge · {t("title")}{when ? ` · ${when}` : ""}

+

{winner && t.has(`winner-${winner}`) ? t(`winner-${winner}`) : t("result-pending")}

+
{prompt}
+
+ + + +
+
    +
  • {t("same-model", { model: doc.model || "—" })}
  • +
  • {t("same-tests")}
  • + {certificateId &&
  • {t("signed")}
  • } +
+
+ + {proofId && {t("open-proof")}} + {t("try-own")} → +
+
+ +
+

{t("what-built")}

+
+
+
EvoForge
+ {evoHtml ? :
{t("no-preview")}
} +
+
+
{t("single")}
+ {singleHtml ? :
{t("no-preview")}
} +
+
+ +
+ {t("fine-print")} +
+ {verdict?.reason &&

{t("result")}: {verdict.reason}

} + {manifest?.disclosure &&

{manifest.disclosure}

} + {certificateId &&

{t("certificate")}: {certificateId}

} +

{doc.arena_id}

+
+
); } @@ -93,25 +127,19 @@ export default function SharePage({ params }: { params: Promise<{ id: string }> useEffect(() => { let cancelled = false; (async () => { - try { - const arena = await getArena(id); - if (!cancelled) setDoc(arena); - } catch { - if (!cancelled) setMissing(true); - } - try { - const cert = await getArenaProof(id); - if (!cancelled) setProofId(cert?.certificate_id ?? null); - } catch { - if (!cancelled) setProofId(null); - } + const [arena, cert] = await Promise.allSettled([getArena(id), getArenaProof(id)]); + if (cancelled) return; + if (arena.status === "fulfilled") setDoc(arena.value); + else setMissing(true); + const c = cert.status === "fulfilled" ? cert.value : null; + setProofId(c?.certificate_id ?? null); })(); return () => { cancelled = true; }; }, [id]); - if (missing) return

{t("not-found")}

; - if (doc === null) return

{t("title")}

; + if (missing) return

{t("not-found")}

; + if (doc === null) return

{t("loading")}

; return ; } diff --git a/apps/web/app/[locale]/verify/[id]/page.tsx b/apps/web/app/[locale]/verify/[id]/page.tsx index 85e1f49..6e09b7a 100644 --- a/apps/web/app/[locale]/verify/[id]/page.tsx +++ b/apps/web/app/[locale]/verify/[id]/page.tsx @@ -1,7 +1,7 @@ "use client"; import { use, useEffect, useState } from "react"; import { useLocale, useTranslations } from "next-intl"; -import { type ProofCertificate, getProof, getProofKey } from "../../../../lib/api"; +import { type ProofCertificate, getArenaProof, getProof, getProofKey } from "../../../../lib/api"; import { Card } from "../../../../components/ui"; import { getErrorMessageKey } from "../../../../lib/apiErrors"; @@ -17,7 +17,10 @@ export default function VerifyPage({ params }: { params: Promise<{ id: string }> useEffect(() => { (async () => { try { - setCert(await getProof(id)); + // Match results (job_…) have their own certificate; everything else is an evidence certificate. + const c = id.startsWith("job_") ? ((await getArenaProof(id)) as unknown as ProofCertificate | null) : await getProof(id); + if (!c) throw new Error("404 certificate not found"); + setCert(c); } catch (e) { setErr(tErrors(getErrorMessageKey(e))); } @@ -44,20 +47,27 @@ export default function VerifyPage({ params }: { params: Promise<{ id: string }> const sealedKinds = (cert.sealed_kinds ?? []).join(", "); const heldoutGate = (cert.gates ?? []).find((g) => /heldout|sealed/i.test(g.gate)); - const verified = cert.verdict === "VERIFIED"; + // A match certificate (kind "arena") carries the match winner as its verdict; it is verified when its + // signature checks out. + const isArena = (cert as unknown as { kind?: string }).kind === "arena"; + const verified = isArena ? cert.verify?.ok === true && keyMatches !== false : cert.verdict === "VERIFIED"; const gates = cert.gates ?? []; + const lanes = (cert as unknown as { lanes?: Record }).lanes; + const score = (side: string) => { const h = lanes?.[side]?.heldout; return h && Number.isInteger(h.passed) && Number.isInteger(h.n) ? `${h.passed}/${h.n}` : "—"; }; + const arenaScores = isArena && lanes ? { evoforge: score("evoforge"), single: score("single") } : null; const gatesPassed = gates.filter((g) => g.result === "PASS").length; const checks: { ok: boolean | null; label: string }[] = [ { ok: cert.verify ? !!cert.verify.ok : null, label: t("check-signature") }, { ok: keyMatches, label: t("check-key") }, - { ok: gates.length > 0 ? gatesPassed === gates.length : null, label: t("check-gates", { passed: gatesPassed, total: gates.length }) }, + ...(gates.length > 0 ? [{ ok: gatesPassed === gates.length, label: t("check-gates", { passed: gatesPassed, total: gates.length }) }] : []), + ...(arenaScores ? [{ ok: true, label: t("check-arena", arenaScores) }] : []), ]; return (
-

{t("heading")} · {cert.verdict}

+

{t("heading")}{isArena ? "" : ` · ${cert.verdict}`}

{verified ? t("hero-verified") : t("hero-failed")}

{t("description")}

    @@ -112,7 +122,7 @@ export default function VerifyPage({ params }: { params: Promise<{ id: string }> -
    + {(gates.length > 0 || (cert.chain ?? []).length > 0) &&
    {t("gates")} · {t("chain")}

    {t("gates")}

    @@ -124,7 +134,7 @@ export default function VerifyPage({ params }: { params: Promise<{ id: string }>
    {c.stage}: {c.event_id ?? "—"}
    ))}
    -
    +
    }
); } diff --git a/apps/web/components/StudioBreadcrumb.tsx b/apps/web/components/StudioBreadcrumb.tsx index db426de..a98ef1e 100644 --- a/apps/web/components/StudioBreadcrumb.tsx +++ b/apps/web/components/StudioBreadcrumb.tsx @@ -11,7 +11,7 @@ export function StudioBreadcrumb() { const labels: Record = { arena: 'arena', replay: 'replay', evidence: 'evidence', performance: 'performance', lab: 'improvement-lab', evolution: 'autopilot', leaderboard: 'leaderboard', - workspace: 'mission-control', verify: 'evidence', + workspace: 'mission-control', verify: 'evidence', share: 'arena', }; return
{ts('workspace')}{labels[route] ? t(labels[route]) : ts('overview')}
; } diff --git a/apps/web/lib/serverArena.ts b/apps/web/lib/serverArena.ts new file mode 100644 index 0000000..3d2e2d1 --- /dev/null +++ b/apps/web/lib/serverArena.ts @@ -0,0 +1,28 @@ +import { headers } from "next/headers"; +import type { ArenaDoc } from "./api"; + +// Server-side read of one arena match for link previews (page metadata and the share image). It goes +// through this site's own public proxy, so it needs no credentials of its own and sees exactly what a +// visitor would. Any failure returns null and the preview falls back to a generic card. +export async function fetchArenaForPreview(id: string): Promise { + try { + const h = await headers(); + const host = h.get("x-forwarded-host") ?? h.get("host"); + if (!host) return null; + const proto = h.get("x-forwarded-proto") ?? (/^(localhost|127\.0\.0\.1)(:|$)/.test(host) ? "http" : "https"); + const r = await fetch(`${proto}://${host}/api/evoforge/v1/arena/${encodeURIComponent(id)}`, { + cache: "no-store", + signal: AbortSignal.timeout(8000), + }); + if (!r.ok) return null; + const doc = (await r.json()) as ArenaDoc; + return doc && typeof doc === "object" && doc.arena_id === id ? doc : null; + } catch { + return null; + } +} + +export function laneScore(doc: ArenaDoc | null, side: "evoforge" | "single"): { passed: number; n: number } | null { + const h = doc?.lanes?.[side]?.heldout; + return h && Number.isInteger(h.passed) && Number.isInteger(h.n) && h.n > 0 ? { passed: h.passed, n: h.n } : null; +} diff --git a/apps/web/messages/en.json b/apps/web/messages/en.json index c61e2c3..ca03a45 100644 --- a/apps/web/messages/en.json +++ b/apps/web/messages/en.json @@ -55,7 +55,17 @@ "winner-single": "Single AI call wins", "winner-tie": "Tie", "winner-unscorable": "Not scorable (too few checked tests)", - "winner-inconclusive": "Needs another check" + "winner-inconclusive": "Needs another check", + "result-pending": "Result not decided yet", + "same-model": "Same model on both sides ({model})", + "same-tests": "Same hidden tests, written before either side built", + "signed": "Result signed with Ed25519", + "share-this": "Share this result", + "open-proof": "Open the signed proof", + "what-built": "What each side built", + "no-preview": "No screen to show — this task is judged by its tests", + "fine-print": "How this was judged", + "loading": "Loading result…" }, "studio": { "title": "Workspace", @@ -574,7 +584,8 @@ "check-signature": "The signature over this result is valid", "check-key": "It was signed with this server's published key", "check-gates": "{passed} of {total} release gates passed", - "details": "Certificate details" + "details": "Certificate details", + "check-arena": "Hidden tests: EvoForge {evoforge} · single AI call {single}" }, "leaderboard": { "heading": "Trust leaderboard", @@ -723,7 +734,8 @@ "winner-single": "Single AI won", "winner-tie": "Tie", "row-prompt": "Your request", - "row-single": "Single" + "row-single": "Single", + "open-result": "Share this result" }, "plan": { "add-round": "Add round", diff --git a/apps/web/messages/ko.json b/apps/web/messages/ko.json index 5a3bd83..2650e10 100644 --- a/apps/web/messages/ko.json +++ b/apps/web/messages/ko.json @@ -55,7 +55,17 @@ "winner-single": "단일 실행 승", "winner-tie": "무승부", "winner-unscorable": "판정 불가 (검증된 테스트 부족)", - "winner-inconclusive": "추가 확인 필요" + "winner-inconclusive": "추가 확인 필요", + "result-pending": "아직 판정 전이에요", + "same-model": "양쪽 모두 같은 모델 ({model})", + "same-tests": "양쪽이 만들기 전에 작성된 같은 숨은 테스트", + "signed": "Ed25519로 서명된 결과", + "share-this": "이 결과 공유하기", + "open-proof": "서명된 증명 열기", + "what-built": "양쪽이 만든 결과물", + "no-preview": "보여 줄 화면이 없어요 — 이 과제는 테스트로 판정해요", + "fine-print": "판정 방식", + "loading": "결과를 불러오는 중…" }, "studio": { "title": "작업실", @@ -574,7 +584,8 @@ "check-signature": "이 결과에 대한 서명이 유효해요", "check-key": "이 서버가 공개한 키로 서명했어요", "check-gates": "출시 게이트 {total}개 중 {passed}개 통과", - "details": "인증서 세부 정보" + "details": "인증서 세부 정보", + "check-arena": "숨은 테스트: EvoForge {evoforge} · 단일 AI 호출 {single}" }, "leaderboard": { "heading": "신뢰 리더보드", @@ -723,7 +734,8 @@ "winner-single": "단일 AI 승", "winner-tie": "무승부", "row-prompt": "직접 요청", - "row-single": "단일" + "row-single": "단일", + "open-result": "결과 공유하기" }, "plan": { "add-round": "라운드 추가", diff --git a/apps/web/styles/pages.css b/apps/web/styles/pages.css index 73c306c..e02e939 100644 --- a/apps/web/styles/pages.css +++ b/apps/web/styles/pages.css @@ -242,3 +242,66 @@ select.studio-chip { padding-right: 8px; } .studio-footer { flex-wrap: wrap; align-items: baseline; } .studio-footer-costs > summary { cursor: pointer; color: #8b95a1; font-weight: 600; } .studio-footer-costs p { margin: 6px 0 0; } + +/* Shared result: the verdict and both scores read at a glance; what each side built follows. */ +.share-page { max-width: 960px; margin: 0 auto; display: grid; gap: 16px; } +.share-status { padding: 40px 0; color: #6b7684; } +.share-hero { padding: 36px; background: #fff; border: 1px solid #e5e8eb; border-radius: 28px; box-shadow: 0 8px 32px #18283c08; } +.share-kicker { margin: 0; font-size: 13px; font-weight: 650; color: #8b95a1; } +.share-hero h1 { margin: 10px 0 0; font-size: 40px; line-height: 1.15; font-weight: 800; letter-spacing: -1.4px; color: #191f28; } +.share-hero.is-evoforge h1 { color: #0a8a5a; } +.share-hero.is-single h1 { color: #1b64da; } +.share-prompt { margin: 16px 0 0; padding: 14px 18px; border-left: 3px solid #e5e8eb; background: #f9fafb; border-radius: 0 14px 14px 0; font-size: 15px; line-height: 1.6; color: #4e5968; overflow-wrap: anywhere; } +.share-prompt > span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; } +.share-versus { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 14px; margin-top: 24px; } +.share-vs { align-self: center; font-size: 14px; font-weight: 800; color: #b0b8c1; text-transform: uppercase; } +.share-lane { display: grid; gap: 8px; padding: 20px; border-radius: 20px; background: #f9fafb; border: 2px solid transparent; } +.share-lane.is-leading.is-evoforge { background: #ebf9f2; border-color: #12a66e33; } +.share-lane.is-leading.is-single { background: #eef5ff; border-color: #3182f633; } +.share-lane-name { font-size: 14px; font-weight: 700; color: #4e5968; } +.share-lane-score { font-size: 44px; line-height: 1; font-weight: 800; letter-spacing: -1.5px; color: #333d4b; font-variant-numeric: tabular-nums; } +.share-lane.is-evoforge .share-lane-score { color: #0a8a5a; } +.share-lane.is-single .share-lane-score { color: #1b64da; } +.share-lane-bar { height: 10px; border-radius: 999px; background: #e5e8eb; overflow: hidden; } +.share-lane-bar > span { display: block; height: 100%; border-radius: inherit; background: #b0b8c1; } +.share-lane.is-evoforge .share-lane-bar > span { background: #12a66e; } +.share-lane.is-single .share-lane-bar > span { background: #3182f6; } +.share-lane-meta { font-size: 13px; color: #6b7684; font-variant-numeric: tabular-nums; } +.share-lane-note { font-size: 12px; font-weight: 600; color: #d22030; } +.share-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; } +.share-trust li { padding: 6px 12px; border-radius: 999px; background: #f2f4f6; font-size: 12px; font-weight: 600; color: #4e5968; } +.share-trust li::before { content: "✓ "; color: #12a66e; } +.share-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 24px; } +.share-primary { height: 52px; padding: 0 24px; border: 0; border-radius: 16px !important; background: #3182f6; color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; } +.share-primary:hover { background: #1b64da; } +.share-secondary { display: inline-flex; align-items: center; height: 52px; padding: 0 20px; border-radius: 16px; background: #f2f4f6; color: #333d4b; font-size: 15px; font-weight: 650; text-decoration: none; } +.share-secondary:hover { background: #e5e8eb; } +.share-link { margin-left: auto; color: #4e5968; font-size: 14px; font-weight: 600; text-decoration: none; } +.share-link:hover { color: #3182f6; } +.share-built h2 { margin: 8px 0 12px; font-size: 18px; font-weight: 700; color: #191f28; } +.share-previews { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } +.share-preview { min-width: 0; background: #fff; border: 1px solid #e5e8eb; border-radius: 20px; overflow: hidden; } +.share-preview > header { padding: 12px 18px; border-bottom: 1px solid #f2f4f6; font-size: 13px; font-weight: 700; color: #4e5968; } +.share-preview iframe { border: 0 !important; border-radius: 0 !important; } +.share-preview-empty { display: grid; place-items: center; min-height: 180px; padding: 20px; text-align: center; font-size: 13px; color: #8b95a1; } +.share-fine p { font-size: 13px; line-height: 1.7; color: #6b7684; overflow-wrap: anywhere; } +@media (max-width: 767px) { + .share-hero { padding: 24px 20px; border-radius: 24px; } + .share-hero h1 { font-size: 30px; } + .share-versus { grid-template-columns: minmax(0, 1fr); } + .share-vs { justify-self: center; } + .share-lane-score { font-size: 36px; } + .share-previews { grid-template-columns: minmax(0, 1fr); } + .share-actions > * { flex: 1 1 100%; justify-content: center; text-align: center; } + .share-link { margin: 4px 0 0; } +} + +.arena-share-link { + display: inline-block; + white-space: nowrap; + margin-top: 6px; + font-size: 13px; + font-weight: 600; + color: #3182f6; +} +.arena-share-link:hover { text-decoration: underline; }