:root{
  --bg:#ffffff;
  --text:#24292f;
  --muted:#57606a;
  --line:#d0d7de;
  --soft:#f6f8fa;
  --link:#0969da;
  --econometrics:#c97f9b;
  --structural:#9f83b7;
  --micro:#c8a25e;
  --macro:#6f91bd;
  --measurement:#6fa39c;
  --institutions:#8f7284;
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;
  font-size:16px;
  line-height:1.6;
}

a{
  color:var(--link);
  text-decoration:none;
}

a:hover{text-decoration:underline}

.container{
  width:min(920px,calc(100% - 40px));
  margin:0 auto;
}

.narrow{width:min(760px,calc(100% - 40px))}

.site-header{
  border-bottom:1px solid var(--line);
  background:#fff;
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;
  padding:24px 0;
}

.identity{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.header-avatar{
  width:62px;
  height:62px;
  flex:none;
  object-fit:contain;
  background:#fff;
}

.identity-text{min-width:0}

.name{
  color:var(--text);
  font-family:Georgia,"Times New Roman",serif;
  font-size:1.55rem;
  font-weight:600;
}

.name:hover{text-decoration:none}

.affiliation{
  margin-top:2px;
  color:var(--muted);
  font-size:.92rem;
}


nav{
  display:flex;
  flex-wrap:nowrap;
  gap:20px;
}

nav a{
  color:var(--text);
  font-size:.93rem;
}

.intro{
  padding:72px 0 58px;
  border-bottom:1px solid var(--line);
}

.intro-line{
  margin:0 0 18px;
  color:var(--muted);
  font-size:.92rem;
}

.intro h1{
  max-width:760px;
  margin:0 0 24px;
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(2.25rem,5vw,4.2rem);
  font-weight:500;
  line-height:1.08;
  letter-spacing:-.035em;
}

.intro-question{
  max-width:720px;
  margin:.25rem 0;
  color:#3f4650;
  font-size:1.08rem;
}

.section{
  padding:60px 0;
  border-bottom:1px solid var(--line);
}

.section h2{
  margin:0;
  font-family:Georgia,"Times New Roman",serif;
  font-size:1.7rem;
  font-weight:600;
}

.featured-section{
  padding:44px 0 46px;
  border-bottom:1px solid var(--line);
}

.featured-heading{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  margin-bottom:14px;
}

.featured-heading h2{
  margin:0;
  font-family:Georgia,"Times New Roman",serif;
  font-size:1.55rem;
  font-weight:600;
}

.eyebrow{
  margin:0 0 3px;
  color:var(--muted);
  font-size:.72rem;
  font-weight:600;
  letter-spacing:.02em;
}

.featured-count{
  color:var(--muted);
  font-size:.75rem;
}

.research-date-note{
  margin:-3px 0 16px;
  color:var(--muted);
  font-size:.82rem;
  line-height:1.45;
}

.featured-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.featured-card{
  min-width:0;
  display:flex;
  flex-direction:column;
  padding:16px;
  border:1px solid var(--line);
  border-radius:6px;
  background:#fff;
}

.featured-card:hover{border-color:#8c959f}

.featured-title-row{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}

.repo-mark{
  width:13px;
  height:15px;
  flex:none;
  position:relative;
  border:1.35px solid #57606a;
  border-radius:2px;
}

.repo-mark::after{
  content:"";
  position:absolute;
  right:2px;
  bottom:3px;
  left:2px;
  border-top:1px solid #8c959f;
}

.featured-title{
  min-width:0;
  overflow:hidden;
  color:var(--link);
  font-size:.98rem;
  font-weight:600;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.featured-subtitle{
  margin:4px 0 0 21px;
  overflow:hidden;
  color:var(--muted);
  font-size:.76rem;
  line-height:1.35;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.featured-summary{
  display:-webkit-box;
  margin:12px 0 14px;
  overflow:hidden;
  color:#3f4650;
  font-size:.84rem;
  line-height:1.48;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
}

.featured-mini-bar,
.language-bar{
  display:flex;
  width:100%;
  overflow:hidden;
  border-radius:999px;
  background:var(--soft);
}

.featured-mini-bar{
  height:4px;
  margin-top:auto;
  box-shadow:inset 0 0 0 1px rgba(27,31,36,.04);
}

.language-bar{
  height:9px;
  box-shadow:inset 0 0 0 1px rgba(27,31,36,.06);
}

.seg{
  min-width:0;
  height:100%;
  box-shadow:inset -1px 0 0 rgba(255,255,255,.9);
}

.seg:last-child{box-shadow:none}

.econometrics{background:var(--econometrics)}
.structural{background:var(--structural)}
.micro{background:var(--micro)}
.macro{background:var(--macro)}
.measurement{background:var(--measurement)}
.institutions{background:var(--institutions)}

.featured-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:9px;
  color:var(--muted);
  font-size:.73rem;
}

.featured-field{
  display:inline-flex;
  align-items:center;
  min-width:0;
  white-space:nowrap;
}

.featured-links,
.paper-links{
  display:flex;
  flex:none;
}

.featured-links{
  gap:10px;
  font-size:.78rem;
}

.featured-links a,
.paper-links a{font-weight:500}

.research-toolbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:28px;
  margin-bottom:14px;
}

.research-heading-block{
  min-width:0;
  flex:1 1 auto;
}

.mix-key{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:5px 11px;
  margin-top:8px;
  color:var(--muted);
  font-size:.75rem;
  line-height:1.35;
}

.mix-key span,
.paper-mix-values span{
  display:inline-flex;
  align-items:center;
  white-space:nowrap;
}

.mix-key i{margin-right:4px}

.sort-control{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  flex:none;
  margin-top:4px;
  color:var(--muted);
  font-size:.78rem;
  white-space:nowrap;
}

.sort-control select{
  max-width:100%;
  padding:3px 24px 3px 7px;
  border:1px solid var(--line);
  border-radius:6px;
  background:#fff;
  color:var(--text);
  font:inherit;
}

.paper-list{border-top:1px solid var(--line)}

.paper-item{
  padding:30px 0 28px;
  border-bottom:1px solid var(--line);
}

.paper-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
}

.paper-heading h3{
  margin:0;
  font-family:Georgia,"Times New Roman",serif;
  font-size:1.35rem;
  font-weight:600;
  line-height:1.25;
}

.subtitle{
  margin:4px 0 0;
  color:var(--muted);
  font-size:.94rem;
}

.paper-year{
  flex:none;
  padding-top:2px;
  color:var(--muted);
  font-size:.9rem;
}

.paper-question{
  max-width:760px;
  margin:16px 0 8px;
  color:#3f4650;
}

.paper-summary{
  max-width:820px;
  margin:0 0 20px;
  color:var(--muted);
  font-size:.93rem;
  line-height:1.62;
}

.paper-meta-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:start;
  gap:10px 18px;
  margin-top:12px;
}

.paper-mix-values{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:5px 12px;
  color:var(--muted);
  font-size:.75rem;
}

.paper-links{
  gap:14px;
  justify-content:flex-end;
  white-space:nowrap;
  font-size:.88rem;
}

.mix-key i,
.paper-mix-values i,
.featured-field i{
  width:9px;
  height:9px;
  display:inline-block;
  flex:none;
  border-radius:50%;
  box-shadow:0 0 0 1px rgba(36,41,47,.08);
}

.paper-mix-values i,
.featured-field i{margin-right:6px}

.c-econometrics{background:var(--econometrics)}
.c-structural{background:var(--structural)}
.c-micro{background:var(--micro)}
.c-macro{background:var(--macro)}
.c-measurement{background:var(--measurement)}
.c-institutions{background:var(--institutions)}

.note{
  margin:14px 0 0;
  color:var(--muted);
  font-size:.78rem;
}

.about-heading{
  max-width:720px;
  margin:22px 0 14px;
  font-family:Georgia,"Times New Roman",serif;
  font-size:1.45rem;
  font-weight:600;
  line-height:1.35;
}

#about p{
  max-width:720px;
  color:#3f4650;
}

#contact p{margin:18px 0 0}

.contact-links{
  display:flex;
  flex-wrap:wrap;
  gap:16px;
  margin-top:10px;
}

.site-footer{
  padding:28px 0 38px;
  color:var(--muted);
  font-size:.82rem;
}

.site-footer .container{
  display:flex;
  justify-content:space-between;
  gap:20px;
}

.footer-meta{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:1px;
}

@media (max-width:760px){
  .featured-grid{grid-template-columns:1fr}

  .featured-card{padding:14px 15px}

  .featured-summary{
    margin:10px 0 12px;
    font-size:.82rem;
    line-height:1.44;
    -webkit-line-clamp:2;
  }

  .featured-subtitle{font-size:.74rem}

  .header-inner{gap:18px}

  .research-toolbar{gap:16px}

  .sort-control{
    margin-top:2px;
    margin-left:auto;
  }

  nav{gap:14px}

  .intro{padding:54px 0 44px}

  .section{padding:48px 0}
}

@media (max-width:620px){
  .header-inner{
    display:grid;
    grid-template-columns:58px minmax(0,1fr);
    align-items:start;
    column-gap:12px;
    row-gap:8px;
  }

  .identity{display:contents}

  .header-avatar{
    grid-column:1;
    grid-row:1 / span 2;
    width:58px;
    height:58px;
  }

  .identity-text{
    grid-column:2;
    grid-row:1;
  }

  .name{font-size:1.35rem}

  .affiliation{font-size:.84rem}

  .header-inner nav{
    grid-column:2;
    grid-row:2;
    gap:12px;
  }

  .header-inner nav a{font-size:.84rem}
}

@media (max-width:520px){
  .featured-section{padding:34px 0 38px}

  .featured-heading{
    align-items:flex-start;
    flex-direction:column;
    gap:3px;
    margin-bottom:12px;
  }

  .featured-footer{margin-top:8px}

  .featured-field{font-size:.71rem}

  .featured-links{font-size:.76rem}

  .container,
  .narrow{
    width:min(100% - 28px,920px);
  }

  .header-inner{padding:18px 0}

  .research-toolbar{gap:10px}

  .research-heading-block h2{
    font-size:1.5rem;
    line-height:1.15;
  }

  .mix-key{
    margin-top:7px;
    gap:4px 8px;
    font-size:.71rem;
  }

  .sort-control{
    gap:4px;
    font-size:.72rem;
  }

  .sort-control select{padding:3px 20px 3px 6px}

  .paper-heading h3{font-size:1.22rem}

  .paper-meta-row{gap:8px 10px}

  .paper-mix-values{
    gap:4px 9px;
    font-size:.71rem;
    line-height:1.35;
  }

  .paper-links{font-size:.82rem}

  .site-footer .container{
    flex-direction:column;
    gap:3px;
  }

  .footer-meta{
    align-items:flex-start;
  }
}



.paper-title-link{
  color:var(--text);
}

.paper-title-link:hover{
  color:var(--link);
  text-decoration:none;
}

.paper-page{
  min-height:68vh;
  padding:34px 0 64px;
}

.paper-repo-path{
  display:flex;
  align-items:center;
  gap:7px;
  padding-bottom:16px;
  border-bottom:1px solid var(--line);
  color:var(--muted);
  font-size:.9rem;
}

.paper-repo-path a{
  font-weight:600;
}

.repo-slash{
  color:#8c959f;
}

.paper-status-pill{
  margin-left:4px;
  padding:1px 7px;
  border:1px solid var(--line);
  border-radius:999px;
  color:var(--muted);
  font-size:.7rem;
  font-weight:500;
}

.paper-detail-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 252px;
  gap:32px;
  padding-top:24px;
}

.paper-detail-main{
  min-width:0;
}

.paper-detail-header{
  padding-bottom:24px;
}

.paper-detail-header h1{
  margin:0;
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(2rem,4.8vw,3.35rem);
  font-weight:500;
  line-height:1.08;
  letter-spacing:-.028em;
}

.paper-detail-subtitle{
  margin:8px 0 0;
  color:#3f4650;
  font-family:Georgia,"Times New Roman",serif;
  font-size:1.22rem;
  line-height:1.35;
}

.paper-detail-byline{
  display:flex;
  flex-wrap:wrap;
  gap:7px 16px;
  margin-top:18px;
  color:var(--muted);
  font-size:.86rem;
}

.paper-detail-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:20px;
}

.paper-action{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:4px 11px;
  border:1px solid var(--line);
  border-radius:6px;
  background:#fff;
  color:var(--text);
  font-size:.82rem;
  font-weight:600;
}

.paper-action:hover{
  background:var(--soft);
  text-decoration:none;
}

.paper-action.primary{
  background:#004284;
  border-color:#004284;
  color:#fff;
}

.paper-action.primary:hover{
  background:#00366d;
  border-color:#00366d;
}

.paper-file-panel,
.paper-readme{
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:6px;
  background:#fff;
}

.paper-file-panel{
  margin-bottom:20px;
}

.paper-file-panel-head,
.paper-readme-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:42px;
  padding:8px 14px;
  border-bottom:1px solid var(--line);
  background:var(--soft);
  color:var(--muted);
  font-size:.78rem;
}

.paper-file-panel-head span:first-child{
  color:var(--text);
  font-weight:600;
}

.paper-file-row{
  display:grid;
  grid-template-columns:18px minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border-bottom:1px solid var(--line);
  color:var(--text);
  font-size:.82rem;
}

.paper-file-row:last-child{
  border-bottom:0;
}

.paper-file-row:hover{
  background:#f6f8fa;
  text-decoration:none;
}

.file-icon,
.readme-icon{
  position:relative;
  display:inline-block;
  width:12px;
  height:15px;
  flex:none;
  border:1px solid #57606a;
  border-radius:2px;
}

.file-icon::after,
.readme-icon::after{
  content:"";
  position:absolute;
  left:2px;
  right:2px;
  top:5px;
  border-top:1px solid #8c959f;
  box-shadow:0 3px 0 #8c959f;
}

.file-name{
  color:var(--link);
  font-weight:600;
}

.file-detail{
  color:var(--muted);
  font-size:.76rem;
  white-space:nowrap;
}

.paper-readme-head{
  justify-content:flex-start;
  gap:8px;
  color:var(--text);
}

.readme-icon{
  width:13px;
  height:14px;
}

.paper-readme-body{
  padding:24px 26px 30px;
}

.paper-content-section + .paper-content-section{
  margin-top:30px;
  padding-top:26px;
  border-top:1px solid var(--line);
}

.paper-content-section h2{
  margin:0 0 12px;
  padding-bottom:7px;
  border-bottom:1px solid var(--line);
  font-family:Georgia,"Times New Roman",serif;
  font-size:1.35rem;
  font-weight:600;
}

.paper-content-section p{
  margin:0;
  color:#3f4650;
  line-height:1.72;
}

.paper-question-callout{
  padding-left:14px;
  border-left:3px solid var(--line);
  color:var(--text)!important;
  font-size:1.02rem;
}

.paper-detail-sidebar{
  min-width:0;
}

.sidebar-section{
  padding:0 0 20px;
  margin-bottom:20px;
  border-bottom:1px solid var(--line);
}

.sidebar-section:last-child{
  border-bottom:0;
}

.sidebar-section h2{
  margin:0 0 9px;
  font-size:.83rem;
  font-weight:600;
}

.sidebar-section p{
  margin:0;
  color:var(--muted);
  font-size:.78rem;
  line-height:1.55;
}

.sidebar-mix-bar{
  display:flex;
  width:100%;
  height:7px;
  overflow:hidden;
  margin:2px 0 10px;
  border-radius:999px;
  background:var(--soft);
}

.sidebar-mix-list{
  display:flex;
  flex-direction:column;
  gap:5px;
}

.sidebar-mix-list span{
  display:grid;
  grid-template-columns:9px minmax(0,1fr) auto;
  align-items:center;
  gap:6px;
  color:var(--muted);
  font-size:.72rem;
}

.sidebar-mix-list i{
  width:8px;
  height:8px;
  border-radius:50%;
}

.sidebar-mix-list b{
  color:var(--muted);
  font-weight:500;
}

.paper-metadata{
  margin:0;
}

.paper-metadata div{
  display:grid;
  grid-template-columns:66px minmax(0,1fr);
  gap:8px;
  padding:4px 0;
  font-size:.75rem;
}

.paper-metadata dt{
  color:var(--muted);
}

.paper-metadata dd{
  margin:0;
  color:#3f4650;
}

.topic-tags{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.topic-tags span{
  padding:2px 7px;
  border-radius:999px;
  background:#ddf4ff;
  color:#0969da;
  font-size:.69rem;
  line-height:1.45;
}

.draft-status p{
  color:#6e7781;
}

@media (max-width:760px){
  .paper-page{
    padding:24px 0 48px;
  }

  .paper-detail-grid{
    grid-template-columns:1fr;
    gap:24px;
  }

  .paper-detail-sidebar{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:0 22px;
    padding-top:4px;
    border-top:1px solid var(--line);
  }

  .sidebar-section{
    padding-top:18px;
  }
}

@media (max-width:520px){
  .paper-repo-path{
    flex-wrap:wrap;
    font-size:.8rem;
  }

  .paper-status-pill{
    margin-left:0;
  }

  .paper-detail-header h1{
    font-size:2rem;
  }

  .paper-detail-subtitle{
    font-size:1.08rem;
  }

  .paper-file-row{
    grid-template-columns:18px minmax(0,1fr);
  }

  .file-detail{
    grid-column:2;
    white-space:normal;
  }

  .paper-readme-body{
    padding:20px 18px 24px;
  }

  .paper-detail-sidebar{
    grid-template-columns:1fr;
  }

  .sidebar-section{
    margin-bottom:0;
  }
}


.paper-resource-panel{
  overflow:hidden;
  margin-bottom:20px;
  border:1px solid var(--line);
  border-radius:6px;
  background:#fff;
}

.paper-resource-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:42px;
  padding:8px 14px;
  border-bottom:1px solid var(--line);
  background:var(--soft);
  color:var(--muted);
  font-size:.78rem;
}

.paper-resource-panel-head span:first-child{
  color:var(--text);
  font-weight:600;
}

.paper-resource-row{
  display:grid;
  grid-template-columns:18px minmax(0,1fr) 16px;
  align-items:center;
  gap:9px;
  padding:10px 14px;
  border-bottom:1px solid var(--line);
  color:var(--text);
}

.paper-resource-row:last-child{
  border-bottom:0;
}

.paper-resource-row:hover{
  background:#f6f8fa;
  text-decoration:none;
}

.resource-icon{
  position:relative;
  display:inline-block;
  width:13px;
  height:13px;
  border:1px solid #57606a;
  border-radius:50%;
}

.resource-icon::before,
.resource-icon::after{
  content:"";
  position:absolute;
  left:5px;
  top:2px;
  width:1px;
  height:7px;
  background:#8c959f;
}

.resource-icon::after{
  transform:rotate(90deg);
}

.resource-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:1px;
}

.resource-copy strong{
  overflow:hidden;
  color:var(--link);
  font-size:.8rem;
  font-weight:600;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.resource-copy small{
  overflow:hidden;
  color:var(--muted);
  font-size:.7rem;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.external-mark{
  color:#8c959f;
  font-size:.78rem;
  text-align:right;
}


@media (max-width:520px){
  .resource-copy strong,
  .resource-copy small{
    white-space:normal;
  }
}



.comments-heading h2{
  margin:0;
}





.comment-heading h3{
  margin:0;
  font-family:Georgia,"Times New Roman",serif;
  font-size:1.2rem;
  font-weight:600;
  line-height:1.3;
}







.scope-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

.scope-grid>div{
  padding:14px;
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--soft);
}

.scope-grid h3{
  margin:0 0 6px;
  font-size:.8rem;
  font-weight:600;
}

.scope-grid p{
  font-size:.84rem;
  line-height:1.55;
}

@media (max-width:520px){
  .scope-grid{
    grid-template-columns:1fr;
  }
}

.comment-meta-row{
  margin-top:14px;
}

.resource-page{
  --resource-accent:#004284;
  padding:34px 0 64px;
}

.resource-breadcrumb{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:7px;
  margin-bottom:26px;
  color:var(--muted);
  font-size:.76rem;
}

.resource-breadcrumb a{
  color:var(--muted);
}

.resource-breadcrumb span{
  color:#afb8c1;
}

.resource-breadcrumb strong{
  color:var(--text);
  font-weight:600;
}

.resource-index-header{
  padding:0 0 16px;
}

.resource-index-header h1{
  margin:0;
  font-family:Georgia,"Times New Roman",serif;
  font-size:1.7rem;
  font-weight:600;
}

.resource-index-list{
  max-width:920px;
  border-top:1px solid var(--line);
}

.resource-index-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:24px;
  padding:26px 0;
  border-bottom:1px solid var(--line);
}

.resource-index-row h2{
  margin:0 0 6px;
  font-family:Georgia,"Times New Roman",serif;
  font-size:1.3rem;
  font-weight:600;
  line-height:1.3;
}

.resource-index-row p{
  max-width:760px;
  margin:0;
  color:var(--muted);
  font-size:.88rem;
  line-height:1.58;
}

.resource-chapter-count{
  padding-top:3px;
  color:var(--muted);
  font-size:.78rem;
  white-space:nowrap;
}

.resource-book-header,
.resource-chapter-header{
  max-width:840px;
  padding:18px 0 28px;
  border-bottom:1px solid var(--line);
}

.resource-book-header h1,
.resource-chapter-header h1{
  margin:0;
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(2rem,4vw,2.8rem);
  font-weight:500;
  line-height:1.12;
  letter-spacing:-.025em;
}

.resource-book-header>p,
.resource-chapter-header>p{
  max-width:790px;
  margin:16px 0 0;
  color:#3f4650;
  font-size:.98rem;
  line-height:1.68;
}

.book-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px 16px;
  margin-top:17px;
  color:var(--muted);
  font-size:.74rem;
}

.book-meta span{
  padding:0;
  border:0;
  background:transparent;
}

.resource-toc{
  max-width:900px;
  padding-top:30px;
}

.resource-part{
  margin-bottom:44px;
}

.resource-part-heading{
  margin-bottom:4px;
}

.resource-part-heading h2{
  margin:0;
  font-family:Georgia,"Times New Roman",serif;
  font-size:1.3rem;
  font-weight:600;
}

.resource-chapter-row{
  display:grid;
  grid-template-columns:72px minmax(0,1fr) 20px;
  gap:16px;
  padding:18px 0;
  border-top:1px solid var(--line);
}

.chapter-row-number{
  color:var(--resource-accent);
  font-size:.76rem;
  font-weight:700;
}

.chapter-row-copy h3{
  margin:0 0 6px;
  font-family:Georgia,"Times New Roman",serif;
  font-size:1.12rem;
  font-weight:600;
  line-height:1.32;
}

.chapter-row-copy p{
  margin:0;
  color:#3f4650;
  font-size:.84rem;
  line-height:1.55;
}

.chapter-topic-line{
  display:flex;
  flex-wrap:wrap;
  gap:4px 13px;
  margin:10px 0 0;
  padding:0;
  color:var(--muted);
  list-style:none;
}

.chapter-topic-line li{
  font-size:.71rem;
}

.chapter-row-arrow{
  align-self:center;
  color:var(--resource-accent);
  font-size:1rem;
}

.chapter-label{
  margin:0 0 8px;
  color:var(--muted);
  font-size:.74rem;
  font-weight:600;
}

.chapter-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 230px;
  gap:38px;
  align-items:start;
  padding-top:30px;
}

.chapter-section{
  padding:0 0 26px;
  scroll-margin-top:24px;
}

.chapter-section+.chapter-section{
  padding-top:26px;
  border-top:1px solid var(--line);
}

.chapter-section h2{
  margin:0 0 11px;
  font-family:Georgia,"Times New Roman",serif;
  font-size:1.3rem;
  font-weight:600;
}

.chapter-section p{
  margin:0;
  color:#30363d;
  line-height:1.7;
}

.chapter-section p+p{
  margin-top:13px;
}

.chapter-section h3{
  margin:24px 0 9px;
  font-family:Georgia,"Times New Roman",serif;
  font-size:1.05rem;
  font-weight:600;
  line-height:1.4;
}

.chapter-section ul,
.chapter-section ol:not(.chapter-topic-grid):not(.reference-list){
  margin:12px 0 0;
  padding-left:22px;
  color:#30363d;
  line-height:1.68;
}

.chapter-section li+li{
  margin-top:6px;
}

.chapter-lede{
  font-family:Georgia,"Times New Roman",serif;
  font-size:1.05rem;
  line-height:1.72;
}

.formal-block{
  margin:22px 0;
  padding:0;
  border:0;
  background:transparent;
}

.formal-block.definition{
  border:0;
  background:transparent;
}

.formal-block.warning{
  padding:16px 0;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  background:transparent;
}

.formal-label{
  display:block;
  margin-bottom:8px;
  color:var(--resource-accent);
  font-family:Georgia,"Times New Roman",serif;
  font-size:.9rem;
  font-weight:600;
  letter-spacing:0;
  text-transform:none;
}

.formal-block.definition .formal-label{
  color:var(--resource-accent);
}

.formal-block.warning .formal-label{
  color:var(--resource-accent);
}

.equation-block{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:18px;
  align-items:center;
  margin:16px 0;
  padding:8px 18px;
  border:0;
  background:transparent;
  color:#111820;
  font-size:1rem;
  line-height:1.5;
}

.equation-tex{
  min-width:0;
  overflow-x:auto;
  overflow-y:hidden;
  text-align:center;
  scrollbar-width:thin;
}

.equation-tex mjx-container[jax="CHTML"][display="true"]{
  width:max-content;
  min-width:100%;
  margin:.25rem 0!important;
  padding:.2rem 0;
  overflow:visible;
}

.math-inline mjx-container[jax="CHTML"]{
  margin:0 .025em;
}

.equation-number{
  color:var(--muted);
  font-family:var(--font-sans,Arial,sans-serif);
  font-size:.72rem;
}

.proof{
  margin:14px 0 0;
  padding-left:0;
  border-left:0;
}

.proof strong:first-child{
  font-family:Georgia,"Times New Roman",serif;
  font-style:italic;
  font-weight:600;
}

.chapter-table-wrap{
  margin:16px 0;
  overflow-x:auto;
}

.chapter-table{
  width:100%;
  border-collapse:collapse;
  font-variant-numeric:tabular-nums;
  font-size:.82rem;
}

.chapter-table th,
.chapter-table td{
  padding:9px 10px;
  border-bottom:1px solid var(--line);
  text-align:right;
  white-space:nowrap;
}

.chapter-table th:first-child,
.chapter-table td:first-child{
  text-align:left;
}

.chapter-table th{
  border-top:1px solid #8c959f;
  background:transparent;
  color:#30363d;
  font-weight:650;
}

.pseudocode{
  margin:16px 0;
  padding:4px 0 4px 16px;
  overflow-x:auto;
  border:0;
  border-left:1px solid #8c959f;
  border-radius:0;
  background:transparent;
  color:#30363d;
  font:400 .78rem/1.65 Consolas,"SFMono-Regular",monospace;
  white-space:pre;
}

.chapter-download{
  display:inline-block;
  margin-top:6px;
  font-size:.8rem;
  font-weight:650;
}

.exercise-list{
  counter-reset:chapter-exercise;
  margin:0;
  padding:0;
  list-style:none;
}

.exercise-list>li{
  counter-increment:chapter-exercise;
  padding:16px 0;
  border-top:1px solid var(--line);
}

.exercise-list>li::before{
  content:"Exercise " counter(chapter-exercise);
  display:block;
  margin-bottom:6px;
  color:var(--resource-accent);
  font-size:.72rem;
  font-weight:750;
  letter-spacing:.03em;
  text-transform:uppercase;
}

.solution-sketch{
  margin-top:10px;
  padding:6px 0 0 14px;
  border-left:1px solid var(--line);
  border-radius:0;
  background:transparent;
}

.solution-sketch summary{
  cursor:pointer;
  font-size:.78rem;
  font-weight:650;
}

.solution-sketch p{
  margin-top:9px;
  font-size:.86rem;
}

.reference-list{
  margin:0;
  padding-left:22px;
  color:#30363d;
}

.reference-list li{
  padding:5px 0;
  line-height:1.58;
}

.reference-list small{
  display:block;
  margin-top:3px;
  color:var(--muted);
  line-height:1.5;
}

.chapter-expanded .chapter-topic-grid{
  gap:0 24px;
}

.chapter-expanded .chapter-topic-grid li{
  min-height:auto;
  padding:10px 0;
  border:0;
  border-bottom:1px solid var(--line);
  border-radius:0;
  background:transparent;
}

.chapter-expanded .chapter-practice,
.chapter-expanded .chapter-checkpoint{
  padding:26px 0;
  border-left:0;
  background:transparent;
}

.chapter-expanded .chapter-sidebar-card{
  padding:12px 0;
  border:0;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  border-radius:0;
  background:transparent;
}

.chapter-topic-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin:0;
  padding:0;
  list-style:none;
}

.chapter-topic-grid li{
  display:flex;
  min-height:72px;
  flex-direction:column;
  justify-content:space-between;
  gap:5px;
  padding:12px 13px;
  border:1px solid var(--line);
  border-radius:6px;
  background:#fff;
}

.chapter-topic-grid li:last-child:nth-child(odd){
  grid-column:1/-1;
}

.chapter-topic-grid span{
  color:var(--resource-accent);
  font-size:.68rem;
  font-weight:700;
}

.chapter-topic-grid strong{
  font-family:Georgia,"Times New Roman",serif;
  font-size:.92rem;
  line-height:1.35;
}

.chapter-practice,
.chapter-checkpoint{
  padding:20px;
  border-left:3px solid var(--resource-accent);
  background:var(--soft);
}

.chapter-scope p{
  color:var(--muted);
}

.chapter-prerequisites ul{
  margin:0;
  padding-left:18px;
}

.chapter-prerequisites li{
  margin:5px 0;
}

.chapter-sidebar{
  position:sticky;
  top:24px;
}

.chapter-sidebar-card{
  padding:14px;
  border:1px solid var(--line);
  border-radius:6px;
  background:#fff;
}

.chapter-sidebar-card strong{
  display:block;
  font-family:Georgia,"Times New Roman",serif;
  font-size:.88rem;
  line-height:1.42;
}

.chapter-sidebar-card a{
  display:inline-block;
  margin-top:10px;
  font-size:.75rem;
  font-weight:600;
}

.chapter-mini-toc{
  display:flex;
  flex-direction:column;
  margin-top:16px;
  padding-left:12px;
  border-left:1px solid var(--line);
}

.chapter-mini-toc strong{
  margin-bottom:6px;
  font-size:.72rem;
}

.chapter-mini-toc a{
  padding:3px 0;
  color:var(--muted);
  font-size:.72rem;
}

.chapter-pagination{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:18px;
  padding-top:22px;
  border-top:1px solid var(--line);
}

.chapter-pagination>a{
  display:flex;
  flex-direction:column;
  padding:12px 13px;
  border:1px solid var(--line);
  border-radius:6px;
  color:var(--text);
}

.chapter-pagination>a:hover{
  border-color:#8c959f;
  text-decoration:none;
}

.chapter-pagination>a.next{
  text-align:right;
}

.chapter-pagination>a span{
  margin-bottom:3px;
  color:var(--muted);
  font-size:.68rem;
  font-weight:600;
}

.chapter-pagination>a strong{
  font-size:.78rem;
  line-height:1.4;
}

@media (max-width:760px){
  .chapter-layout{
    grid-template-columns:1fr;
    gap:18px;
  }

  .chapter-sidebar{
    position:static;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
    grid-row:1;
  }

  .chapter-mini-toc{
    margin-top:0;
  }
}

@media (max-width:520px){
  .resource-page{
    padding:26px 0 48px;
  }

  .resource-index-row,
  .resource-chapter-row{
    grid-template-columns:1fr;
    gap:6px;
  }

  .resource-chapter-count{
    padding-top:0;
  }

  .chapter-row-arrow{
    display:none;
  }

  .chapter-topic-grid,
  .chapter-sidebar,
  .chapter-pagination{
    grid-template-columns:1fr;
  }

  .chapter-topic-grid li:last-child:nth-child(odd){
    grid-column:auto;
  }

  .chapter-pagination>a.next{
    text-align:left;
  }

  .equation-block{
    grid-template-columns:1fr;
    gap:6px;
    padding:6px 0;
  }

  .equation-tex mjx-container[jax="CHTML"][display="true"]{
    min-width:max-content;
  }

  .formal-block{
    padding:0;
  }

  .formal-block.warning{
    padding:14px 0;
  }

  .pseudocode{
    padding:4px 0 4px 12px;
  }

  .equation-number{
    justify-self:end;
  }
}

@media print{
  .site-header,
  .site-footer,
  .resource-breadcrumb,
  .chapter-sidebar,
  .chapter-pagination{
    display:none;
  }

  .resource-page{
    padding:0;
  }

  .chapter-layout{
    display:block;
  }

  .chapter-section,
  .chapter-topic-grid li{
    break-inside:avoid;
  }
}
