/* Breakpoints sm 600 / md 960 / lg 1280, spacing unit 8px. */
:root {
    --color-primary-light: #87acff;
    --color-primary: #4e7de8;
    --color-primary-dark: #0052b5;
    --color-text: #081f4d;
    --color-text-secondary: #333;
    --color-error: #ff375f;
    --color-success: #30d158;
    --color-info: #0b83ff;
    --color-logo-green-light: #b5fff8;
    --color-logo-green: #82d7c5;
    --color-logo-green-dark: #50a595;
    --color-logo-purple-light: #b0bdff;
    --color-logo-purple: #7c8df6;
    --color-logo-purple-dark: #474eb8;
    --color-logo-yellow-light: #ffe888;
    --color-logo-yellow: #ebb659;
    --color-logo-yellow-dark: #b6862a;
    --color-header-bg: #f8faff;
    --color-footer-bg: #09255a;
    --color-footer-muted: #8497bb;
    --font-family:
        'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif,
        'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
    --spacing: 8px;
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Bare URLs in the legal copy are one unbreakable word wider than a phone's
   screen; the old reset let any word break rather than run off the edge. */
html {
    word-break: break-word;
}

body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.75;
    letter-spacing: 0.02em;
    color: var(--color-text);
    background: #fff;
}

/* Without height:auto the width/height attributes stretch scaled images. */
img {
    max-width: 100%;
    height: auto;
}

.site-header__logo img {
    height: 40px;
    width: auto;
}

.site-footer__brand img {
    height: 60px;
    width: auto;
}

h1,
h2,
h3 {
    line-height: 1.379;
    letter-spacing: -0.5px;
    font-weight: 700;
    margin: 0 0 1rem;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.8rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: 0.25px;
    margin: 0 0 1rem;
}

h5 {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 0.75rem;
}

h6 {
    font-size: 1em;
    font-weight: 600;
    line-height: 1.6;
    margin: 0 0 0.5rem;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    background: var(--color-primary-dark);
    color: #fff;
    padding: 8px 16px;
}

.skip-link:focus {
    left: 0;
}

/* ---------- Layout ---------- */
/* Mirrors Gatsby PageSection: 15% side padding on desktop, 3% under lg, 30px under md. */
.section {
    padding-left: 15%;
    padding-right: 15%;
}

@media (max-width: 1279px) {
    .section {
        padding-left: 3%;
        padding-right: 3%;
    }
}

@media (max-width: 959.95px) {
    .section {
        padding-left: 30px;
        padding-right: 30px;
    }
}

.grid {
    display: grid;
    gap: calc(var(--spacing) * 3);
}

@media (min-width: 960px) {
    .grid--2 {
        grid-template-columns: 1fr 1fr;
    }

    .grid--3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ---------- Buttons ---------- */
.button {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3575;
    letter-spacing: 0.0536em;
    white-space: nowrap;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    padding: 12px 28px;
    min-width: 168px;
    text-align: center;
    cursor: pointer;
    border: 0;
}

.button:hover {
    text-decoration: none;
}

.button--contained {
    background: var(--color-primary);
    color: #fff;
}

.button--contained:hover {
    background: var(--color-primary-dark);
}

.button--outlined {
    background: transparent;
    color: inherit;
    border: 1px solid currentColor;
}

.button--text {
    background: none;
    color: var(--color-primary);
}

.button--text:hover {
    background: rgba(78, 125, 232, 0.04);
}

/* MUI washes the background on hover only, but darkens the label on focus too. */
.button--text:hover,
.button--text:focus {
    color: var(--color-primary-dark);
}

/* Live drops the wash on touch devices and keeps just the darker label. */
@media (hover: none) {
    .button--text:hover {
        background: transparent;
    }
}

.button--with-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* FontAwesome duotone: the secondary layer is drawn at 40%. */
.fa-secondary {
    opacity: 0.4;
}

.button__icon {
    margin: 0 -4px 0 calc(var(--spacing) * 2);
    flex-shrink: 0;
}

/* ---------- Rendered markdown ---------- */
.prose h1 {
    margin: 0.67em 0 calc(var(--spacing) * 2);
}

.prose h2 {
    margin: calc(var(--spacing) * 10) 0 calc(var(--spacing) * 2);
}

.prose h3 {
    margin: calc(var(--spacing) * 5) 0 var(--spacing);
}

.prose h4,
.prose h5,
.prose h6,
.prose p {
    margin: 0 0 var(--spacing);
}

.prose p,
.prose li {
    font-size: 1rem;
    line-height: 1.75;
    letter-spacing: 0.02em;
}

/* The old reset zeroed the browser's list padding, so the markers below sit in
   the left margin instead. */
.prose ul,
.prose ol {
    margin: 0 0 calc(var(--spacing) * 2) calc(var(--spacing) * 2);
    padding: 0;
    list-style: none;
}

.prose li {
    margin: 0;
    padding-left: calc(var(--spacing) * 3);
    position: relative;
}

.prose ul > li::before {
    content: '';
    position: absolute;
    top: 6px;
    left: -5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-primary);
}

.prose ol {
    counter-reset: li;
}

.prose ol > li {
    counter-increment: li;
}

.prose ol > li::before {
    content: counter(li);
    position: absolute;
    top: 0;
    left: -9px;
    color: var(--color-primary);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
}

/* ---------- Loading / error block (components/loading) ---------- */
.loading {
    text-align: center;
    padding: var(--spacing);
}

.loading__bar {
    position: relative;
    display: inline-block;
    overflow: hidden;
    width: 80px;
    height: 4px;
    margin: calc(var(--spacing) * 3);
    border-radius: 5px;
    background: var(--color-primary);
}

.loading__bar span {
    position: absolute;
    top: 0;
    bottom: 0;
    transition: transform 0.2s linear;
}

.loading__bar span:first-child {
    background: var(--color-logo-yellow);
    animation: loading-bar-1 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
}

.loading__bar span:last-child {
    background: var(--color-logo-green);
    animation: loading-bar-2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
}

@keyframes loading-bar-1 {
    0% {
        left: -35%;
        right: 100%;
    }

    60%,
    100% {
        left: 100%;
        right: -90%;
    }
}

@keyframes loading-bar-2 {
    0% {
        left: -200%;
        right: 100%;
    }

    60%,
    100% {
        left: 107%;
        right: -8%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .loading__bar span {
        animation: none;
    }
}

.loading__error {
    color: var(--color-error);
    margin: 0;
}

.loading__retry {
    margin: calc(var(--spacing) * 3);
    background: #fff;
    color: var(--color-primary-dark);
}

/* ---------- Announcement banner ---------- */
.announcement-banner {
    color: #fff;
    text-align: center;
    padding: calc(var(--spacing) * 1.5);
}

.announcement-banner p {
    margin: 0;
}

.announcement-banner a {
    color: #fff;
    text-decoration: underline;
}

/* ---------- Header ---------- */
.site-header {
    background: var(--color-header-bg);
    position: sticky;
    top: 0;
    z-index: 10;
}

/* menu.js sets is-sticky on scroll. */
.site-header.is-sticky {
    box-shadow: 0 1px 6px 0 rgba(0, 0, 0, 0.1);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing) * 2);
    padding-top: calc(var(--spacing) * 3);
    padding-bottom: calc(var(--spacing) * 3);
}

.site-header.is-sticky .site-header__inner {
    padding-top: 14px;
    padding-bottom: 14px;
}

/* Equal-width side columns keep the nav and its dropdown page-centred. */
.site-header__logo {
    margin: 0;
    font-size: 0;
    flex: 0 0 184px;
}

.site-header__menu-toggle {
    display: none;
    background: none;
    border: 0;
    padding: calc(var(--spacing) * 1.5);
    margin-left: auto;
    margin-right: calc(var(--spacing) * -1.5);
    color: var(--color-text);
    cursor: pointer;
}

.icon-bars,
.icon-times,
.icon-angle-up {
    display: block;
}

.site-nav {
    flex: 1;
    position: relative;
}

.site-nav__list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing);
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav__item {
    position: static;
}

.site-nav__link {
    position: relative;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.6;
    /* Live's h6 variant computes 0.0075em; without this it inherits body's 0.02em instead. */
    letter-spacing: 0.0075em;
    color: var(--color-text-secondary);
    background: none;
    border: 0;
    padding: 4px 18px;
    border-radius: 10px;
    transition: all 0.2s;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.site-nav__link:hover,
.site-nav__item:hover > .site-nav__link {
    background: #fff;
    box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 0.16);
    text-decoration: none;
}

.site-nav__link.is-active {
    color: var(--color-primary);
}

/* One wide panel centred under the nav bar. */
.site-nav__submenu {
    display: none;
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 850px;
    max-width: 100vw;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 0.16);
    list-style: none;
    margin: 0;
    padding: calc(var(--spacing) * 4);
    z-index: 30;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 calc(var(--spacing) * 3);
}

.site-nav__submenu--compact {
    grid-template-columns: repeat(3, 1fr);
}

@media (min-width: 960px) {
    .site-nav__item:hover > .site-nav__submenu:not(.site-nav__submenu--mobile-only),
    .site-nav__item:focus-within > .site-nav__submenu:not(.site-nav__submenu--mobile-only) {
        display: grid;
    }

    /* The panel starts 26px below the link, so the 10px caret sits 16px under. */
    .site-nav__item.has-submenu:hover > .site-nav__link::after,
    .site-nav__item.has-submenu:focus-within > .site-nav__link::after {
        content: '';
        position: absolute;
        left: calc(50% - 10px);
        top: calc(100% + 16px);
        width: 0;
        height: 0;
        border-left: 10px solid transparent;
        border-right: 10px solid transparent;
        border-bottom: 10px solid #fff;
        filter: drop-shadow(0 -3px 2px rgba(0, 0, 0, 0.05));
        z-index: 40;
    }

    /* Bridges the gap to the panel; without it hover is lost on the way down. */
    .site-nav__item.has-submenu:hover > .site-nav__link::before,
    .site-nav__item.has-submenu:focus-within > .site-nav__link::before {
        content: '';
        position: absolute;
        top: 100%;
        left: -50px;
        right: -50px;
        height: 30px;
    }
}

.site-nav__submenu a {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing) * 2);
    padding: calc(var(--spacing) * 1.5) var(--spacing);
    color: inherit;
}

/* Duotone: swap_icon_opacity flips which layer is faded. */
.submenu-icon {
    flex-shrink: 0;
    /* Matches live's FontAwesome "lg" size (1.33333em) at the inherited 14px body font-size. */
    width: 18.67px;
    height: 18.67px;
    color: var(--color-primary);
}

.submenu-icon__primary {
    opacity: 0.5;
}

.submenu-icon__secondary {
    opacity: 0.2;
}

.submenu-icon__primary.is-swapped {
    opacity: 0.2;
}

.submenu-icon__secondary.is-swapped {
    opacity: 0.5;
}

/* Active state keeps the duotone shading (live's inner swap-opacity layer is unaffected
   by its own active/wrapper opacity going to 1) -- it just scales the same swap up to 1/0.4
   instead of flattening both layers to full opacity. */
.site-nav__submenu a.is-active .submenu-icon__primary {
    opacity: 1;
}

.site-nav__submenu a.is-active .submenu-icon__secondary {
    opacity: 0.4;
}

.site-nav__submenu a.is-active .submenu-icon__primary.is-swapped {
    opacity: 0.4;
}

.site-nav__submenu a.is-active .submenu-icon__secondary.is-swapped {
    opacity: 1;
}

.site-nav__submenu a.is-active .submenu-text {
    border-bottom: 3px solid var(--color-primary);
}

.site-nav__submenu a:hover {
    text-decoration: none;
}

.submenu-title {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    color: var(--color-text);
}

.submenu-description {
    display: block;
    font-size: 0.75rem;
    line-height: 1.66;
    color: #7a7a7a;
}

.site-header__actions {
    flex: 0 0 184px;
    display: flex;
    justify-content: flex-end;
}

.site-nav__actions,
.site-nav__close {
    display: none;
}

/* Mobile nav */
@media (max-width: 959.95px) {
    .site-header__menu-toggle {
        display: block;
    }

    .site-header__actions {
        display: none;
    }

    /* A centred sheet over a scrim, every submenu already open. */
    .site-nav {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 1300;
        background: rgba(0, 0, 0, 0.5);
        padding: 0;
    }

    .site-nav.is-open {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .site-nav__panel {
        position: relative;
        display: flex;
        flex-direction: column;
        width: calc(100% - 64px);
        max-width: 600px;
        max-height: calc(100% - 64px);
        overflow: hidden;
        background: #fff;
        border-radius: 4px;
        box-shadow:
            0 11px 15px -7px rgba(0, 0, 0, 0.2),
            0 24px 38px 3px rgba(0, 0, 0, 0.14),
            0 9px 46px 8px rgba(0, 0, 0, 0.12);
    }

    /* Only the item list scrolls; the actions bar stays pinned, as DialogActions did. */
    .site-nav__list {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0;
        padding: 0 calc(var(--spacing) * 4) calc(var(--spacing) * 4);
    }

    .site-nav__close {
        display: block;
        position: absolute;
        right: 30px;
        top: 30px;
        z-index: 5;
        padding: calc(var(--spacing) * 0.5);
        border: 0;
        background: none;
        color: var(--color-text);
        cursor: pointer;
    }

    .site-nav__link {
        margin: calc(var(--spacing) * 4) 0 calc(var(--spacing) * 2.5);
        padding: 0;
    }

    .site-nav__submenu,
    .site-nav__item:hover > .site-nav__submenu {
        display: block;
        width: auto;
        position: static;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        min-width: 0;
        padding: 0;
    }

    .site-nav__submenu a {
        /* No left padding: aligns flush with the 32px list padding, matching the group heading above it.
           Top/bottom is 12px per side (live's real per-item Grid padding), cancelled at each group's
           first/last item below so only the group heading's own margin shows at those edges. */
        padding: calc(var(--spacing) * 1.5) calc(var(--spacing) * 2) calc(var(--spacing) * 1.5) 0;
    }

    .site-nav__submenu li:first-child a {
        padding-top: 0;
    }

    .site-nav__submenu li:last-child a {
        padding-bottom: 0;
    }

    /* The dialog's actions bar. */
    .site-nav__actions {
        display: flex;
        justify-content: center;
        background: var(--color-header-bg);
        padding: var(--spacing);
    }
}

/* Short-content groups (e.g. Company) keep a 2-column grid between 600-959px. */
@media (min-width: 600px) and (max-width: 959px) {
    .site-nav__submenu--compact,
    .site-nav__item:hover > .site-nav__submenu--compact {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    /* Row-aware: both items in the top row lose their top padding, not just the first DOM child. */
    .site-nav__submenu--compact li:nth-child(-n + 2) a {
        padding-top: 0;
    }
}

/* Company's 3-column desktop dropdown needs the same row-aware edge cancellation. */
@media (min-width: 960px) {
    .site-nav__submenu--compact li:nth-child(-n + 3) a {
        padding-top: 0;
    }

    .site-nav__submenu--compact li:last-child a {
        padding-bottom: 0;
    }
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--color-footer-bg);
    color: #fff;
    padding-top: calc(var(--spacing) * 8);
    padding-bottom: calc(var(--spacing) * 8);
}

@media (max-width: 959.95px) {
    .site-footer {
        padding-top: calc(var(--spacing) * 4);
        padding-bottom: calc(var(--spacing) * 4);
    }
}

/* MUI medium Fab sitting on the header-tinted strip above the footer. */
.back-to-top-wrapper {
    background: var(--color-header-bg);
    padding: calc(var(--spacing) * 2);
}

.back-to-top {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: calc(var(--spacing) * 5) auto;
    border-radius: 50%;
    background: #fff;
    color: var(--color-primary);
    box-shadow:
        0 2px 1px -1px rgba(0, 0, 0, 0.2),
        0 1px 1px 0 rgba(0, 0, 0, 0.14),
        0 1px 3px 0 rgba(0, 0, 0, 0.12);
}

.back-to-top:hover {
    text-decoration: none;
    box-shadow:
        0 3px 3px -2px rgba(0, 0, 0, 0.2),
        0 3px 4px 0 rgba(0, 0, 0, 0.14),
        0 1px 8px 0 rgba(0, 0, 0, 0.12);
}

/* The old button drew this at 2x its own 0.8rem, in a 1.25em-wide box. */
.back-to-top .icon-angle-up {
    width: 32px;
    height: 25.6px;
}

.site-footer__columns {
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--spacing) * 3);
}

/* The old grid sat a 3-wide column beside a 10-wide one on a no-wrap row, so
   the two shrank to 3/13 and 10/13, with the gutter taken out of the same width. */
.site-footer__brand {
    flex: 0 0 calc(100% * 3 / 13 - 24px * 10 / 13);
}

.site-footer__rights {
    font-weight: 600;
    line-height: 1.6;
    margin: calc(var(--spacing) * 1.5) 0 0;
}

.site-footer__copyright,
.site-footer__address {
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 4px 0;
}

.site-footer__address {
    color: var(--color-primary);
    margin-bottom: calc(var(--spacing) * 3);
}

.site-footer__stores {
    display: flex;
    flex-direction: column;
    gap: var(--spacing);
    margin-bottom: calc(var(--spacing) * 3);
    align-items: flex-start;
}

.store-button {
    display: inline-flex;
    align-items: center;
    width: 128px;
    padding: var(--spacing);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    color: #fff;
    letter-spacing: 0.64px;
    line-height: 1.75;
    white-space: nowrap;
}

.store-button:hover {
    text-decoration: none;
    border-color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

/* Touch devices kept the border change and dropped the wash. */
@media (hover: none) {
    .store-button:hover {
        background: transparent;
    }
}

.store-button__icon {
    width: 24px;
    height: 24px;
    margin-right: var(--spacing);
    flex-shrink: 0;
}

/* The old icon was 30px tall and drew at the glyph's own 12/16 width. */
.store-button__icon--apple {
    width: 22.5px;
    height: 30px;
}

.store-button__label {
    display: flex;
    flex-direction: column;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.store-button__label > span {
    font-size: 0.5rem;
    font-weight: 300;
}

.site-footer__menu {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--spacing) * 2);
}

.site-footer__menu-group {
    flex: 1 1 180px;
}

.site-footer__menu-title {
    font-size: 1em;
    font-weight: 600;
    color: var(--color-footer-muted);
    margin: 0 0 calc(var(--spacing) * 2);
}

.site-footer__menu-group ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer__menu-group a {
    display: block;
    color: #fff;
    font-weight: 300;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: var(--spacing);
    text-transform: capitalize;
}

.site-footer__menu-group a:hover {
    color: var(--color-primary-light);
    text-decoration: none;
}

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid rgba(255, 255, 255, 0.32);
    margin-top: calc(var(--spacing) * 10);
    padding-top: calc(var(--spacing) * 2.5);
    gap: calc(var(--spacing) * 2);
}

.site-footer__bottom p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.6;
    letter-spacing: 0.02em;
}

.site-footer__social {
    display: flex;
    gap: calc(var(--spacing) * 2);
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer__social a {
    color: #fff;
}

.site-footer__social a:hover {
    color: var(--color-logo-purple);
}

.site-footer__social svg {
    width: 26.67px;
    height: 21.33px;
}

/* Below md every footer column is full width, the bottom row included. */
@media (max-width: 959.95px) {
    .site-footer__brand,
    .site-footer__menu,
    .site-footer__menu-group,
    .site-footer__bottom > * {
        flex: 0 0 100%;
    }

    /* The social row stayed right-aligned once it wrapped below the tagline. */
    .site-footer__social {
        margin-top: calc(var(--spacing) * 6);
        justify-content: flex-end;
    }
}
