/* ==========================================================
   YVU Results page - results-modern.css
   Load AFTER Styles.css / mystyle2.css / chromestyle.css
   ========================================================== */

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

:root {
    --maroon: #7a1f2b;
    --maroon-deep: #5a1520;
    --ink: #1c2230;
    --muted: #5d6677;
    --paper: #f3f4f7;
    --card: #ffffff;
    --line: #dfe2e8;
    --visited: #8a90a0;
    --focus: #1d4ed8;
    --radius: 12px;
}

/* ---------- Page frame ----------
   Styles.css uses selectors like "#motherContainer #header #title",
   so these rules use the same ID chains (and load later) to win. */
html {
    -webkit-text-size-adjust: 100%;
}

html body {
    margin: 0;
    min-height: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Hind", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    text-align: left;
}

html body #motherContainer {
    width: auto;
    max-width: 900px;
    height: auto;
    margin: 0 auto;
    padding: 16px 16px 56px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    box-sizing: border-box;
}

/* ---------- Header ---------- */
#motherContainer #header {
    height: auto;
    width: auto;
    margin: 0 0 20px;
    padding: 16px;
    background: var(--card);
    border: 1px solid var(--line);
    border-bottom: 4px solid var(--maroon);
    border-radius: var(--radius);
    text-align: center;
    overflow: hidden;
}

#motherContainer #header #title {
    float: none;
    width: auto;
    height: auto;
    margin: 0;
}

#motherContainer #header #title img.title {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.clear {
    clear: both;
}

/* ---------- Content area ---------- */
#motherContainer #contentBase {
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    background: transparent;
}

/* hide the old inline red divider */
#motherContainer #contentBase > div:first-child:not(.list-type1) {
    display: none;
}

/* ---------- Results list ---------- */
html body .list-type1 {
    width: auto;
    max-width: 100%;
}

html body .list-type1 ol {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: none;
    font-family: inherit;
    font-size: 1rem;
    display: grid;
    gap: 10px;
}

html body .list-type1 ol ol {
    margin: 0;
}

html body .list-type1 li {
    margin: 0;
    padding: 0;
    list-style: none;
}

html body .list-type1 a {
    position: relative;
    display: block;
    top: auto;
    left: auto;
    margin: 0;
    padding: 14px 52px 14px 20px;
    background: var(--card);
    color: var(--ink);
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    border: 1px solid var(--line);
    border-left: 5px solid var(--line);
    border-radius: var(--radius);
    transform: none;
    transition: border-color 0.18s ease, background-color 0.18s ease,
        box-shadow 0.18s ease, color 0.18s ease;
    overflow-wrap: anywhere;
}

/* remove the old numbered bubble */
html body .list-type1 a:before {
    content: none;
    display: none;
}

/* chevron on the right */
html body .list-type1 a:after {
    content: "";
    position: absolute;
    right: 22px;
    top: 50%;
    width: 8px;
    height: 8px;
    margin-top: -5px;
    border-top: 2px solid var(--muted);
    border-right: 2px solid var(--muted);
    transform: rotate(45deg);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

html body .list-type1 a:hover {
    background: #fff;
    color: var(--maroon-deep);
    border-color: var(--maroon);
    border-left-color: var(--maroon);
    box-shadow: 0 6px 18px rgba(90, 21, 32, 0.12);
    transform: none;
    text-decoration: none;
}

html body .list-type1 a:hover:after {
    border-color: var(--maroon);
    transform: translateX(4px) rotate(45deg);
}

html body .list-type1 a:active {
    background: #fbf3f4;
}

/* already-opened results fade a little so students can track what they checked */
html body .list-type1 a:visited {
    color: var(--visited);
    border-left-color: #cfd3dc;
}

html body .list-type1 a:visited:hover {
    color: var(--maroon-deep);
    border-left-color: var(--maroon);
}

html body .list-type1 a:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

/* ---------- The latest result: the one loud element ---------- */
html body .list-type1 li:first-child a {
    padding-top: 26px;
    padding-bottom: 22px;
    background: var(--maroon);
    border-color: var(--maroon);
    border-left-color: #e0b24a;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 600;
    box-shadow: 0 10px 24px rgba(90, 21, 32, 0.25);
}

html body .list-type1 li:first-child a:before {
    content: "Latest";
    display: inline-block;
    position: absolute;
    top: 0;
    left: 15px;
    transform: translateY(-50%);
    margin: 0;
    padding: 2px 12px;
    height: auto;
    width: auto;
    line-height: 1.5;
    background: #e0b24a;
    color: #3a2a00;
    border: 0;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

html body .list-type1 li:first-child a:after {
    border-color: #fff;
}

html body .list-type1 li:first-child a:hover {
    background: var(--maroon-deep);
    color: #fff;
    border-color: var(--maroon-deep);
    border-left-color: #e0b24a;
}

html body .list-type1 li:first-child a:hover:after {
    border-color: #fff;
}

html body .list-type1 li:first-child a:visited {
    color: #fff;
}

html body .list-type1 li:first-child {
    margin-bottom: 6px;
}

/* ---------- Small screens ---------- */
@media (max-width: 600px) {
    html body #motherContainer {
        padding: 10px 10px 40px;
    }

    #motherContainer #header {
        padding: 12px;
        margin-bottom: 14px;
    }

    html body .list-type1 a {
        padding: 13px 44px 13px 16px;
        font-size: 0.97rem;
    }

    html body .list-type1 a:after {
        right: 16px;
    }

    html body .list-type1 li:first-child a {
        font-size: 1.05rem;
    }
}

/* ---------- Respect user motion settings ---------- */
@media (prefers-reduced-motion: reduce) {
    html body .list-type1 a,
    html body .list-type1 a:after {
        transition: none;
    }

    html body .list-type1 a:hover:after {
        transform: rotate(45deg);
    }
}

/* ---------- Print ---------- */
@media print {
    body {
        background: #fff;
    }

    html body .list-type1 a,
    html body .list-type1 li:first-child a {
        background: #fff;
        color: #000;
        border: 0;
        border-bottom: 1px solid #ccc;
        border-radius: 0;
        box-shadow: none;
    }

    html body .list-type1 a:after,
    html body .list-type1 li:first-child a:before {
        display: none;
    }
}
