/* System fonts only: no font, script or image requests leave this site. */
:root {
  --paper: #faf8f2;
  --ink: #000e2f;
  --muted: #47526a;
  --teal: #0f6066;
  --teal-on-navy: #9fdcd5;
  --rule: #d5d8d6;
  --serif: "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", "P052", Georgia, "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", SimSun, serif;
  --sans: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--serif); font-size: 18px; line-height: 1.6; }
h1, h2, h3, p, ul { margin: 0; }
a { color: var(--teal); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 1px; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 2; padding: 8px 14px; background: var(--ink); color: var(--paper); font-family: var(--sans); font-size: 15px; }
.skip:focus { top: 12px; color: var(--paper); }

.layout { display: grid; grid-template-columns: 296px minmax(0, 1fr); }
.content { min-width: 0; }

/* Sidebar: stays in view on larger screens, and scrolls itself on short ones */
.sidebar { position: sticky; top: 0; align-self: start; display: flex; flex-direction: column; height: 100vh; overflow-y: auto; padding: 24px 28px 20px; border-right: 1px solid var(--rule); }
.portrait { display: block; width: 120px; height: auto; }
.sidebar h1, .site-name { margin-top: 14px; font-size: 36px; font-weight: 400; line-height: 1.1; letter-spacing: -.01em; }
.site-name a { color: inherit; text-decoration: none; }
.site-name a:hover { text-decoration: underline; }
.name-zh { display: block; margin-top: 6px; color: var(--muted); font-size: 18px; letter-spacing: 0; line-height: 1.3; }
.role { margin-top: 10px; font-size: 16px; line-height: 1.4; }
.market { margin-top: 12px; font-size: 15px; font-weight: 700; line-height: 1.4; }
.actions { display: grid; gap: 8px; margin-top: 12px; font-family: var(--sans); font-size: 14px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 7px 12px; border: 1px solid var(--ink); border-radius: 2px; color: var(--ink); font-weight: 600; text-decoration: none; }
.button:hover { background: #fff; }
.button.primary { background: var(--ink); color: var(--paper); }
.button.primary:hover { background: #17305f; border-color: #17305f; }
.email { overflow-wrap: anywhere; }
.site-nav { display: grid; margin-top: 14px; padding-top: 8px; border-top: 1px solid var(--rule); font-family: var(--sans); font-size: 15px; }
.site-nav a { display: flex; align-items: center; min-height: 30px; color: var(--ink); text-decoration: none; }
.site-nav a:hover { color: var(--teal); text-decoration: underline; }
.site-nav a[aria-current] { font-weight: 600; }

/* The question: the one loud element on the page */
.question { background: var(--ink); color: var(--paper); padding: 32px 52px 28px; }
.question blockquote { margin: 0; max-width: 24em; font-size: clamp(26px, 2.9vw, 38px); line-height: 1.18; letter-spacing: -.01em; }
.question p { margin-top: 14px; max-width: 60em; font-family: var(--sans); font-size: 16px; line-height: 1.6; }
.question a { color: var(--teal-on-navy); }
.question a:focus-visible { outline-color: var(--teal-on-navy); }
.paper-heading { max-width: 22em; font-size: clamp(28px, 3.2vw, 42px); font-weight: 400; line-height: 1.18; letter-spacing: -.01em; }
.question .button { color: var(--ink); background: var(--paper); border-color: var(--paper); }
.question .button:hover { background: #fff; }
.question .button:focus-visible { outline-color: var(--teal-on-navy); }
.paper-actions { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-top: 18px; font-family: var(--sans); font-size: 15px; }

/* Sections */
main { padding-inline: 52px; }
.section { max-width: 720px; padding-block: 24px; border-top: 1px solid var(--rule); }
.section:first-child { border-top: 0; }
.section > h2 { margin-bottom: 12px; font-size: 28px; font-weight: 400; line-height: 1.25; }
.committee { color: var(--muted); font-family: var(--sans); font-size: 15px; line-height: 1.5; }
.section-body > .lists { margin-top: 32px; }
.section-body > * + * { margin-top: 18px; }
.group + .group { margin-top: 44px; }
h3 { color: var(--muted); font-family: var(--sans); font-size: 16px; font-weight: 600; line-height: 1.4; }
.lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.plain { padding: 0; list-style: none; }
.plain li { margin-top: 8px; line-height: 1.45; }

/* Papers */
.paper { margin-top: 24px; }
.paper-title { font-size: 21px; line-height: 1.32; }
.paper p { margin-top: 6px; }
.byline { color: var(--muted); font-size: 17px; line-height: 1.5; }
.jmp { padding: 14px 0 0; border-top: 3px solid var(--ink); margin-top: 10px; }
.jmp .paper-title { font-size: 26px; line-height: 1.25; }
.jmp .abstract { margin-top: 14px; }
#research .group + .group { margin-top: 28px; }
#research .paper { margin-top: 14px; }
#research .paper p { margin-top: 3px; }
#research .jmp .abstract { margin-top: 10px; }
.abstract-fold { margin-top: 3px; }
.abstract-fold summary { width: fit-content; color: var(--teal); cursor: pointer; font-family: var(--sans); font-size: 14px; font-weight: 600; line-height: 1.5; }
.abstract-fold summary:hover { text-decoration: underline; text-underline-offset: .18em; }
.abstract-fold summary:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 1px; }
#research .abstract-fold p { margin: 6px 0 4px; padding-left: 14px; border-left: 2px solid var(--rule); font-size: 16px; line-height: 1.5; }
@media (pointer: coarse) { .abstract-fold summary { padding-block: 10px; } }

/* Paper page */
.findings { padding: 0; list-style: none; }
.findings li + li { margin-top: 18px; }
.findings strong { display: block; font-weight: 700; }
.limits { padding-left: 1.2em; }
.limits li + li { margin-top: 10px; }
.citation { padding-left: 16px; border-left: 3px solid var(--rule); }

/* Paper page figure: bars are drawn on a track that stands for all of a firm's open-source code */
.share-figure { margin: 24px 0 0; }
.share-figure figcaption { font-family: var(--sans); font-size: 14px; line-height: 1.5; color: var(--muted); }
.share-figure .figure-title { margin-bottom: 14px; font-family: var(--sans); font-size: 16px; font-weight: 600; line-height: 1.5; }
.bars { margin: 0 0 14px; padding: 0; list-style: none; font-family: var(--sans); font-size: 15px; }
.bars li + li { margin-top: 14px; }
.bar-label { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 4px; }
.bar-value { font-size: 22px; font-weight: 600; line-height: 1.2; }
.bar-track { height: 18px; background: #e7e8e4; border-radius: 0 4px 4px 0; }
.bar-fill { display: block; height: 100%; border-radius: 0 4px 4px 0; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.bar-fill.observed { background: var(--ink); }
.bar-fill.benchmark { background: #66758c; }

/* Footer */
.site-footer { padding: 24px 52px 40px; border-top: 1px solid var(--rule); color: var(--muted); font-family: var(--sans); font-size: 14px; }

/* Chinese pages: Windows has no good serif for Chinese (it falls back to thin SimSun), so Chinese display text is sans.
   Palatino stays for English titles and the English abstract. */
html[lang="zh-Hans"] body { font-family: var(--sans); font-size: 17px; line-height: 1.75; }
html[lang="zh-Hans"] .sidebar h1, html[lang="zh-Hans"] .site-name { font-weight: 600; letter-spacing: .04em; }
html[lang="zh-Hans"] .name-zh { font-family: var(--serif); font-weight: 400; letter-spacing: 0; }
html[lang="zh-Hans"] .question blockquote { max-width: 26em; font-size: clamp(24px, 2.5vw, 32px); line-height: 1.45; letter-spacing: 0; }
html[lang="zh-Hans"] .section > h2 { font-size: 23px; font-weight: 600; }
html[lang="zh-Hans"] .paper-title { font-size: 18px; font-weight: 600; line-height: 1.5; }
html[lang="zh-Hans"] .paper-title[lang="en"], html[lang="zh-Hans"] .paper-heading { font-family: var(--serif); font-weight: 400; }
html[lang="zh-Hans"] .paper-title[lang="en"] { font-size: 20px; line-height: 1.32; }
html[lang="zh-Hans"] .jmp .paper-title[lang="en"] { font-size: 26px; line-height: 1.25; }
html[lang="zh-Hans"] .byline { font-size: 15px; line-height: 1.65; }
html[lang="zh-Hans"] .abstract[lang="en"] { font-family: var(--serif); font-size: 18px; line-height: 1.6; }

/* Below this width the sidebar becomes the top of the page */
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; overflow: visible; padding: 8px 24px 36px; border-right: 0; }
  .site-nav { order: -1; display: flex; flex-wrap: wrap; gap: 0 16px; margin: 0 0 14px; padding-top: 0; border-top: 0; font-size: 14px; }
  .site-nav a { min-height: 44px; }
  .sidebar h1, .site-name { font-size: 44px; }
  .role { font-size: 18px; }
  .market { font-size: 17px; }
  .button { min-height: 46px; }
  .question { padding: 40px 24px 36px; }
  main { padding-inline: 24px; }
  .section { padding-block: 32px; }
  .site-footer { padding-inline: 24px; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .sidebar { padding-inline: 16px; }
  .portrait { width: 112px; }
  .question { padding-inline: 16px; }
  main { padding-inline: 16px; }
  .lists { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .jmp .paper-title { font-size: 25px; }
  .site-footer { padding-inline: 16px; }
}
@media print {
  body { background: #fff; font-size: 11pt; }
  .layout { display: block; }
  .sidebar { position: static; height: auto; overflow: visible; padding: 0 0 12pt; border: 0; }
  .site-nav, .actions, .skip, .paper-actions .button { display: none; }
  .question { background: none; color: #000; padding: 12pt 0; }
  .question a { color: #000; }
  main, .site-footer { padding-inline: 0; }
  .section { max-width: none; padding-block: 16pt; break-inside: avoid-page; }
  .abstract-fold::details-content { display: block; content-visibility: visible; }
}
