/* Research index (/research) and paper pages (/research/<slug>).
   Built on the core-page tokens (About, Culture, Methodology, Academy):
   Geist for text, Newsreader italic for headline accents, Fragment Mono only
   for eyebrows and small meta, #1e1e1e canvas with the 26px dot texture,
   warm white ink, one mint accent. Layout follows research-lab
   conventions: generative line art as the visual identity, a featured paper,
   and a paper page set as a document (slim details rail + one reading column). */

.ryv-rs {
  --ink: #f5f3ec;
  --sub: rgba(245,243,236,.78);
  --soft: rgba(245,243,236,.68);
  --dim: rgba(245,243,236,.55);
  --line: rgba(255,255,255,.09);
  --card: rgba(255,255,255,.025);
  --card-line: rgba(255,255,255,.07);
  --mint: #9fd6b5;
  --tan: #d8a373;
  --sans: "Geist", "Geist Placeholder", sans-serif;
  --serif: "Newsreader", "Newsreader Placeholder", ui-serif, Georgia, serif;
  --mono: "Fragment Mono", "Fragment Mono Placeholder", ui-monospace, monospace;
  width: 100%; min-width: 0; font-family: var(--sans); color: var(--ink);
}
.ryv-rs, .ryv-rs * { box-sizing: border-box; }
.ryv-rs :focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }
.ryv-rs ::selection { background: rgba(159,214,181,.3); color: #fff; }
.ryv-rs em { font-family: var(--serif); font-style: italic; font-weight: 400; }

/* ---------- Hero (About / Culture construction) ---------- */
.ryv-rs-hero { background: #1e1e1e; padding: 9px; }
.ryv-rs-hero-card {
  position: relative; width: 100%; min-height: 520px; border-radius: 10px; overflow: hidden;
  background: #0d1416; display: flex; align-items: flex-end; isolation: isolate;
}
.ryv-rs-hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    radial-gradient(ellipse at 55% 50%, rgba(20,28,32,0) 0%, rgba(15,20,24,.55) 70%, rgba(10,14,18,.8) 100%),
    linear-gradient(180deg, rgba(20,30,34,.4) 0%, rgba(14,20,24,.62) 100%);
  filter: saturate(.6) brightness(.82);
}
.ryv-rs-hero-grid {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .55;
  background: url("/assets/images/vLikCLnzwwcHeQgCk9IbnE9w0.png") repeat 0 0 / 1482px auto;
}
.ryv-rs-hero-inner { position: relative; z-index: 2; width: 100%; max-width: 1120px; margin: 0 auto; padding: 160px 48px 72px; }
.ryv-rs-hero-title {
  margin: 0; max-width: 900px; font-size: clamp(48px,7vw,88px); font-weight: 500;
  line-height: 1.04; letter-spacing: -.03em; color: var(--ink); text-wrap: balance;
}
.ryv-rs-hero-sub { margin: 22px 0 0; max-width: 640px; font-size: 18px; line-height: 1.55; letter-spacing: -.003em; color: var(--sub); }

/* Paper hero: the paper's own line art instead of the starfield. */
.ryv-rs-hero-art { position: absolute; inset: 0; z-index: 0; }
.ryv-rs-hero-art .ryv-rs-flow { position: absolute; inset: 0; width: 100%; height: 100%; }
.ryv-rs-hero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(13,20,22,.92) 0%, rgba(13,20,22,.72) 34%, rgba(13,20,22,.12) 66%, rgba(13,20,22,0) 100%),
    linear-gradient(0deg, rgba(13,20,22,.55) 0%, rgba(13,20,22,0) 40%);
}
.ryv-rs-paper-hero .ryv-rs-hero-title { max-width: 860px; font-size: clamp(40px,5vw,64px); line-height: 1.06; }
.ryv-rs-paper-hero .ryv-rs-hero-title em { display: block; }

/* Generative line art */
.ryv-rs-flow { display: block; width: 100%; height: 100%; }
.ryv-rs-flow .is-accent { stroke: #9fd6b5; stroke-width: 1.6; stroke-dasharray: 160 1640; animation: ryv-rs-drift 11s linear infinite; }
@keyframes ryv-rs-drift { from { stroke-dashoffset: 1800; } to { stroke-dashoffset: 0; } }

/* ---------- Shared type ---------- */
.ryv-rs-eyebrow {
  display: inline-flex; align-items: center; gap: 12px; margin: 0 0 24px;
  font: 500 13px/1.4 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--ink);
}
.ryv-rs-eyebrow::before { content: ""; width: 9px; height: 9px; background: var(--ink); flex: none; }
.ryv-rs-h {
  margin: 0; max-width: 780px; font-size: clamp(34px,4vw,48px); font-weight: 500;
  line-height: 1.08; letter-spacing: -.028em; color: var(--ink); text-wrap: balance;
}
.ryv-rs-lede { margin: 0; max-width: 560px; font-size: 18px; line-height: 1.65; letter-spacing: -.003em; color: var(--sub); text-wrap: pretty; }
.ryv-rs-meta { font: 400 11px/1.5 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }

/* ---------- Body canvas ---------- */
.ryv-rs-body { position: relative; background: #1e1e1e; padding: 112px 0 120px; overflow: clip; }
.ryv-rs-body::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.045) 1px, transparent 1.4px);
  background-size: 26px 26px;
}
.ryv-rs-wrap { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 0 48px; }
.ryv-rs-sec + .ryv-rs-sec { margin-top: 136px; }
.ryv-rs-sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 16px 32px; margin-bottom: 8px; }
.ryv-rs-count { margin: 0; font-size: 15px; line-height: 1.5; color: var(--soft); }

/* ---------- Index: featured paper ---------- */
.ryv-rs-feature {
  display: block; overflow: hidden; border-radius: 10px; color: inherit; text-decoration: none;
  background: rgba(255,255,255,.03); border: 1px solid var(--card-line);
  transition: border-color .22s ease, background-color .22s ease;
}
.ryv-rs-feature:hover { border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.045); }
.ryv-rs-feature-art { position: relative; aspect-ratio: 1440/460; background: #0d1416; border-bottom: 1px solid var(--card-line); overflow: hidden; }
.ryv-rs-feature-art .ryv-rs-flow { position: absolute; inset: 0; transition: transform .8s cubic-bezier(.22,.61,.36,1); }
.ryv-rs-feature:hover .ryv-rs-flow { transform: scale(1.02); }
.ryv-rs-feature-body {
  display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: 32px 64px;
  padding: 36px 40px 38px;
}
.ryv-rs-feature-meta { display: flex; flex-wrap: wrap; align-items: baseline; margin: 0 0 18px; font-size: 15px; line-height: 1.5; color: var(--soft); }
.ryv-rs-feature-meta > * + *::before { content: "\00b7"; margin: 0 10px; color: var(--dim); }
.ryv-rs-feature-status { font-weight: 500; color: var(--ink); }
.ryv-rs-feature-title { margin: 0; font-size: clamp(28px,3vw,38px); font-weight: 500; line-height: 1.12; letter-spacing: -.025em; color: var(--ink); text-wrap: balance; }
.ryv-rs-feature-title em { display: block; }
.ryv-rs-feature-side { display: flex; flex-direction: column; gap: 16px; padding-top: 34px; }
.ryv-rs-feature-sub { margin: 0; font-size: 16px; line-height: 1.65; color: rgba(245,243,236,.72); text-wrap: pretty; }
.ryv-rs-feature-authors { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.5; color: var(--sub); }
.ryv-rs-feature-link {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 6px;
  font: 600 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink);
}
.ryv-rs-feature-link svg { transition: transform .2s ease; }
.ryv-rs-feature:hover .ryv-rs-feature-link svg { transform: translateX(4px); }

/* ---------- Index: publications table (shown from two papers up) ---------- */
.ryv-rs-table { margin-top: 40px; }
.ryv-rs-table ul { margin: 0; padding: 0; list-style: none; }
.ryv-rs-table-head, .ryv-rs-row { display: grid; grid-template-columns: 150px 180px minmax(0,1fr); gap: 24px; }
.ryv-rs-table-head { padding: 0 0 14px; border-bottom: 1px solid var(--line); }
.ryv-rs-row { padding: 22px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; transition: background-color .18s ease; }
.ryv-rs-row:hover { background: rgba(255,255,255,.025); }
.ryv-rs-row time { padding-top: 4px; }
.ryv-rs-row-topic { font-size: 15px; line-height: 1.5; color: var(--soft); }
.ryv-rs-row-title { font-size: 18px; font-weight: 500; line-height: 1.4; letter-spacing: -.01em; color: var(--ink); }
.ryv-rs-row-authors { display: block; margin-top: 4px; font-size: 14px; font-weight: 400; color: var(--dim); }

/* ---------- Index: research areas ---------- */
.ryv-rs-split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 32px 64px; align-items: end; }
.ryv-rs-areas { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 40px; margin-top: 56px; }
.ryv-rs-area { padding-top: 22px; border-top: 1px solid rgba(245,243,236,.22); }
.ryv-rs-area h3 { margin: 14px 0 0; font-size: 20px; font-weight: 500; line-height: 1.3; letter-spacing: -.012em; color: var(--ink); }
.ryv-rs-area p { margin: 10px 0 0; font-size: 15px; line-height: 1.65; color: var(--soft); }

/* ---------- Paper: document layout ---------- */
.ryv-rs-body--paper { padding-top: 88px; }
.ryv-rs-doc { display: grid; grid-template-columns: 220px minmax(0,680px); gap: 96px; align-items: start; }
.ryv-rs-rail { position: sticky; top: 100px; }
.ryv-rs-rail-facts { margin: 0; }
.ryv-rs-rail-facts > div { padding: 0 0 18px; }
.ryv-rs-rail-facts dt { font-size: 13px; font-weight: 500; line-height: 1.4; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.ryv-rs-rail-facts dd { margin: 6px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink); }
.ryv-rs-rail-links { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; padding-top: 22px; border-top: 1px solid var(--line); }
.ryv-rs-rail-links a { display: inline-flex; align-items: center; gap: 8px; width: fit-content; font-size: 15px; line-height: 1.5; color: var(--ink); text-decoration: none; border-bottom: 1px solid rgba(245,243,236,.25); }
.ryv-rs-rail-links a:hover { border-bottom-color: var(--ink); }
.ryv-rs-rail-pending { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; line-height: 1.5; color: var(--sub); }
.ryv-rs-rail-pending::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--tan); }

.ryv-rs-main { min-width: 0; }
.ryv-rs-lead { margin: 0; font-size: 24px; line-height: 1.5; letter-spacing: -.015em; color: var(--ink); text-wrap: pretty; }
.ryv-rs-block { margin-top: 88px; scroll-margin-top: 100px; }
.ryv-rs-lead + .ryv-rs-block { margin-top: 72px; }
.ryv-rs-h2 { margin: 0 0 22px; font-size: clamp(28px,3vw,36px); font-weight: 500; line-height: 1.15; letter-spacing: -.025em; color: var(--ink); text-wrap: balance; }
.ryv-rs-prose p { margin: 0 0 20px; font-size: 18px; line-height: 1.7; letter-spacing: -.003em; color: var(--sub); text-wrap: pretty; }
.ryv-rs-prose p:last-child { margin-bottom: 0; }
.ryv-rs-prose a { color: var(--mint); text-decoration: none; border-bottom: 1px solid rgba(159,214,181,.35); }
.ryv-rs-prose h2 { margin: 72px 0 22px; font-size: clamp(28px,3vw,36px); font-weight: 500; line-height: 1.15; letter-spacing: -.025em; color: var(--ink); text-wrap: balance; scroll-margin-top: 100px; }
.ryv-rs-prose h2:first-child { margin-top: 0; }
.ryv-rs-prose h2 .anchor { margin-left: 10px; font-family: var(--sans); font-size: .55em; color: var(--dim); border: 0; opacity: 0; transition: opacity .15s ease; }
.ryv-rs-prose h2:hover .anchor, .ryv-rs-prose h2 .anchor:focus-visible { opacity: 1; }
.ryv-rs-lead + .ryv-rs-prose { margin-top: 72px; }





/* Scope: set like a paper's closing footnote, a hairline then small text. */
.ryv-rs-scope { margin: 56px 0 0; padding-top: 24px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.65; color: var(--soft); text-wrap: pretty; }
.ryv-rs-scope strong { font-weight: 500; color: var(--ink); }

.ryv-rs-further { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.ryv-rs-further a {
  display: grid; grid-template-columns: 110px minmax(0,1fr) auto; gap: 16px; align-items: center;
  padding: 20px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
.ryv-rs-further-title { font-size: 17px; font-weight: 500; line-height: 1.4; }
.ryv-rs-further svg { color: var(--dim); transition: transform .2s ease, color .2s ease; }
.ryv-rs-further a:hover svg { transform: translateX(4px); color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .ryv-rs-doc { grid-template-columns: minmax(0,1fr); gap: 48px; }
  .ryv-rs-rail { position: static; display: flex; flex-wrap: wrap; gap: 20px 48px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
  .ryv-rs-rail-facts { display: flex; flex-wrap: wrap; gap: 20px 40px; }
  .ryv-rs-rail-facts > div { padding: 0; }
  .ryv-rs-rail-links { margin: 0; padding: 0; border: 0; }
  .ryv-rs-feature-body { grid-template-columns: minmax(0,1fr); }
  .ryv-rs-feature-side { padding-top: 0; }
  .ryv-rs-split { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 720px) {
  .ryv-rs-hero-card { min-height: calc(100svh - 62px); }
  .ryv-rs-hero-inner { padding: 120px 24px 56px; }
  .ryv-rs-hero-sub, .ryv-rs-lede, .ryv-rs-prose p { font-size: 17px; }
  .ryv-rs-paper-hero .ryv-rs-hero-card { min-height: 0; }
  .ryv-rs-paper-hero .ryv-rs-hero-inner { padding-top: 260px; }
  .ryv-rs-paper-hero .ryv-rs-hero-title { font-size: 38px; line-height: 1.08; }
  .ryv-rs-hero-scrim { background: linear-gradient(0deg, rgba(13,20,22,.96) 0%, rgba(13,20,22,.82) 55%, rgba(13,20,22,.2) 100%); }
  .ryv-rs-body { padding: 72px 0 80px; }
  .ryv-rs-body--paper { padding-top: 48px; }
  .ryv-rs-wrap { padding: 0 22px; }
  .ryv-rs-sec + .ryv-rs-sec { margin-top: 96px; }
  .ryv-rs-feature-art { aspect-ratio: 16/9; }
  .ryv-rs-feature-body { padding: 24px 22px 28px; }
  .ryv-rs-feature-title { font-size: 26px; }
  .ryv-rs-feature-meta time { flex-basis: 100%; }
  .ryv-rs-feature-meta time::before { display: none; }
  .ryv-rs-areas { grid-template-columns: minmax(0,1fr); gap: 28px; margin-top: 40px; }
  .ryv-rs-table-head { display: none; }
  .ryv-rs-row { grid-template-columns: minmax(0,1fr); gap: 6px; }
  .ryv-rs-rail { flex-direction: column; gap: 20px; }
  .ryv-rs-lead { font-size: 20px; }
  .ryv-rs-block { margin-top: 72px; }
  .ryv-rs-further a { grid-template-columns: minmax(0,1fr) auto; }
  .ryv-rs-further .ryv-rs-meta { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .ryv-rs-flow .is-accent { animation: none; display: none; }
  .ryv-rs-feature, .ryv-rs-feature-art .ryv-rs-flow, .ryv-rs-feature-link svg, .ryv-rs-further svg { transition: none; }
  .ryv-rs-feature:hover .ryv-rs-flow { transform: none; }
}
@media print {
  .ryv-rs-hero-card { min-height: 0; background: none; }
  .ryv-rs-hero-art, .ryv-rs-hero-scrim, .ryv-rs-hero-grid, .ryv-uni-overlay { display: none; }
  .ryv-rs-doc { grid-template-columns: minmax(0,1fr); }
}
