/* Preview C · Answer-first. Tokens measured from perplexity.ai answer pages (2026-12-01):
   #fbfbfb canvas, teal-black ink rgb(11,40,51) with 75%/50% alpha secondaries, serif headline
   ~37px/500 and serif reading text, sans UI 16px, monospace source pills 11–12px, 8px source
   cards, pill-shaped inputs. Motion: Magic UI BorderBeam on the ask box, AnimatedShinyText
   while reading, Aceternity TextGenerateEffect when an answer arrives. */
:root {
  --bg: #fbfbfb; --surface: #fff; --sub: rgba(28, 28, 28, .035); --sub-2: rgba(28, 28, 28, .07);
  --ink: rgb(11, 40, 51); --ink-2: rgba(11, 40, 51, .75); --ink-3: rgba(11, 40, 51, .62); --line: rgba(11, 40, 51, .1);
  --teal: #1f7f8c; --teal-2: #13606a; --teal-soft: rgba(31, 127, 140, .1);
  --sans: "Geist", system-ui, sans-serif; --serif: "Newsreader", Georgia, serif; --mono: "Geist Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--sans); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.i { width: 1.05em; height: 1.05em; vertical-align: -.16em; flex: none; }
[data-reveal] { opacity: 0; transform: translateY(8px); filter: blur(6px); transition: opacity .4s ease-out, transform .4s ease-out, filter .4s ease-out; }
[data-reveal].is-in { opacity: 1; transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; filter: none; } .beam::after { display: none; } }

/* shell: Perplexity-style sidebar */
.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; background: var(--bg); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 17px; letter-spacing: -.02em; padding: 4px 8px 14px; }
.brand .mk { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 13px; }
.side a.nv { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 15px; color: var(--ink-2); transition: background-color .15s ease, color .15s ease; }
.side a.nv:hover, .side a.nv.on { background: var(--sub-2); color: var(--ink); }
.side .new { display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border-radius: 9999px; box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); font-weight: 500; margin-bottom: 8px; transition: box-shadow .15s ease; }
.side .new:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
.side h6 { margin: 16px 10px 4px; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.side .vid { display: block; padding: 6px 10px; border-radius: 8px; font-size: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .vid:hover { background: var(--sub-2); }
.side .sp { flex: 1; }
.side .acct { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: 14px; }
.side .acct .av { width: 28px; height: 28px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.side .acct small { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.mtop { display: none; }
.main { min-width: 0; }

/* home */
.home { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 18vh 24px 60px; background: var(--bg); }
.home h1 { font: 500 52px/1.08 var(--serif); letter-spacing: -.015em; text-align: center; margin: 0 0 12px; }
.home .sub { color: var(--ink-2); font-size: 18px; text-align: center; margin: 0 0 32px; max-width: 560px; }
.ask-xl { width: min(720px, 100%); }
.beam { position: relative; border-radius: 24px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 10px 40px -20px rgba(11, 40, 51, .25); }
.beam::after { opacity: 0; transition: opacity .3s ease; content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: conic-gradient(from var(--a), transparent 0 80%, var(--teal) 88%, #8fd3da 92%, transparent 96%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: beam 6s linear infinite; pointer-events: none; }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes beam { to { --a: 360deg; } }
.ask-xl textarea { width: 100%; border: 0; outline: 0; resize: none; font: 400 18px/1.5 var(--sans); padding: 20px 22px 8px; background: transparent; color: var(--ink); min-height: 70px; }
.ask-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px 10px 14px; }
.ask-row .pill { white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 9999px; background: var(--sub-2); font-size: 14px; color: var(--ink-2); }
.ask-row .sp { flex: 1; }
.go { width: 38px; height: 38px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; transition: background-color .15s ease, transform .15s ease; }
.go:hover { background: var(--teal-2); transform: scale(1.05); }
.examples { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; max-width: 720px; }
.examples a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 9999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; color: var(--ink-2); transition: box-shadow .15s ease, color .15s ease; }
.examples a:hover { box-shadow: inset 0 0 0 1px var(--ink-3); color: var(--ink); }
.home-sec { width: min(960px, 100%); margin-top: 96px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.home-sec h3 { font: 500 22px/1.25 var(--serif); margin: 10px 0 6px; }
.home-sec p { margin: 0; color: var(--ink-2); font-size: 15px; }
.home-sec .n { font: 500 12px var(--mono); color: var(--teal); }
.home-foot { margin-top: 80px; color: var(--ink-3); font-size: 14px; display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }

/* thread */
.thread-top { position: sticky; top: 0; z-index: 10; background: rgba(251, 251, 251, .9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); height: 56px; display: flex; align-items: center; gap: 14px; padding: 0 28px; }
.thread-top .vt { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 14.5px; font-weight: 500; }
.thread-top .vt img { width: 48px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; }
.thread-top .vt span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-top .sp { flex: 1; }
.ttabs { display: flex; gap: 4px; }
.ttabs button { height: 32px; padding: 0 12px; border-radius: 9999px; font-size: 14px; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; transition: background-color .15s ease; }
.ttabs button.on { background: var(--sub-2); color: var(--ink); font-weight: 500; }
.col { max-width: 760px; margin: 0 auto; padding: 36px 28px 200px; }
.vcard { display: grid; grid-template-columns: 1fr; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); background: #000; margin-bottom: 30px; }
.vcard video { width: 100%; aspect-ratio: 16 / 9; display: block; }
.vcard .cap { background: var(--surface); padding: 10px 14px; display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--ink-2); }
.qa { margin-bottom: 56px; }
.qa h1 { font: 500 34px/1.2 var(--serif); letter-spacing: -.01em; margin: 0 0 16px; }
.srow-h { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--ink-2); margin-bottom: 10px; }
.srow { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin-bottom: 22px; }
.scard { text-align: left; border-radius: 8px; background: var(--sub); padding: 8px 10px; display: grid; gap: 4px; font-size: 12px; transition: background-color .15s ease; min-height: 68px; }
.scard:hover { background: var(--sub-2); }
.scard .d { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 500; }
.scard .d img { width: 48px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 3px; }
.scard .d .ic { width: 16px; height: 16px; border-radius: 4px; background: var(--teal-soft); color: var(--teal); display: grid; place-items: center; font-size: 10px; }
.scard b { font-size: 13px; font-weight: 500; color: var(--ink); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.answer { font: 400 18.5px/1.7 var(--serif); }
.answer p { margin: 0 0 14px; }
.answer ul { margin: 0 0 14px; padding-left: 22px; }
.answer li { margin: 4px 0; }
.tag-inference { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--teal-2); background: var(--teal-soft); padding: 3px 6px; border-radius: 4px; vertical-align: 2px; }
.cite { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; margin-left: 3px; border-radius: 6px; background: var(--sub-2); color: var(--ink-2); font: 500 12px/1 var(--sans); font-variant-numeric: tabular-nums; vertical-align: 2px; transition: background-color .15s ease, color .15s ease; }
.cite:hover { background: var(--teal); color: #fff; }
.acts { display: flex; gap: 4px; margin-top: 4px; color: var(--ink-3); }
.acts button { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; transition: background-color .15s ease, color .15s ease; }
.acts button:hover { background: var(--sub-2); color: var(--ink); }
.related { border-top: 1px solid var(--line); margin-top: 22px; }
.related h3 { font: 500 16px var(--sans); display: flex; gap: 8px; align-items: center; margin: 18px 0 6px; }
.related a { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 15.5px; transition: color .15s ease; }
.related a:hover { color: var(--teal); }
.follow { position: fixed; left: 256px; right: 0; bottom: 0; display: flex; justify-content: center; padding: 28px 28px 18px; z-index: 20; background: linear-gradient(rgba(251, 251, 251, 0), var(--bg) 40%); }
.follow .beam { width: min(704px, 100%); min-height: 56px; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 20px; border-radius: 9999px; }
.follow input { flex: 1; border: 0; outline: 0; font: inherit; background: transparent; color: var(--ink); }
.shiny { color: rgba(11, 40, 51, .4); background: linear-gradient(110deg, transparent 35%, rgba(11, 40, 51, .9) 50%, transparent 65%) 0 0 / 220% 100% no-repeat; -webkit-background-clip: text; background-clip: text; animation: shiny 2.2s linear infinite; font-weight: 500; }
@keyframes shiny { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.gen-w { display: inline-block; animation: gen .5s ease-out both; }
@keyframes gen { from { opacity: 0; filter: blur(10px); } }
.hovercard { position: fixed; z-index: 50; width: 320px; background: var(--surface); border-radius: 12px; box-shadow: 0 0 0 1px var(--line), 0 16px 40px -12px rgba(11, 40, 51, .3); padding: 12px; font-size: 13.5px; pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .15s ease, transform .15s ease; }
.hovercard.on { opacity: 1; transform: none; }
.hovercard img { width: 100%; border-radius: 6px; display: block; margin-bottom: 8px; }
.hovercard .h { display: flex; justify-content: space-between; font: 500 11.5px var(--mono); color: var(--ink-3); margin-bottom: 4px; }
.hovercard q { font: italic 400 15px/1.5 var(--serif); display: block; }
/* transcript + visuals tabs */
.trp { display: grid; grid-template-columns: 56px 1fr; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.trp time { font: 500 12px var(--mono); color: var(--teal); padding-top: 6px; cursor: pointer; }
.trp .who { font-size: 13px; color: var(--ink-3); }
.trp p { margin: 0; font: 400 17px/1.7 var(--serif); }
.trp.active p { background: var(--teal-soft); border-radius: 4px; }
.vis { border-radius: 12px; box-shadow: 0 0 0 1px var(--line); overflow: hidden; background: var(--surface); margin-bottom: 18px; }
.vis img { width: 100%; display: block; }
.vis .c { padding: 14px 18px; }
.vis h3 { font: 500 20px/1.3 var(--serif); margin: 0 0 6px; }
.vis ul { margin: 6px 0; padding-left: 20px; font-size: 15px; }
.hier { display: grid; gap: 3px; margin: 8px 0; font-size: 13px; }
.hier div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 10px; border-radius: 6px; background: var(--sub); }
.hier div.hl { background: var(--ink); color: #fff; }
table.slide { width: 100%; border-collapse: collapse; font-size: 13px; }
table.slide th, table.slide td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: center; }
table.slide th:first-child, table.slide td:first-child { text-align: left; }
table.slide th { font: 500 11px var(--mono); color: var(--ink-3); }
table.slide td.y { color: var(--teal-2); font-weight: 600; }
.refnote { font: italic 400 15px/1.55 var(--serif); color: var(--ink-2); border-left: 2px solid var(--teal); padding-left: 12px; }
/* library, upload, account */
.pg { max-width: 820px; margin: 0 auto; padding: 48px 28px 100px; }
.pg h1 { font: 500 36px/1.15 var(--serif); margin: 0 0 22px; }
.lib-item { display: grid; grid-template-columns: 1fr 140px; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: center; }
.lib-item h3 { font: 500 19px/1.35 var(--serif); margin: 0 0 6px; }
.lib-item .q { font-size: 14px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; }
.lib-item .m { font: 400 12px var(--mono); color: var(--ink-3); margin-top: 6px; display: flex; gap: 12px; }
.lib-item img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.drop { border-radius: 20px; padding: 56px 24px; text-align: center; background: var(--surface); }
.drop h3 { font: 500 24px var(--serif); margin: 14px 0 6px; }
.drop p { color: var(--ink-2); margin: 0 0 18px; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 9999px; background: var(--teal); color: #fff; font-weight: 500; transition: background-color .15s ease; }
.btn:hover { background: var(--teal-2); }
.btn.ghost { background: var(--sub-2); color: var(--ink); }
.prog { margin-top: 18px; font-size: 15px; }
.prog .bar { height: 4px; border-radius: 9px; background: var(--sub-2); overflow: hidden; margin: 10px 0; }
.prog .bar i { display: block; height: 100%; background: var(--teal); transition: width .3s ease; }
.mono { font-family: var(--sans); font-variant-numeric: tabular-nums; font-size: 13px; color: var(--ink-2); }
.balance { font: 500 64px/1 var(--serif); }
.packs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0 36px; }
.pack { border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); padding: 20px; transition: box-shadow .15s ease; }
.pack:hover { box-shadow: 0 0 0 1px var(--ink-3); }
.act li { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.act { list-style: none; padding: 0; margin: 0; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .shell { display: block; }
  .side { display: none; }
  .mtop { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 15; }
  .mtop .sp { flex: 1; }
  .home { padding-top: 12vh; }
  .home h1 { font-size: 36px; }
  .home-sec { grid-template-columns: 1fr; margin-top: 56px; gap: 22px; }
  .thread-top { padding: 0 16px; top: 52px; }
  .thread-top .vt { display: none; }
  .col { padding: 22px 16px 170px; }
  .qa h1 { font-size: 27px; }
  .answer { font-size: 17.5px; }
  .follow { left: 0; padding: 0 12px; }
  .lib-item { grid-template-columns: 1fr 96px; }
  .packs { grid-template-columns: 1fr; }
  .pg { padding: 28px 16px 90px; }
}

.beam:focus-within::after { opacity: 1; }
.vcard.compact { margin: 0 0 40px; }
.lib-search { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 9999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 8px; color: var(--ink-3); }
.lib-search input { border: 0; outline: 0; background: transparent; font: inherit; width: 100%; color: var(--ink); }
.trp time, .scard .d, .hovercard .h, .tag-inference, table.slide th, .home-sec .n { font-family: var(--sans) !important; font-variant-numeric: tabular-nums; }

/* round 2: answer column + sticky player column (sources and moment always beside the claim) */
.col.two { max-width: 1160px; display: grid; grid-template-columns: minmax(0, 640px) 440px; gap: 40px; align-items: start; padding-bottom: 220px; }
.col.two .vcard { position: sticky; top: 76px; margin: 0; }
.vcard.ring { box-shadow: 0 0 0 3px var(--teal); transition: box-shadow .3s ease; }
.cite { background: var(--teal-soft); color: var(--teal-2); font-weight: 600; height: 22px; font-size: 12.5px; }
.scard .num { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: var(--teal-soft); color: var(--teal-2); font-weight: 600; font-size: 11px; }
.answer li { margin: 2px 0; }
.answer { line-height: 1.65; }
.side .acct { flex-wrap: wrap; }
.side .acct small { margin-left: 38px; width: 100%; font-family: var(--sans); }
.examples { flex-direction: column; align-items: stretch; }
.examples a { justify-content: flex-start; }
@media (max-width: 1100px) { .col.two { grid-template-columns: 1fr; } .col.two .vcard { position: sticky; top: 108px; z-index: 5; order: -1; } }
@media (max-width: 900px) { .col.two .vcard { top: 104px; } .col.two .vcard .cap { display: none; } .ask-row .pill:first-child { max-width: 44px; padding: 0 12px; } .ask-row .pill:first-child { font-size: 0; } .ask-row .pill:first-child .i { font-size: 16px; } }
