.theory-page{max-width:1000px;min-width:0}
.theory-card{background:#fff;border:1px solid var(--border);border-radius:12px;padding:clamp(16px,3vw,32px);margin:0 0 24px;box-shadow:0 3px 12px rgba(0,0,0,.035)}
.theory-contents h2{margin:0 0 12px;font-size:var(--font-heading)}
.theory-contents ol,.theory-contents ul{margin:0;padding-left:0;columns:1;list-style:none}
.theory-contents li{padding:6px 0;break-inside:avoid}
.theory-article{line-height:1.75;overflow-wrap:anywhere}
.theory-article h2{font-size:var(--font-xl);margin:36px 0 16px;padding-top:24px;border-top:1px solid var(--border);scroll-margin-top:20px}
.theory-article h2:first-of-type{margin-top:20px}
.theory-article h3{font-size:var(--font-md);color:var(--primary-dark);margin:24px 0 10px}
.theory-article p{margin:0 0 16px}
.theory-article ul,.theory-article ol{padding-left:24px;margin:12px 0 20px}
.theory-article li{padding:3px 0}
.theory-article blockquote{margin:16px 0 24px;padding:14px 18px;background:#eef5fb;border-left:4px solid var(--primary);border-radius:6px}
.theory-article blockquote p:last-child{margin-bottom:0}
.theory-formula{background:#f4f7fb;border:1px solid var(--border);border-radius:8px;padding:16px;margin:16px 0 22px;font-family:Cambria,'Times New Roman',serif;font-size:1.3rem;text-align:center;white-space:pre-wrap;overflow-wrap:anywhere}
.theory-article img{display:block;max-width:100%;height:auto;margin:18px 0 24px;border-radius:6px}
.theory-table-wrap{max-width:100%;overflow-x:auto;margin:16px 0 22px}
.theory-article table{border-collapse:collapse;width:100%;font-size:var(--font-base)}
.theory-article th,.theory-article td{border:1px solid var(--border);padding:10px 12px;text-align:left;vertical-align:top}
.theory-article th{background:#eef5fb;color:var(--primary-dark)}
.theory-bottom{display:flex;align-items:center;flex-wrap:wrap;gap:20px;margin-bottom:24px}
@media(max-width:640px){.theory-contents ol,.theory-contents ul{columns:1}.theory-article h2{font-size:var(--font-heading)}.theory-article th,.theory-article td{padding:8px;font-size:var(--font-sm)}}
.theory-formula math{font-size:1.15em;white-space:normal;max-width:100%}

.division-example{display:block;width:100%;height:650px;border:0;margin:16px 0 24px;background:#f4f7fb;border-radius:10px}

.theory-bottom .primary-link:hover { background:var(--primary-dark); color:white; text-decoration:none; }
