@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --brand-50: #ede7f6;
  --brand-100: #d1c4e9;
  --brand-600: #5e35b1;
  --brand-700: #512da8;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
}

html {
  color: var(--text);
  background-color: #ffffff;
}

body {
  margin: 0 auto;
  max-width: 980px;
  padding: 28px 24px 56px;
  font-family: "Inter", "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  color: var(--text);
  text-rendering: optimizeLegibility;
}

.tutorial-topbar {
  display: flex;
  align-items: center;
  margin: 0 0 1rem;
}

.tutorial-home-link {
  display: inline-block;
  background: var(--brand-700);
  color: #ffffff !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  padding: 0.7rem 0.95rem;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(81, 45, 168, 0.25);
}

.tutorial-home-link:hover {
  background: var(--brand-600);
}

@media (max-width: 900px) {
  body {
    max-width: 100%;
    font-size: 17px;
    padding: 18px 14px 36px;
  }
}

a,
a:visited {
  color: var(--brand-600);
}

a:hover {
  color: var(--brand-700);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--brand-700);
  line-height: 1.25;
}

h1.title {
  margin: 0.25rem 0 0.5rem;
  font-size: 2rem;
  letter-spacing: -0.01em;
}

h2 {
  margin-top: 2.2rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  margin-top: 1.8rem;
}

#title-block-header {
  margin-bottom: 1.8rem;
  text-align: left;
}

#title-block-header .author,
#title-block-header .date {
  margin: 0.15rem 0;
  color: var(--muted);
  font-size: 0.95rem;
}

#TOC {
  margin: 0.5rem 0 1.8rem;
  padding: 14px 16px;
  border: 1px solid var(--brand-100);
  border-radius: 12px;
  background: #f8f6fc;
}

#TOC > ul {
  margin: 0;
}

#TOC ul {
  padding-left: 1.1rem;
}

#TOC li {
  margin: 0.15rem 0;
}

#TOC a {
  text-decoration: none;
  color: var(--brand-700);
}

#TOC a:hover {
  text-decoration: underline;
}

p[align="center"] {
  text-align: center;
}

p[align="center"] img {
  max-width: min(760px, 100%);
  height: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

p[align="center"] sub {
  color: #64748b;
  font-size: 0.92rem;
}

code {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 0.05rem 0.3rem;
}

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