:root {
    --ink: #0f1b3d;
    --ink-2: #1a2a5c;
    --ink-deep: #080f26;
    --blue: #2f6fe4;
    --cyan: #3cc6ef;
    --paper: #f3f6fc;
    --muted: #5a6788;
    --line: #dfe5f2;
    --header-h: 86px;
    --nav-h: 64px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Jost', sans-serif;
    background-color: var(--ink-deep);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(8, 15, 38, 0.74), rgba(8, 15, 38, 0.74)),
        url('./assets/bg.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

img,
svg {
    max-width: 100%;
}

a,
button {
    touch-action: manipulation;
}

.header-section {
    width: 90%;
    height: var(--header-h);
    background-color: #fff;
    position: fixed;
    top: 0;
    left: 5%;
    z-index: 1000;
    display: flex;
    align-items: center;
    flex-direction: row;
    padding: 3px;
    -webkit-user-select: none;
    user-select: none;
}

.header-section .left {
    flex: 0 0 13%;
    height: 100%;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--ink);
    text-align: center;
    padding: 0 6px;
}

.header-section .left span {
    text-transform: capitalize;
    font-weight: 500;
    line-height: 1.15;
}

.header-section .center {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.header-section .center p {
    color: var(--ink);
    margin: 0 12px 0 0;
}

.header-section .left img {
    width: 140px;
    height: auto;
}

.header-section .right {
    flex: 0 0 30%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
}

.header-section .right a {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    background-color: var(--ink);
    color: #fff;
    text-align: center;
    padding: 0 4px;
}

.header-section .right a span {
    text-transform: capitalize;
    font-size: 0.85rem;
}

.header-section .right a:hover {
    background-color: var(--blue);
}

.main-section {
    width: 90%;
    height: auto;
    min-height: 70vh;
    background-color: var(--paper);
    margin: calc(var(--header-h) + 34px) 5% 20px;
    display: flex;
    padding-bottom: 30px;
    animation: rise-in 0.4s ease both;
}

.main-section .left {
    flex: 0 0 15%;
    min-width: 150px;
    align-self: flex-start;
    background-color: #080f26;
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: 140px;
    gap: 5px;
    padding-right: 5px;
    padding-bottom: 5px;
}

.main-section .left a {
    background-color: #fff;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--ink-deep);
    text-align: center;
    padding: 8px;
}

.main-section .left a img {
    width: 80px;
    height: auto;
}

.main-section .left a p {
    text-transform: uppercase;
    margin: 12px 0 0;
}

.main-section .left a:hover {
    transform: translateX(8px);
}

.main-section .right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #080f26;
    padding: 30px 20px 0;
}

.header-section a:focus-visible,
.main-section .left a:focus-visible {
    outline: 3px solid var(--cyan);
    outline-offset: 2px;
}

.container {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
}

p.intro {
    font-size: 1.05rem;
    color: #080f26;
    margin-bottom: 32px;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f1b3d;
    margin-bottom: 20px;
}

ol {
    list-style: none;
    counter-reset: step-counter;
    padding: 0;
    margin: 0;
}

li {
    counter-increment: step-counter;
    position: relative;
    margin-bottom: 15px;
    padding-left: 36px;
}

li::before {
    content: counter(step-counter) ".";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 600;
    color: #1a2a5c;
}

.step-title {
    font-weight: 600;
    color: #080f26;
    display: inline;
}

.step-desc {
    color: #080f26;
    display: block;
    margin-top: 4px;
    font-size: 0.95rem;
}

.big-title {
    font-size: clamp(1.4rem, 3.2vw, 1.9rem);
    text-transform: capitalize;
    text-align: center;
    line-height: 1.2;
    margin: 16px 0 0;
}

.siswati-title {
    font-size: clamp(0.95rem, 2.2vw, 1.125rem);
    margin: 8px 0 28px;
    font-style: italic;
    text-align: center;
    color: var(--muted);
}

.lang-switch {
    display: inline-flex;
    margin-bottom: 24px;
    border: 1px solid var(--ink);
}

.lang-btn {
    font: inherit;
    font-size: 0.9rem;
    padding: 8px 20px;
    background-color: #fff;
    color: var(--ink);
    border: 0;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-btn + .lang-btn {
    border-left: 1px solid var(--ink);
}

.lang-btn:hover {
    background-color: var(--line);
}

.lang-btn.is-active {
    background-color: var(--ink);
    color: #fff;
}

.lang-btn:focus-visible {
    outline: 3px solid var(--cyan);
    outline-offset: 2px;
}

.container[data-lang="en"] [lang="ss"],
.container[data-lang="ss"] [lang="en"] {
    display: none;
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 1100px) {
    .header-section .center p {
        display: none;
    }

    .header-section .right a span {
        font-size: 0.75rem;
    }
}

@media (max-width: 860px) {
    :root {
        --header-h: 60px;
    }

    html {
        scroll-padding-top: calc(var(--header-h) + var(--safe-top));
    }

    body {
        overscroll-behavior-y: none;
        padding-bottom: calc(var(--nav-h) + var(--safe-bottom));
        -webkit-font-smoothing: antialiased;
    }

    .header-section {
        width: 100%;
        left: 0;
        height: calc(var(--header-h) + var(--safe-top));
        padding: var(--safe-top) calc(14px + var(--safe-right)) 0 calc(14px + var(--safe-left));
        justify-content: space-between;
        gap: 10px;
        border-bottom: 1px solid var(--line);
        box-shadow: 0 2px 14px rgba(8, 15, 38, 0.18);
    }

    .header-section .left {
        flex: 1 1 auto;
        min-width: 0;
        flex-direction: row;
        justify-content: flex-start;
        gap: 10px;
        text-align: left;
        padding: 0;
    }

    .header-section .left svg {
        flex: none;
        width: 28px;
        height: 28px;
    }

    .header-section .left span {
        font-size: 0.95rem;
        font-weight: 600;
        max-width: 11em;
    }

    .header-section .center {
        flex: none;
        justify-content: flex-end;
    }

    .header-section .center img {
        width: 84px;
    }

    .header-section .right {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1001;
        width: 100%;
        height: calc(var(--nav-h) + var(--safe-bottom));
        padding: 0 var(--safe-right) var(--safe-bottom) var(--safe-left);
        gap: 0;
        background-color: #fff;
        border-top: 1px solid var(--line);
        box-shadow: 0 -2px 14px rgba(8, 15, 38, 0.18);
    }

    .header-section .right a {
        background-color: transparent;
        color: var(--muted);
        gap: 3px;
        min-height: 48px;
        transition: color 0.2s ease, background-color 0.2s ease;
    }

    .header-section .right a:hover {
        background-color: transparent;
    }

    .header-section .right a:active {
        color: var(--blue);
        background-color: var(--paper);
    }

    .header-section .right a svg {
        width: 26px;
        height: 26px;
    }

    .header-section .right a span {
        font-size: 0.72rem;
        font-weight: 500;
        letter-spacing: 0.02em;
    }

    .main-section {
        width: auto;
        min-height: 0;
        margin: calc(var(--header-h) + var(--safe-top) + 14px) calc(14px + var(--safe-right)) 18px calc(14px + var(--safe-left));
        padding: 0;
        flex-direction: column;
        gap: 14px;
        background-color: transparent;
    }

    .main-section .left {
        flex: none;
        min-width: 0;
        min-height: 0;
        width: 100%;
        background-color: #080f26;
        grid-auto-rows: auto;
        gap: 5px;
        padding: 0 5px 5px 0;
    }

    .main-section .left a {
        flex-direction: row;
        justify-content: flex-start;
        gap: 14px;
        min-height: 72px;
        padding: 12px 16px;
        text-align: left;
        transition: transform 0.15s ease, background-color 0.15s ease;
        -webkit-user-select: none;
        user-select: none;
    }

    .main-section .left a img {
        width: 48px;
        flex: none;
    }

    .main-section .left a p {
        margin: 0;
        font-weight: 600;
        font-size: 0.95rem;
        letter-spacing: 0.02em;
    }

    .main-section .left a::after {
        content: '';
        margin-left: auto;
        flex: none;
        width: 9px;
        height: 9px;
        border-top: 2px solid var(--muted);
        border-right: 2px solid var(--muted);
        transform: rotate(45deg);
    }

    .main-section .left a:hover {
        transform: none;
    }

    .main-section .left a:active {
        transform: scale(0.98);
        background-color: var(--paper);
    }

    .main-section .right {
        flex: none;
        justify-content: flex-start;
        background-color: var(--paper);
        padding: 24px 18px 26px;
        box-shadow: 0 6px 18px rgba(8, 15, 38, 0.25);
    }

    .main-section .right > svg {
        width: 64px;
        height: 64px;
        color: var(--ink);
    }

    .big-title {
        margin-top: 12px;
    }

    .siswati-title {
        margin-bottom: 22px;
    }

    .lang-switch {
        display: flex;
        width: 100%;
        border: 0;
        padding: 4px;
        background-color: var(--line);
        gap: 4px;
    }

    .lang-btn {
        flex: 1;
        min-height: 44px;
        background-color: transparent;
        font-weight: 500;
    }

    .lang-btn + .lang-btn {
        border-left: 0;
    }

    .lang-btn:hover {
        background-color: transparent;
    }

    .lang-btn.is-active {
        background-color: var(--ink);
        color: #fff;
        box-shadow: 0 2px 8px rgba(8, 15, 38, 0.25);
    }

    p.intro {
        font-size: 1rem;
        line-height: 1.55;
        margin-bottom: 24px;
    }

    h2 {
        font-size: 1.15rem;
        margin-bottom: 14px;
    }

    li {
        margin-bottom: 12px;
        padding: 14px 14px 14px 58px;
        background-color: #fff;
        border: 1px solid var(--line);
        line-height: 1.4;
    }

    li:last-child {
        margin-bottom: 0;
    }

    li::before {
        content: counter(step-counter);
        left: 14px;
        top: 14px;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: var(--ink);
        color: #fff;
        font-size: 0.95rem;
    }

    .step-title {
        font-size: 1.02rem;
    }

    .step-desc {
        margin-top: 6px;
        line-height: 1.5;
        color: var(--muted);
    }
}

@media (max-width: 380px) {
    .header-section .left span {
        font-size: 0.85rem;
    }

    .header-section .center img {
        width: 68px;
    }

    .main-section .right {
        padding: 20px 14px 22px;
    }

    li {
        padding-left: 54px;
    }
}

@media (max-width: 860px) and (orientation: landscape) and (max-height: 480px) {
    :root {
        --header-h: 52px;
        --nav-h: 52px;
    }

    .header-section .right a {
        flex-direction: row;
        gap: 8px;
    }

    .header-section .right a svg {
        width: 22px;
        height: 22px;
    }

    .main-section .left {
        grid-template-columns: repeat(3, 1fr);
    }

    .main-section .left a {
        min-height: 64px;
        padding: 10px 12px;
    }

    .main-section .left a img {
        width: 36px;
    }

    .main-section .left a::after {
        display: none;
    }
}

@media (hover: none) {
    .main-section .left a:hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}