
.math-article {
 max-width: 1200px;
 margin: 0 auto;
 padding: 2rem;
 font-family: system-ui, -apple-system, sans-serif;
 line-height: 1.6;
 color: #333;
}

.math-article h1 {
 font-size: 2.5rem;
 color: #1a365d;
 margin-bottom: 2rem;
 line-height: 1.2;
}
figure {
 font-size: 24px;
 display: flex;
 flex-direction: column;
 align-items: center;
}
.math-article h2 {
 font-size: 2rem;
 color: #2c5282;
 margin: 2.5rem 0 1.5rem;
 border-bottom: 2px solid #e2e8f0;
 padding-bottom: 0.5rem;
}
.math-article h3 {
 font-size: 1.5rem;
 color: #2d3748;
 margin: 2rem 0 1rem;
}

.toc {
 background: #f8fafc;
 border: 1px solid #e2e8f0;
 border-radius: 0.5rem;
 padding: 1.5rem;
 margin: 2rem 0;
}
.toc h2 {
 font-size: 1.25rem;
 margin-top: 0;
 margin-bottom: 1rem;
 border-bottom: none;
}
.toc ul {
 list-style: none;
 padding-left: 0;
 margin: 0;
}
.toc a {
 color: #4a5568;
 text-decoration: none;
 padding: 0.25rem 0;
 display: block;
 transition: color 0.2s;
}
.toc a:hover {
 color: #2b6cb0;
 text-decoration: underline;
}

.definition-box,
.formulas-box,
.properties-box,
.applications-box,
.theorems-box,
.classification-box,
.variations-box,
.frustum-box {
 background: #fff;
 border: 1px solid #e2e8f0;
 border-radius: 0.5rem;
 padding: 1.5rem;
 margin: 1.5rem 0;
 box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.math-formulas {
 margin: 0;
}
.math-formulas dt {
 font-weight: 600;
 margin-top: 1rem;
}
.math-formulas dd {
 margin-left: 0;
 padding: 0.5rem 0;
}
.formula {
 display: block;
 padding: 0.5rem;
 margin: 0.5rem 0;
 background: #f7fafc;
 border-radius: 0.25rem;
 overflow-x: auto;
}

.math-article ul,
.math-article dl {
 padding-left: 1.5rem;
 margin: 1rem 0;
}
.math-article li {
 margin: 0.5rem 0;
}

dl dt {
 font-weight: 600;
 margin-top: 1rem;
}
dl dd {
 margin-left: 1rem;
 margin-bottom: 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
 * {
 animation: none !important;
 transition: none !important;
 }
}
@media (prefers-color-scheme: dark) {
 .math-article {
 color: #e2e8f0;
 background: #1a202c;
 }
.math-article h1 {
 color: #90cdf4;
 }
 .math-article h2 {
 color: #63b3ed;
 }
 .math-article h3 {
 color: #bee3f8;
 }
.toc,
 .definition-box,
 .formulas-box,
 .properties-box,
 .applications-box,
 .theorems-box,
 .classification-box,
 .variations-box,
 .frustum-box {
 background: #2d3748;
 border-color: #4a5568;
 }
.formula {
 background: #2d3748;
 }
.toc a {
 color: #cbd5e0;
 }
.toc a:hover {
 color: #90cdf4;
 }
}

@media print {
 .math-article {
 max-width: none;
 padding: 0;
 }
.toc {
 break-after: page;
 }
h2 {
 break-before: page;
 }
.definition-box,
 .formulas-box,
 .properties-box,
 .applications-box,
 .theorems-box,
 .classification-box,
 .variations-box,
 .frustum-box {
 break-inside: avoid;
 }
}

@media (max-width: 768px) {
 .math-article {
 padding: 1rem;
 }
.math-article h1 {
 font-size: 2rem;
 }
.math-article h2 {
 font-size: 1.75rem;
 }
.math-article h3 {
 font-size: 1.25rem;
 }
.definition-box,
 .formulas-box,
 .properties-box,
 .applications-box,
 .theorems-box,
 .classification-box,
 .variations-box,
 .frustum-box {
 padding: 1rem;
 }
}
