:root {
  --article-bg: #f6f7f4;
  --article-paper: #fffdfa;
  --article-ink: #232629;
  --article-muted: #66706a;
  --article-rule: #d9ded8;
  --article-rule-strong: #b8c4bc;
  --article-accent: #27615b;
  --article-accent-2: #8d4d2f;
  --article-code-bg: #f4f1ea;
  --article-code-rule: #cfc6b8;
  --article-table-head: #edf2ef;
  --article-table-stripe: #faf8f2;
  --article-warn-bg: #fff7df;
  --article-warn-ink: #7a4a00;
  --article-code-font: "SFMono-Regular", Consolas, "Liberation Mono", Menlo,
    monospace;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--article-bg);
}

body {
  margin: 0;
  color: var(--article-ink);
  background: var(--article-bg);
  font-family: Charter, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
    serif;
  font-size: 18px;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}

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

a:hover,
a:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.teal-dark {
  color: var(--article-accent);
}

.article-shell {
  width: min(100% - 32px, 980px);
  margin: 40px auto;
  background: var(--article-paper);
  border: 1px solid var(--article-rule);
  box-shadow: 0 22px 70px rgba(40, 43, 38, 0.11);
}

.article-inner {
  width: min(100% - 36px, 760px);
  margin: 0 auto;
  padding: 56px 0 64px;
}

.article-header {
  padding-bottom: 28px;
}

.article-kicker {
  margin: 0 0 12px;
  color: var(--article-accent);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  color: #1e2524;
  line-height: 1.18;
}

h1 {
  margin: 0;
  font-size: 40px;
  font-weight: 600;
}

.subtitle,
.article-subtitle {
  margin: 0.65rem 0 0;
  color: var(--article-muted);
  font-size: clamp(1.12rem, 2vw, 1.38rem);
  font-weight: 400;
  line-height: 1.38;
}

h2 {
  margin: 1.85rem 0 0.72rem;
  padding-top: 0.25rem;
  font-size: 24px;
}

h3 {
  margin: 1.8rem 0 0.55rem;
  font-size: 1.16rem;
}

p {
  margin: 0 0 1.05rem;
}

ul.elegante,
ul.formal {
  margin: 1rem 0 1.35rem;
  padding: 0 0 0 1.25rem;
  list-style: none;
}

ul.elegante li,
ul.formal li {
  position: relative;
  margin: 0 0 0.65rem;
  padding-left: 1.35rem;
}

ul.elegante li::before,
ul.formal li::before {
  content: "";
  position: absolute;
  top: 0.84em;
  left: 0.12rem;
  width: 0.64rem;
  height: 0.64rem;
  background-color: var(--article-accent);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M0 96C0 60.7 28.7 32 64 32h320c35.3 0 64 28.7 64 64v320c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96z'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M0 96C0 60.7 28.7 32 64 32h320c35.3 0 64 28.7 64 64v320c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96z'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  transform: translateY(-50%);
}

ul.references,
ul.bibliography {
  margin: 1rem 0 1.4rem;
  padding: 0 0 0 1.25rem;
  list-style: none;
}

ul.references li,
ul.bibliography li {
  position: relative;
  margin: 0 0 0.9rem;
  padding-left: 1.45rem;
}

ul.references li::before,
ul.bibliography li::before {
  content: "";
  position: absolute;
  top: 0.42em;
  left: 0;
  width: 0.9rem;
  height: 0.9rem;
  background-color: var(--article-accent);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath d='M64 0C28.7 0 0 28.7 0 64v384c0 35.3 28.7 64 64 64h256c35.3 0 64-28.7 64-64V160H256c-17.7 0-32-14.3-32-32V0H64zm192 0v128h128L256 0zM112 256h160c8.8 0 16 7.2 16 16s-7.2 16-16 16H112c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64h160c8.8 0 16 7.2 16 16s-7.2 16-16 16H112c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64h160c8.8 0 16 7.2 16 16s-7.2 16-16 16H112c-8.8 0-16-7.2-16-16s7.2-16 16-16z'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath d='M64 0C28.7 0 0 28.7 0 64v384c0 35.3 28.7 64 64 64h256c35.3 0 64-28.7 64-64V160H256c-17.7 0-32-14.3-32-32V0H64zm192 0v128h128L256 0zM112 256h160c8.8 0 16 7.2 16 16s-7.2 16-16 16H112c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64h160c8.8 0 16 7.2 16 16s-7.2 16-16 16H112c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64h160c8.8 0 16 7.2 16 16s-7.2 16-16 16H112c-8.8 0-16-7.2-16-16s7.2-16 16-16z'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

ul.manita {
  margin: 1rem 0 1.35rem;
  padding: 0 0 0 1.25rem;
  list-style: none;
}

ul.manita li {
  position: relative;
  margin: 0 0 0.55rem;
  padding-left: 1.75rem;
}

ul.manita li::before {
  content: "";
  position: absolute;
  top: 0.34em;
  left: 0;
  width: 1.15rem;
  height: 1.15rem;
  background-color: var(--article-accent);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M512 199.652c0 23.625-20.65 43.826-44.8 43.826h-99.851c16.34 17.048 18.346 49.766-6.299 70.944 14.288 22.829 2.147 53.017-16.45 62.315C353.574 425.878 322.654 448 272 448c-2.746 0-13.276-.203-16-.195-61.971.168-76.894-31.065-123.731-38.315C120.596 407.683 112 397.599 112 385.786V214.261l.002-.001c.011-18.366 10.607-35.889 28.464-43.845 28.886-12.994 95.413-49.038 107.534-77.323 7.797-18.194 21.384-29.084 40-29.092 34.222-.014 57.752 35.098 44.119 66.908-3.583 8.359-8.312 16.67-14.153 24.918H467.2c23.45 0 44.8 20.543 44.8 43.826zM96 200v192c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V200c0-13.255 10.745-24 24-24h48c13.255 0 24 10.745 24 24zM68 368c0-11.046-8.954-20-20-20s-20 8.954-20 20 8.954 20 20 20 20-8.954 20-20z'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M512 199.652c0 23.625-20.65 43.826-44.8 43.826h-99.851c16.34 17.048 18.346 49.766-6.299 70.944 14.288 22.829 2.147 53.017-16.45 62.315C353.574 425.878 322.654 448 272 448c-2.746 0-13.276-.203-16-.195-61.971.168-76.894-31.065-123.731-38.315C120.596 407.683 112 397.599 112 385.786V214.261l.002-.001c.011-18.366 10.607-35.889 28.464-43.845 28.886-12.994 95.413-49.038 107.534-77.323 7.797-18.194 21.384-29.084 40-29.092 34.222-.014 57.752 35.098 44.119 66.908-3.583 8.359-8.312 16.67-14.153 24.918H467.2c23.45 0 44.8 20.543 44.8 43.826zM96 200v192c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V200c0-13.255 10.745-24 24-24h48c13.255 0 24 10.745 24 24zM68 368c0-11.046-8.954-20-20-20s-20 8.954-20 20 8.954 20 20 20 20-8.954 20-20z'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

.article-meta,
.caption,
figcaption,
.table-caption,
.tabjax-meta,
.tabjax-warning,
.article-footer {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

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

.abstract {
  margin: 22px 0 4px;
  padding: 18px 20px;
  border-left: 4px solid var(--article-accent);
  background: #f0f5f1;
}

.abstract strong {
  color: var(--article-accent);
}

.abstract p {
  margin: 0;
}

.abstract p + p {
  margin-top: 0.75rem;
}

.equation {
  margin: 1.05rem 0;
  padding: 0.2rem 0;
  overflow-x: auto;
}

figure {
  margin: 2rem 0;
}

.figure-panel {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 8px 0;
}

svg.scientific-plot {
  width: min(100%, 680px);
  height: auto;
  display: block;
}

figcaption,
.caption,
.table-caption {
  margin-top: 0.55rem;
  color: var(--article-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

figcaption {
  text-align: center;
}

.table-block {
  margin: 1.8rem 0;
}

.tabjax-source {
  display: none;
}

.tabjax-output {
  overflow-x: auto;
}

.tabjax-output .latex-table,
.article-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse !important;
  border-top: 2px solid #36413d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-size: 0.94rem;
  line-height: 1.45;
}

.tabjax-output th,
.tabjax-output td,
.article-table th,
.article-table td {
  border-bottom: 0;
  padding: 0.62rem 0.78rem !important;
}

.tabjax-output thead th,
.article-table thead th {
  background: transparent;
  border-bottom: 1px solid #36413d;
  color: #26312d;
  font-weight: 700;
}

.tabjax-output tbody tr:nth-child(even),
.article-table tbody tr:nth-child(even) {
  background: transparent;
}

.tabjax-meta,
.tabjax-warning {
  margin-top: 0.55rem;
  font-size: 0.82rem;
  line-height: 1.4;
}

.tabjax-meta {
  color: var(--article-muted);
}

.tabjax-warning {
  padding: 0.55rem 0.7rem;
  color: var(--article-warn-ink);
  background: var(--article-warn-bg);
  border: 1px solid #efd38d;
}

pre[class*="-code-pre"] {
  margin: 1rem 0 !important;
  padding: 0.36rem 0.48rem !important;
  overflow-x: auto;
  border: 1px solid var(--article-code-rule) !important;
  border-radius: 6px !important;
  background: var(--article-code-bg) !important;
  color: #29251f;
  font-family: var(--article-code-font);
  font-size: 0.92rem;
  line-height: 1.55 !important;
}

pre[class*="-code-pre"] code,
pre[class*="-code-pre"] .hljs {
  background: transparent !important;
  font-family: inherit !important;
  font-size: inherit !important;
}

pre[class*="-code-pre--copy"] {
  padding-top: 2.08rem !important;
}

button[class*="-code-copy-button"] {
  top: 0.4rem !important;
  right: 0.36rem !important;
  padding: 0.3rem 0.5rem !important;
  border-radius: 6px !important;
  font-size: 0.78rem !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif !important;
}

code,
kbd,
samp {
  font-family: var(--article-code-font);
}

:not(pre) > code {
  padding: 0.09em 0.28em;
  border: 0;
  border-radius: 4px;
  background: #f7f2e9;
  font-size: 0.92rem;
  line-height: 1.35;
}

.article-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(102, 112, 106, 0.22);
  color: var(--article-muted);
  font-size: 0.86rem;
}

.ccby {
  line-height: 1.5;
}

.ccby .ccby-icons {
  display: inline-flex;
  gap: 0.25em;
  align-items: center;
  margin-top: 0.35rem;
}

.ccby .ccby-icons img {
  width: 1em;
  height: 1em;
}

body.bookdown-style {
  --article-bg: #f6f7f4;
  --article-paper: #fffdfa;
  --article-ink: #212529;
  --article-muted: #6c757d;
  --article-rule: #eeeeee;
  --article-accent: #2c6f7b;
  --article-code-bg: #f1f3f4;
  --article-code-rule: #eeeeee;
  background: var(--article-bg);
  color: var(--article-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

body.bookdown-style .article-shell {
  width: min(100% - 32px, 56rem);
  margin: 1.25rem auto 2.75rem;
  background: var(--article-paper);
  border: 1px solid rgba(217, 222, 216, 0.75);
  box-shadow: 0 18px 55px rgba(40, 43, 38, 0.06);
}

body.bookdown-style .article-inner {
  width: min(100% - 64px, 50rem);
  padding: 1.25rem 0 3rem;
}

body.bookdown-style .article-kicker,
body.bookdown-style .article-meta,
body.bookdown-style .caption,
body.bookdown-style figcaption,
body.bookdown-style .table-caption,
body.bookdown-style .tabjax-meta,
body.bookdown-style .tabjax-warning,
body.bookdown-style .article-footer {
  font-family: inherit;
}

body.bookdown-style h1,
body.bookdown-style h2,
body.bookdown-style h3,
body.bookdown-style h4 {
  color: var(--article-ink);
  line-height: 1.3;
}

body.bookdown-style h1 {
  font-size: 2.35rem;
  font-weight: 500;
}

body.bookdown-style .subtitle,
body.bookdown-style .article-subtitle {
  font-size: 1.15rem;
  line-height: 1.45;
}

body.bookdown-style h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-top: 0;
  font-size: 1.5rem;
  font-weight: 500;
}

body.bookdown-style h3 {
  margin-top: 1.5em;
  font-size: 1.2rem;
  font-weight: 500;
}

body.bookdown-style p {
  margin-bottom: 1rem;
}

body.bookdown-style .abstract {
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  border-left-color: var(--article-accent);
  background: #eef6f4;
}

body.bookdown-style .abstract p {
  margin: 0;
}

body.bookdown-style :not(pre) > code {
  background: #eef0f1;
}

body.bookdown-style pre[class*="-code-pre"] {
  margin: 0 0 1rem !important;
  padding: 0.5rem !important;
  background: linear-gradient(160deg, #f4f5f6 0, #eceff1 100%) !important;
}

body.bookdown-style pre[class*="-code-pre--copy"] {
  padding-top: 0.5rem !important;
}

body.bookdown-style button[class*="-code-copy-button"] {
  top: 0.22rem !important;
  right: 0.22rem !important;
  padding: 0.22rem 0.45rem !important;
  font-size: 0.72rem !important;
}

body.bookdown-style .article-footer {
  margin-top: 2.5rem;
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .article-shell {
    width: 100%;
    margin: 0;
    border-right: 0;
    border-left: 0;
    box-shadow: none;
  }

  .article-inner {
    width: min(100% - 28px, 760px);
    padding: 34px 0 44px;
  }

  h1 {
    font-size: 2.05rem;
  }

  .subtitle,
  .article-subtitle {
    font-size: 1.08rem;
  }

  .equation,
  .abstract {
    padding: 0.9rem 1rem;
  }

  body.bookdown-style .article-shell {
    width: min(100% - 24px, 50rem);
  }

  body.bookdown-style .article-inner {
    padding: 1rem 0 2.25rem;
  }

  body.bookdown-style h1 {
    font-size: 2rem;
  }
}

@media print {
  @page {
    margin: 18mm;
  }

  :root {
    --article-bg: #ffffff;
    --article-paper: #ffffff;
  }

  html,
  body {
    background: #ffffff !important;
  }

  body {
    font-size: 12pt;
  }

  .article-shell,
  body.bookdown-style .article-shell {
    width: 100%;
    margin: 0;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  .article-inner,
  body.bookdown-style .article-inner {
    width: 100%;
    padding: 0;
  }

  h1 {
    font-size: 26pt;
  }

  .subtitle,
  .article-subtitle {
    font-size: 15pt;
  }

  button[class*="-code-copy-button"] {
    display: none !important;
  }

  pre[class*="-code-pre--copy"] {
    padding-top: 0.36rem !important;
  }

  pre[class*="-code-pre"] {
    break-inside: avoid;
    page-break-inside: avoid;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    padding-bottom: 0.58rem !important;
    overflow: visible !important;
  }

  pre[class*="-code-pre"] code,
  pre[class*="-code-pre"] .hljs {
    display: block !important;
    break-inside: avoid;
    page-break-inside: avoid;
    line-height: inherit !important;
    overflow: visible !important;
  }
}
