/* Custom CSS for Term page */

.container {
    max-width: 1000px;
    padding-left: 20px;
    padding-right: 20px;
    margin: 24px auto 0;
}

@media (max-width: 959px) {
    .container {
        margin: 0;
    }
    .wrapper > .container {
        padding-top: 14px;
    }
}

.wrapper .content {
    margin-top: 24px;
    overflow: visible;
}

h1 {
    color: #222;
    font-size: 24px;
    line-height: 33px;
    font-weight: 700;
    letter-spacing: 1.44px;
    padding: 26px 32px;
    background-color: #f5f5f5;
}

@media (max-width: 959px) {
    h1 {
        padding: 16px 29px;
        font-size: 16px;
        line-height: 22px;
        letter-spacing: 0.96px;
    }
}

h2 {
    margin-top: 16px;
    color: #222;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1.08px;
}

@media (max-width: 959px) {
    h2 {
        font-size: 14px;
        line-height: 19px;
        letter-spacing: 0.84px;
    }
}

hr {
    border: none;
    border-top: 2px solid #ED780A;
    margin: 6px 0 8px;
}

@media (max-width: 959px) {
    hr {
        margin: 8px 0;
    }
}

p, ol {
    color: #222;
    font-size: 16px;
    line-height: 22px;
    letter-spacing: 0.96px;
}

@media (max-width: 959px) {
    p, ol {
        font-size: 14px;
        line-height: 19px;
        letter-spacing: 0.84px;
    }
}

ol {
    list-style-type: none; /* Remove default numbers */
}

ol.ol1 {
    counter-reset: main-section; /* Create main counter */
}

/* Logic for formatting the number */
ol > li {
    padding-left: 2em;
    position: relative;
}

ol > li:before {
    position: absolute;
    left: 0;
    top: 0;
    color: #333;
}

ol.ol1 > li::before {
    counter-increment: main-section;
    content: counter(main-section) ".";
}

ol li p {
    display: inline-block; /* Keep paragraph text on the same line as number */
}

/* Ensure sub-lists reset their internal counter properly */
ol ol {
    counter-reset: sub-section;
}

ol.ol1.rounded-brackets > li::before {
    content: "(" counter(main-section) ")";
}

/* -----------------------------------------
   HELPER CLASS: Start From 2
   Usage: Add class "start-from-two" to a SUB-OL
   Result: First item becomes X-2 instead of X-1
   ----------------------------------------- */
ol ol.start-from-two {
    counter-reset: sub-section 1; /* Sets counter to 1, so first increment = 2 */
}

ol ol.start-from-two > li {
    padding-left: 3.5em;
    position: relative;
}

ol ol.start-from-two > li::before {
    counter-increment: sub-section;
    content: counter(main-section)"-"counter(sub-section);
}


/* =========================================
   STYLE 2: Katakana List (ア, イ, ウ)
   Usage: Add class "katakana-style" to <ol>
   ========================================= */

ol.katakana-style {
    list-style: none; /* Remove default bullets */
    counter-reset: kata-counter; /* Create specific counter */
}

ol.katakana-style li {
    counter-increment: kata-counter;
}

ol.katakana-style li::before {
    /* content: counter(variable, style) + suffix */
    content: counter(kata-counter, katakana) "）";
}