/* Opt-in reading layout; other articles retain their existing theme. */
body.math-note {
  width: min(1120px, 100%);
  padding: 40px 24px;
  color: #303030;
  font-size: 17px;
  line-height: 1.9;
}

.math-note .masthead { width: 170px; margin-top: 8px; }
.math-note .masthead h1 { font-size: 34px; margin-right: 20px; }
.math-note .masthead .menu { font-size: 14px; }
.math-note .masthead .menu li:hover { border: 0; }
.math-note .main {
  width: auto;
  min-width: 0;
  margin-left: 196px;
  padding: 4px 0 48px 44px;
  border-color: #e5e5e5;
}

.math-note .main .title h1 { margin: 0 0 12px; font-size: 34px; text-align: left; }
.math-note .title h3 { margin: 0; text-align: left; font-size: 14px; font-weight: 400; color: #737373; }
.math-note .title hr { max-width: none; margin: 24px 0; border-color: #e5e5e5; }
.math-note .counterpart { margin-bottom: 22px; font-size: 14px; }
.math-note a { color: #404040; border-color: #bdbdbd; }
.math-note a:hover { color: #171717; border-color: currentColor; }
.math-note a:focus-visible,
.math-note .math-display:focus-visible { outline: 2px solid #404040; outline-offset: 4px; }

.math-note #TableOfContents {
  margin: 0 0 28px;
  padding: 16px 20px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #f6f6f6;
  font-size: 14px;
  line-height: 1.65;
}
.math-note #TableOfContents ul { margin: 0; padding-left: 0; list-style: none; }
.math-note #TableOfContents ul ul { padding-left: 18px; list-style: none; }
.math-note #TableOfContents li { margin: 4px 0; }
.math-note #TableOfContents a { border: 0; }
.math-note h2, .math-note h3, .math-note h4, .math-note h5 { text-align: left; scroll-margin-top: 24px; }
.math-note h2 { margin: 48px 0 20px; padding-bottom: 12px; border-bottom: 1px solid #e5e5e5; font-size: 25px; line-height: 1.45; }
.math-note h3 { margin: 32px 0 16px; font-size: 20px; line-height: 1.5; }
.math-note h4 { margin: 28px 0 14px; font-size: 18px; line-height: 1.5; }
.math-note h5 { margin: 24px 0 12px; font-size: 16px; line-height: 1.5; }
.math-note p { margin: 0 0 1.2em; padding: 0; background: none; overflow-wrap: anywhere; }
.math-note .main strong {
  color: #262626;
  font-weight: 600;
  padding: 0 .08em;
  background: linear-gradient(transparent 62%, #e4e4e4 62%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.math-note li { margin: 8px 0; overflow-wrap: anywhere; }
.math-note li p { margin-bottom: .5em; }
.math-note ul, .math-note ol { padding-left: 1.5em; }
.math-note blockquote {
  margin: 24px 0;
  padding: 14px 20px;
  background: #f6f6f6;
  border-left: 3px solid #a3a3a3;
  color: #555555;
  font-size: .94em;
}
.math-note blockquote p:last-child { margin-bottom: 0; }
.math-note img { display: block; height: auto; margin: 24px auto; }

.math-note code.has-jax {
  padding: 0;
  color: inherit;
  font-family: inherit;
  font-size: 100%;
  white-space: normal;
}
.math-note code.has-jax:not(.math-display) {
  display: inline-block;
  max-width: 100%;
  padding: .15em .1em;
  overflow-x: auto;
  overflow-y: hidden;
  vertical-align: middle;
}
.math-note .math-display {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 0;
}
.math-note mjx-container[display="true"] { margin: 12px 0 !important; }
.math-note pre {
  max-width: 100%;
  overflow: auto;
  padding: 18px !important;
  border-radius: 8px;
  background: #242424 !important;
  color: #ededed !important;
  font-size: 13px;
  line-height: 1.65;
  tab-size: 4;
}
.math-note pre code {
  display: block;
  width: max-content;
  min-width: 100%;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: none;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  overflow: visible;
  filter: grayscale(1) brightness(1.35);
}

@media (max-width: 960px) {
  body.math-note { max-width: 800px; padding: 20px 24px; }
  .math-note .masthead { width: auto; margin: 0 0 28px; padding: 0 0 20px; border-bottom: 1px solid #e5e5e5; }
  .math-note .masthead h1 { margin: 0; font-size: 28px; line-height: 1.4; }
  .math-note .masthead .menu li:hover { border-bottom: 1px solid; margin-bottom: 0; }
  .math-note .main { margin: 0; padding: 0; border: 0; }
  .math-note #menu-label { height: 36px; line-height: 34px; font-size: 14px; border-color: #d9d9d9; border-radius: 4px; }
}

@media (max-width: 480px) {
  body.math-note { padding: 20px; font-size: 16px; }
  .math-note .main .title h1 { font-size: 28px; }
  .math-note h2 { font-size: 22px; margin-top: 36px; }
  .math-note h3 { font-size: 18px; }
  .math-note #TableOfContents { padding: 14px 16px; }
  .math-note blockquote { padding: 12px 14px; }
}
