:root {
    color-scheme: light;
    font-family: "Noto Sans Thai", "Leelawadee UI", Tahoma, system-ui, sans-serif;
    color: #13274c;
    background: #f9fafc;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); }
a { color: #174581; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #2d71ba; outline-offset: 4px; }
.brand {
    min-width: 0;
    padding: clamp(30px, 4.4vw, 76px);
    color: #fff;
    background: linear-gradient(165deg, #0719327a 5%, #0c234e30 72%, #07193280),
        #102950 url("background.webp") center 62% / cover no-repeat;
}
.brand img { width: min(330px, 100%); height: auto; }
.brand-title { margin-top: clamp(58px, 13vh, 155px); }
.brand-title p { margin: 16px 0 0; font-size: clamp(20px, 2.65vw, 44px); font-weight: 700; line-height: 1.16; }
main { min-width: 0; display: grid; grid-template-rows: auto 1fr auto; padding: clamp(22px, 3.8vw, 63px); }
nav a, .resources a { font-weight: 650; text-underline-offset: 4px; }
.content { align-self: center; width: min(100%, 590px); margin: 0 auto; padding: 42px 0; }
h1 { margin: 0 0 26px; font-size: clamp(25px, 3vw, 43px); line-height: 1.3; letter-spacing: -.025em; }
.roles { display: grid; gap: 15px; }
.role, .course { display: flex; align-items: center; justify-content: space-between; gap: 16px; text-decoration: none; }
.role { padding: 24px; border: 1px solid #dce4ef; border-radius: 19px; background: #fff; color: #13274c; box-shadow: 0 8px 24px #1029500a; }
.role:hover, .course:hover { border-color: #557fb5; background: #f0f5fc; }
.role strong { font-size: 23px; }
small { display: block; margin-top: 3px; color: #465977; font-size: 14px; }
.arrow { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #193f76; color: #fff; font-size: 23px; }
.faculty .arrow { background: #ffd15b; color: #172b4c; }
.course { margin-top: 20px; padding: 16px 21px; border: 1px solid #dbe5f3; border-radius: 14px; background: #e9f0fa; }
footer { color: #51617a; font-size: 13px; }
form { display: grid; gap: 10px; }
label { font-weight: 680; }
input { width: 100%; min-width: 0; min-height: 48px; padding: 10px 13px; border: 1px solid #9cacc3; border-radius: 10px; background: #fff; color: inherit; font: inherit; }
.password, .account, .resources { display: flex; gap: 12px; align-items: center; }
.account, .resources { justify-content: space-between; flex-wrap: wrap; }
.account { margin: 6px 0 12px; }
.resources { margin-top: 18px; }
button { cursor: pointer; border: 1px solid #dbe5f3; border-radius: 10px; padding: 10px 16px; min-height: 46px; background: #e9f0fa; color: #174581; font: inherit; font-weight: 700; }
.primary { background: #193f76; color: white; }
.primary:hover { background: #102c58; }
@media (max-width: 760px) {
    body { grid-template-columns: 1fr; }
    .brand { padding: 25px; background-position: center 60%; }
    .brand img { width: min(220px, 100%); }
    .brand-title { margin-top: 25px; }
    .brand-title p { margin-top: 7px; }
    .content { padding: 30px 0; }
}

@font-face {
    font-family: "Noto Sans Thai";
    src: url("NotoSansThai-Regular.ttf") format("truetype");
    font-weight: 400;
    font-display: swap;
    unicode-range: U+0E00-0E7F;
}
@font-face {
    font-family: "Noto Sans Thai";
    src: url("NotoSansThai-Bold.ttf") format("truetype");
    font-weight: 700;
    font-display: swap;
    unicode-range: U+0E00-0E7F;
}
@font-face {
    font-family: "Noto Sans";
    src: url("NotoSans-Regular.ttf") format("truetype");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "Noto Sans";
    src: url("NotoSans-Bold.ttf") format("truetype");
    font-weight: 700;
    font-display: swap;
}
:root { font-family: "Noto Sans Thai", "Noto Sans", system-ui, sans-serif; }
.brand {
    background: linear-gradient(135deg, rgba(2, 6, 15, .87), rgba(5, 12, 24, .72) 58%, rgba(3, 8, 18, .66)),
        #102950 url("background.webp") center 62% / cover no-repeat;
}
.brand-title .map-logo {
    display: block;
    width: clamp(190px, 22vw, 205px);
    height: auto;
    filter: drop-shadow(0 3px 12px #0008);
}
.brand-title p { text-shadow: 0 3px 20px #000b; }
.topbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap-reverse; gap: 10px; }
.languages {
    display: inline-flex;
    margin-inline-start: auto;
    padding: 4px;
    gap: 2px;
    border: 1px solid #d5deee;
    border-radius: 99px;
    background: #eef3fa;
}
.languages a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 34px;
    padding: 4px 10px;
    border-radius: 99px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}
.languages a[aria-current] { color: white; background: #193f76; }
.flag { width: 21px; height: 14px; border-radius: 3px; box-shadow: 0 0 0 1px #15274837; }
.flag-th { background: linear-gradient(#ac2430 16.67%, white 16.67% 33.33%, #28254a 33.33% 66.67%, white 66.67% 83.33%, #ac2430 83.33%); }
.flag-uk { background: #012169 url("flag-uk.svg") center / 100% 100% no-repeat; }
.course {
    justify-content: flex-start;
    padding: 18px;
    border: 1px solid #214f8a;
    border-radius: 18px;
    background: linear-gradient(115deg, #122b55, #1d4e89);
    color: #fff;
    box-shadow: 0 12px 25px #142e5629;
}
.course:hover { border-color: #3269a6; background: #214f8a; }
.course strong { font-size: 21px; }
.course small { color: #e3edff; }
.course-icon, .course-arrow {
    display: grid;
    flex: none;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 24px;
}
.course-icon { background: #ffffff25; }
.course-arrow { margin-inline-start: auto; border-radius: 50%; background: #ffd15b; color: #152747; }
@media (max-width: 420px) {
    .course { gap: 10px; padding: 14px; }
    .course-icon, .course-arrow { width: 32px; height: 32px; font-size: 19px; }
}
.login-error { padding: 12px 16px; border: 1px solid #edc3c3; border-radius: 10px; color: #8c2727; background: #fff2f2; }

.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.brand-title { margin-block: auto; padding-block: clamp(28px, 5vh, 65px); }
.brand-kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; color: #ffd15b; font-size: 13px; font-weight: 700; letter-spacing: .12em; }
.brand-kicker::before { content: ""; width: 25px; height: 2px; background: currentColor; }
.brand-steps { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 22px 0 0; color: #ffdb80; list-style: none; counter-reset: map-step; font-size: 13px; }
.brand-steps li { counter-increment: map-step; }
.brand-steps li::before { content: counter(map-step, decimal-leading-zero); margin-inline-end: 5px; font-weight: 700; }
.brand-credit { color: #eef3ff; font-size: 13px; }
main > footer { text-align: center; }
.primary { width: 100%; border-radius: 999px; background: #293478; box-shadow: 0 7px 20px #29347824; }
.primary:hover { background: #202b67; }
.password { position: relative; }
.password:has(button:not([hidden])) input { padding-inline-end: 54px; }
.password button { position: absolute; inset-inline-end: 5px; padding: 0; width: 42px; min-height: 36px; border: 0; background: transparent; color: #4e6387; }
.password button:not([hidden]) { display: grid; place-items: center; }
.password .eye-slash { display: none; }
.password button[aria-pressed="true"] .eye-slash { display: block; }
@media (max-width: 760px) {
    .brand { gap: 14px; }
    .brand-title { padding-block: 12px; }
    .brand-kicker { margin-bottom: 12px; }
    .brand-steps { margin-top: 15px; }
}
