﻿* {
    box-sizing: border-box
}

html {
    font-family: system-ui,-apple-system,"Segoe UI",sans-serif;
    color: #18314f;
    background: #f6f9fd
}

body {
    margin: 0;
    padding-bottom: 76px
}

a {
    color: #0d69a5
}

.jw-skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap
}

.jw-skip-link:focus {
    position: fixed;
    z-index: 1000;
    top: 8px;
    left: 8px;
    width: auto;
    height: auto;
    padding: 12px 16px;
    overflow: visible;
    clip: auto;
    color: #ffffff;
    background: #123b70;
    border: 2px solid #ffffff;
    border-radius: 6px
}

body.jw-high-contrast .jw-skip-link:focus {
    color: #ffffff;
    background: #000000
}

button, input, select {
    font: inherit
}

button, a, input, select {
    touch-action: manipulation
}

.topbar {
    background: white;
    box-shadow: 0 1px 10px #17375b16;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px max(18px,calc((100vw - 960px)/2));
    position: sticky;
    top: 0;
    z-index: 10
}

.brand {
    font-size: 1.35rem;
    font-weight: 850;
    letter-spacing: -.6px;
    text-decoration: none;
    color: #123b70;
    display: flex;
    align-items: center;
    gap: 9px
}

.brandmark {
    display: inline-grid;
    place-items: center;
    background: #123b70;
    color: white;
    border-radius: 12px;
    width: 40px;
    height: 40px;
    font-size: .95rem;
    letter-spacing: 0
}

.accent {
    color: #0c9dbe
}

.topnote, .muted {
    color: #5b7189
}

.topnote {
    font-size: .85rem
}

.main {
    max-width: 960px;
    margin: auto;
    padding: 25px 18px 50px
}

h1 {
    font-size: clamp(2rem,6vw,3.4rem);
    line-height: 1.14;
    letter-spacing: -.045em;
    margin: .35em 0
}

h2 {
    font-size: 1.45rem
}

h3 {
    margin: .6rem 0 .3rem
}

p {
    line-height: 1.6
}

.eyebrow {
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .12em;
    color: #167da6
}

.hero {
    border-radius: 24px;
    background: linear-gradient(135deg,#e7f5ff,#fff);
    padding: clamp(25px,5vw,55px);
    margin-bottom: 32px
}

    .hero p {
        max-width: 530px
    }

.button {
    background: #123b70;
    color: white;
    text-decoration: none;
    display: inline-block;
    border: 0;
    border-radius: 13px;
    padding: 14px 20px;
    font-weight: 750;
    cursor: pointer;
    margin-top: 12px;
    min-height: 48px
}

    .button:hover {
        background: #0d6293
    }

.cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 20px 0 30px
}

.card {
    background: #fff;
    border: 1px solid #dfe8f3;
    border-radius: 20px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 6px 20px #18314f0b
}

.emoji {
    display: grid;
    place-items: center;
    background: #e4f5fb;
    color: #117da0;
    width: 60px;
    height: 60px;
    border-radius: 16px;
    font-size: 1.8rem;
    font-weight: 800
}

.cardlink {
    color: #087fa7;
    font-weight: 750
}

.callout {
    background: #e9f7fa;
    border-radius: 20px;
    padding: 24px
}

.field {
    max-width: 460px;
    margin: 24px 0
}

    .field label, .question label {
        display: block;
        font-weight: 750;
        margin-bottom: 8px
    }

input, select {
    border: 1px solid #9db2c7;
    border-radius: 12px;
    padding: 14px;
    width: 100%;
    min-height: 48px;
    background: white
}

.question {
    max-width: 650px
}

    .question input {
        max-width: 220px;
        display: block
    }

.feedback {
    font-weight: 700;
    min-height: 1.5rem
}

    .feedback.good {
        color: #137b49
    }

    .feedback.bad {
        color: #a23b32
    }

.small {
    font-size: .85rem
}

.chat {
    max-width: 690px;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px
}

.bubble {
    background: #e8f3ff;
    border-radius: 17px 17px 17px 3px;
    padding: 17px;
    max-width: 85%;
    line-height: 1.55
}

.chat-entry {
    display: flex;
    gap: 10px
}

    .chat-entry button {
        border: 0;
        border-radius: 12px;
        padding: 0 18px
    }

        .chat-entry button:disabled {
            opacity: .5
        }

.bottomnav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    border-top: 1px solid #dce6f1;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 20
}

    .bottomnav a {
        text-align: center;
        padding: 8px 0;
        color: #123b70;
        text-decoration: none;
        font-size: 1.35rem;
        font-weight: 800
    }

    .bottomnav small {
        display: block;
        font-size: .72rem;
        font-weight: 600
    }

.footer {
    font-size: .72rem;
    color: #718399;
    text-align: center;
    padding: 10px 15px
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0)
}

[hidden] {
    display: none !important
}

.jw-install-panel {
    max-width: 960px;
    margin: 12px auto 0;
    padding: 0 18px;
    text-align: right;
}
.jw-network-status {
    margin: 0;
    padding: 10px 16px;
    background: #7c2d12;
    color: #ffffff;
    text-align: center;
    font-weight: 750;
}
@media(min-width:700px) {
    .cards {
        grid-template-columns: repeat(2,minmax(0,1fr))
    }

    .bottomnav {
        max-width: 500px;
        margin: auto;
        border: 1px solid #dce6f1;
        border-radius: 20px 20px 0 0
    }

    .main {
        padding-top: 38px
    }
}
.jackwise-header {
    width: 100%;
    padding: 0;
    margin: 0;
}

.jackwise-logo {
    display: block;
    width: 160px;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}
.jw-dashboard .jw-subject-progress {
    margin-top: 22px;
}

.jw-dashboard .jw-progress-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    font-weight: 700;
}

.jw-dashboard .jw-progress-track {
    width: 100%;
    height: 12px;
    overflow: hidden;
    border-radius: 20px;
    background: #e6edf5;
}

.jw-dashboard .jw-progress-fill {
    height: 100%;
    border-radius: 20px;
    background: #087f73;
}

    .jw-dashboard .jw-progress-fill.english-language {
        background: #7138c7;
    }

    .jw-dashboard .jw-progress-fill.english-literature {
        background: #1764b0;
    }

.jw-dashboard .jw-progress-info {
    margin-top: 8px !important;
    font-size: .85rem;
}
.jw-account-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 16px 12px;
}

    .jw-account-nav a,
    .jw-logout-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 120px;
        min-height: 48px;
        padding: 12px 20px;
        border: 2px solid #123b70;
        border-radius: 12px;
        background: #123b70;
        color: #ffffff;
        font-family: inherit;
        font-size: 16px;
        font-weight: 700;
        text-decoration: none;
        cursor: pointer;
        box-sizing: border-box;
    }

        .jw-account-nav a:hover,
        .jw-logout-button:hover {
            background: #0b274b;
            color: #ffffff;
        }

body.jw-large-text { font-size: 112.5%; }
body.jw-extra-large-text { font-size: 125%; }
body.jw-high-contrast {
    background: #ffffff;
    color: #000000;
}
body.jw-high-contrast a,
body.jw-high-contrast .muted,
body.jw-high-contrast p,
body.jw-high-contrast h1,
body.jw-high-contrast h2,
body.jw-high-contrast h3,
body.jw-high-contrast label,
body.jw-high-contrast summary {
    color: #000000;
}
body.jw-high-contrast .button,
body.jw-high-contrast .jw-logout-button,
body.jw-high-contrast .bottomnav,
body.jw-high-contrast .bottomnav a {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}
body.jw-high-contrast input,
body.jw-high-contrast select,
body.jw-high-contrast textarea,
body.jw-high-contrast .card,
body.jw-high-contrast .jw-progress-panel {
    background: #ffffff;
    color: #000000;
    border: 2px solid #000000;
}
body :focus-visible {
    outline: 3px solid #d97706;
    outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}
@media (forced-colors: active) {
    body,
    body.jw-high-contrast {
        background: Canvas;
        color: CanvasText;
    }
    .button,
    .jw-logout-button,
    .bottomnav,
    .bottomnav a,
    input,
    select,
    textarea,
    .card {
        forced-color-adjust: auto;
    }
}
@media (max-width: 400px) {
    .jw-account-nav a,
    .jw-logout-button {
        min-width: 105px;
        padding: 12px 14px;
    }
}
.jw-welcome-account {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.jw-welcome-login,
.jw-welcome-register {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 130px;
    min-height: 48px;
    padding: 12px 20px;
    border: 2px solid #123b70;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    box-sizing: border-box;
}

.jw-welcome-login {
    background: #ffffff;
    color: #123b70;
}

.jw-welcome-register {
    background: #123b70;
    color: #ffffff;
}

.jw-welcome-login:hover {
    background: #e7f8ff;
}

.jw-welcome-register:hover {
    background: #0b274b;
    color: #ffffff;
}
.jw-dashboard-account {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}
.hero > .button {
    display: flex;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}
.jw-welcome-buttons {
    width: 100%;
    max-width: 300px;
    margin: 20px auto 0;
}

.hero .jw-start-revising {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    margin: 0;
    box-sizing: border-box;
}

.jw-welcome-buttons .jw-welcome-account {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.jw-welcome-buttons .jw-welcome-login,
.jw-welcome-buttons .jw-welcome-register {
    min-width: 0;
    width: 100%;
}
.jw-dashboard-account {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.jw-number {
    width: 180px;
    max-width: 100%;
    padding: 12px;
    border: 2px solid #666;
    border-radius: 6px;
    font-size: 1.25rem;
}

    .jw-number.jw-correct {
        background: #e7f5eb;
        border-color: #216e39;
        color: #174d29;
    }

    .jw-number.jw-incorrect {
        background: #fdebea;
        border-color: #a12622;
        color: #7b1d1a;
    }

/* Examination radio buttons */
input[type="radio"] {
    width: 20px !important;
    height: 20px !important;
    min-height: 0 !important;
    display: inline-block !important;
    vertical-align: middle;
    margin: 0 10px 0 0;
    padding: 0 !important;
}

    input[type="radio"] + label {
        display: inline !important;
        vertical-align: middle;
        width: auto !important;
    }
.bottomnav {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

    .bottomnav a {
        min-width: 0;
        text-align: center;
    }

.main {
    padding-bottom: 110px;
}

/* Checkbox alignment */
input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
    min-height: 0 !important;
    display: inline-block !important;
    vertical-align: middle;
    margin: 0 10px 0 0;
    padding: 0 !important;
}

    input[type="checkbox"] + label {
        display: inline !important;
        vertical-align: middle;
        width: auto !important;
    }

/* Shared collapsible sections */
.jw-collapse { border:1px solid #94a3b8; border-radius:10px; margin:12px 0; }
.jw-collapse > summary { cursor:pointer; padding:14px 16px; font-size:1.15rem; font-weight:700; background:rgba(100,116,139,.10); border-radius:9px; }
.jw-collapse[open] > summary { border-bottom:1px solid #94a3b8; border-radius:9px 9px 0 0; }
.jw-collapse > summary:focus-visible { outline:2px solid #2563eb; outline-offset:2px; }
.jw-collapse-body { padding:12px; min-width:0; overflow-wrap:anywhere; }
.jw-collapse-body select { max-width:100%; }
