/* Shared ShowPapers chrome. The homepage and reading pages use the same grid and controls. */
:root{--header-height:88px;--chrome-ink:#233342;--chrome-muted:#63727e;--chrome-paper:#f7f9fa;--chrome-card:#fff;--chrome-line:#e1e7ea;--chrome-accent:#007976;--chrome-soft:#e5f3ef;--chrome-shadow:#23334218}
html[data-theme=dark]{--chrome-ink:#e6edf3;--chrome-muted:#a8b7c4;--chrome-paper:#131d25;--chrome-card:#1d2934;--chrome-line:#33434f;--chrome-accent:#7bd7c2;--chrome-soft:#243f3d;--chrome-shadow:#00000030}
.container{box-sizing:border-box;width:min(100%,1392px);padding-inline:56px;margin-inline:auto}
.site-header,.site-foot{font-family:Manrope,system-ui,sans-serif;color:var(--chrome-ink);background:var(--chrome-paper)}
.site-header{--nav-gutter:15vw;border-bottom:1px solid var(--chrome-line)}
/* Apply theme foregrounds and surfaces together, including on the homepage. */
:root.theme-changing *,:root.theme-changing *::before,:root.theme-changing *::after{transition:none!important}
/* An animated underline and a menu joined directly to the shared header. */
:root{--sticky-download-height:77px}
html{scroll-padding-top:calc(var(--sticky-download-height) + 20px)}
.site-header{position:sticky;top:0;z-index:60}
.site-nav{min-height:76px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 24px;padding-block:12px}
.site-header .site-nav{width:100%;padding-inline:var(--nav-gutter)}
.site-header .brand{display:flex;align-items:center;gap:11px;min-width:44px;min-height:44px;color:var(--chrome-ink);font-size:22px;font-weight:700;letter-spacing:-.04em;line-height:1.1;white-space:nowrap;text-decoration:none}
.site-header .brand img{display:block;flex:none;width:31px;height:31px;filter:none}
/* Suppress the browser's tap flash without changing keyboard focus styling. */
.site-header .brand{-webkit-tap-highlight-color:transparent}
.site-header .nav-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px 18px;width:auto;min-width:0;margin-left:auto}
.site-header a.nav-download{box-sizing:border-box;position:relative;display:flex;align-items:center;justify-content:center;flex:none;min-height:44px;padding:10px 0;border:0;border-radius:0;background:transparent;color:var(--chrome-ink);font-size:14px;font-weight:750;line-height:1.5;text-decoration:none;white-space:nowrap;transform:none}
.site-header a.nav-download::before,.site-header a.nav-download::after{content:"";position:absolute;bottom:6px;right:0;width:55%;height:1px;background:currentColor;pointer-events:none}
.site-header a.nav-download::before{height:2px;opacity:.85}
.site-header a.nav-download::after{height:2px;opacity:0;transform:scaleX(0);transform-origin:left center}
.site-header a.nav-download:is(:hover,:focus-visible)::after{background:var(--chrome-accent);animation:download-underline 200ms cubic-bezier(.16,1,.3,1) both}
@keyframes download-underline{from{opacity:1;transform:scaleX(0)}to{opacity:1;transform:scaleX(1)}}
html.page-hidden .nav-download::after{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){.site-header a.nav-download::after{animation:none!important;opacity:0}}
.site-header .nav-controls{display:flex;align-items:center;gap:4px}
.site-header .menu-toggle{display:grid;place-items:center;flex:none;width:44px;height:44px;min-height:44px;padding:12px;border:0;border-radius:9px;cursor:pointer;color:var(--chrome-ink);background:transparent}
.site-header .menu-toggle:hover{background:transparent;color:var(--chrome-accent)}
.chrome-icon{display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.site-header .menu-toggle{background:transparent;color:var(--chrome-ink);border-radius:0}
.site-header .menu-toggle .chrome-icon{width:24px;height:24px}
.menu-line{transition:transform 240ms cubic-bezier(.16,1,.3,1);stroke-width:1.65}
.menu-line-top{transform-origin:12px 8px}
.menu-line-bottom{transform-origin:12px 16px;transform:translateX(3.5px) scaleX(.61)}
.menu-toggle[aria-expanded=true] .menu-line-top{transform:translateY(4px) rotate(45deg)}
.menu-toggle[aria-expanded=true] .menu-line-bottom{transform:translateY(-4px) rotate(-45deg)}
.site-header :focus-visible,.site-foot :focus-visible{outline:2px solid var(--chrome-accent);outline-offset:4px}
.site-menu{box-sizing:border-box;position:fixed;top:var(--menu-top,77px);inset-inline:0;z-index:70;width:100%;max-height:calc(100dvh - var(--menu-top,77px));overflow:auto;overscroll-behavior:contain;background:var(--chrome-paper);border:0;border-bottom:1px solid var(--chrome-line);border-radius:0;box-shadow:none}
.site-menu[hidden]{display:none}
.menu-links{display:flex;flex-direction:column;padding-block:12px}
.site-menu a{box-sizing:border-box;display:flex;align-items:center;justify-content:center;text-align:center;min-height:44px;padding:9px 0;color:var(--chrome-ink);font-size:16px;font-weight:500;line-height:1.5;letter-spacing:-.01em;text-decoration:none;overflow-wrap:anywhere}
.site-menu:not([hidden]) .menu-links a{animation:menu-item-in 220ms cubic-bezier(.16,1,.3,1) both}
.site-menu:not([hidden]) .menu-links a:nth-child(2){animation-delay:24ms}
.site-menu:not([hidden]) .menu-links a:nth-child(3){animation-delay:48ms}
.site-menu:not([hidden]) .menu-links a:nth-child(4){animation-delay:72ms}
.site-menu:not([hidden]) .menu-links a:nth-child(5){animation-delay:96ms}
.site-menu:not([hidden]) .menu-links a:nth-child(6){animation-delay:120ms}
@keyframes menu-item-in{from{opacity:0;transform:translateX(14px)}to{opacity:1;transform:translateX(0)}}
@media(prefers-reduced-motion:reduce){.site-menu:not([hidden]) .menu-links a{animation:none}}
.site-menu a:hover,.site-menu a[aria-current=page]{color:var(--chrome-accent);text-decoration:underline;text-underline-offset:6px;text-decoration-thickness:1px}
.site-menu a[aria-current=page]{font-weight:650}
.site-menu :focus-visible{outline-offset:3px;border-radius:2px}
.site-foot{border-top:1px solid var(--chrome-line)}
.site-foot .footer-grid{display:grid;grid-template-columns:1.45fr repeat(4,minmax(0,1fr));padding-top:54px;padding-bottom:40px;gap:32px}
.site-foot .footer-brand{display:block;width:fit-content;font-size:21px;font-weight:700;letter-spacing:-.04em;line-height:1.4;text-decoration:none;color:var(--chrome-ink)}
.site-foot .footer-intro p{margin:18px 0 0;font-size:14px;line-height:1.7;color:var(--chrome-muted)}
.site-foot .language-choices{display:flex;gap:18px;margin-top:16px;align-items:center}
.site-foot .language-choices a,.site-foot .language-choices span{display:flex;align-items:center;min-height:44px;padding:4px 0;font-size:13px;line-height:1.5;text-decoration:none;color:var(--chrome-muted)}
.site-foot .language-choices [aria-current=true]{color:var(--chrome-ink);font-weight:650;text-decoration:underline;text-underline-offset:5px}
.site-foot .language-choices a:hover{color:var(--chrome-accent)}
.site-foot .footer-theme{display:flex;width:auto;height:auto;align-items:center;gap:8px;min-height:44px;padding:6px 0;border:0;background:transparent;color:var(--chrome-muted);font:inherit;font-size:13px;line-height:1.5;cursor:pointer}
.site-foot .footer-theme .chrome-icon{width:16px;height:16px}
.site-foot .footer-theme:hover{color:var(--chrome-accent)}
.site-foot .footer-group h3{font-size:14px;font-weight:650;line-height:1.5;letter-spacing:0;margin:0 0 12px;color:var(--chrome-ink)}
.site-foot .footer-group a{display:block;width:fit-content;max-width:100%;font-size:13px;line-height:1.6;padding:7px 0;color:var(--chrome-muted);text-decoration:none}
.site-foot .footer-group a:hover{color:var(--chrome-accent);text-decoration:underline;text-underline-offset:.24em}
.site-foot .footer-bottom{display:flex;justify-content:space-between;align-items:center;gap:20px;border-top:1px solid var(--chrome-line);padding-top:18px;padding-bottom:25px}
.site-foot .footer-bottom p{margin:0;font-size:12px;line-height:1.6;color:var(--chrome-muted)}
.site-foot .analytics-settings{font-family:inherit;font-size:12px;line-height:1.6;min-height:44px;padding:8px 0;border:0;background:transparent;color:var(--chrome-muted);cursor:pointer}
.site-foot .analytics-settings:hover{color:var(--chrome-accent)}
.analytics-settings[hidden],.analytics-banner[hidden]{display:none!important}
/* Original production consent surface and actions, retained across every page. */
.analytics-banner{box-sizing:border-box;position:fixed;z-index:500;bottom:16px;left:16px;width:min(calc(100% - 32px),400px);max-height:45vh;overflow:auto;padding:16px;border:1px solid var(--chrome-line);border-radius:18px;background:var(--chrome-card);box-shadow:0 3px 16px var(--chrome-shadow);font-family:Manrope,system-ui,sans-serif;color:var(--chrome-ink)}
.analytics-banner strong{font-size:14px;font-weight:700;line-height:1.6}
.analytics-banner p{font-size:14px;line-height:1.6;margin:3px 0 0;color:var(--chrome-muted)}
.analytics-banner a{color:var(--chrome-accent);text-underline-offset:.24em}
.analytics-banner .analytics-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}
.analytics-banner .analytics-actions button{display:flex;align-items:center;justify-content:center;min-height:48px;padding:10px 14px;font-family:inherit;font-size:14px;line-height:1.5;border:1px solid var(--chrome-line);border-radius:18px;color:var(--chrome-ink);background:var(--chrome-soft);cursor:pointer}
.analytics-banner .analytics-actions button:hover{background:color-mix(in srgb,var(--chrome-accent) 10%,var(--chrome-soft))}
.analytics-banner :focus-visible{outline:2px solid var(--chrome-accent);outline-offset:3px}
@media(max-width:1100px){.container{padding-inline:36px}.site-foot .footer-grid{grid-template-columns:1.4fr 1fr 1fr}.site-foot .footer-intro{grid-row:1/3}}
@media(max-width:760px){
 :root{--header-height:65px;--sticky-download-height:65px}
 .container{padding-inline:24px}
 .site-header .site-nav{padding-inline:24px}
 .site-nav{min-height:64px;padding-block:10px;gap:8px}
 .site-header .brand{justify-content:flex-start;font-size:18px;gap:8px}
 .site-header .brand span{display:inline}
 .site-header .brand img{width:27px;height:27px}
 .site-header .nav-actions{flex:1;gap:8px 16px}
 .site-header a.nav-download{font-size:14px}
 .site-header .nav-controls{gap:0;margin-inline-end:-8px}
 .site-menu{width:100vw;max-width:none}
 .site-menu a{justify-content:flex-end;text-align:right}
 .site-foot .footer-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 24px;padding-top:40px;padding-bottom:30px}
 .site-foot .footer-intro{grid-column:1/-1;grid-row:auto}.site-foot .footer-intro p{margin-top:14px}
 .site-foot .footer-bottom{align-items:flex-start;flex-direction:column;gap:7px;padding-top:18px;padding-bottom:25px}.site-foot .analytics-settings{padding:6px 0}
}
@media(max-width:420px){.container{padding-inline:22px}.site-header .site-nav{padding-inline:22px}.menu-links{padding-inline:22px}.site-foot .footer-bottom p{font-size:11px}}
@media(max-width:360px){.site-header .site-nav{padding-inline:16px}.menu-links{padding-inline:16px}}
@media(prefers-reduced-motion:reduce){.site-header *,.site-foot *{transition:none!important}}
.site-foot{padding:0}
/* The focused skip link uses the same contrast-safe palette as shared controls. */
.skip{top:0;max-width:calc(100% - 32px);transform:translateY(calc(-100% - 1rem));background:var(--chrome-card);color:var(--chrome-ink)}
.skip:focus{top:1rem;transform:none}
