/* Shared RSI density system. Keep prose readable; remove duplicated page chrome.
   Loaded last on every RSI page, independent of the Agent site. */
body[data-rsi-page]{--rsi-page-gutter:22px;--rsi-page-top:18px;--rsi-topbar-height:56px;--rsi-page-width:1680px}
@media(min-width:821px){body[data-rsi-page] .layout{grid-template-columns:276px minmax(0,1fr)}}
body[data-rsi-page] .content{max-width:var(--rsi-page-width);padding:var(--rsi-page-top) var(--rsi-page-gutter) 28px;margin:0 auto;width:100%}
body[data-rsi-page] .topbar{min-height:var(--rsi-topbar-height);padding:8px 22px;gap:10px;background:rgba(250,251,254,.97)}
/* Loading never hides the old article or blanks the navigation shell. */
body[data-rsi-page].rsi-soft-pending .topbar:after{content:"";position:absolute;bottom:0;left:0;width:38%;height:2px;background:linear-gradient(90deg,#315fa8,#7860bd,#2b9377);animation:rsi-soft-loading 1s ease-in-out infinite alternate;pointer-events:none}
@keyframes rsi-soft-loading{from{transform:translateX(-90%)}to{transform:translateX(270%)}}
body[data-rsi-page] .search{max-width:900px}
body[data-rsi-page] .search input{height:36px;padding:7px 13px 7px 34px;border-radius:9px;font-size:13px;line-height:20px}
body[data-rsi-page] .search:before{left:12px;top:0;font-size:21px;line-height:34px}
body[data-rsi-page] .language-toggle{padding:7px 10px;border-radius:8px;font-size:10px;line-height:18px}
body[data-rsi-page] .sidebar{padding:14px 12px 20px}
body[data-rsi-page] .site-switcher{margin-bottom:12px;padding:10px}
body[data-rsi-page] .site-switcher__caption{font-size:9px;margin-bottom:6px}
body[data-rsi-page] .site-switcher__tab{padding:7px 9px;font-size:11px}
body[data-rsi-page] .brand{gap:9px;padding:3px 7px 13px}
body[data-rsi-page] .brand .logo{width:34px;height:34px;border-radius:9px;font-size:13px;flex-basis:34px}
body[data-rsi-page] .brand strong{font-size:14px}
body[data-rsi-page] .brand>span:last-child>span{font-size:10px;margin-top:2px}
body[data-rsi-page] #research-nav .nav-level1{padding:9px 9px;font-size:10px;line-height:1.4}
body[data-rsi-page] #research-nav .nav-level2{padding:7px 9px 7px 20px;font-size:12px;line-height:1.45}
body[data-rsi-page] .nav-children{padding-bottom:5px}
body[data-rsi-page] .page-toc{margin:12px 5px 0;padding:11px 6px}
body[data-rsi-page] .toc-title{margin-bottom:5px;font-size:9px}
body[data-rsi-page] .toc-links{gap:1px}
body[data-rsi-page] .toc-links a{padding:5px 8px;font-size:11px;line-height:1.55}
/* RSI reading navigation: chapters -> topic folders -> pages, without a fourth level. */
body[data-rsi-page] #research-nav .nav-subgroup{margin:2px 0 3px 3px;border-radius:8px;border:1px solid transparent;min-width:0}
body[data-rsi-page] #research-nav .nav-subgroup[open]{background:rgba(92,119,156,.065);border-color:rgba(135,161,197,.14)}
body[data-rsi-page] #research-nav .nav-folder-title{list-style:none;display:flex;align-items:center;justify-content:space-between;min-height:34px;gap:7px;padding:7px 9px;color:#9fb5d1;cursor:pointer;font-size:11px;line-height:1.5;font-weight:740;border-radius:7px}
body[data-rsi-page] #research-nav .nav-folder-title::-webkit-details-marker{display:none}
body[data-rsi-page] #research-nav .nav-folder-title>span:first-child{min-width:0;overflow-wrap:anywhere}
body[data-rsi-page] #research-nav .nav-folder-title:hover{background:#24364b;color:#f0f6ff}
body[data-rsi-page] #research-nav .active-subgroup>.nav-folder-title{background:#21354e;color:#eaf4ff;border-left:2px solid #6194cc}
body[data-rsi-page] #research-nav .nav-subgroup .nav-chevron{font-size:13px}
body[data-rsi-page] #research-nav .nav-subgroup[open]>.nav-folder-title .nav-chevron{transform:rotate(180deg)}
body[data-rsi-page] #research-nav .nav-subgroup-children{margin:0 3px 5px 11px;padding:2px 0 2px 8px;border-left:1px solid #425c7d;display:flex;flex-direction:column;min-width:0}
body[data-rsi-page] #research-nav .nav-subgroup .nav-level2{padding:7px 7px 7px 10px;font-size:11.5px;line-height:1.5;overflow-wrap:anywhere}
body[data-rsi-page] #research-nav .nav-folder-title:focus-visible{outline:2px solid #88bdfb;outline-offset:1px}
/* Long reads get an editorial two-level outline; short pages stay flat. */
body[data-rsi-page] .page-toc--grouped{margin-top:14px}
body[data-rsi-page] .page-toc .toc-count{font-size:9px;font-weight:500;opacity:.72;margin-left:5px}
body[data-rsi-page] .toc-links--grouped{display:block}
body[data-rsi-page] .toc-group{border:1px solid transparent;border-radius:8px;margin:3px 0 4px;min-width:0}
body[data-rsi-page] .toc-group[open]{border-color:rgba(116,151,197,.15);background:rgba(255,255,255,.02)}
body[data-rsi-page] .toc-group-heading{display:flex;align-items:center;justify-content:space-between;gap:7px;min-height:35px;padding:7px 8px;list-style:none;cursor:pointer;border-radius:7px;font-size:11px;line-height:1.5;color:#a2bad5;font-weight:720}
body[data-rsi-page] .toc-group-heading::-webkit-details-marker{display:none}
body[data-rsi-page] .toc-group-heading>span:first-child{min-width:0}
body[data-rsi-page] .toc-group-heading:hover{background:#23344b;color:#fff}
body[data-rsi-page] .toc-group.current-group>.toc-group-heading{color:#f0f6ff;background:#253a54}
body[data-rsi-page] .toc-group-heading:focus-visible{outline:2px solid #88bdfb;outline-offset:1px}
body[data-rsi-page] .toc-group-chevron{font-size:12px;transition:transform .15s;color:#91a9c8;flex-shrink:0}
body[data-rsi-page] .toc-group[open]>.toc-group-heading .toc-group-chevron{transform:rotate(180deg)}
body[data-rsi-page] .toc-group-items{margin:0 4px 6px 12px;padding:1px 0 2px 8px;border-left:1px solid #405775;display:flex;flex-direction:column}
body[data-rsi-page] .toc-links--grouped .toc-item{color:#b0c2d7;font-size:11px;line-height:1.5;padding:6px 7px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;overflow-wrap:anywhere}
body[data-rsi-page] .toc-links--grouped .toc-item:hover{color:#fff;background:#243953;border-radius:6px}
body[data-rsi-page] .toc-links--grouped .toc-item.active{color:#fff;background:#294767;border-radius:6px;box-shadow:inset 2px 0 #8fbcef}
body[data-rsi-page] .toc-links a:focus-visible{outline:2px solid #88bdfb;outline-offset:1px}
@media(max-width:820px){
 body[data-rsi-page] #research-nav .nav-folder-title,
 body[data-rsi-page] .toc-group-heading{min-height:38px;padding-top:9px;padding-bottom:9px}
 body[data-rsi-page] #research-nav .nav-subgroup .nav-level2,
 body[data-rsi-page] .toc-links--grouped .toc-item{font-size:12px;padding-top:8px;padding-bottom:8px}
}
body[data-rsi-page] .sidebar-note{margin:14px 5px 0;padding:11px;font-size:10px;line-height:1.75}
/* One concise title panel, shared by overview, literature, ideas and long reads. */
body[data-rsi-page]:not([data-rsi-page="timeline"]) .research-hero{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 16px;padding:13px 17px 13px 20px;margin:0 0 14px;border:1px solid #dce3ee;border-radius:12px;background:#fff;box-shadow:0 3px 14px #20385804}
body[data-rsi-page]:not([data-rsi-page="timeline"]) .research-hero:before{content:"";position:absolute;left:0;top:14px;bottom:14px;width:3px;border-radius:3px;background:linear-gradient(#426fb3,#7e6bbc)}
body[data-rsi-page]:not([data-rsi-page="timeline"]) .research-hero>.eyebrow{grid-column:1/-1;font-size:9px;letter-spacing:.1em;line-height:1.4;margin:0 0 5px;color:#6f61a1}
body[data-rsi-page]:not([data-rsi-page="timeline"]) .research-en{display:none}
body[data-rsi-page]:not([data-rsi-page="timeline"]) .research-hero h1{grid-column:1;max-width:none;font-size:28px;line-height:1.3;letter-spacing:-.035em;margin:0 0 7px;overflow-wrap:anywhere}
body[data-rsi-page]:not([data-rsi-page="timeline"]) .research-hero .lead{grid-column:1;max-width:1100px;font-size:13px;line-height:1.75;margin:0;color:#63738b}
body[data-rsi-page]:not([data-rsi-page="timeline"]) .hero-meta{grid-column:2;grid-row:2/4;align-self:start;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px;max-width:190px;margin:4px 0 0}
body[data-rsi-page] .hero-meta span{font-size:9px;padding:4px 7px;line-height:1.3;background:#f8fafc;border:1px solid #e2e7ef;color:#75839a}
/* Tighter framing, not miniature body text. */
body[data-rsi-page] .research-section{padding:18px 20px;margin-bottom:14px;border-radius:11px;box-shadow:0 3px 14px #20385803;scroll-margin-top:74px}
body[data-rsi-page] .research-section>h2{font-size:20px;line-height:1.45;margin:0 0 14px;padding-left:11px;border-left-width:3px}
body[data-rsi-page] .section-body>h3{font-size:17px;margin-top:18px;margin-bottom:8px}
body[data-rsi-page] .section-body{font-size:14px;line-height:1.85}
body[data-rsi-page] .section-body p{margin:9px 0}
body[data-rsi-page] .route-grid,body[data-rsi-page] .card-grid{gap:10px}
body[data-rsi-page] .route-grid>a{padding:15px 17px;gap:6px;border-radius:9px}
body[data-rsi-page] .route-grid b{font-size:15px}
body[data-rsi-page] .route-grid span{font-size:12px;line-height:1.7}
body[data-rsi-page] .research-card{padding:14px 16px}
body[data-rsi-page] .decision{padding:17px 19px;margin-bottom:16px;border-radius:10px}
body[data-rsi-page] .decision h3{font-size:21px;margin:7px 0 10px}
body[data-rsi-page] .status-strip{margin-top:15px;gap:6px}
body[data-rsi-page] .status-strip span,body[data-rsi-page] .status{padding:5px 8px;font-size:11px}
body[data-rsi-page] .table-wrap{margin:12px 0 16px}
body[data-rsi-page] .table-wrap th,body[data-rsi-page] .table-wrap td{padding:10px 12px}
body[data-rsi-page] .flow{margin:17px 0;gap:12px}
body[data-rsi-page] .flow>div{padding:12px 10px}
body[data-rsi-page] .reading-grid{gap:12px}
body[data-rsi-page] .reading-card{padding:17px 18px;gap:11px;border-radius:10px}
body[data-rsi-page] .reading-card-head h3{font-size:22px;margin:7px 0 3px}
body[data-rsi-page] .reading-full-title{margin-bottom:8px!important}
body[data-rsi-page] .reading-one-sentence{padding:10px 12px;font-size:14px;line-height:1.8}
body[data-rsi-page] .reading-story{gap:9px}
body[data-rsi-page] .reading-tools{gap:7px;margin-bottom:14px}
body[data-rsi-page] .reading-tools input,body[data-rsi-page] .reading-tools select{padding:8px 10px}
body[data-rsi-page] .idea-board{gap:10px;margin:14px 0 18px}
body[data-rsi-page] .idea-board-card{padding:15px 17px;gap:5px}
body[data-rsi-page] .idea-focus{padding:12px 14px;margin-bottom:15px}
body[data-rsi-page] .deep-paper-head{max-width:1180px}
body[data-rsi-page] .deep-paper-head>h3{margin:6px 0 12px}
body[data-rsi-page] .deep-focus{font-size:15px;padding:12px 15px}
body[data-rsi-page] .deep-summary{padding:11px 14px;margin:14px 0}
body[data-rsi-page] .deep-shortcuts{margin:14px 0;gap:6px}
body[data-rsi-page] .deep-stage{padding:17px 0 10px}
body[data-rsi-page] .deep-stage-lead{font-size:14px;line-height:1.9}
body[data-rsi-page] .deep-chapter{margin-top:20px;padding-top:14px}
body[data-rsi-page] .deep-stage .deep-chapter{margin:0;padding:0}
body[data-rsi-page] .deep-glossary{margin:14px 0}
body[data-rsi-page] .deep-chapter-body{padding:12px 14px 15px}
body[data-rsi-page] .source-card{padding:16px 0}
body[data-rsi-page] .source-card h3{font-size:16px;margin:7px 0}
body[data-rsi-page] .page-pagination{padding:17px 0;font-size:12px}
body[data-rsi-page] .footer{padding:16px 22px;font-size:11px;line-height:1.7}
@media(max-width:1100px){
 body[data-rsi-page]:not([data-rsi-page="timeline"]) .research-hero{grid-template-columns:1fr}
 body[data-rsi-page]:not([data-rsi-page="timeline"]) .hero-meta{grid-column:1;grid-row:auto;max-width:none;justify-content:flex-start;margin-top:9px}
}
@media(max-width:820px){
 body[data-rsi-page]{--rsi-page-gutter:13px;--rsi-page-top:14px}
 body[data-rsi-page] .topbar{padding:8px 12px;gap:8px}
 body[data-rsi-page] .sidebar{width:min(290px,88vw);padding:14px 12px 20px}
 body[data-rsi-page] .mobile-toggle{padding:4px 8px;font-size:18px}
 body[data-rsi-page] .search input{height:35px;font-size:12px;padding-left:31px}
 body[data-rsi-page] .language-toggle{font-size:9px;padding:6px 8px}
 body[data-rsi-page]:not([data-rsi-page="timeline"]) .research-hero{padding:12px 14px 12px 17px;margin-bottom:12px}
 body[data-rsi-page]:not([data-rsi-page="timeline"]) .research-hero h1{font-size:24px;line-height:1.35}
 body[data-rsi-page]:not([data-rsi-page="timeline"]) .research-hero .lead{font-size:12.5px;line-height:1.75}
 body[data-rsi-page] .research-section{padding:15px 14px;margin-bottom:12px}
 body[data-rsi-page] .research-section>h2{font-size:18px;margin-bottom:12px}
 body[data-rsi-page] .section-body{font-size:14px;line-height:1.85}
 body[data-rsi-page] .reading-card{padding:15px}
 body[data-rsi-page] .reading-grid{grid-template-columns:1fr}
 body[data-rsi-page] .table-wrap th,body[data-rsi-page] .table-wrap td{padding:9px 10px}
}
@media print{
 body[data-rsi-page] .content{max-width:none;padding:0}
 body[data-rsi-page]:not([data-rsi-page="timeline"]) .research-hero{border:0;padding:0;box-shadow:none}
 body[data-rsi-page] .research-section{border:0;padding:10px 0;box-shadow:none}
}

/* Smooth same-origin page-to-page navigation (native multi-page view transitions).
   Keep the previous document visible while the destination prepares its first paint.
   Unsupported browsers retain normal hyperlinks and may use navigation prefetch. */
@view-transition {
 navigation: auto;
}
body[data-rsi-page] .sidebar{view-transition-name:rsi-navigation-sidebar}
body[data-rsi-page] .topbar{view-transition-name:rsi-navigation-topbar}
@keyframes rsi-page-out {
 from{opacity:1}
 to{opacity:0}
}
@keyframes rsi-page-in {
 from{opacity:0;transform:translateY(5px)}
 to{opacity:1;transform:translateY(0)}
}
/* The new document is fully visible beneath the old snapshot. Only the old
   snapshot fades away: two simultaneous fade-to/from-transparent layers caused
   the pale blank flash in the previous version. */
::view-transition-old(root){animation:175ms ease-out both rsi-page-out;z-index:1}
::view-transition-new(root){animation:none;opacity:1}
/* The navigation chrome stays visually stable; only its active item changes. */
::view-transition-old(rsi-navigation-sidebar),
::view-transition-new(rsi-navigation-sidebar),
::view-transition-old(rsi-navigation-topbar),
::view-transition-new(rsi-navigation-topbar){animation-duration:120ms;animation-timing-function:ease-in-out}
@media(prefers-reduced-motion:reduce){
 body[data-rsi-page].rsi-soft-pending .topbar:after{animation:none;transform:none;width:100%}
 ::view-transition-old(root),::view-transition-new(root),
 ::view-transition-old(rsi-navigation-sidebar),::view-transition-new(rsi-navigation-sidebar),
 ::view-transition-old(rsi-navigation-topbar),::view-transition-new(rsi-navigation-topbar){
  animation-duration:.01ms!important;animation-delay:0ms!important
 }
}
