/* Social Portfolio marketing site. Dark only, product faithful: tokens from
   PortfolioShare/Core/DesignSystem/Theme.swift, except where WCAG AA needs
   more contrast on the web: --muted is lifted from #6B7280, and white text
   sits on --blue-fill (#2563EB), not --blue. */
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url('/assets/fonts/Figtree-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url('/assets/fonts/Figtree-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #0B0D10; --surface: #111418; --card: #171B21; --border: rgba(255,255,255,0.06);
  --text: #F5F7FA; --text-2: #9AA4B2; --muted: #858E9C;
  --gain: #22C55E; --loss: #EF4444; --blue: #3B82F6; --amber: #F59E0B;
  /* Loss text on the loss pill's 14% tint: #EF4444 measures 4.0:1 there, this 5.44:1. */
  --loss-text: #F87171;
  --header-bg: rgba(11,13,16,0.78); --card-hover: #1d222a; --blue-fill: #2563EB; --blue-hover: #1D4ED8; --white: #fff; --black: #000;
  --bezel: #0a0c0f; --bezel-edge: rgba(255,255,255,0.14); --bezel-ring: #1c2027; --shadow: rgba(0,0,0,0.6);
  --glow: rgba(59,130,246,0.22);
  --radius: 16px; --gutter: 20px; --wrap: 1080px;
  --font: "Figtree", -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --fs-body: 15px; --lh: 1.55;
}
@media (min-width: 768px) { :root { --fs-body: 17px; --gutter: 32px; } }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--fs-body)/var(--lh) var(--font); overflow-x: hidden; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sr-only:focus-visible { position: fixed; top: 12px; left: 12px; z-index: 20; width: auto; height: auto; clip: auto; white-space: normal; padding: 10px 14px; border-radius: 999px; background: var(--blue-fill); color: var(--white); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; line-height: 1.08; }
h1 { font-size: clamp(40px, 7vw, 72px); }
h2 { font-size: clamp(30px, 4.5vw, 48px); }
h3 { font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; }
p { margin: 0; max-width: 62ch; }
.lede { font-size: clamp(17px, 2vw, 21px); color: var(--text-2); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gain); }
.num, .ticker { font-variant-numeric: tabular-nums; }
.ticker { font-family: var(--mono); font-size: 0.92em; }
.gain { color: var(--gain); } .loss { color: var(--loss); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--header-bg); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 17px; }
.wordmark img { width: 28px; height: 28px; border-radius: 7px; }
.site-nav { display: none; gap: 24px; align-items: center; }
.site-nav a { color: var(--text-2); font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.site-nav a:hover { color: var(--text); text-decoration: none; }
@media (min-width: 768px) { .site-nav { display: flex; } }

/* Buttons and the badge */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 700; color: var(--text); background: var(--card); border: 1px solid var(--border); }
.btn:hover { text-decoration: none; background: var(--card-hover); }
.btn.primary { background: var(--blue-fill); border-color: var(--blue-fill); color: var(--white); }
.btn.primary:hover { background: var(--blue-hover); }
.badge { display: inline-block; line-height: 0; }
.badge img { height: 54px; width: auto; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.fineprint { color: var(--muted); font-size: 13px; }

/* Cards and layout */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.grid { display: grid; gap: 16px; }
@media (min-width: 768px) { .grid.three { grid-template-columns: repeat(3, 1fr); } .grid.two { grid-template-columns: repeat(2, 1fr); } }
section { padding: clamp(56px, 9vw, 120px) 0; }
section[id] { scroll-margin-top: 64px; }
section + section { border-top: 1px solid var(--border); }

/* The device frame: an iPhone drawn in CSS around a real capture. */
.device { position: relative; width: min(100%, 340px); aspect-ratio: 390 / 844; margin: 0 auto; border-radius: 52px; background: var(--bezel); border: 1px solid var(--bezel-edge); box-shadow: 0 0 0 7px var(--bezel-ring), 0 30px 80px var(--shadow); overflow: hidden; }
.device .screen { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.device::after { content: ""; position: absolute; top: 12px; left: 50%; width: 32%; height: 28px; transform: translateX(-50%); background: var(--black); border-radius: 999px; }

/* Scroll reveal: 12 px fade up once; off under reduced motion. */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 400ms ease, transform 400ms ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 36px 0 48px; color: var(--muted); font-size: 13px; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 14px; }
.site-footer a { color: var(--text-2); }
.site-footer p a { text-decoration: underline; }
.site-footer p { max-width: none; }
.site-footer a, .wordmark { min-height: 44px; display: inline-flex; align-items: center; }

/* Home */
.hero { padding-top: clamp(40px, 7vw, 96px); position: relative; }
.hero::before { content: ""; position: absolute; inset: -20% 0 auto 0; height: 70%; background: radial-gradient(60% 50% at 50% 0%, var(--glow), transparent 70%); pointer-events: none; }
.hero-grid { display: grid; gap: 40px; align-items: center; position: relative; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr 0.9fr; } }
.hero-copy { display: grid; gap: 22px; }
.hero h1 { font-size: clamp(40px, 6.2vw, 64px); }
.hero h1 .gain { display: block; }
.hero-reel { position: relative; width: min(100%, 320px); aspect-ratio: 9 / 16; margin: 0 auto; border-radius: 24px; overflow: hidden; background: var(--card); border: 1px solid var(--border); box-shadow: 0 30px 80px var(--shadow); }
.hero-reel .reel { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (min-width: 900px) { .hero-reel { width: 360px; } }
.reel-toggle { position: absolute; right: 12px; bottom: 12px; min-width: 44px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--header-bg); color: var(--text); font: 600 13px var(--font); cursor: pointer; }
:root:not(.js) .reel-toggle { display: none; }
.facts { margin-top: 36px; }
.chapter { display: grid; gap: 28px; align-items: center; padding: clamp(36px, 6vw, 72px) 0; }
@media (min-width: 900px) { .chapter { grid-template-columns: 1fr 1fr; } .chapter.flip .device { order: 2; } }
.chapter .device { width: min(100%, 300px); }
.chapter-copy { display: grid; gap: 12px; }
.levels { display: inline-flex; gap: 6px; padding: 4px; margin: 28px 0 18px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); }
.levels label { position: relative; min-height: 44px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: 999px; font-weight: 700; color: var(--text-2); cursor: pointer; }
.levels input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.levels input:checked + span { color: var(--text); }
.levels label:has(input:checked) { background: var(--blue-fill); }
.levels label:has(input:checked) span { color: var(--white); }
.levels label:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.demo-card { max-width: 520px; display: grid; gap: 12px; margin-bottom: 12px; }
#demo.js .demo-card { margin-bottom: 0; }
.demo-card[hidden] { display: none; }
.demo-title { font-weight: 800; font-size: 20px; display: flex; justify-content: space-between; }
.locked { color: var(--text-2); }
.tickers { display: flex; flex-wrap: wrap; gap: 8px; }
.tickers .ticker { padding: 6px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); }
.mini-map { display: flex; height: 120px; gap: 3px; border-radius: 10px; overflow: hidden; }
.mini-map span { flex: var(--w) 0 0; min-width: min-content; background: color-mix(in srgb, var(--c) 42%, var(--card)); display: flex; align-items: flex-end; padding: 6px; font-size: 12px; font-weight: 700; line-height: 1.2; overflow: hidden; }
.pro { display: grid; gap: 18px; max-width: 760px; }
.pro-facts { margin: 0; padding-left: 20px; color: var(--text-2); display: grid; gap: 6px; }
.faq { border-top: 1px solid var(--border); padding: 18px 0; }
.faq:last-of-type { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 12px; min-height: 44px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-2); font-size: 22px; }
.faq[open] summary::after { content: "×"; }
.faq p { margin-top: 10px; color: var(--text-2); }
.closer { text-align: center; }
.closer .wrap { display: grid; gap: 18px; justify-items: center; }

/* Profile */
.profile-main { padding: 28px var(--gutter) 120px; display: grid; gap: 16px; }
.profile-main [hidden] { display: none; }
#view:not([hidden]) { display: grid; gap: 16px; }
.profile { display: grid; gap: 14px; }
.who { display: flex; align-items: center; gap: 16px; }
.who > div { min-width: 0; }
.avatar, .monogram { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; flex: none; }
.monogram { display: inline-flex; align-items: center; justify-content: center; font-size: 36px; font-weight: 800; color: var(--white); }
.profile h1 { font-size: clamp(26px, 5vw, 36px); overflow-wrap: anywhere; }
.handle { color: var(--text-2); font-weight: 600; overflow-wrap: anywhere; }
.bio { color: var(--text-2); }
.stats { display: flex; gap: 18px; color: var(--text-2); }
.stats b { color: var(--text); }
.pcard { display: grid; gap: 12px; }
.pcard .row { display: flex; align-items: center; gap: 14px; }
.pfname { font-size: 18px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.pill { display: inline-block; font-weight: 800; font-size: 15px; padding: 6px 12px; border-radius: 999px; }
.pill.gain { background: color-mix(in srgb, var(--gain) 14%, transparent); }
.pill.loss { background: color-mix(in srgb, var(--loss) 14%, transparent); color: var(--loss-text); }
.pcard .map { height: 240px; border-radius: 10px; overflow: hidden; position: relative; background: var(--bg); }
.tile { position: absolute; border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; color: var(--white); padding: 4px; line-height: 1.2; text-align: center; }
.tile b { font-weight: 800; }
.tile span { font-weight: 600; opacity: 0.9; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); font-weight: 700; }
.pcard .privacy { color: var(--muted); font-size: 13px; }
/* Provenance chips under the portfolio name. Scoped to p.chips so the L1
   ticker chips (div.chips) keep their own look. */
.pcard p.chips { display: flex; gap: 6px; margin-top: 6px; }
.pcard p.chips .chip { font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }
.profile-main .locked, .state { text-align: center; display: grid; gap: 14px; justify-items: center; padding: 40px 22px; }
.profile-main .locked h2, .state h1 { font-size: clamp(24px, 4.5vw, 34px); color: var(--text); overflow-wrap: anywhere; }
.ctas { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.skeleton { display: grid; gap: 16px; }
.skeleton .card { background: linear-gradient(90deg, var(--card), var(--card-hover), var(--card)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.sk-head { height: 150px; } .sk-map { height: 300px; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton .card { animation: none; } }
.install-bar { position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--border); font-weight: 600; }
.install-bar .btn { flex: none; }
@media (max-width: 767px) { .profile-page .site-footer { padding-bottom: calc(110px + env(safe-area-inset-bottom)); } }
@media (min-width: 768px) { .install-bar { display: none; } }

/* Help */
.help-main { padding: 36px var(--gutter) 80px; display: grid; gap: 22px; max-width: 760px; }
.help-main h1 { font-size: clamp(30px, 5vw, 44px); }
.toc { display: flex; flex-wrap: wrap; gap: 10px; }
.toc a { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-2); font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.help-main .card { display: grid; gap: 10px; }
.help-main .card p, .help-main li { color: var(--text-2); }
.perms { width: 100%; border-collapse: collapse; }
.perms th, .perms td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.help-index { display: grid; gap: 14px; }
.help-index a.card { color: var(--text); }
.help-index a.card:hover { text-decoration: none; background: var(--card-hover); }
/* Help content: card headings below the page h1, spaced steps and questions. */
.help-main .card h2 { font-size: clamp(22px, 3vw, 28px); }
.help-main .card h3 { font-size: 18px; color: var(--text); }
.help-main .card p + h3 { margin-top: 12px; }
.help-main ol { margin: 0; padding-left: 1.4em; }
.help-main li + li { margin-top: 18px; }
.help-main li > * + * { margin-top: 8px; }
.help-main li::marker { color: var(--blue); font-weight: 800; }
.perms th { color: var(--text); }
.note { border-left: 3px solid var(--gain); padding: 10px 14px; border-radius: 8px; background: var(--surface); }
.note.warn { border-left-color: var(--amber); }
.note.warn strong { color: var(--amber); }
