:root,
html[data-theme="light"],
body[data-theme="light"] {
  color-scheme: light;
  --report-bg: #f6f7f4;
  --report-paper: #ffffff;
  --report-paper-2: #eef3f0;
  --report-ink: #1d2525;
  --report-muted: #667372;
  --report-line: #d8dfda;
  --report-accent: #0f7b70;
  --report-accent-2: #a4472b;
  --report-accent-3: #345c92;
  --report-good: #0f766e;
  --report-warn: #a16207;
  --report-bad: #b42318;
  --report-code: #111827;
  --report-code-bg: #f1f5f9;
  --report-shadow: 0 14px 34px rgba(34, 43, 40, .09);
  --report-radius: 12px;
  --report-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  --report-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  --bg: var(--report-bg);
  --paper: var(--report-paper);
  --panel: var(--report-paper);
  --surface: var(--report-paper);
  --surface-2: var(--report-paper-2);
  --soft: var(--report-paper-2);
  --soft2: #edf9f6;
  --ink: var(--report-ink);
  --text: var(--report-ink);
  --muted: var(--report-muted);
  --line: var(--report-line);
  --border: var(--report-line);
  --accent: var(--report-accent);
  --brand: var(--report-accent);
  --accent2: var(--report-accent-2);
  --accent-2: var(--report-accent-2);
  --brand2: var(--report-accent-2);
  --accent3: var(--report-accent-3);
  --accent-3: var(--report-accent-3);
  --good: var(--report-good);
  --ok: var(--report-good);
  --warn: var(--report-warn);
  --bad: var(--report-bad);
  --danger: var(--report-bad);
  --code: var(--report-code);
  --code-bg: var(--report-code-bg);
  --codeInk: #e5e7eb;
  --code-ink: #e5e7eb;
  --shadow: var(--report-shadow);
  --radius: var(--report-radius);
  --sans: var(--report-sans);
  --mono: var(--report-mono);
}

html[data-theme="dark"],
body[data-theme="dark"] {
  color-scheme: dark;
  --report-bg: #0f1517;
  --report-paper: #171f22;
  --report-paper-2: #202b2e;
  --report-ink: #edf2f2;
  --report-muted: #a9b6b6;
  --report-line: #334044;
  --report-accent: #66d5c8;
  --report-accent-2: #f2a67f;
  --report-accent-3: #9dbcf5;
  --report-good: #7dd3c7;
  --report-warn: #f6c177;
  --report-bad: #fca5a5;
  --report-code: #e5e7eb;
  --report-code-bg: #0b1113;
  --report-shadow: 0 16px 40px rgba(0, 0, 0, .35);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    color-scheme: dark;
    --report-bg: #0f1517;
    --report-paper: #171f22;
    --report-paper-2: #202b2e;
    --report-ink: #edf2f2;
    --report-muted: #a9b6b6;
    --report-line: #334044;
    --report-accent: #66d5c8;
    --report-accent-2: #f2a67f;
    --report-accent-3: #9dbcf5;
    --report-good: #7dd3c7;
    --report-warn: #f6c177;
    --report-bad: #fca5a5;
    --report-code: #e5e7eb;
    --report-code-bg: #0b1113;
    --report-shadow: 0 16px 40px rgba(0, 0, 0, .35);
  }
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 1rem;
  text-size-adjust: 100%;
}

[hidden] {
  display: none !important;
}

body {
  color: var(--report-ink);
  background:
    linear-gradient(180deg, rgba(15, 123, 112, .08), transparent 340px),
    var(--report-bg);
  font-family: var(--report-sans);
  overflow-wrap: break-word;
}

::selection {
  background: color-mix(in srgb, var(--report-accent) 28%, transparent);
}

main {
  min-width: 0;
}

a {
  color: var(--report-accent);
  text-underline-offset: .18em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--report-accent);
  outline-offset: 3px;
}

button,
input,
select,
textarea {
  font: inherit;
  max-width: 100%;
}

button,
input,
select,
textarea {
  accent-color: var(--report-accent);
}

button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: .62;
}

button,
.btn,
.button-like,
.action,
.tab,
summary {
  touch-action: manipulation;
}

button[onclick*="print"],
#printBtn {
  display: none !important;
}

img,
svg,
canvas,
iframe,
video {
  max-width: 100%;
}

iframe {
  border: 1px solid var(--report-line);
  border-radius: var(--report-radius);
}

img,
video {
  height: auto;
}

pre,
code,
kbd,
samp {
  font-family: var(--report-mono);
}

pre {
  max-width: 100%;
  overflow-x: auto;
  background: var(--report-code-bg);
  color: var(--report-code);
  border: 1px solid var(--report-line);
  border-radius: var(--report-radius);
}

pre code {
  background: transparent;
  border: 0;
  color: inherit;
  padding: 0;
}

blockquote {
  border-left: 4px solid var(--report-accent);
  color: var(--report-muted);
  margin-inline: 0;
  padding: .2rem 0 .2rem 1rem;
}

table {
  border-color: var(--report-line);
}

th,
td {
  border-color: var(--report-line);
}

.table-wrap,
.math,
.svg-wrap,
.svgwrap,
.diagram,
.interactive,
.result-box,
.output,
.panel,
mjx-container {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

mjx-container[display="true"] {
  display: block;
  overflow-x: auto;
  overflow-y: hidden;
}

.layout,
.wrap,
.container,
.main {
  max-width: min(1600px, 100%);
}

:where(h1, h2, h3, h4, h5, h6) {
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

:where(section, .section, .chapter, .hero, header.hero) {
  scroll-margin-top: 1rem;
}

.report-skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 10001;
  transform: translateY(-140%);
  border: 1px solid var(--report-line);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--report-paper);
  color: var(--report-ink);
  box-shadow: var(--report-shadow);
}

.report-skip-link:focus {
  transform: translateY(0);
}

aside,
nav.toc,
.toc,
.sidebar,
.control-card,
.hero,
.hero-card,
.herocard,
section.card,
.section,
.chapter,
.card,
.callout,
.box,
.def,
.theorem,
.thm,
.prop,
.lemma,
.example,
.recipe,
.proof,
.algorithm,
.alg,
.note,
.warn,
details,
.table-wrap,
.svg-wrap,
.svgwrap,
.diagram,
.mathbox,
.eq-card,
.stat,
.metric,
.interactive,
.control,
.result,
.result-box,
.output {
  border-color: var(--report-line);
  box-shadow: var(--report-shadow);
}

.hero,
header.hero {
  border-radius: calc(var(--report-radius) + 6px);
}

.badge,
.tag,
.pill {
  border-color: var(--report-line);
}

html[data-theme="dark"] body,
body[data-theme="dark"] {
  background:
    linear-gradient(180deg, rgba(102, 213, 200, .10), transparent 340px),
    var(--report-bg);
}

html[data-theme="dark"] aside,
html[data-theme="dark"] nav.toc,
html[data-theme="dark"] .toc,
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .control-card,
html[data-theme="dark"] .hero,
html[data-theme="dark"] .hero-card,
html[data-theme="dark"] .herocard,
html[data-theme="dark"] section.card,
html[data-theme="dark"] .section,
html[data-theme="dark"] .chapter,
html[data-theme="dark"] .card,
html[data-theme="dark"] .callout,
html[data-theme="dark"] .box,
html[data-theme="dark"] .def,
html[data-theme="dark"] .theorem,
html[data-theme="dark"] .thm,
html[data-theme="dark"] .prop,
html[data-theme="dark"] .lemma,
html[data-theme="dark"] .example,
html[data-theme="dark"] .recipe,
html[data-theme="dark"] .proof,
html[data-theme="dark"] .algorithm,
html[data-theme="dark"] .alg,
html[data-theme="dark"] .note,
html[data-theme="dark"] .warn,
html[data-theme="dark"] details,
body[data-theme="dark"] aside,
body[data-theme="dark"] nav.toc,
body[data-theme="dark"] .toc,
body[data-theme="dark"] .sidebar,
body[data-theme="dark"] .control-card,
body[data-theme="dark"] .hero,
body[data-theme="dark"] .hero-card,
body[data-theme="dark"] .herocard,
body[data-theme="dark"] section.card,
body[data-theme="dark"] .section,
body[data-theme="dark"] .chapter,
body[data-theme="dark"] .card,
body[data-theme="dark"] .callout,
body[data-theme="dark"] .box,
body[data-theme="dark"] .def,
body[data-theme="dark"] .theorem,
body[data-theme="dark"] .thm,
body[data-theme="dark"] .prop,
body[data-theme="dark"] .lemma,
body[data-theme="dark"] .example,
body[data-theme="dark"] .recipe,
body[data-theme="dark"] .proof,
body[data-theme="dark"] .algorithm,
body[data-theme="dark"] .alg,
body[data-theme="dark"] .note,
body[data-theme="dark"] .warn,
body[data-theme="dark"] details {
  background-color: var(--report-paper);
  color: var(--report-ink);
}

html[data-theme="dark"] main section:not(.hero),
html[data-theme="dark"] .box,
html[data-theme="dark"] .theorem,
html[data-theme="dark"] .proof,
html[data-theme="dark"] .algorithm,
html[data-theme="dark"] .alg,
html[data-theme="dark"] .note,
html[data-theme="dark"] .warn,
html[data-theme="dark"] .interactive,
html[data-theme="dark"] .control,
html[data-theme="dark"] .result,
html[data-theme="dark"] .result-box,
html[data-theme="dark"] .output,
body[data-theme="dark"] main section:not(.hero),
body[data-theme="dark"] .box,
body[data-theme="dark"] .theorem,
body[data-theme="dark"] .proof,
body[data-theme="dark"] .algorithm,
body[data-theme="dark"] .alg,
body[data-theme="dark"] .note,
body[data-theme="dark"] .warn,
body[data-theme="dark"] .interactive,
body[data-theme="dark"] .control,
body[data-theme="dark"] .result,
body[data-theme="dark"] .result-box,
body[data-theme="dark"] .output {
  background: var(--report-paper);
  color: var(--report-ink);
  border-color: var(--report-line);
}

html[data-theme="dark"] main h2,
html[data-theme="dark"] main h3,
html[data-theme="dark"] main h4,
body[data-theme="dark"] main h2,
body[data-theme="dark"] main h3,
body[data-theme="dark"] main h4 {
  color: var(--report-ink);
}

html[data-theme="dark"] .lead,
html[data-theme="dark"] .small,
html[data-theme="dark"] .tiny,
html[data-theme="dark"] .control label,
html[data-theme="dark"] .controls label,
body[data-theme="dark"] .lead,
body[data-theme="dark"] .small,
body[data-theme="dark"] .tiny,
body[data-theme="dark"] .control label,
body[data-theme="dark"] .controls label {
  color: var(--report-muted);
}

html[data-theme="dark"] .kicker,
body[data-theme="dark"] .kicker {
  color: var(--report-accent);
}

html[data-theme="dark"] .label,
body[data-theme="dark"] .label {
  background: var(--report-paper-2);
  color: var(--report-accent);
  border-color: var(--report-line);
}

html[data-theme="dark"] .warn .label,
body[data-theme="dark"] .warn .label {
  color: var(--report-warn);
}

html[data-theme="dark"] .proof .label,
body[data-theme="dark"] .proof .label {
  color: var(--report-muted);
}

html[data-theme="dark"] summary,
body[data-theme="dark"] summary {
  background: var(--report-paper-2);
  color: var(--report-ink);
}

html[data-theme="dark"] table,
html[data-theme="dark"] td,
body[data-theme="dark"] table,
body[data-theme="dark"] td {
  background: var(--report-paper);
  color: var(--report-ink);
  border-color: var(--report-line);
}

html[data-theme="dark"] code,
body[data-theme="dark"] code {
  background: var(--report-code-bg);
  color: var(--report-code);
  border-color: var(--report-line);
}

html[data-theme="dark"] th,
body[data-theme="dark"] th {
  background: var(--report-paper-2);
  color: var(--report-accent);
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] button,
body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea,
body[data-theme="dark"] button {
  background-color: var(--report-paper-2);
  color: var(--report-ink);
  border-color: var(--report-line);
}

.report-theme-toggle {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 10000;
  border: 1px solid var(--report-line);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--report-paper);
  color: var(--report-ink);
  box-shadow: var(--report-shadow);
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) body {
    background:
      linear-gradient(180deg, rgba(102, 213, 200, .10), transparent 340px),
      var(--report-bg);
  }
}

@media print {
  html,
  body {
    background: #fff !important;
    color: #111 !important;
  }

  .report-theme-toggle,
  .report-skip-link,
  nav.toc,
  .toc,
  .sidebar,
  .controls,
  .toolbar,
  .tabs {
    display: none !important;
  }

  a {
    color: #111 !important;
    text-decoration: underline;
  }

  pre,
  code {
    white-space: pre-wrap;
  }

  section,
  .section,
  .chapter,
  .card,
  .callout,
  details {
    box-shadow: none !important;
    break-inside: avoid;
  }
}

@media (max-width: 980px) {
  body {
    line-height: 1.72;
  }

  .layout {
    display: block !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    padding: 16px !important;
  }

  .wrap,
  .container {
    width: min(100% - 24px, 980px) !important;
  }

  aside,
  nav.toc,
  .toc,
  .sidebar {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: auto !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 0 16px !important;
    overflow: visible !important;
  }

  .hero,
  header.hero,
  .hero-card,
  .herocard,
  section.card,
  .section,
  .chapter,
  .card,
  .control-card {
    margin-bottom: 16px !important;
    padding: 20px !important;
    border-radius: 14px !important;
  }

  h1 {
    font-size: clamp(2rem, 9vw, 3rem) !important;
    line-height: 1.14 !important;
    letter-spacing: 0 !important;
  }

  h2 {
    font-size: clamp(1.45rem, 7vw, 2rem) !important;
    line-height: 1.24 !important;
    letter-spacing: 0 !important;
  }

  h3 {
    font-size: clamp(1.15rem, 5vw, 1.45rem) !important;
    line-height: 1.35 !important;
  }

  .grid,
  .grid.two,
  .grid.three,
  .grid2,
  .grid3,
  .grid-2,
  .grid-3,
  .two,
  .three,
  .two-col,
  .three-col,
  .hero-grid,
  .herogrid,
  .cards,
  .overview,
  .controls {
    grid-template-columns: 1fr !important;
  }

  .toolbar,
  .controls,
  .btnrow,
  .side-actions,
  .badges,
  .tabs {
    flex-wrap: wrap !important;
  }

  table {
    min-width: 0;
  }

  .table-wrap table,
  .interactive table,
  .result-box table,
  .output table,
  .panel table {
    min-width: 560px;
  }

  .MathJax,
  mjx-container {
    max-width: 100%;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15.5px;
  }

  .layout {
    padding: 10px !important;
  }

  .wrap,
  .container {
    width: min(100% - 18px, 560px) !important;
  }

  .hero,
  header.hero,
  .hero-card,
  .herocard,
  section.card,
  .section,
  .chapter,
  .card,
  .control-card {
    padding: 16px !important;
  }

  .report-theme-toggle {
    right: 10px;
    bottom: 10px;
    padding: 7px 10px;
  }
}
