@font-face {
    font-family: "CMU Serif";
    src: url("fonts/cmun/cmunorm.otf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "CMU Serif";
    src: url("fonts/cmun/cmunsl.otf") format("truetype");
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: "CMU Serif";
    src: url("fonts/cmun/cmunbx.otf") format("truetype");
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: "CMU Serif";
    src: url("fonts/cmun/cmunbi.otf") format("truetype");
    font-weight: bold;
    font-style: italic;
}

/* body {
    font-family: "CMU Serif", "Times New Roman", serif;
} */

/* .theorem/.task styles moved to unified section below */

.inside_1 {
    background-color: #fff;
    border: 1px solid #eee;
    padding: 10px;
    margin-top: 10px;
    font-family: "Courier New", monospace;
    font-size: 16px;
    color: #000;
}
/* .explain styles moved to unified section below */
.container ul {
    list-style-type: square;
    line-height: 2rem;
}

footer {
    display: block;
    margin-top: 5rem;
}

img {
    max-width: 13rem;
}
.lh_2rem {
    line-height: 2rem;
}
.lh_3rem {
    line-height: 3rem;
}
.bg_green {
    background-color: rgba(44, 95, 45, 0.2);
}

/* ============================================ */
/* Unified content styles for topic pages       */
/* ============================================ */

/* Headings — smaller sizes for content pages */
.container h1 { font-size: 1.55rem; margin-bottom: 1rem; line-height: 1.3; }
.container h2 { font-size: 1.25rem; margin-top: 0.5rem; margin-bottom: 0.5rem; line-height: 1.3; }
.container h3 { font-size: 1.08rem; margin-top: 0.4rem; margin-bottom: 0.4rem; line-height: 1.3; }

/* Box base */
.box {
  border: 1px solid #ddd;
  border-left: 6px solid rgba(44, 95, 45, 0.5);
  border-radius: 4px;
  padding: 10px 20px;
  margin: 1rem 0;
  background: #f9f9f9;
  color: #333;
}

/* Box variants */
.box.def  { background: rgba(44, 95, 45, 0.08); border-color: rgba(44, 95, 45, 0.35); border-left: 6px solid rgba(44, 95, 45, 0.5); }
.box.note { background: rgba(44, 95, 45, 0.08); border-color: rgba(44, 95, 45, 0.35); border-left: 6px solid rgba(44, 95, 45, 0.5); }
.box.proof { background: #f9f9f9; border-color: #ddd; border-left: 6px solid rgba(44, 95, 45, 0.5); }
.box.cor  { background: rgba(44, 95, 45, 0.08); border-color: rgba(44, 95, 45, 0.35); border-left: 6px solid rgba(44, 95, 45, 0.5); }
.box.example { background: #f9f9f9; border-color: #ddd; border-left: 6px solid rgba(44, 95, 45, 0.5); }

/* Small text */
.small { color: #444; font-size: 0.96rem; }

/* Backward compat: .theorem and .explain also get box-like styling */
.theorem,
.task {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px 20px;
  margin: 1rem 0;
  background: #f9f9f9;
  border-left: 6px solid rgba(44, 95, 45, 0.5);
  font-size: inherit;
  color: #333;
}
.theorem.bg_green {
  background: rgba(44, 95, 45, 0.08);
  border-color: rgba(44, 95, 45, 0.35);
  border-left: 6px solid rgba(44, 95, 45, 0.5);
}
.explain {
  border-left: 3px solid rgba(44, 95, 45, 0.5);
  padding-left: 1rem;
  margin: 0.8rem 0;
}

/* index.html */
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
}

.row {
    display: flex;
}

.col-md-8 {
    display: flex;
    flex-direction: column;
}

iframe {
    display: block;
    width: 100%;
    height: 100%;
    flex-grow: 1;
    border: none;
    overflow-y: auto;
    overflow-x: hidden;
}

.link {
    border: 1px solid #ddd;
    padding: 0.3rem 1rem;
    margin: 1rem;
    border-radius: 10px;
    color: rgba(44, 95, 45, 1);
}
a:link,
a:visited,
a:active {
    color: #2c5f2d;
    font-weight: normal;
    text-decoration: none;
}
a:hover {
    color: #1a3d1b;
    text-decoration: underline;
    text-decoration-color: rgba(44, 95, 45, 0.4);
    text-underline-offset: 2px;
}

/* Index page list styling */
.col-md-4 ol {
    padding-left: 1.2rem;
    list-style-type: decimal;
}
.col-md-4 ol li {
    padding: 0.25rem 0.4rem;
    margin-bottom: 2px;
    line-height: 1.5;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}
.col-md-4 ol li:hover {
    background-color: rgba(44, 95, 45, 0.06);
}
.col-md-4 ol li mark {
    background-color: rgba(44, 95, 45, 0.15);
    color: #2c5f2d;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 4px;
    vertical-align: middle;
}

/* Mobile responsive styles */
@media (max-width: 767px) {
    html,
    body {
        height: auto;
        overflow-x: hidden;
        font-family: Helvetica, sans-serif;
    }

    .container-fluid,
    .row {
        height: auto;
    }

    iframe {
        min-height: 200vh;
        height: 2000px;
    }

    .link {
        margin: 0.5rem;
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }

    .theorem,
    .task {
        padding: 8px 12px;
        font-size: 16px;
        margin: 10px 0;
    }

    .box {
        padding: 8px 12px;
        margin: 0.7rem 0;
        border-radius: 4px;
    }

    .container h1 { font-size: 1.3rem; }
    .container h2 { font-size: 1.1rem; }
    .container h3 { font-size: 1rem; }

    .inside_1 {
        font-size: 14px;
        padding: 8px;
    }

    img {
        max-width: 100%;
        height: auto;
    }
}
