@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  --tutorial-ink: #0a2878;
  --tutorial-rule: #d9d9d9;
  --tutorial-muted: #687078;
  --tutorial-paper: #f8f9fa;
}

html { scroll-behavior: smooth; }
body {
  box-sizing: border-box;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 26px 70px;
  font: 20px/1.55 'EB Garamond', Garamond, Georgia, serif;
  color: #333;
  background: var(--tutorial-paper);
}
h1, h2, h3, h4 {
  color: var(--tutorial-ink);
  font-family: inherit;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 48px 0 16px; }
h2 { font-size: 1.75em; font-variant: small-caps; border-color: var(--tutorial-rule); padding-top: 24px; margin-top: 56px; }
h3 { font-size: 1.3em; margin-top: 28px; }
.author { color: var(--tutorial-muted); font-size: .95em; }
a { color: var(--tutorial-ink); text-underline-offset: .18em; }
.website-back {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 2px solid var(--tutorial-rule);
  font-size: 1em;
  font-variant: small-caps;
  letter-spacing: .03em;
  color: var(--tutorial-muted);
}
.website-back a { font-weight: 400; text-decoration: none; }
.website-back a[aria-current] { border-bottom: 1px solid var(--tutorial-ink); }
.website-back .tutorial-version { margin-left: auto; font-variant: normal; font-size: .85em; }
#TOC {
  background: none;
  border: 0;
  border-bottom: 1px solid var(--tutorial-rule);
  border-radius: 0;
  padding: 18px 0 24px;
  margin: 24px 0 36px;
}
#TOC > ul { columns: 2; column-gap: 40px; padding-left: 22px; }
#TOC li { break-inside: avoid; margin-bottom: 6px; }
#TOC a { text-decoration: none; }
.lead-panel, .note-panel, .recorded-warning {
  background: none;
  color: inherit;
  border: 0;
  border-left: 2px solid var(--tutorial-rule);
  border-radius: 0;
  padding: 0 0 0 22px;
  margin: 30px 0;
}
.lead-panel strong { color: var(--tutorial-ink); }
code, .lead-panel code { color: var(--tutorial-ink); background: #eceff1; font-size: .78em; }
pre, pre.sourceCode {
  background: #f0f1f2;
  border: 0;
  border-left: 2px solid var(--tutorial-rule);
  border-radius: 0;
  padding: 18px;
  overflow: auto;
}
pre code { background: none; font-size: 13px; }
.flow { gap: 28px; margin: 36px 0; }
.flow > div { background: none; border: 0; border-top: 1px solid var(--tutorial-rule); border-radius: 0; padding: 16px 0; }
.flow b, .metric b, .baseline-comparison h4 { color: var(--tutorial-ink); }
.gallery { background: none; border: 0; border-top: 1px solid var(--tutorial-rule); border-radius: 0; padding: 24px 0; margin: 36px 0; }
.gallery-controls label { color: var(--tutorial-ink); font-size: 1em; font-weight: 400; }
.gallery-controls select {
  font: inherit;
  color: var(--tutorial-ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--tutorial-rule);
  border-radius: 0;
  padding: 8px 28px 8px 0;
}
.gallery-controls .check input { accent-color: var(--tutorial-ink); }
.metric { background: none; border: 0; border-top: 1px solid var(--tutorial-rule); border-radius: 0; padding: 14px 0; }
.figure-view { border-radius: 0; }
.figure-note, .provenance, .metric small { color: var(--tutorial-muted); }
.baseline-comparison, .provenance { border-color: var(--tutorial-rule); border-top-style: solid; }
th { background: none; color: var(--tutorial-ink); font-weight: 600; border-top: 1px solid var(--tutorial-ink); }
th, td { border-bottom-color: var(--tutorial-rule); }
table { display: block; overflow-x: auto; font-size: .9em; }
summary { color: var(--tutorial-ink); cursor: pointer; padding: 10px 0; }
details { border-bottom: 1px solid var(--tutorial-rule); margin: 20px 0; }
iframe[data-flexmatch-live] { display: block; background: white; margin: 28px 0; max-width: 100%; }
select:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 2px solid var(--tutorial-ink); outline-offset: 3px;
}
@media (max-width: 700px) {
  body { margin: 0 auto; padding: 0 18px 40px; font-size: 18px; }
  h1 { margin-top: 32px; }
  h2 { font-size: 1.5em; margin-top: 40px; }
  #TOC > ul { columns: 1; }
  .website-back { gap: 10px 18px; }
  .website-back .tutorial-version { width: 100%; margin-left: 0; }
  .gallery { padding: 20px 0; }
  .lead-panel { padding: 0 0 0 16px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { body { background: white; font-size: 11pt; } .website-back { display: none; } #TOC > ul { columns: 1; } }

/* Navigation is the same full-width Quarto header as the main website. */
body.nav-fixed {
  max-width: none;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0;
}
.package-tutorial-content {
  box-sizing: border-box;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 26px 70px;
}
@media (max-width: 700px) {
  .package-tutorial-content { padding: 0 16px 50px; }
}
/* Prevent the tutorial's larger body text from changing navbar dimensions. */
#quarto-header { font: 1rem/1.5 'EB Garamond', Garamond, serif; }
