/* ==========================================================================
   Belajar AI: static lesson pages
   A small, script-free companion to styles.css with the same navy & gold
   look: a white sticky header, lesson heads as banner cards, navy number
   tiles, gold pill buttons and a navy footer. One typeface throughout.
   ========================================================================== */

:root {
    /* Palette */
    --navy-900: #06184a;
    --navy-800: #0a2463;
    --navy-600: #1a4fc2;
    --gold-500: #f7b500;
    --gold-400: #ffc629;
    --sky-50: #f3f8fd;
    --sky-100: #e7f1fc;
    --sky-200: #cfe2f7;
    --gold-100: #fff4d1;

    /* Roles (the playground script reads --paper, --ink and --muted: keep them literal colours) */
    --paper: #ffffff;
    --paper-sunk: #f3f8fd;
    --surface: #ffffff;
    --ink: #0d1b3a;
    --ink-2: #46526d;
    --muted: #6c7791;
    --rule: #e0e8f3;
    --title: #0a2463;
    --tile: #0a2463;
    --tile-hover: #0f3488;
    --link: #1a4fc2;
    --gold-text: #8a6200;
    --accent: #f7b500;
    --accent-ink: #06184a;
    --focus: #1a4fc2;
    --shadow-sm: 0 1px 2px rgba(10, 36, 99, .05), 0 3px 10px rgba(10, 36, 99, .05);
    --shadow: 0 10px 30px rgba(10, 36, 99, .09);
    --shadow-lg: 0 22px 60px rgba(10, 36, 99, .18);
    --hero-bg: linear-gradient(180deg, #d4e8fb 0%, #e9f3fd 45%, #f6faff 82%, #ffffff 100%);
    --card-glow: radial-gradient(circle 120px at calc(100% + 18px) -18px, var(--gold-100), transparent 75%);

    --sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', 'Noto Sans Arabic', 'Noto Sans Devanagari', 'Hiragino Sans', 'PingFang SC', 'Apple SD Gothic Neo', sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --measure: 68ch;
    --gutter: clamp(16px, 3vw, 24px);
    --maxw: 1240px;
    --r-lg: 24px;
    --r: 18px;
    --r-sm: 12px;

    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --sky-50: #0a1d4d;
        --sky-100: #11296a;
        --sky-200: #1d3c86;
        --gold-100: rgba(255, 198, 41, .12);

        --paper: #061336;
        --paper-sunk: #081a45;
        --surface: #0b1f52;
        --ink: #e9eefb;
        --ink-2: #b9c5e3;
        --muted: #8d9cc4;
        --rule: #1c3170;
        --title: #ffffff;
        --tile: #1a4fc2;
        --tile-hover: #2a60d8;
        --link: #9dbcff;
        --gold-text: #ffc629;
        --accent: #ffc629;
        --focus: #ffc629;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .25), 0 3px 10px rgba(0, 0, 0, .2);
        --shadow: 0 12px 32px rgba(0, 0, 0, .35);
        --shadow-lg: 0 22px 60px rgba(0, 0, 0, .5);
        --hero-bg: linear-gradient(180deg, #0c2a72 0%, #0a2160 45%, #07184a 82%, #061336 100%);
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Letter-spacing breaks joined and syllabic scripts */
:is(:lang(ar), :lang(hi), :lang(zh), :lang(ja), :lang(ko)) :is(.kicker, .pager small) {
    letter-spacing: 0;
}

a {
    color: var(--link);
}

a:focus-visible,
summary:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

::selection {
    background: var(--gold-400);
    color: var(--navy-900);
}

/* ---------- Header ---------- */

.masthead {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 74px;
    padding: 10px max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter)));
    border-bottom: 1px solid var(--rule);
    background: color-mix(in srgb, var(--paper) 94%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    backdrop-filter: saturate(1.4) blur(10px);
    box-shadow: 0 1px 2px rgba(10, 36, 99, .04);
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    color: var(--title);
    text-decoration: none;
}

.wordmark-mark {
    position: relative;
    display: grid;
    flex: none;
    width: 44px;
    height: 44px;
    place-items: center;
    padding-bottom: 2px;
    border-radius: 13px;
    background: var(--tile);
    color: var(--gold-400);
    font-size: 24px;
    font-weight: 800;
    box-shadow: 0 6px 14px rgba(10, 36, 99, .22);
}

.wordmark-mark::after {
    content: '';
    position: absolute;
    bottom: -4px;
    inset-inline-end: -4px;
    width: 14px;
    height: 14px;
    border: 3px solid var(--paper);
    border-radius: 50%;
    background: var(--gold-500);
}

.wordmark-text {
    display: grid;
    min-width: 0;
    padding-inline-start: 14px;
    border-inline-start: 1px solid var(--rule);
    line-height: 1.25;
}

.wordmark-name {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -.02em;
    white-space: nowrap;
}

.wordmark-sub {
    overflow: hidden;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lang-menu {
    position: relative;
    flex: none;
    font-size: .84rem;
}

.lang-menu summary {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 12px;
    border: 1.5px solid var(--rule);
    border-radius: 999px;
    background: var(--surface);
    color: var(--title);
    font-weight: 600;
    white-space: nowrap;
    list-style: none;
    cursor: pointer;
}

.lang-menu summary::-webkit-details-marker {
    display: none;
}

.lang-menu summary::before,
.lang-menu summary::after {
    content: '';
    flex: none;
    background: currentColor;
}

.lang-menu summary::before {
    width: 16px;
    height: 16px;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20'/%3E%3Cpath d='M2 12h20'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20'/%3E%3Cpath d='M2 12h20'/%3E%3C/svg%3E") center / contain no-repeat;
}

.lang-menu summary::after {
    width: 14px;
    height: 14px;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform .2s;
}

.lang-menu[open] summary::after {
    transform: rotate(180deg);
}

.lang-menu summary:hover {
    border-color: var(--sky-200);
}

.lang-menu ul {
    position: absolute;
    z-index: 2;
    inset-inline-end: 0;
    display: grid;
    min-width: 200px;
    max-height: 70vh;
    overflow-y: auto;
    margin: 8px 0 0;
    padding: 8px;
    border: 1px solid var(--rule);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    list-style: none;
}

.lang-menu a {
    display: block;
    padding: 7px 12px;
    border-radius: 10px;
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
}

.lang-menu a:hover {
    background: var(--sky-50);
    color: var(--title);
}

.lang-menu a[aria-current] {
    background: var(--sky-100);
    color: var(--title);
    font-weight: 800;
}

/* ---------- Reading column ---------- */

.lesson {
    max-width: calc(var(--measure) + 2 * var(--gutter));
    margin: 0 auto;
    padding: 28px var(--gutter) 72px;
}

.hub {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter) 72px;
}

.breadcrumb {
    color: var(--muted);
    font-size: .84rem;
    font-weight: 600;
}

.breadcrumb a {
    font-weight: 700;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Lesson heads are banner cards with a small network where the photo would be */
.lesson-head {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin: 18px 0 40px;
    padding: 34px clamp(20px, 4vw, 40px);
    border: 1px solid var(--rule);
    border-radius: var(--r-lg);
    background: linear-gradient(120deg, var(--surface) 45%, var(--sky-100));
    box-shadow: var(--shadow-sm);
}

.lesson-head::after {
    content: '';
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    inset-inline-end: 0;
    width: min(48%, 360px);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 420 240'%3E%3Cpath d='M70 60L210 36M70 60L210 92M70 60L210 148M70 60L210 204M70 120L210 36M70 120L210 92M70 120L210 148M70 120L210 204M70 180L210 36M70 180L210 92M70 180L210 148M70 180L210 204M210 36L350 80M210 36L350 160M210 92L350 80M210 92L350 160M210 148L350 80M210 148L350 160M210 204L350 80M210 204L350 160' fill='none' stroke='%23cfe2f7' stroke-width='1.5'/%3E%3Cg fill='%23fff' stroke='%23b9d3f0' stroke-width='2'%3E%3Ccircle cx='70' cy='60' r='9'/%3E%3Ccircle cx='70' cy='180' r='9'/%3E%3Ccircle cx='210' cy='92' r='9'/%3E%3Ccircle cx='210' cy='204' r='9'/%3E%3Ccircle cx='350' cy='160' r='11'/%3E%3C/g%3E%3Ccircle cx='70' cy='120' r='9' fill='%23f7b500'/%3E%3Ccircle cx='210' cy='36' r='9' fill='%230a2463'/%3E%3Ccircle cx='210' cy='148' r='9' fill='%231a4fc2'/%3E%3Ccircle cx='350' cy='80' r='11' fill='%23f7b500'/%3E%3C/svg%3E") right 20px top 22px / auto 120px no-repeat;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%);
    mask-image: linear-gradient(90deg, transparent, #000 45%);
    pointer-events: none;
}

[dir="rtl"] .lesson-head::after {
    transform: scaleX(-1);
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    padding: 7px 15px;
    border-radius: 999px;
    background: var(--gold-500);
    color: var(--navy-900);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    box-shadow: 0 6px 16px rgba(247, 181, 0, .25);
}

h1 {
    margin: 0;
    color: var(--title);
    font-size: clamp(2rem, 4.6vw, 2.9rem);
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.1;
    text-wrap: balance;
}

.lede {
    margin: 14px 0 0;
    color: var(--ink-2);
    font-size: 1.08rem;
    line-height: 1.7;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0 0;
    font-size: .78rem;
    font-weight: 700;
}

.meta span {
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--sky-100);
    color: var(--title);
}

.meta span:first-child {
    background: var(--gold-100);
    color: var(--gold-text);
}

section {
    margin: 0 0 40px;
}

h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
    color: var(--title);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.3;
}

/* Section numbers sit in navy tiles */
.num {
    display: inline-grid;
    flex: none;
    min-width: 36px;
    height: 36px;
    place-items: center;
    padding: 0 6px;
    border-radius: 11px;
    background: var(--tile);
    color: var(--gold-400);
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: 0;
}

section p,
section li {
    font-size: 1.06rem;
    line-height: 1.78;
    overflow-wrap: break-word;
}

section ul,
section ol {
    padding-inline-start: 1.3em;
}

section li::marker {
    color: var(--gold-500);
    font-weight: 800;
}

section li + li {
    margin-top: 6px;
}

.cta {
    display: inline-flex;
    align-items: center;
    gap: .55em;
    min-height: 52px;
    padding: 0 26px;
    border-radius: 999px;
    background: var(--gold-500);
    color: var(--navy-900);
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(247, 181, 0, .32);
    transition: background .15s, box-shadow .15s, transform .15s;
}

.cta::after {
    content: '';
    width: 18px;
    height: 18px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

[dir="rtl"] .cta::after {
    transform: scaleX(-1);
}

.cta:hover {
    background: var(--gold-400);
    box-shadow: 0 12px 24px rgba(247, 181, 0, .38);
    transform: translateY(-1px);
}

/* ---------- Playground callout: a navy promo card ---------- */

.callout {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    column-gap: 18px;
    margin: 0 0 40px;
    padding: 24px;
    border-radius: var(--r);
    background: linear-gradient(135deg, var(--navy-800), var(--navy-900));
    color: #c9d6f2;
    box-shadow: var(--shadow);
}

.callout::before {
    content: '';
    grid-row: span 3;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--gold-500) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a2463' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='16' y='16' width='6' height='6' rx='1'/%3E%3Crect x='2' y='16' width='6' height='6' rx='1'/%3E%3Crect x='9' y='2' width='6' height='6' rx='1'/%3E%3Cpath d='M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3'/%3E%3Cpath d='M12 12V8'/%3E%3C/svg%3E") center / 26px no-repeat;
}

.callout::after {
    content: '';
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    inset-inline-end: 0;
    width: 30%;
    opacity: .7;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 420 240'%3E%3Cpath d='M70 60L210 36M70 60L210 92M70 60L210 148M70 60L210 204M70 120L210 36M70 120L210 92M70 120L210 148M70 120L210 204M70 180L210 36M70 180L210 92M70 180L210 148M70 180L210 204M210 36L350 80M210 36L350 160M210 92L350 80M210 92L350 160M210 148L350 80M210 148L350 160M210 204L350 80M210 204L350 160' fill='none' stroke='%23ffffff' stroke-opacity='.16' stroke-width='1.2'/%3E%3Cg fill='%230a2463' stroke='%23ffffff' stroke-opacity='.3' stroke-width='1.5'%3E%3Ccircle cx='70' cy='60' r='8'/%3E%3Ccircle cx='70' cy='180' r='8'/%3E%3Ccircle cx='210' cy='92' r='8'/%3E%3Ccircle cx='210' cy='204' r='8'/%3E%3Ccircle cx='350' cy='160' r='10'/%3E%3C/g%3E%3Ccircle cx='70' cy='120' r='8' fill='%23f7b500'/%3E%3Ccircle cx='210' cy='36' r='8' fill='%231a4fc2'/%3E%3Ccircle cx='210' cy='148' r='8' fill='%23f7b500' fill-opacity='.7'/%3E%3Ccircle cx='350' cy='80' r='10' fill='%23f7b500'/%3E%3C/svg%3E") right 16px center / auto 90% no-repeat;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%);
    mask-image: linear-gradient(90deg, transparent, #000 60%);
    pointer-events: none;
}

[dir="rtl"] .callout::after {
    transform: scaleX(-1);
}

.callout > p {
    grid-column: 2;
    margin: 0;
}

.callout .kicker {
    justify-self: start;
    margin-bottom: 8px;
    box-shadow: none;
}

.callout a {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -.01em;
    text-decoration: none;
}

.callout a::after {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-inline-start: 8px;
    vertical-align: -3px;
    background: var(--gold-400);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

[dir="rtl"] .callout a::after {
    transform: scaleX(-1);
}

.callout a:hover {
    text-decoration: underline;
    text-decoration-color: var(--gold-400);
    text-underline-offset: 4px;
}

.callout a:focus-visible {
    outline-color: var(--gold-400);
}

.callout .callout-note {
    margin-top: 6px;
    color: #c9d6f2;
    font-size: .92rem;
}

/* ---------- Previous / next ---------- */

.pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 40px;
}

.pager a {
    display: grid;
    align-content: start;
    gap: 4px;
    padding: 18px 20px;
    border: 1px solid var(--rule);
    border-radius: var(--r);
    background: var(--surface);
    color: var(--title);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.pager a[rel="next"] {
    text-align: end;
}

.pager a:hover {
    border-color: var(--sky-200);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.pager small {
    color: var(--gold-text);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* ---------- Hub: a sky hero, then the modules as cards ---------- */

.hub .lesson-head {
    overflow: visible;
    margin: 0 0 44px;
    padding: clamp(36px, 6vw, 72px) 0 clamp(40px, 6vw, 72px);
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
}

.hub .lesson-head::before {
    content: '';
    position: absolute;
    z-index: -2;
    top: 0;
    bottom: 0;
    left: calc(50% - 50vw);
    right: calc(50% - 50vw);
    background: var(--hero-bg);
}

.hub .lesson-head::after {
    top: 50%;
    bottom: auto;
    width: min(40%, 460px);
    aspect-ratio: 420 / 240;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 420 240'%3E%3Cpath d='M70 60L210 36M70 60L210 92M70 60L210 148M70 60L210 204M70 120L210 36M70 120L210 92M70 120L210 148M70 120L210 204M70 180L210 36M70 180L210 92M70 180L210 148M70 180L210 204M210 36L350 80M210 36L350 160M210 92L350 80M210 92L350 160M210 148L350 80M210 148L350 160M210 204L350 80M210 204L350 160' fill='none' stroke='%23cfe2f7' stroke-width='1.5'/%3E%3Cg fill='%23fff' stroke='%23b9d3f0' stroke-width='2'%3E%3Ccircle cx='70' cy='60' r='9'/%3E%3Ccircle cx='70' cy='180' r='9'/%3E%3Ccircle cx='210' cy='92' r='9'/%3E%3Ccircle cx='210' cy='204' r='9'/%3E%3Ccircle cx='350' cy='160' r='11'/%3E%3C/g%3E%3Ccircle cx='70' cy='120' r='9' fill='%23f7b500'/%3E%3Ccircle cx='210' cy='36' r='9' fill='%230a2463'/%3E%3Ccircle cx='210' cy='148' r='9' fill='%231a4fc2'/%3E%3Ccircle cx='350' cy='80' r='11' fill='%23f7b500'/%3E%3C/svg%3E") center / contain no-repeat;
    -webkit-mask-image: none;
    mask-image: none;
    transform: translateY(-50%);
}

[dir="rtl"] .hub .lesson-head::after {
    transform: translateY(-50%) scaleX(-1);
}

.hub .lesson-head > * {
    max-width: 640px;
}

.hub .kicker::before {
    content: '';
    width: 17px;
    height: 17px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z'/%3E%3Cpath d='M22 10v6'/%3E%3Cpath d='M6 12.5V16a6 3 0 0 0 12 0v-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z'/%3E%3Cpath d='M22 10v6'/%3E%3Cpath d='M6 12.5V16a6 3 0 0 0 12 0v-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.hub h1 {
    font-size: clamp(2.2rem, 4.4vw, 3.6rem);
    letter-spacing: -.04em;
    line-height: 1.06;
}

.hub .lede {
    margin-bottom: 28px;
}

.hub > h2 {
    display: block;
    margin: 8px 0 22px;
    font-size: clamp(1.5rem, 2.8vw, 2.1rem);
    letter-spacing: -.03em;
}

.hub > h2::before {
    content: '';
    display: block;
    width: 48px;
    height: 6px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: var(--gold-500);
}

.module-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.module-list li {
    display: flex;
}

.module-list a {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 22px;
    border: 1px solid var(--rule);
    border-radius: var(--r);
    background: var(--card-glow), var(--surface);
    color: var(--ink);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.module-list a:hover {
    border-color: var(--sky-200);
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.module-list .num {
    position: relative;
    width: 52px;
    height: 52px;
    margin-bottom: 8px;
    border-radius: 14px;
    font-size: 1.05rem;
}

/* The gold dot on the tile's corner */
.module-list .num::after {
    content: '';
    position: absolute;
    bottom: -4px;
    inset-inline-end: -4px;
    width: 14px;
    height: 14px;
    border: 3px solid var(--surface);
    border-radius: 50%;
    background: var(--gold-500);
}

.item-title {
    color: var(--title);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -.015em;
    line-height: 1.3;
}

.item-desc {
    color: var(--ink-2);
    font-size: .92rem;
    line-height: 1.6;
}

.item-meta {
    align-self: flex-start;
    margin-top: auto;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--sky-100);
    color: var(--title);
    font-size: .75rem;
    font-weight: 700;
}

/* ---------- Footer ---------- */

.footer {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 30px max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter)));
    background: var(--navy-900);
    color: #c9d6f2;
    font-size: .9rem;
}

.footer::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    inset-inline-end: 0;
    width: 50%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 420 240'%3E%3Cpath d='M70 60L210 36M70 60L210 92M70 60L210 148M70 60L210 204M70 120L210 36M70 120L210 92M70 120L210 148M70 120L210 204M70 180L210 36M70 180L210 92M70 180L210 148M70 180L210 204M210 36L350 80M210 36L350 160M210 92L350 80M210 92L350 160M210 148L350 80M210 148L350 160M210 204L350 80M210 204L350 160' fill='none' stroke='%23ffffff' stroke-opacity='.16' stroke-width='1.2'/%3E%3Cg fill='%230a2463' stroke='%23ffffff' stroke-opacity='.3' stroke-width='1.5'%3E%3Ccircle cx='70' cy='60' r='8'/%3E%3Ccircle cx='70' cy='180' r='8'/%3E%3Ccircle cx='210' cy='92' r='8'/%3E%3Ccircle cx='210' cy='204' r='8'/%3E%3Ccircle cx='350' cy='160' r='10'/%3E%3C/g%3E%3Ccircle cx='70' cy='120' r='8' fill='%23f7b500'/%3E%3Ccircle cx='210' cy='36' r='8' fill='%231a4fc2'/%3E%3Ccircle cx='210' cy='148' r='8' fill='%23f7b500' fill-opacity='.7'/%3E%3Ccircle cx='350' cy='80' r='10' fill='%23f7b500'/%3E%3C/svg%3E") right 24px center / auto 140% no-repeat;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%);
    mask-image: linear-gradient(90deg, transparent, #000 70%);
    pointer-events: none;
}

[dir="rtl"] .footer::before {
    transform: scaleX(-1);
}

.footer p {
    margin: 0;
}

.footer a {
    color: #fff;
    font-weight: 700;
}

.footer a:hover {
    color: var(--gold-400);
}

.footer a:focus-visible {
    outline-color: var(--gold-400);
}

/* ---------- Dark mode details ---------- */

@media (prefers-color-scheme: dark) {
    .lesson-head::after {
        opacity: .3;
    }

    .hub .lesson-head::after {
        opacity: .5;
    }

    .callout,
    .footer {
        border-top: 1px solid var(--rule);
    }

    .callout {
        border: 1px solid var(--rule);
    }
}

/* ---------- Narrow screens ---------- */

@media (min-width: 1000px) {
    .module-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 899px) {
    .hub .lesson-head::after {
        display: none;
    }
}

@media (max-width: 640px) {
    .masthead {
        min-height: 64px;
    }

    .wordmark-mark {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 22px;
    }

    .wordmark-text {
        display: none;
    }

    .lesson-head {
        padding: 26px 20px;
        border-radius: var(--r);
    }

    .lesson-head::after {
        opacity: .3;
    }

    .callout {
        grid-template-columns: minmax(0, 1fr);
    }

    .callout::before {
        grid-row: auto;
        margin-bottom: 14px;
    }

    .callout > p {
        grid-column: auto;
    }

    .pager {
        grid-template-columns: 1fr;
    }

    .pager a[rel="next"] {
        text-align: start;
    }
}
