/* ---------- Palette ---------- */
:root {
    --ink: #16163A;
    --navy: #15135C;
    --blue: #002FA7;
    --blue-hover: #0A2585;
    --paper: #F5F5F8;
    --soft: #E6EAF5;
    --muted: #5A5E78;
    --line: #D9DCE8;
    --accent: #3E7BDB;
    --sky-light: #A9C1F5;
    --sky: linear-gradient(180deg, #110E52 0%, #18237F 22%, #2A51B4 48%, #6E93D6 66%, #C9D3EC 84%, #E6E9F4 100%);
    --sky-page: linear-gradient(180deg, #110E52 0%, #18237F 30%, #2A51B4 62%, #6E93D6 80%, #C9D3EC 92%, #E6E9F4 100%);
    --seam: #E6E9F4;
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
    --bs-body-font-family: var(--sans);
    --bs-body-font-size: 16px;
    --bs-body-line-height: 1.55;
    --bs-body-color: var(--ink);
    --bs-body-color-rgb: 22, 22, 58;
    --bs-body-bg: var(--paper);
    --bs-body-bg-rgb: 245, 245, 248;
    --bs-secondary-color: var(--muted);
    --bs-secondary-color-rgb: 90, 94, 120;
    --bs-border-color: var(--line);
    --bs-border-radius-xl: 14px;
    --bs-heading-color: inherit;
    color-scheme: light;
}

/* ---------- Base ---------- */
body {
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-weight: 700;
    line-height: inherit;
    text-wrap: balance;
}

p {
    margin: 0;
}

.container {
    max-width: 1160px;
    padding-inline: 24px;
}

.container-wide {
    max-width: 1320px;
}

:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

.masthead :focus-visible,
.site-footer :focus-visible {
    outline-color: var(--sky-light);
}

/* ---------- Utilities ---------- */
.font-serif {
    font-family: var(--serif);
}

.text-navy {
    color: var(--navy);
}

.text-blue {
    color: var(--blue);
}

h2.font-serif {
    line-height: 1.15;
}

.skip-link {
    background: var(--blue);
    font-size: 14px;
}

.rule {
    width: 44px;
    height: 3px;
    margin: 14px 0 18px;
    border: 0;
    background: var(--accent);
    opacity: 1;
}

.icon {
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- Buttons ---------- */
.btn-brand {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--blue);
    --bs-btn-border-width: 0;
    --bs-btn-border-radius: 8px;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--blue-hover);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--blue-hover);
    --bs-btn-focus-box-shadow: 0 0 0 3px rgba(0, 47, 167, .35);
    --bs-btn-font-size: 15px;
    --bs-btn-font-weight: 600;
    --bs-btn-padding-x: 22px;
    --bs-btn-padding-y: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
}

.btn-brand .icon {
    width: 18px;
    height: 18px;
    flex: none;
    stroke-width: 2;
}

.btn-brand-light {
    --bs-btn-color: var(--blue);
    --bs-btn-bg: #fff;
    --bs-btn-hover-color: var(--blue);
    --bs-btn-hover-bg: #E6ECFA;
    --bs-btn-active-color: var(--blue);
    --bs-btn-active-bg: #E6ECFA;
}

/* ---------- Masthead ---------- */
.masthead {
    background: var(--grain), var(--sky);
}

.masthead--page {
    background: var(--grain), var(--sky-page);
}

.masthead::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 220px;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(230, 233, 244, 0) 0%, rgba(230, 233, 244, .35) 30%, rgba(230, 233, 244, .75) 62%, rgba(230, 233, 244, .95) 85%, var(--seam) 100%);
}

.masthead--page::after {
    height: 120px;
}

.site-header {
    column-gap: 32px;
    min-height: 64px;
}

.logo {
    gap: 12px;
    font-size: 20px;
    letter-spacing: -.01em;
}

.logo::before {
    content: "";
    flex: none;
    width: 18px;
    height: 18px;
    border-radius: 2px;
    background: radial-gradient(circle at 50% 50%, #A9C1F5 0%, #8FA9EC 60%, #6F8FE0 100%);
    transition: box-shadow .35s ease, background .35s ease;
}

.logo:hover::before,
.logo:focus-visible::before {
    background: radial-gradient(circle at 50% 50%, #fff 0%, #DCE6FF 30%, #A9C1F5 62%, #6F8FE0 100%);
    box-shadow: 0 0 12px rgba(169, 193, 245, .85), 0 0 26px rgba(169, 193, 245, .4), inset 0 0 6px rgba(255, 255, 255, .7);
    animation: logo-glow 2.4s ease-in-out infinite;
}

@keyframes logo-glow {
    50% {
        box-shadow: 0 0 16px rgba(169, 193, 245, 1), 0 0 34px rgba(169, 193, 245, .55), inset 0 0 8px rgba(255, 255, 255, .9);
    }
}

.site-header .logo {
    height: 64px;
}

.logo em {
    color: var(--sky-light);
}

.main-nav a {
    font-size: 13px;
    color: rgba(255, 255, 255, .8);
    transition: color .2s, transform .2s;
}

.main-nav a:hover,
.main-nav a[aria-current] {
    color: #fff;
}

.main-nav a[aria-current] {
    font-weight: 600;
}

.main-nav a:focus-visible {
    outline-offset: -2px;
}

.powered {
    font-size: 12px;
    line-height: 1.3;
    color: rgba(255, 255, 255, .8);
}

.powered strong,
.footer-bottom strong {
    color: var(--sky-light);
}

.powered sup,
.footer-bottom sup {
    font-size: .6em;
}

.powered em {
    font-size: 11px;
    color: rgba(255, 255, 255, .65);
}

.site-burger {
    width: 44px;
    height: 44px;
}

.site-burger span {
    width: 22px;
    height: 2px;
    background: #fff;
    transition: transform .3s ease, opacity .2s;
}

.site-burger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.site-burger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.site-burger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

@media (min-width: 1200px) {
    .main-nav a {
        padding: 0 14px;
    }

    .main-nav a::after {
        content: "";
        position: absolute;
        left: 14px;
        right: 14px;
        bottom: 16px;
        height: 2px;
        border-radius: 2px;
        background: linear-gradient(90deg, #A9C1F5, #fff, #A9C1F5);
        box-shadow: 0 0 10px rgba(169, 193, 245, .8);
        transform: scaleX(0);
        transition: transform .3s ease;
    }

    .main-nav a:hover {
        transform: scale(1.08);
    }

    .main-nav a:hover::after {
        transform: scaleX(.4);
    }

    .main-nav a[aria-current]::after {
        transform: scaleX(1);
    }
}

@media (max-width: 1199.98px) {
    .main-nav a {
        padding: 14px 0;
        font-size: 16px;
        border-top: 1px solid rgba(255, 255, 255, .15);
    }

    .main-nav a[aria-current] {
        color: var(--sky-light);
    }
}

/* ---------- Page background ---------- */
main {
    padding-bottom: 96px;
    background: linear-gradient(180deg, var(--seam) 0px, #EAECF5 180px, #EFF0F6 480px, #F6F7FA 1100px, #FFFFFF 100%);
}

/* ---------- Content pages ---------- */
.page-column {
    max-width: 880px;
    margin-inline: auto;
}

.page-head {
    padding: clamp(40px, 7vw, 88px) 0 clamp(88px, 10vw, 136px);
}

.page-head .breadcrumb {
    --bs-breadcrumb-divider-color: rgba(255, 255, 255, .55);
    --bs-breadcrumb-item-active-color: rgba(255, 255, 255, .8);
}

.page-head .breadcrumb a {
    color: rgba(255, 255, 255, .8);
    text-decoration: none;
}

.page-head .breadcrumb a:hover {
    color: #fff;
    text-decoration: underline;
}

.page-head h1 {
    font-size: clamp(44px, 7vw, 96px);
    line-height: .95;
    letter-spacing: -.03em;
    text-shadow: 0 2px 30px rgba(17, 14, 82, .35);
}

.page-intro {
    max-width: 46ch;
    font-size: clamp(19px, 1.8vw, 24px);
    line-height: 1.35;
    color: #DCE5FA;
    text-shadow: 0 1px 12px rgba(17, 14, 82, .45);
}

.page-sheet {
    box-shadow: 0 28px 50px -34px rgba(17, 14, 82, .45);
}

.prose {
    font-size: 17px;
    line-height: 1.7;
}

.prose > * + * {
    margin-top: 1em;
}

.prose > :first-child {
    margin-top: 0;
}

.prose h2 {
    margin-top: 1.8em;
    font-family: var(--serif);
    font-size: clamp(26px, 2.6vw, 32px);
    line-height: 1.15;
    color: var(--navy);
}

.prose h3 {
    margin-top: 1.5em;
    font-size: 19px;
    color: var(--navy);
}

.prose a {
    color: var(--blue);
    text-underline-offset: 3px;
}

.prose a:hover {
    color: var(--blue-hover);
}

.prose ul,
.prose ol {
    margin-bottom: 0;
    padding-left: 1.3em;
}

.prose li + li {
    margin-top: .35em;
}

.prose blockquote {
    margin: 0;
    padding-left: 18px;
    border-left: 3px solid var(--accent);
    font-family: var(--serif);
    font-style: italic;
    color: var(--navy);
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--grain), linear-gradient(180deg, #18237F, #110E52);
}

.dotted-surface {
    opacity: 0;
    transition: opacity 1.2s ease;
}

.dotted-surface.on {
    opacity: 1;
}

.footer-top {
    padding: 72px 0 120px;
}

.site-footer .motto {
    line-height: 1.2;
}

.site-footer .motto em {
    color: var(--sky-light);
}

.footer-links {
    grid-template-rows: repeat(var(--rows, 3), auto);
    grid-auto-flow: column;
    gap: 10px 56px;
}

.footer-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, .85);
    transition: color .2s;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-bottom {
    padding: 20px 0 28px;
    border-top: 1px solid rgba(255, 255, 255, .15);
    font-size: 12px;
    color: rgba(255, 255, 255, .7);
}

.footer-bottom a {
    color: rgba(255, 255, 255, .8);
}

.footer-bottom a:hover {
    color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 575.98px) {
    .container {
        padding-inline: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}
