/* ---------- Fonts (self-hosted, variable) ---------- */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("fonts/inter-cyrillic-wght-normal.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
    --indigo: #210082;
    --blue: #0098FF;
    --black: #000000;
    --white: #FFFFFF;
    --surface: #F5F5F5;
    --surface-clear: rgba(245, 245, 245, 0);
    /* Solid buttons look slightly raised, straight up from the page: a thin, close shadow of equal
       depth on every side. Kept tight so it does not read as a glow; no offset and no lit or shaded
       edge, which would make the button seem to lean. */
    --raised: 0 0 1px rgba(0, 0, 0, .3), 0 0 3px rgba(0, 0, 0, .16);
    --raised-pressed: 0 0 1px rgba(0, 0, 0, .3), 0 0 1px rgba(0, 0, 0, .16);
    --raised-inverse: 0 0 1px rgba(0, 0, 0, .3), 0 0 4px rgba(0, 0, 0, .2);
    --raised-inverse-pressed: 0 0 1px rgba(0, 0, 0, .3), 0 0 1px rgba(0, 0, 0, .2);
    --black-60: rgba(0, 0, 0, .6);
    --system: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --gutter: 20px;
}
/* Inter and Plus Jakarta Sans have no Arabic or Chinese glyphs (and Plus Jakarta Sans no Cyrillic):
   those scripts fall through to the reader's system fonts. */
:lang(ar) { --system: "SF Arabic", "Geeza Pro", "Segoe UI", "Noto Sans Arabic", "Noto Naskh Arabic", Tahoma, system-ui, sans-serif; }
:lang(zh) { --system: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", system-ui, sans-serif; }
/* Declared wherever --system changes, so a label in another language (the language bar) picks up its own fallbacks. */
:root, :lang(ar), :lang(zh) {
    --font-ui: "Inter", var(--system);
    --font-display: "Plus Jakarta Sans", "Inter", var(--system);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--white);
    color: var(--black);
    font-family: var(--font-ui);
    font-size: 1rem;
    line-height: 1.625rem;
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 32px; }

.container { width: min(100% - 2 * var(--gutter), 1200px); margin-inline: auto; }
.visually-hidden {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; inset-inline-start: 16px; top: 16px; z-index: 30;
    transform: translateY(calc(-100% - 32px));   /* out of sight above the page, however tall it is */
    padding: .875rem 1.5rem; border-radius: 12px;
    background: var(--indigo); color: var(--white);
    font-weight: 600; line-height: 1.5rem;
}
.skip-link:focus { transform: none; }

a:focus-visible, button:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 4px;
    border-radius: 4px;
}

/* ---------- Type ---------- */
.display { font: 700 2.125rem/2.8125rem var(--font-display); letter-spacing: -.02em; }
.h2 { font: 700 1.75rem/2.25rem var(--font-display); letter-spacing: -.015em; }
.statement { font: 500 1.25rem/1.875rem var(--font-display); letter-spacing: -.01em; }
.lead { font-size: 1.0625rem; line-height: 1.75rem; }
.body { font-size: 1rem; line-height: 1.625rem; }
.eyebrow { font-size: .8125rem; font-weight: 600; line-height: 1rem; letter-spacing: .04em; text-transform: uppercase; }
.small { font-size: .875rem; line-height: 1.375rem; }
/* Translated headings wrap wherever they fall, so even out their lines. English keeps the wraps drawn in Figma. */
:root:not(:lang(en)) :is(.display, .h2) { text-wrap: balance; }
/* The two headings above the public benefit statement and the current status are not drawn to a
   fixed wrap, so in English too a heading that needs two lines is split evenly, not left with one
   word on its second line. */
.about .h2 { text-wrap: balance; }
/* And their text does not end on a line of one word, where the browser can avoid it. */
.about :is(.statement, .body) { text-wrap: pretty; }
/* Tracking is tuned for Latin letterforms; it breaks Arabic joining and crowds Chinese. */
:lang(ar) :is(.display, .h2, .statement, .lead, .eyebrow),
:lang(zh) :is(.display, .h2, .statement, .lead, .eyebrow) { letter-spacing: 0; }

/* ---------- Button ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: .875rem 1.5rem; border: 0; border-radius: 12px;
    font-size: 1rem; font-weight: 600; line-height: 1.5rem; text-align: center;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn:focus-visible { outline-offset: 0; border-radius: 12px; }
/* Hover colours apply only where the pointer can hover. A touch screen has no hover: a tapped link
   or button would keep its hover colour after the finger lifts, until something else is tapped.
   The same colour is used while pressed (:active), which is the feedback a touch screen gets. */
.btn-primary { background: var(--indigo); color: var(--white); box-shadow: var(--raised); }
@media (hover: hover) { .btn-primary:hover { background: var(--black); } }
.btn-primary:active { background: var(--black); box-shadow: var(--raised-pressed); }
.btn-inverse { background: var(--white); color: var(--black); box-shadow: var(--raised-inverse); }
@media (hover: hover) { .btn-inverse:hover { background: var(--indigo); color: var(--white); } }
.btn-inverse:active { background: var(--indigo); color: var(--white); box-shadow: var(--raised-inverse-pressed); }
.btn-ghost { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1.5px var(--white); }
@media (hover: hover) { .btn-ghost:hover { background: var(--white); color: var(--black); } }
.btn-ghost:active { background: var(--white); color: var(--black); }
.btn-ghost:focus-visible { box-shadow: none; }
/* On small screens, where the hero's two buttons are stacked, they swap designs: "Subscribe to
   updates" is the outlined one and "Contact us" the filled one, each with the other's hovered and
   pressed states too. (These two designs are used only by those two buttons.) */
@media (max-width: 599.98px) {
    .hero .btn-inverse { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1.5px var(--white); }
    .hero .btn-inverse:active { background: var(--white); color: var(--black); box-shadow: inset 0 0 0 1.5px var(--white); }
    .hero .btn-inverse:focus-visible { box-shadow: none; }
    .hero .btn-ghost { background: var(--white); color: var(--black); box-shadow: var(--raised-inverse); }
    .hero .btn-ghost:active { background: var(--indigo); color: var(--white); box-shadow: var(--raised-inverse-pressed); }
}
@media (max-width: 599.98px) and (hover: hover) {
    .hero .btn-inverse:hover { background: var(--white); color: var(--black); }
    .hero .btn-ghost:hover { background: var(--indigo); color: var(--white); }
}

/* ---------- Field ---------- */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label { font-size: .875rem; font-weight: 600; line-height: 1.25rem; align-self: flex-start; }
.control {
    display: block; width: 100%; height: 3.25rem; margin: 0; padding: 0 16px;
    border: 1px solid var(--black); border-radius: 10px;
    background: var(--white); color: var(--black);
    font-size: 1rem; line-height: 1.5rem;
    appearance: none; -webkit-appearance: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
textarea.control { height: 10rem; min-height: 10rem; padding: .875rem 16px; resize: vertical; }
.control::placeholder { color: var(--black-60); opacity: 1; }
.control:focus {
    outline: none;
    border-color: var(--indigo);
    box-shadow: inset 0 0 0 1px var(--indigo), 0 0 0 3px var(--blue);
}
.honeypot { position: absolute; transform: scale(0); }

/* Form submission status (replaces the submit button while sending) */
@keyframes form-spin { to { transform: rotate(360deg); } }
@keyframes form-fade-in { from { opacity: 0; } to { opacity: 1; } }
.form-status { display: flex; align-items: center; justify-content: center; flex: none; }
.form-spinner {
    width: 28px; height: 28px; flex: none;
    border: 3px solid rgba(33, 0, 130, .2); border-top-color: var(--indigo); border-radius: 50%;
    animation: form-spin .7s linear infinite, form-fade-in .3s ease;
}
.form-status-text { font-size: 1rem; font-weight: 600; line-height: 1.5rem; white-space: nowrap; animation: form-fade-in .3s ease; }

/* ---------- Lines that scroll sideways ----------
   On small screens the language bar and the footer links are each one line that scrolls sideways.
   The box around the line fades at whichever edge has more beyond it: site.js adds has-less and
   has-more, and each box says which colour to fade into. */
.scroll-fade { position: relative; }
.scroll-fade::before, .scroll-fade::after {
    content: ""; position: absolute; top: 0; bottom: 0; width: 32px;
    pointer-events: none; opacity: 0; transition: opacity .15s ease;
}
.scroll-fade::before { inset-inline-start: 0; background: linear-gradient(to left, var(--fade-clear), var(--fade)); }
.scroll-fade::after { inset-inline-end: 0; background: linear-gradient(to right, var(--fade-clear), var(--fade)); }
[dir="rtl"] .scroll-fade::before { background: linear-gradient(to right, var(--fade-clear), var(--fade)); }
[dir="rtl"] .scroll-fade::after { background: linear-gradient(to left, var(--fade-clear), var(--fade)); }
.scroll-fade.has-less::before, .scroll-fade.has-more::after { opacity: 1; }

/* ---------- Language bar ---------- */
.lang-bar { --fade: var(--surface); --fade-clear: var(--surface-clear); background: var(--surface); }
/* On small screens the languages sit on one line that scrolls sideways. */
.lang-list {
    display: flex; gap: 20px;
    padding: 5px 0; padding-inline-start: var(--gutter);
    overflow-x: auto; scrollbar-width: none;
    font-size: .875rem; font-weight: 500; line-height: 1.375rem; white-space: nowrap;
}
.lang-list::-webkit-scrollbar { display: none; }
.lang-list li { flex: none; }
.lang-list li:last-child { padding-inline-end: var(--gutter); }   /* the gutter after the last language, inside the scrolling line */
.lang-list a {
    display: block; padding: 4px 0;
    color: var(--black-60);   /* the languages not selected; the current one is black */
    font-family: var(--font-ui);
    text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
    transition: color .15s ease;
}
@media (hover: hover) { .lang-list a:hover { color: var(--indigo); } }
.lang-list a:active { color: var(--indigo); }
.lang-list a[aria-current] { color: var(--black); font-weight: 600; text-decoration: none; }
.lang-list a:focus-visible { outline-offset: 2px; }
/* ---------- Language menu (small screens) ----------
   Below 600px the language bar gives way to a button beside the menu button. The button shows the
   flag of the country that stands for the page's language, and opens a menu of all six languages,
   each listed by its ISO code and its own name.
   site.js opens and closes it, so without JavaScript the bar stays instead. */
.lang-menu { display: none; position: relative; }
.lang-button {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; margin: 0; padding: 0;
    border: 0; border-radius: 10px; background: none; cursor: pointer;
}
.lang-button:focus-visible { outline-offset: 0; border-radius: 10px; }
/* The flag is a small circle: smaller than the menu icon beside it, so that the colour does not
   outweigh it. */
.flag { flex: none; width: 20px; height: 20px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .16); }   /* the ring gives the white parts of a flag an edge on white */
.lang-panel {
    position: absolute; z-index: 15; top: calc(100% + 4px); inset-inline-end: 0;
    min-width: 12.5rem; max-width: calc(100vw - 2 * var(--gutter));
    padding: 8px; border-radius: 8px;
    background: var(--white); color: var(--black);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .1), 0 12px 40px rgba(0, 0, 0, .28);
    animation: a11y-in .18s ease;
}
@media (prefers-reduced-motion: reduce) { .lang-panel { animation: none; } }
.lang-options a {
    display: flex; align-items: center; gap: 12px;
    min-height: 44px; padding: 8px 12px; border-radius: 12px;   /* as round as the site's buttons */
    font-family: var(--font-ui); font-size: 1rem; font-weight: 500; line-height: 1.5rem; white-space: nowrap;
}
.lang-options a:focus-visible { outline-offset: -3px; border-radius: 12px; }
@media (hover: hover) { .lang-options a:hover { background: var(--surface); } }
.lang-options a:active { background: var(--surface); }
.lang-options .lang-code { flex: none; min-width: 1.75rem; font-size: .875rem; font-weight: 700; letter-spacing: .03em; }   /* the ISO code, in a column of its own */
/* The language of this page: white on a dark blue box, bolder, with a tick at the far end. It comes
   after the hover and pressed rules so that it stays as it is under a pointer or a finger. */
.lang-options a[aria-current] { background: var(--indigo); color: var(--white); font-weight: 600; }
.lang-options a[aria-current]::after {
    content: ""; flex: none; width: 7px; height: 12px; margin-inline: auto 6px; margin-bottom: 3px;
    border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* ---------- Header ---------- */
.site-header { background: var(--white); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 21px 0 15px; }
.logo { display: block; flex: none; }
.logo img { width: auto; height: 36px; }
.menu-button {
    display: none; align-items: center; justify-content: center;
    width: 48px; height: 48px; margin: 0; padding: 0;
    border: 0; border-radius: 10px; background: none; color: var(--black); cursor: pointer;
}
.menu-button:focus-visible { outline-offset: 0; border-radius: 10px; }
.menu-button .icon-close, .menu-button[aria-expanded="true"] .icon-menu { display: none; }
.menu-button[aria-expanded="true"] .icon-close { display: block; }
/* The language button and the menu button sit together at the far end of the header. The box is
   shown only where the menu button is (see "Header navigation" below). */
.header-actions { display: none; align-items: center; gap: 4px; }
/* Neither button shows anything when it is pressed: the browser's own tap highlight, a dark square
   over the button, is turned off, and what the button opens is the response. */
.lang-button, .menu-button { -webkit-tap-highlight-color: transparent; }
.nav { display: flex; flex-direction: column; flex-basis: 100%; }
.nav-links { display: flex; flex-direction: column; }
.nav-links a { display: block; padding: 12px 0; font-size: 1.0625rem; font-weight: 500; line-height: 1.5rem; }
/* Section links (header and footer) respond with an underline under the label, not a colour:
   a 2px line in the lighter brand blue, with rounded ends.
   The line starts at the near edge in the reading direction: the left, or the right on a
   right-to-left page.
   - Hovered (mouse) or pressed: it grows from the near edge.
   - Let go without a click or tap: it shrinks back to the near edge, where it started.
   - Click or tap completed: it finishes growing, then leaves by the far edge, so it has travelled
     right across. site.js holds it with is-drawn and then switches it to is-crossing.
   The line is a full-width shape under the label, revealed and hidden by clipping it from one
   side; the clip is rounded too, so the moving end stays round. */
.nav-links, .footer-links { --line-waiting: inset(0 100% 0 0 round 1px); --line-gone: inset(0 0 0 100% round 1px); }
[dir="rtl"] .nav-links, [dir="rtl"] .footer-links { --line-waiting: inset(0 0 0 100% round 1px); --line-gone: inset(0 100% 0 0 round 1px); }
.nav-links a span, .footer-links a span { position: relative; }
.nav-links a span::after, .footer-links a span::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px;
    border-radius: 1px; background: var(--blue);
    clip-path: var(--line-waiting);
    transition: clip-path .4s ease;   /* 0.4s: keep LINE in site.js the same */
}
@media (hover: hover) {
    .nav-links a:hover span::after, .footer-links a:hover span::after { clip-path: inset(0 round 1px); }
}
.nav-links a:active span::after, .footer-links a:active span::after,
.nav-links a.is-drawn span::after, .footer-links a.is-drawn span::after { clip-path: inset(0 round 1px); }
/* After the rules above, so that it wins while the link is still hovered or pressed. */
.nav-links a.is-crossing span::after, .footer-links a.is-crossing span::after { clip-path: var(--line-gone); }
@media (prefers-reduced-motion: reduce) { .nav-links a span::after, .footer-links a span::after { transition: none; } }
.nav .btn { margin-top: 12px; }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; padding: 80px 0 88px; background: var(--black); color: var(--white); }
.hero-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(90deg, rgba(0, 0, 0, .86) 0%, rgba(0, 0, 0, .78) 50%, rgba(0, 0, 0, .66) 100%);
}
/* Right-to-left: mirror the picture and its shading so the text still sits on the dark side. */
[dir="rtl"] .hero-bg, [dir="rtl"] .hero::before { transform: scaleX(-1); }
.hero-content { display: flex; flex-direction: column; gap: 20px; }
.actions { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }

/* ---------- About ---------- */
.about { padding: 64px 0; }
.about-grid { display: flex; flex-direction: column; gap: 44px; }
.about-col { display: flex; flex-direction: column; gap: 24px; flex: 1 1 0; min-width: 0; }
.section-heading { display: flex; flex-direction: column; gap: 16px; }
.rule { flex: none; height: 2px; background: var(--indigo); }
.highlights { display: flex; flex-direction: column; gap: 14px; }
.highlights li { display: flex; align-items: center; gap: 14px; min-width: 0; font-size: 1.0625rem; font-weight: 500; line-height: 1.5rem; }
.highlights svg { flex: none; }

/* ---------- Subscribe ---------- */
.subscribe { padding-bottom: 64px; }
.subscribe-panel { display: flex; flex-direction: column; gap: 24px; padding: 32px 24px; background: var(--blue); color: var(--indigo); }
.subscribe-heading { display: flex; flex-direction: column; gap: 8px; flex: 1 1 0; min-width: 0; }
.subscribe-form { display: flex; flex-direction: column; gap: 12px; }
/* The blue focus ring disappears on the blue panel, so the button uses white here. */
.subscribe-panel .btn:focus-visible { outline-color: var(--white); }

/* ---------- Contact ---------- */
.contact { padding: 64px 0; background: var(--indigo); color: var(--white); }
.contact-grid { display: flex; flex-direction: column; gap: 28px; }
.contact-form {
    display: flex; flex-direction: column; gap: 24px; min-width: 0;
    padding: 24px 20px; border-radius: 16px;
    background: var(--white); color: var(--black);
    box-shadow: 0 0 28px rgba(0, 0, 0, .28), 0 14px 44px rgba(0, 0, 0, .32);
}
.form-row { display: flex; flex-direction: column; gap: 24px; }

/* ---------- Footer ---------- */
.site-footer { padding: 40px 0 32px; background: var(--white); }
.footer-inner { display: flex; flex-direction: column; gap: 24px; }
.footer-top { display: flex; flex-direction: column; gap: 24px; }
.site-footer .logo { align-self: flex-start; }
.site-footer .logo img { height: 30px; }
/* On small screens the section links are one line. The line runs the full width of the screen,
   out through the gutters, and scrolls sideways when the labels do not fit. Its vertical padding
   (cancelled by the margin) leaves room for the focus ring, which the scrolling box would clip. */
.footer-nav { --fade: var(--white); --fade-clear: rgba(255, 255, 255, 0); margin-inline: calc(-1 * var(--gutter)); }
.footer-links {
    display: flex; gap: 24px;
    margin-block: -8px; padding: 8px 0; padding-inline-start: var(--gutter);
    overflow-x: auto; scrollbar-width: none;
    font-size: .9375rem; font-weight: 500; line-height: 1.5rem; white-space: nowrap;
}
.footer-links::-webkit-scrollbar { display: none; }
.footer-links li { flex: none; }
.footer-links li:last-child { padding-inline-end: var(--gutter); }
.footer-bottom { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.copyright { color: var(--black-60); }
.footer-legal { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .15s ease; }
@media (hover: hover) { .footer-legal:hover { color: var(--indigo); } }
.footer-legal:active { color: var(--indigo); }
.footer-legal[aria-current] { font-weight: 600; text-decoration: none; }

/* ---------- Text pages (the privacy policy) ----------
   One column of running text, no wider than is comfortable to read; the measure is in rem so that
   it widens with the text size. */
.legal { padding: 48px 0 64px; }
.legal-text { max-width: 46rem; }
.legal-text > * + * { margin-top: 16px; }
.legal-text > h2 { margin-top: 40px; font: 700 1.25rem/1.75rem var(--font-display); letter-spacing: -.01em; }
:lang(ar) .legal-text > h2, :lang(zh) .legal-text > h2 { letter-spacing: 0; }
.legal-updated, .legal-note { color: var(--black-60); }
.legal-text > .legal-updated { margin-top: 8px; }
.legal-text ul { display: flex; flex-direction: column; gap: 8px; padding-inline-start: 1.25rem; list-style: disc; }
.legal-text :is(p, li) a { color: var(--indigo); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
@media (hover: hover) { .legal-text :is(p, li) a:hover { color: var(--black); } }

/* ---------- Tablet (design: 810) ---------- */
@media (min-width: 600px) {
    :root { --gutter: 48px; }

    .display { font-size: 3rem; line-height: 4rem; letter-spacing: -.025em; }
    .h2 { font-size: 2.125rem; line-height: 2.625rem; letter-spacing: -.02em; }
    .statement { font-size: 1.625rem; line-height: 2.375rem; letter-spacing: -.015em; }
    .lead { font-size: 1.1875rem; line-height: 1.875rem; letter-spacing: -.005em; }
    .body { font-size: 1.0625rem; line-height: 1.6875rem; }

    .lang-list { width: min(100% - 2 * var(--gutter), 1200px); margin-inline: auto; padding-inline: 0; justify-content: flex-end; gap: 24px; overflow: visible; }
    .lang-list li:last-child { padding-inline-end: 0; }

    .hero { padding: 104px 0 112px; }
    .hero::before { background: linear-gradient(90deg, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .76) 50%, rgba(0, 0, 0, .4) 100%); }
    .hero-content { gap: 24px; max-width: 640px; }
    .hero .lead { max-width: 600px; }
    .actions { flex-direction: row; flex-wrap: wrap; gap: 16px; }

    .about { padding: 80px 0; }
    .about-grid { gap: 56px; }
    .highlights { flex-direction: row; gap: 16px; }
    .highlights li { flex: 1 1 0; flex-direction: column; align-items: flex-start; gap: 12px; font-size: .9375rem; }

    .subscribe { padding-bottom: 80px; }
    .subscribe-panel { gap: 28px; padding: 44px 40px; }
    .subscribe-form { flex-direction: row; align-items: flex-start; }
    .subscribe-form .field { flex: 1 1 0; }

    .contact { padding: 80px 0; }
    .contact-grid { gap: 36px; }
    .contact-form { padding: 32px; border-radius: 20px; }
    .contact-form .btn, .contact-form .form-status { align-self: flex-start; }
    .form-row { flex-direction: row; }
    .form-row .field { flex: 1 1 0; }

    .site-footer { padding: 48px 0 40px; }
    .footer-inner { gap: 28px; }
    .footer-top { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
    .site-footer .logo { align-self: auto; }
    .site-footer .logo img { height: 34px; }
    .footer-nav { margin-inline: 0; }
    .footer-links { flex-wrap: wrap; gap: 8px 24px; margin-block: 0; padding: 0; overflow: visible; }
    .footer-links li:last-child { padding-inline-end: 0; }
    .footer-bottom { flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }

    .legal { padding: 64px 0 88px; }
    .legal-text > h2 { margin-top: 48px; font-size: 1.5rem; line-height: 2rem; }
}

/* ---------- Header navigation: menu button until the links fit beside the logo ----------
   French, Spanish and Russian labels are longer, so those pages switch to the full
   navigation at 920px instead of 768px. The two blocks of row rules below are the same;
   :where() keeps their specificity low so the desktop rules still override them.
   If the nav labels in src/locales change length, re-check these widths. */
@media (max-width: 599.98px) {
    .js .lang-bar { display: none; }
    .js .lang-menu { display: block; }
}
/* On a narrow phone the two buttons leave the logo less than its usual width (218.6px at 36px high),
   so it takes what is left: the screen, less the gutters, the buttons (100px) and the gap (24px). */
@media (max-width: 382px) {
    .js .site-header .logo img { width: calc(100vw - 2 * var(--gutter) - 124px); height: auto; }
}
@media (max-width: 767.98px) {
    .js .header-actions { display: flex; }
    .js .menu-button { display: inline-flex; }
    .js .nav { display: none; }
    .js .site-header.is-open .nav { display: flex; }
}
@media (min-width: 768px) and (max-width: 919.98px) {
    .js:is(:lang(fr), :lang(es), :lang(ru)) .header-actions { display: flex; }
    .js:is(:lang(fr), :lang(es), :lang(ru)) .menu-button { display: inline-flex; }
    .js:is(:lang(fr), :lang(es), :lang(ru)) .nav { display: none; }
    .js:is(:lang(fr), :lang(es), :lang(ru)) .site-header.is-open .nav { display: flex; }
}
@media (min-width: 768px) {
    .header-inner { padding: 30px 0 24px; }
    .site-header .logo img { height: 38px; }

    :where(html:not(:lang(fr), :lang(es), :lang(ru))) .nav { flex-direction: row; flex-basis: auto; align-items: center; gap: 24px; }
    :where(html:not(:lang(fr), :lang(es), :lang(ru))) .nav-links { flex-direction: row; align-items: center; gap: 20px; }
    :where(html:not(:lang(fr), :lang(es), :lang(ru))) .nav-links a { padding: 0; white-space: nowrap; }
    :where(html:not(:lang(fr), :lang(es), :lang(ru))) .nav .btn { margin-top: 0; padding: .625rem 1.25rem; border-radius: 10px; }
}
@media (min-width: 920px) {
    :where(html:is(:lang(fr), :lang(es), :lang(ru))) .nav { flex-direction: row; flex-basis: auto; align-items: center; gap: 24px; }
    :where(html:is(:lang(fr), :lang(es), :lang(ru))) .nav-links { flex-direction: row; align-items: center; gap: 20px; }
    :where(html:is(:lang(fr), :lang(es), :lang(ru))) .nav-links a { padding: 0; white-space: nowrap; }
    :where(html:is(:lang(fr), :lang(es), :lang(ru))) .nav .btn { margin-top: 0; padding: .625rem 1.25rem; border-radius: 10px; }
}

/* ---------- Desktop (design: 1440) ---------- */
@media (min-width: 1200px) {
    .display { font-size: 4rem; line-height: 5.3125rem; }
    .h2 { font-size: 2.5rem; line-height: 3rem; }
    .statement { font-size: 1.5rem; line-height: 2.125rem; }
    .lead { font-size: 1.25rem; line-height: 2rem; }
    .body { font-size: 1.125rem; line-height: 1.75rem; }

    .lang-list { gap: 32px; }

    .header-inner { padding: 42px 0 33px; }
    .site-header .logo img { height: 56px; }
    .nav { gap: 44px; }
    .nav-links { gap: 40px; }
    .nav .btn { padding: .875rem 1.5rem; border-radius: 12px; }
    .nav .btn:focus-visible { border-radius: 12px; }

    .hero { padding: 136px 0 144px; }
    .hero::before { background: linear-gradient(90deg, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .7) 50%, rgba(0, 0, 0, .15) 100%); }
    .hero-content { gap: 28px; max-width: 840px; }
    .hero .lead { max-width: 680px; }
    .actions { padding-top: 12px; }

    .about { padding: 112px 0; }
    .about-grid { flex-direction: row; }
    .about-col { gap: 28px; }
    .rule { width: 2px; height: auto; align-self: stretch; }

    .subscribe { padding-bottom: 112px; }
    .subscribe-panel { flex-direction: row; align-items: center; gap: 48px; padding: 56px 64px; }
    .subscribe-form { flex: none; }
    .subscribe-form .field { flex: 0 0 360px; }

    .contact { padding: 112px 0; }
    .contact-grid { flex-direction: row; align-items: flex-start; gap: 24px; }
    .contact .section-heading { flex: 0 0 486px; }
    .contact .section-heading .body { max-width: 400px; }
    .contact-form { flex: 1 1 0; padding: 40px; }

    .site-footer { padding: 56px 0 48px; }
    .site-footer .logo img { height: 36px; }
    .footer-links { gap: 8px 32px; }

    .legal { padding: 88px 0 120px; }
}

/* ---------- Accessibility tools ----------
   A tab fixed to the far edge of the screen (the right; the left on a right-to-left page), half
   way up, opens a panel of display options. site.js keeps the choices in localStorage and sets them as attributes
   on <html>, which the rules below respond to; a short script in the page head sets the same
   attributes before the first paint, so a saved choice does not flash in. The tab needs the
   script, so without JavaScript it is not shown. */
.a11y { display: none; }
/* The box runs the full height of the screen along that edge so that it can centre the tab and the
   panel by layout (a transform would leave the panel's text on half pixels). It lets clicks through;
   only the tab and the panel take them. */
.js .a11y {
    --tab: 64px;
    display: flex; align-items: center;
    position: fixed; z-index: 20; inset-block: 0; inset-inline-end: 0;
    pointer-events: none;
}
.a11y-toggle, .a11y-panel { pointer-events: auto; }
.a11y-toggle {
    display: flex; align-items: center; justify-content: center;
    width: var(--tab); height: var(--tab); margin: 0; padding: 0; border: 0; border-radius: 0;   /* a plain square, flush with the edge of the screen */
    background: var(--blue); color: var(--white); cursor: pointer;
    /* The white edge keeps the tab apart from the dark bands and the blue panel it passes over. */
    box-shadow: 0 0 0 2px var(--white), 0 0 8px 2px rgba(0, 0, 0, .2);
    transition: background-color .15s ease;
}
@media (hover: hover) { .a11y-toggle:hover { background: var(--black); } }
.a11y-toggle:active { background: var(--black); }
.a11y-toggle:focus-visible { outline-offset: 2px; border-radius: 0; }
.a11y-toggle .icon-close, .a11y-toggle[aria-expanded="true"] .icon-open { display: none; }
.a11y-toggle[aria-expanded="true"] .icon-close { display: block; }
/* The panel opens beside the tab, centred on it. Its width follows the text size, up to what the
   screen has room for; on a short screen it fills the height, less a margin, and scrolls. */
.a11y-panel {
    position: absolute; inset-inline-end: calc(100% + 8px);
    top: 24px; bottom: 24px; margin-block: auto; height: fit-content;   /* as tall as its contents, in the middle of the space between */
    width: min(17.5rem, 100vw - var(--tab) - 24px);   /* the tab, the gap beside it and a margin at the other edge */
    max-height: calc(100% - 48px);
    overflow-y: auto; overscroll-behavior: contain;
    padding: 8px; border-radius: 8px;
    background: var(--white); color: var(--black);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .1), 0 12px 40px rgba(0, 0, 0, .28);
    animation: a11y-in .18s ease;
}
@keyframes a11y-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .a11y-panel { animation: none; } }
.a11y-title { padding: 10px 12px 6px; font: 700 1.125rem/1.5rem var(--font-display); letter-spacing: -.01em; }
:lang(ar) .a11y-title, :lang(zh) .a11y-title { letter-spacing: 0; }
.a11y-list button {
    display: flex; align-items: center; gap: 12px;
    width: 100%; min-height: 44px; margin: 0; padding: 8px 12px;
    border: 0; border-radius: 5px; background: none; cursor: pointer;
    font-size: 1rem; font-weight: 500; line-height: 1.5rem; text-align: start;
}
.a11y-list svg { flex: none; }
.a11y-list span { min-width: 0; }   /* lets a long word break when the panel is narrow and the text large */
.a11y-list button:focus-visible { outline-offset: -3px; border-radius: 5px; }
@media (hover: hover) { .a11y-list button:hover { background: var(--surface); } }
.a11y-list button:active { background: var(--surface); }
/* A choice that is on: the lighter blue and bolder, with a tick at the far end so it does not rest on colour alone. */
.a11y-list [aria-pressed="true"] { color: var(--blue); font-weight: 600; }
.a11y-list [aria-pressed="true"]::after {
    content: ""; flex: none; width: 7px; height: 12px; margin-inline: auto 6px; margin-bottom: 3px;
    border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
/* Text already at its smallest or largest: the button stays in place but shows it has nothing to do. */
.a11y-list [aria-disabled="true"] { opacity: .4; cursor: default; }
.a11y-list [aria-disabled="true"]:hover, .a11y-list [aria-disabled="true"]:active { background: none; }
.a11y-list li:last-child { margin-top: 4px; padding-top: 4px; border-top: 1px solid rgba(0, 0, 0, .12); }
@media print { .a11y { display: none !important; } }

/* Increase / decrease text: five steps of 10%. Type, buttons and fields are sized in rem, so they
   follow the root size; spacing and images stay as they are. */
[data-text-size="1"] { font-size: 110%; }
[data-text-size="2"] { font-size: 120%; }
[data-text-size="3"] { font-size: 130%; }
[data-text-size="4"] { font-size: 140%; }
[data-text-size="5"] { font-size: 150%; }

/* Grayscale. The filter goes on each part of the page, not on <body>: a filtered ancestor would
   stop the tab above from staying fixed to the screen. */
[data-gray] body > * { filter: grayscale(1); }

/* Underline links: every text link, not only those in the language bar. Buttons are left alone. */
[data-underline] a:not(.btn) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* Readable font: one plain, wide typeface for everything, without the tight tracking of the headings. */
[data-readable], [data-readable] * {
    --font-ui: Verdana, Tahoma, "DejaVu Sans", var(--system);
    --font-display: Verdana, Tahoma, "DejaVu Sans", var(--system);
}
[data-readable] :is(.display, .h2, .statement, .lead, .a11y-title, .legal-text > h2) { letter-spacing: 0; }

/* Colour schemes: high contrast, negative contrast and light background (one at a time; grayscale
   is the fourth choice). Each scheme names a paper, ink, accent and on-accent colour for the page
   (0) and for the two bands that are dark by design, the hero and the contact section (1):
   - contrast: black on white, and white on black in the two bands; nothing in between
   - negative: white on black throughout, yellow for buttons and accents
   - light:    black on white throughout, indigo for buttons and accents
   The rules after them repaint the page with those colours. */
[data-scheme="contrast"] { --p0: #FFF; --i0: #000; --a0: #000; --o0: #FFF; --p1: #000; --i1: #FFF; --a1: #FFF; --o1: #000; --muted: #333; --edge: 2px; }
[data-scheme="negative"] { --p0: #000; --i0: #FFF; --a0: #FFE600; --o0: #000; --p1: #000; --i1: #FFF; --a1: #FFE600; --o1: #000; --muted: #CCC; --edge: 2px; color-scheme: dark; }
[data-scheme="light"] { --p0: #FFF; --i0: #000; --a0: #210082; --o0: #FFF; --p1: #FFF; --i1: #000; --a1: #210082; --o1: #FFF; --muted: #595959; --edge: 1px; }
[data-scheme] body, [data-scheme] .contact-form {
    --paper: var(--p0); --ink: var(--i0); --accent: var(--a0); --on-accent: var(--o0);
    background: var(--paper); color: var(--ink);
}
[data-scheme] :is(.hero, .contact) {
    --paper: var(--p1); --ink: var(--i1); --accent: var(--a1); --on-accent: var(--o1);
    background: var(--paper); color: var(--ink);
    box-shadow: inset 0 var(--edge) var(--ink), inset 0 calc(-1 * var(--edge)) var(--ink);   /* a line where two bands of one colour meet */
}
[data-scheme] .hero-bg { display: none; }
[data-scheme] .hero::before { content: none; }
[data-scheme] :is(.site-header, .site-footer) { background: var(--paper); }
[data-scheme]:not([data-scheme="light"]) .lang-bar { --fade: var(--paper); --fade-clear: transparent; background: var(--paper); box-shadow: inset 0 -1px var(--ink); }
[data-scheme] .footer-nav { --fade: var(--paper); --fade-clear: transparent; }
[data-scheme] .lang-list a { color: var(--ink); }
@media (hover: hover) { [data-scheme] .lang-list a:hover { color: var(--accent); text-decoration-thickness: 2px; } }
[data-scheme] .lang-list a:active { color: var(--accent); text-decoration-thickness: 2px; }
[data-scheme] .menu-button { color: var(--ink); }
[data-scheme] :is(.nav-links, .footer-links) a span::after { background: var(--accent); }
[data-scheme] .rule { background: var(--accent); }
[data-scheme] .copyright, [data-scheme] .control::placeholder, [data-scheme] .legal-updated, [data-scheme] .legal-note { color: var(--muted); }
[data-scheme] .legal-text :is(p, li) a { color: var(--accent); }
@media (hover: hover) { [data-scheme] .legal-text :is(p, li) a:hover, [data-scheme] .footer-legal:hover { color: var(--accent); text-decoration-thickness: 2px; } }
[data-scheme] .footer-legal:active { color: var(--accent); }
[data-scheme] .skip-link { background: var(--accent); color: var(--on-accent); }
[data-scheme="contrast"] .logo img { filter: brightness(0); }
[data-scheme="negative"] .logo img { filter: brightness(0) invert(1); }
[data-scheme]:not([data-scheme="light"]) .highlights :is(path, circle)[fill] { fill: var(--accent); }
[data-scheme]:not([data-scheme="light"]) .highlights path[stroke] { stroke: var(--ink); }
/* Focus: a ring in the accent colour, held off the element so it shows around a button of that same colour. */
[data-scheme] :is(a, button):focus-visible, [data-scheme] .subscribe-panel .btn:focus-visible { outline-color: var(--accent); }
[data-scheme] .btn:focus-visible { outline-offset: 3px; }
/* Buttons: filled with the accent; hovered or pressed they turn into their own outline. The outlined button does the opposite. */
[data-scheme] :is(.btn-primary, .btn-inverse) { background: var(--accent); color: var(--on-accent); box-shadow: none; }
[data-scheme] .btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
@media (hover: hover) {
    [data-scheme] :is(.btn-primary, .btn-inverse):hover { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
    [data-scheme] .btn-ghost:hover { background: var(--ink); color: var(--paper); }
}
[data-scheme] :is(.btn-primary, .btn-inverse):active { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
[data-scheme] .btn-ghost:active { background: var(--ink); color: var(--paper); }
/* The hero's two buttons swap designs on small screens here as well (see Button). */
@media (max-width: 599.98px) {
    [data-scheme] .hero .btn-inverse { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
    [data-scheme] .hero .btn-inverse:active { background: var(--ink); color: var(--paper); }
    [data-scheme] .hero .btn-ghost { background: var(--accent); color: var(--on-accent); box-shadow: none; }
    [data-scheme] .hero .btn-ghost:active { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
}
@media (max-width: 599.98px) and (hover: hover) {
    [data-scheme] .hero .btn-inverse:hover { background: var(--ink); color: var(--paper); }
    [data-scheme] .hero .btn-ghost:hover { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
}
[data-scheme] .subscribe-panel { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 var(--edge) var(--ink); }
[data-scheme] .contact-form { box-shadow: 0 0 0 var(--edge) var(--ink); }
[data-scheme] .control { border: var(--edge) solid var(--ink); background: var(--paper); color: var(--ink); }
[data-scheme] .control:focus { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink), 0 0 0 2px var(--paper), 0 0 0 5px var(--accent); }
[data-scheme] .form-spinner { border-color: color-mix(in srgb, var(--ink) 25%, transparent); border-top-color: var(--ink); }
[data-scheme] .lang-panel { background: var(--paper); color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
@media (hover: hover) { [data-scheme] .lang-options a:hover { background: var(--ink); color: var(--paper); } }
[data-scheme] .lang-options a:active { background: var(--ink); color: var(--paper); }
[data-scheme] .lang-options a[aria-current] { background: var(--accent); color: var(--on-accent); }   /* after the two above: it stays as it is */
[data-scheme] .lang-options a[aria-current]:focus-visible { outline-color: var(--on-accent); }   /* the ring is inside the box, so not in the box's colour */
[data-scheme] .flag { box-shadow: 0 0 0 1px var(--ink); }
/* The tools themselves */
[data-scheme] .a11y-toggle { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 2px var(--paper); }
@media (hover: hover) { [data-scheme] .a11y-toggle:hover { background: var(--ink); color: var(--paper); } }
[data-scheme] .a11y-toggle:active { background: var(--ink); color: var(--paper); }
[data-scheme] .a11y-panel { background: var(--paper); color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
[data-scheme] .a11y-list [aria-pressed="true"] { color: var(--accent); }
[data-scheme="light"] .a11y-list [aria-pressed="true"] { color: var(--blue); }   /* as on the page as designed, which this scheme stays closest to */
@media (hover: hover) { [data-scheme] .a11y-list button:not([aria-disabled="true"]):hover { background: var(--ink); color: var(--paper); } }
[data-scheme] .a11y-list button:not([aria-disabled="true"]):active { background: var(--ink); color: var(--paper); }
[data-scheme] .a11y-list li:last-child { border-top-color: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

/* ---------- From one page to the next ----------
   Changing language, or going to the privacy policy and back, loads another page. Where the browser
   can, the page being left stays up until the next one is ready and then fades into it, instead of
   the screen blanking in between. Other browsers change page as they always have. */
@media (prefers-reduced-motion: no-preference) {
    @view-transition { navigation: auto; }
    ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .3s; }
}
