/*
 * The public site.
 *
 * Designed at 360px first, not at a desktop breakpoint. Parents in this market are on mid-range
 * Android phones with 5-inch screens, and a school's admission page is the first thing they ever
 * see of it — a layout that only works from 1024px up has failed at the only moment that matters.
 *
 * EVERY COLOUR AND METRIC IS A TOKEN. The active theme writes the --cms-* custom properties into
 * :root (CmsThemeCss.ToCssVariables); everything below derives from them, so activating a theme is
 * a token swap, never a deploy. The defaults here are only what a page looks like with no theme row
 * at all.
 *
 * Logical properties throughout (margin-inline, inset-inline-start) so the Urdu layout mirrors by
 * itself; RTL is a first-class layout, not a stylesheet flip. Breakpoints live beside the component
 * they affect. The illustrations' own styles are in scenes.css, loaded only on pages that draw one.
 */

/* ---------------------------------------------------------------------------
   Fonts — the theme faces, self-hosted (see /fonts/OFL.txt). @font-face is lazy:
   a face downloads only when a theme names it, and the layout preloads just those.
   --------------------------------------------------------------------------- */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/inter.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: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 100 700;
    font-display: swap;
    src: url('/fonts/ibm-plex-sans.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: 'Source Serif 4';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url('/fonts/source-serif-4.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;
}

/* No unicode-range: Nastaliq is the fallback for Urdu, and a range would stop it drawing the Latin
   digits inside Urdu text, which would then sit on a different baseline. */
@font-face {
    font-family: 'Noto Nastaliq Urdu';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/noto-nastaliq-urdu.woff2') format('woff2');
}

/* ---------------------------------------------------------------------------
   Tokens
   --------------------------------------------------------------------------- */

:root {
    /* Theme tokens — overridden by the active theme's inline :root block. */
    --cms-accent: #1f5f4e;
    --cms-accent-lift: #2e7d68;
    --cms-accent-deep: #14453a;
    /* The dark bands' ground (call to action, footer). The same as deep in a light theme; the dark
       palette keeps it dark while deep itself becomes the light, readable end of the accent. */
    --cms-band-deep: var(--cms-accent-deep);
    --cms-accent-wash: #e3efea;
    --cms-page: #ffffff;
    --cms-surface: #ffffff;
    --cms-scheme: light;
    --cms-ink: #1c2321;
    --cms-muted: #5b6663;
    --cms-line: #e2e8e6;
    --cms-on-accent: #ffffff;
    --cms-healthy: #2e8b57;
    --cms-due: #c98a12;
    --cms-critical: #b3261e;
    --cms-font-display: "Source Serif 4", Georgia, serif;
    --cms-font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --cms-font-numeric: "IBM Plex Mono", Consolas, monospace;
    --cms-heading-scale: 1.25;
    --cms-radius: 8px;
    --cms-density: 1;

    /* Derived. Nothing below this line is set by a theme. */

    /* The brand's warm second colour, for highlights only — never the only carrier of meaning. */
    --gold: #e0a526;

    --max: 1200px;
    --gutter: clamp(1rem, 4vw, 2rem);
    --section: calc(clamp(3.25rem, 7vw, 6rem) * var(--cms-density));
    --radius-lg: calc(var(--cms-radius) * 1.5 + 6px);
    --radius-xl: calc(var(--cms-radius) * 2 + 10px);

    --tint: color-mix(in srgb, var(--cms-accent) 6%, var(--cms-page));
    --line-strong: color-mix(in srgb, var(--cms-accent) 22%, var(--cms-line));
    --shadow-sm: 0 1px 2px color-mix(in srgb, var(--cms-ink) 7%, transparent),
                 0 2px 6px -2px color-mix(in srgb, var(--cms-ink) 8%, transparent);
    --shadow-md: 0 12px 28px -12px color-mix(in srgb, var(--cms-ink) 22%, transparent),
                 0 3px 8px -3px color-mix(in srgb, var(--cms-ink) 10%, transparent);
    --shadow-lg: 0 40px 80px -30px color-mix(in srgb, var(--cms-accent-deep) 45%, transparent),
                 0 12px 24px -12px color-mix(in srgb, var(--cms-ink) 20%, transparent);

    /* A modular type scale from the theme's own ratio. */
    --step-1: calc(1rem * var(--cms-heading-scale));
    --step-2: calc(var(--step-1) * var(--cms-heading-scale));
    --step-3: calc(var(--step-2) * var(--cms-heading-scale));
    --step-4: calc(var(--step-3) * var(--cms-heading-scale));
}

/* ---------------------------------------------------------------------------
   Base
   --------------------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    color-scheme: var(--cms-scheme);
    -webkit-text-size-adjust: 100%;
    /* In-page links land below the sticky header rather than under it. */
    scroll-padding-top: 5.5rem;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    margin: 0;
    font-family: var(--cms-font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--cms-ink);
    background: var(--cms-page);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;

    /* A safety net, not the design: nothing should be wider than the screen, and if a decorative
       shadow or a tilted mock ever pokes out, the page still must not scroll sideways. */
    overflow-x: clip;
}

h1,
h2,
h3,
h4 {
    font-family: var(--cms-font-display);
    line-height: 1.15;
    letter-spacing: -0.015em;
    text-wrap: balance;
    color: var(--cms-ink);
}

p,
li {
    text-wrap: pretty;
}

img,
svg,
video {
    max-width: 100%;
}

img {
    height: auto;
}

a {
    color: var(--cms-accent);
    text-underline-offset: 0.18em;
    text-decoration-thickness: 1px;
}

a:hover {
    color: var(--cms-accent-deep);
}

:focus-visible {
    outline: 3px solid var(--cms-accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.cms-container {
    width: 100%;
    max-width: var(--max);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* First in the tab order. A parent using a keyboard should not walk the whole navigation to reach
   the enquiry form. */
.cms-skip {
    position: absolute;
    inset-inline-start: 1rem;
    top: -4rem;
    z-index: 100;
    padding: 0.7rem 1rem;
    border-radius: var(--cms-radius);
    background: var(--cms-accent);
    color: var(--cms-on-accent);
    font-weight: 600;
    text-decoration: none;
}

.cms-skip:focus {
    top: 0.75rem;
}

/* ---------------------------------------------------------------------------
   Buttons and links
   --------------------------------------------------------------------------- */

.cms-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;

    /* 44px of touch target. Below that a thumb misses it on a 5-inch screen, which on the enquiry
       button is a family that gives up. */
    min-height: 44px;
    padding: 0.65rem 1.15rem;
    border: 1px solid transparent;
    border-radius: var(--cms-radius);
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.cms-btn-lg {
    min-height: 52px;
    padding: 0.85rem 1.5rem;
    font-size: 1.05rem;
}

.cms-btn-primary {
    background: var(--cms-accent);
    color: var(--cms-on-accent);
    box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--cms-accent) 80%, transparent);
}

.cms-btn-primary:hover,
.cms-btn-primary:focus-visible {
    background: var(--cms-accent-lift);
    color: var(--cms-on-accent);
    transform: translateY(-1px);
}

.cms-btn-quiet {
    background: var(--cms-surface);
    border-color: var(--cms-line);
    color: var(--cms-ink);
}

.cms-btn-quiet:hover,
.cms-btn-quiet:focus-visible {
    border-color: var(--line-strong);
    color: var(--cms-accent-deep);
}

/* On the dark call-to-action band. */
.cms-btn-light {
    background: #ffffff;
    color: #12201b;
}

.cms-btn-light:hover,
.cms-btn-light:focus-visible {
    background: color-mix(in srgb, #ffffff 88%, var(--gold));
    color: #12201b;
    transform: translateY(-1px);
}

.cms-btn-ghost {
    background: transparent;
    border-color: rgb(255 255 255 / 0.4);
    color: #ffffff;
}

.cms-btn-ghost:hover,
.cms-btn-ghost:focus-visible {
    border-color: #ffffff;
    color: #ffffff;
    background: rgb(255 255 255 / 0.08);
}

/* A link that reads as "go there": text plus an arrow that mirrors in RTL. The arrow is
   decoration; the words carry the meaning, so they must say where the link goes. */
.cms-link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--cms-accent);
}

.cms-link-arrow::after {
    content: "→";
    transition: transform 0.15s ease;
}

[dir="rtl"] .cms-link-arrow::after {
    content: "←";
}

.cms-link-arrow:hover::after {
    transform: translateX(3px);
}

[dir="rtl"] .cms-link-arrow:hover::after {
    transform: translateX(-3px);
}

.cms-link-arrow:hover {
    text-decoration: underline;
}

/* ---------------------------------------------------------------------------
   Header — sticky, translucent, with a drawer below 1040px
   --------------------------------------------------------------------------- */

.cms-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--cms-page) 86%, transparent);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cms-header.is-scrolled {
    border-bottom-color: var(--cms-line);
    box-shadow: var(--shadow-sm);
}

.cms-header-inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-height: 68px;
}

.cms-brand {
    display: inline-flex;
    align-items: center;
    flex: none;
    color: inherit;
    text-decoration: none;
}

.cms-brand svg {
    display: block;
    width: auto;
    height: 34px;
}

.cms-brand img {
    display: block;
    width: auto;
    max-height: 40px;
}

.cms-brand-name {
    font-family: var(--cms-font-display);
    font-size: 1.2rem;
    font-weight: 700;
}

.cms-tagline {
    display: none;
}

.cms-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.cms-menu > li > a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0.4rem 0.75rem;
    border-radius: var(--cms-radius);
    color: var(--cms-ink);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.cms-menu > li > a:hover,
.cms-menu > li > a:focus-visible {
    background: var(--tint);
    color: var(--cms-accent-deep);
}

.cms-nav {
    margin-inline-start: auto;
}

.cms-header-actions {
    display: flex;
    gap: 0.5rem;
    flex: none;
}

/* A submenu opens on hover AND on keyboard focus. Hover alone leaves it unreachable for anybody
   navigating with a keyboard, which is a whole branch of the site nobody can get to. */
.cms-menu-item.has-children {
    position: relative;
}

.cms-submenu {
    position: absolute;
    z-index: 20;
    inset-inline-start: 0;
    display: none;
    min-width: 220px;
    margin: 0.25rem 0 0;
    padding: 0.4rem;
    list-style: none;
    background: var(--cms-surface);
    border: 1px solid var(--cms-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.cms-menu-item.has-children:hover > .cms-submenu,
.cms-menu-item.has-children:focus-within > .cms-submenu {
    display: block;
}

.cms-submenu a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: var(--cms-radius);
    color: var(--cms-ink);
    text-decoration: none;
    font-size: 0.92rem;
}

.cms-submenu a:hover,
.cms-submenu a:focus-visible {
    background: var(--tint);
    color: var(--cms-accent-deep);
}

/* ---- The drawer ----
   A <details> element, so it opens with JavaScript broken. On a mid-range Android phone on a bad
   connection that is a real state, and this is the only navigation those visitors get. */

.cms-mobile-nav {
    display: none;
    margin-inline-start: auto;
}

.cms-mobile-nav > summary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0 0.85rem;
    border: 1px solid var(--cms-line);
    border-radius: var(--cms-radius);
    background: var(--cms-surface);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    list-style: none;
}

.cms-mobile-nav > summary::-webkit-details-marker {
    display: none;
}

.cms-burger {
    display: grid;
    gap: 4px;
    width: 18px;
}

.cms-burger i {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.cms-mobile-nav[open] .cms-burger i:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.cms-mobile-nav[open] .cms-burger i:nth-child(2) {
    opacity: 0;
}

.cms-mobile-nav[open] .cms-burger i:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.cms-drawer {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    max-height: calc(100vh - 68px);
    max-height: calc(100dvh - 68px);
    overflow-y: auto;
    padding: 0.75rem var(--gutter) 1.5rem;
    background: var(--cms-page);
    border-bottom: 1px solid var(--cms-line);
    box-shadow: var(--shadow-md);
}

.cms-drawer .cms-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0.1rem;
}

.cms-drawer .cms-menu > li > a {
    display: flex;
    min-height: 48px;
    font-size: 1.05rem;
}

.cms-drawer .cms-submenu {
    position: static;
    display: block;
    margin: 0 0 0.4rem;
    padding: 0 0 0 0.75rem;
    border: 0;
    box-shadow: none;
    background: none;
}

.cms-drawer-actions {
    display: grid;
    gap: 0.6rem;
    margin-top: 1rem;
}

/* Below this width the horizontal nav becomes the drawer: five links and two buttons across a
   five-inch screen is seven targets nobody can tap accurately. */
@media (max-width: 1039.98px) {
    .cms-nav,
    .cms-header-actions {
        display: none;
    }

    .cms-mobile-nav {
        display: block;
    }
}

/* ---------------------------------------------------------------------------
   Footer — a dark band carrying the brand and four columns of links
   --------------------------------------------------------------------------- */

.cms-footer {
    --footer-ink: #e6eeeb;
    --footer-muted: #a9bab4;

    margin-top: 0;
    padding-block: clamp(3rem, 7vw, 4.5rem) 2rem;
    background:
        radial-gradient(700px 300px at 10% 0%, color-mix(in srgb, var(--cms-accent) 30%, transparent), transparent 70%),
        color-mix(in srgb, var(--cms-band-deep) 45%, #0a1311);
    color: var(--footer-ink);
}

.cms-footer-top {
    display: grid;
    gap: 2.5rem;
}

@media (min-width: 900px) {
    .cms-footer-top {
        grid-template-columns: minmax(0, 0.8fr) minmax(0, 2.2fr);
    }
}

.cms-footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: inherit;
    text-decoration: none;
}

.cms-footer-logo svg {
    flex: none;
}

.cms-footer-word {
    font-family: var(--cms-font-body);
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.cms-footer-word .is-gold {
    color: var(--gold);
}

.cms-footer-tagline {
    max-width: 30ch;
    margin: 1rem 0 0;
    color: var(--footer-muted);
}

.cms-footer-columns {
    display: grid;
    gap: 2rem 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
}

.cms-footer-column.is-wide {
    grid-column: 1 / -1;
}

.cms-footer-column.is-wide ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.25rem;
}

.cms-footer-heading {
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cms-footer-heading a {
    color: #ffffff;
    text-decoration: none;
}

.cms-footer-column ul {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cms-footer-column a {
    color: var(--footer-ink);
    text-decoration: none;
    font-size: 0.94rem;
}

.cms-footer-column a:hover,
.cms-footer-column a:focus-visible {
    color: #ffffff;
    text-decoration: underline;
}

.cms-footer :focus-visible {
    outline-color: var(--gold);
}

.cms-footer-bottom {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgb(255 255 255 / 0.12);
    color: var(--footer-muted);
    font-size: 0.875rem;
}

.cms-footer-bottom p {
    margin: 0;
}

/* ---------------------------------------------------------------------------
   Breadcrumbs
   --------------------------------------------------------------------------- */

.cms-breadcrumbs {
    background: var(--cms-accent-wash);
    font-size: 0.85rem;
}

.cms-breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    margin: 0 auto;
    padding-block: 0.75rem 0;
    list-style: none;
}

.cms-breadcrumbs li + li::before {
    content: "/";
    margin-inline-end: 0.5rem;
    color: var(--cms-muted);
}

.cms-breadcrumbs a {
    color: var(--cms-muted);
    text-decoration: none;
}

.cms-breadcrumbs a:hover {
    color: var(--cms-accent-deep);
    text-decoration: underline;
}

.cms-breadcrumbs [aria-current="page"] {
    color: var(--cms-ink);
    font-weight: 600;
}

/* ---------------------------------------------------------------------------
   Section scaffolding shared by the blocks
   --------------------------------------------------------------------------- */

.cms-section-head {
    max-width: 48rem;
    margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.cms-section-heading {
    margin: 0 0 0.75rem;
    font-size: clamp(1.65rem, 1.15rem + 2vw, 2.6rem);
}

.cms-section-intro {
    margin: 0 0 1.75rem;
    max-width: 48rem;
    font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
    color: var(--cms-muted);
}

.cms-section-head .cms-section-intro {
    margin-bottom: 0;
}

.cms-section-more {
    margin: 2rem 0 0;
    text-align: center;
}

.cms-eyebrow {
    margin: 0 0 0.6rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cms-accent);
}

.cms-lead {
    margin: 0 0 1.25rem;
    font-size: clamp(1.02rem, 0.98rem + 0.3vw, 1.15rem);
    color: var(--cms-muted);
}

/* A list of ticks: the check is drawn with borders so it takes the theme's accent. */
.cms-checklist {
    display: grid;
    gap: 0.7rem;
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
}

.cms-checklist li {
    position: relative;
    padding-inline-start: 2rem;
}

.cms-checklist li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0.15em;
    width: 1.3rem;
    height: 1.3rem;
    border-radius: 50%;
    background: var(--cms-accent-wash);
}

.cms-checklist li::after {
    content: "";
    position: absolute;
    inset-inline-start: 0.47rem;
    top: 0.42em;
    width: 0.36rem;
    height: 0.62rem;
    border: solid var(--cms-accent);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.cms-checklist-sm {
    gap: 0.45rem;
    font-size: 0.92rem;
}

/* Vertical rhythm for every block's container. */
.cms-features,
.cms-gallery,
.cms-faq,
.cms-richtext,
.cms-stats,
.cms-enquiry,
.cms-prospectus,
.cms-pricing,
.cms-comparison,
.cms-steps,
.cms-split,
.cms-doc,
.cms-linkgrid,
.cms-quotes,
.cms-contact,
.cms-stores,
.cms-qr,
.cms-videoblock {
    padding-block: var(--section);
}

/* Two documentation sections in a row would otherwise be separated by two full section gaps. */
.cms-block-docsection + .cms-block-docsection .cms-doc {
    padding-top: 0;
}

.cms-thanks {
    padding-block: var(--section);
    max-width: 44rem;
}

/* ---------------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------------- */

.cms-hero {
    position: relative;
    overflow: hidden;
    padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(3rem, 8vw, 6rem);
    background:
        radial-gradient(900px 420px at 88% -12%, color-mix(in srgb, var(--cms-accent) 18%, transparent), transparent 62%),
        radial-gradient(700px 360px at -8% 108%, color-mix(in srgb, var(--gold) 16%, transparent), transparent 60%),
        linear-gradient(180deg, var(--cms-accent-wash), var(--cms-page) 92%);
}

/* A faint grid, fading out from one corner: depth without an image request. */
.cms-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(color-mix(in srgb, var(--cms-accent) 10%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in srgb, var(--cms-accent) 10%, transparent) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 75% 0%, #000, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 75% 0%, #000, transparent 75%);
    pointer-events: none;
}

.cms-hero-inner {
    position: relative;
    display: grid;
    gap: clamp(2rem, 5vw, 3.5rem);
    align-items: center;
}

@media (min-width: 980px) {
    .cms-hero.has-visual .cms-hero-inner {
        grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
    }
}

.cms-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1.1rem;
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: color-mix(in srgb, var(--cms-surface) 80%, transparent);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--cms-accent-deep);
}

.cms-hero-eyebrow::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 25%, transparent);
}

.cms-hero-title {
    margin: 0;
    max-width: 20ch;
    font-size: clamp(2.05rem, 1.15rem + 4vw, 3.9rem);
    line-height: 1.06;
    letter-spacing: -0.03em;
}

.cms-hero:not(.has-visual) .cms-hero-title {
    max-width: 24ch;
}

.cms-hero-sub {
    max-width: 54ch;
    margin: 1.1rem 0 0;
    font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
    color: var(--cms-muted);
}

.cms-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.9rem 0 0;
}

.cms-hero-note {
    margin: 1rem 0 0;
    font-size: 0.875rem;
    color: var(--cms-muted);
}

.cms-hero-visual {
    position: relative;
    min-width: 0;
}

/* ---------------------------------------------------------------------------
   Feature grid and link grid — cards
   --------------------------------------------------------------------------- */

.cms-grid {
    display: grid;
    gap: clamp(0.9rem, 2vw, 1.25rem);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.cms-card {
    position: relative;
    padding: clamp(1.15rem, 2.5vw, 1.6rem);
    border: 1px solid var(--cms-line);
    border-radius: var(--radius-lg);
    background: var(--cms-surface);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.cms-card h3 {
    margin: 0.9rem 0 0.4rem;
    font-size: 1.12rem;
    line-height: 1.3;
}

.cms-card p {
    margin: 0;
    color: var(--cms-muted);
    font-size: 0.95rem;
}

.cms-card-icon {
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    background: var(--cms-accent-wash);
    font-size: 1.35rem;
    line-height: 1;
}

.cms-link-card {
    display: flex;
    flex-direction: column;
}

.cms-link-card:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-md);
}

.cms-link-card h3 a {
    color: var(--cms-ink);
    text-decoration: none;
}

.cms-link-card h3 a::after {
    content: " →";
    color: var(--cms-accent);
}

[dir="rtl"] .cms-link-card h3 a::after {
    content: " ←";
}

.cms-link-card h3 a:hover,
.cms-link-card h3 a:focus-visible {
    color: var(--cms-accent-deep);
    text-decoration: underline;
}

.cms-card-meta {
    margin: 0 0 0.4rem;
    color: var(--cms-muted);
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

/* Two link grids in a row (the features hub) read as one catalogue, not as six sections. */
.cms-block-linkgrid + .cms-block-linkgrid .cms-linkgrid {
    padding-top: 0;
}

/* ---------------------------------------------------------------------------
   Stats
   --------------------------------------------------------------------------- */

.cms-stats {
    display: grid;
    gap: clamp(0.75rem, 2vw, 1.25rem);
    /* Two to a row on a phone rather than a long column of five. */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
    text-align: center;
}

.cms-stat {
    padding: clamp(1rem, 2.5vw, 1.5rem) 0.75rem;
    border: 1px solid color-mix(in srgb, var(--cms-accent) 14%, var(--cms-line));
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 50% 0, color-mix(in srgb, var(--cms-accent) 10%, transparent), transparent 70%),
        var(--cms-surface);
}

.cms-stat-figure {
    display: block;
    font-family: var(--cms-font-display);
    font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem);
    font-weight: 700;
    color: var(--cms-accent);
    font-variant-numeric: tabular-nums;
}

.cms-stat-label {
    color: var(--cms-muted);
    font-size: 0.9rem;
}

/* ---------------------------------------------------------------------------
   Steps — numbered cards
   --------------------------------------------------------------------------- */

.cms-step-list {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14.5rem), 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: cms-step;
}

.cms-step {
    position: relative;
    counter-increment: cms-step;
    padding: 4.1rem 1.4rem 1.4rem;
    border: 1px solid var(--cms-line);
    border-radius: var(--radius-lg);
    background: var(--cms-surface);
}

.cms-step::before {
    content: counter(cms-step);
    position: absolute;
    top: 1.25rem;
    inset-inline-start: 1.4rem;
    display: grid;
    place-items: center;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 50%;
    background: var(--cms-accent);
    color: var(--cms-on-accent);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 0 0 5px var(--cms-accent-wash);
}

.cms-step-title {
    margin: 0 0 0.35rem;
    font-size: 1.08rem;
}

.cms-step-body {
    margin: 0;
    color: var(--cms-muted);
    font-size: 0.95rem;
}

/* ---------------------------------------------------------------------------
   Split feature (screenshot) and feature scene (illustration) — text beside a picture
   --------------------------------------------------------------------------- */

.cms-split,
.cms-featurescene {
    display: grid;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.cms-featurescene {
    padding-block: var(--section);
}

@media (min-width: 900px) {
    .cms-split {
        grid-template-columns: 1fr 1fr;
    }

    .cms-featurescene.has-text {
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    }

    /* The picture MOVES, the markup does not. Reordering the DOM would change the reading order
       for a screen reader and on a narrow screen, where both stack in source order. */
    .cms-split.is-image-left .cms-split-text,
    .cms-featurescene.is-picture-left .cms-featurescene-text {
        order: 2;
    }

    .cms-split.is-image-left .cms-split-figure,
    .cms-featurescene.is-picture-left .cms-featurescene-figure {
        order: 1;
    }

    .cms-featurescene.is-picture-left.has-text {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    }
}

.cms-featurescene.is-solo {
    max-width: 820px;
}

.cms-split-heading {
    margin: 0 0 0.75rem;
    font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.1rem);
}

.cms-split-body {
    margin: 0 0 1rem;
    color: var(--cms-muted);
    font-size: 1.05rem;
}

.cms-split-bullets {
    display: grid;
    gap: 0.5rem;
    margin: 0 0 1.25rem;
    padding-inline-start: 1.2rem;
}

.cms-split-figure,
.cms-featurescene-figure {
    margin: 0;
    min-width: 0;
}

.cms-split-figure img,
.cms-doc-figure img {
    display: block;
    width: 100%;
    border: 1px solid var(--cms-line);
    border-radius: var(--radius-lg);
    background: var(--cms-surface);
    box-shadow: var(--shadow-lg);
}

.cms-split-figure figcaption,
.cms-doc-figure figcaption,
.cms-featurescene-figure figcaption,
.cms-videoblock-figure figcaption {
    margin-top: 0.75rem;
    color: var(--cms-muted);
    font-size: 0.86rem;
    text-align: center;
}

/* ---------------------------------------------------------------------------
   Video
   --------------------------------------------------------------------------- */

.cms-video {
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #0b1210;
    box-shadow: var(--shadow-lg);
}

.cms-video-el {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.cms-videoblock-figure {
    margin: 0;
}

.cms-transcript {
    margin-top: 1rem;
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--cms-line);
    border-radius: var(--radius-lg);
    background: var(--cms-surface);
}

.cms-transcript summary {
    font-weight: 600;
    cursor: pointer;
}

/* ---------------------------------------------------------------------------
   App showcase band, persona tabs, store badges, QR code, logo strip
   --------------------------------------------------------------------------- */

.cms-showcase {
    padding-block: var(--section);
    background:
        radial-gradient(800px 380px at 50% 0%, color-mix(in srgb, var(--cms-accent) 12%, transparent), transparent 70%),
        var(--tint);
    border-block: 1px solid var(--cms-line);
}

.cms-showcase .cms-section-head {
    margin-inline: auto;
    text-align: center;
}

.cms-phones {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(min(78%, 15rem), 1fr);
    gap: clamp(1rem, 2.5vw, 1.75rem);
    margin: 0;
    padding: 0.5rem 0.25rem 1.25rem;
    list-style: none;

    /* Wide content scrolls INSIDE ITSELF on a phone, with snap points. The page never scrolls
       sideways. */
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.cms-phone-card {
    scroll-snap-align: center;
    text-align: center;
}

.cms-phone-title {
    margin: 1.25rem 0 0.35rem;
    font-size: 1.2rem;
}

.cms-phone-body {
    margin: 0 auto 0.75rem;
    max-width: 26ch;
    color: var(--cms-muted);
    font-size: 0.95rem;
}

.cms-phone-card .cms-checklist {
    display: inline-grid;
    text-align: start;
}

/* Persona tabs. Without scripting, every panel shows one after another; site.js turns them into a
   tablist and reveals the tab row. */
.cms-personas {
    padding-block: var(--section);
}

.cms-tablist {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
    padding: 0.35rem;
    overflow-x: auto;
    border: 1px solid var(--cms-line);
    border-radius: 999px;
    background: var(--cms-surface);
    width: max-content;
    max-width: 100%;
}

.cms-tablist[hidden] {
    display: none;
}

.cms-tab {
    flex: none;
    min-height: 44px;
    padding: 0.55rem 1.1rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--cms-muted);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.cms-tab:hover {
    color: var(--cms-ink);
}

.cms-tab[aria-selected="true"] {
    background: var(--cms-accent);
    color: var(--cms-on-accent);
}

.cms-tabpanel {
    display: grid;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    padding: clamp(1.25rem, 3vw, 2.5rem);
    border: 1px solid var(--cms-line);
    border-radius: var(--radius-xl);
    background: var(--cms-surface);
    box-shadow: var(--shadow-sm);
}

.cms-tabpanel + .cms-tabpanel {
    margin-top: 1rem;
}

.cms-tabs.is-enhanced .cms-tabpanel + .cms-tabpanel {
    margin-top: 0;
}

.cms-tabpanel[hidden] {
    display: none;
}

@media (min-width: 900px) {
    .cms-tabpanel:has(.cms-tabpanel-visual) {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

.cms-tabpanel-label {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cms-accent);
}

/* With the tab row showing, the label repeats the tab and is hidden from sight (not from
   assistive technology, which still hears which persona this panel is for). */
.cms-tabs.is-enhanced .cms-tabpanel-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.cms-tabpanel-title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem);
}

.cms-tabpanel-visual {
    min-width: 0;
}

.cms-stores {
    display: grid;
    gap: 1.5rem;
    align-items: center;
}

@media (min-width: 860px) {
    .cms-stores {
        grid-template-columns: minmax(0, 1.2fr) auto;
    }
}

.cms-store-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cms-store {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 56px;
    padding: 0.5rem 1.1rem 0.5rem 0.85rem;
    border-radius: 14px;
    background: #111816;
    color: #ffffff;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.cms-store:hover {
    color: #ffffff;
    background: #000000;
}

.cms-store.is-soon {
    background: var(--cms-surface);
    color: var(--cms-muted);
    border: 1px dashed var(--line-strong);
    box-shadow: none;
}

.cms-store-text {
    display: grid;
    line-height: 1.15;
    font-weight: 700;
    font-size: 1.05rem;
}

.cms-store-text small {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Neutral glyphs, deliberately not the stores' logos: those come only as official artwork. */
.cms-store-icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: currentColor;
    opacity: 0.85;
    -webkit-mask: radial-gradient(circle at 50% 42%, transparent 4px, #000 4.5px) center / 100% 100%;
    mask: radial-gradient(circle at 50% 42%, transparent 4px, #000 4.5px) center / 100% 100%;
}

.cms-store-play .cms-store-icon {
    border-radius: 3px;
    clip-path: polygon(10% 0, 100% 50%, 10% 100%);
    -webkit-mask: none;
    mask: none;
}

.cms-qr {
    display: grid;
    gap: 1.5rem;
    align-items: center;
}

@media (min-width: 760px) {
    .cms-qr {
        grid-template-columns: minmax(0, 1fr) auto;
    }
}

.cms-qr-figure {
    margin: 0;
    justify-self: center;
    padding: 1rem;
    border: 1px solid var(--cms-line);
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.cms-qr-figure svg,
.cms-qr-figure img {
    display: block;
    width: min(220px, 60vw);
    height: auto;
}

.cms-qr-figure figcaption {
    margin-top: 0.5rem;
    color: #46504d;
    font-size: 0.85rem;
}

.cms-logostrip {
    padding-block: clamp(1.75rem, 4vw, 2.5rem);
    border-block: 1px solid var(--cms-line);
    background: var(--cms-surface);
}

.cms-logostrip-heading {
    margin: 0 0 1rem;
    font-family: var(--cms-font-body);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    color: var(--cms-muted);
}

.cms-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cms-logo span,
.cms-logo a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0.4rem 1rem;
    border: 1px solid var(--cms-line);
    border-radius: 999px;
    background: var(--cms-page);
    color: var(--cms-ink);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
}

.cms-logo img {
    display: block;
    width: auto;
    max-height: 36px;
    filter: grayscale(1);
    opacity: 0.8;
}

.cms-logo.is-placeholder span {
    border-style: dashed;
    color: var(--cms-muted);
}

.cms-logostrip-note {
    margin: 1rem 0 0;
    text-align: center;
    color: var(--cms-muted);
    font-size: 0.85rem;
}

/* ---------------------------------------------------------------------------
   FAQ — real <details> elements: they work with no script, the browser's own
   find-in-page searches inside them, and the answers are published as FAQPage.
   --------------------------------------------------------------------------- */

.cms-faq {
    max-width: 52rem;
}

.cms-faq-item {
    border-bottom: 1px solid var(--cms-line);
}

.cms-faq-item summary {
    position: relative;
    display: block;
    padding: 1.15rem 2.5rem 1.15rem 0;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    list-style: none;
}

[dir="rtl"] .cms-faq-item summary {
    padding: 1.15rem 0 1.15rem 2.5rem;
}

.cms-faq-item summary::-webkit-details-marker {
    display: none;
}

.cms-faq-item summary::after {
    content: "+";
    position: absolute;
    inset-inline-end: 0;
    top: 50%;
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    margin-top: -0.875rem;
    border-radius: 50%;
    background: var(--cms-accent-wash);
    color: var(--cms-accent-deep);
    font-weight: 700;
    transition: transform 0.2s ease;
}

.cms-faq-item[open] summary::after {
    transform: rotate(45deg);
}

.cms-faq-item summary:hover {
    color: var(--cms-accent-deep);
}

.cms-faq-item p {
    margin: 0 0 1.25rem;
    color: var(--cms-muted);
}

/* ---------------------------------------------------------------------------
   Call to action — a dark band
   --------------------------------------------------------------------------- */

.cms-cta {
    position: relative;
    overflow: hidden;
    padding-block: clamp(3.5rem, 8vw, 5.5rem);
    background:
        radial-gradient(600px 300px at 85% 10%, color-mix(in srgb, var(--gold) 30%, transparent), transparent 65%),
        radial-gradient(700px 360px at 0% 100%, color-mix(in srgb, var(--cms-accent-lift) 55%, transparent), transparent 65%),
        /* Mixed toward near-black rather than used as it is: a dark theme's "deep" accent can be a
           light teal, and white text on it would fall below a readable contrast. */
        linear-gradient(135deg, color-mix(in srgb, var(--cms-band-deep) 72%, #050a09), color-mix(in srgb, var(--cms-band-deep) 45%, #050a09));
    color: #ffffff;
    text-align: center;
}

.cms-cta-inner {
    position: relative;
    max-width: 50rem;
}

.cms-cta-heading {
    margin: 0 0 0.75rem;
    color: #ffffff;
    font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
}

.cms-cta-body {
    margin: 0 auto;
    max-width: 44rem;
    color: rgb(255 255 255 / 0.85);
    font-size: 1.1rem;
}

.cms-cta-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin: 1.75rem 0 0;
}

.cms-cta-note {
    margin: 1rem 0 0;
    color: rgb(255 255 255 / 0.7);
    font-size: 0.875rem;
}

.cms-cta :focus-visible {
    outline-color: var(--gold);
}

.cms-banner {
    padding: 0.7rem 0;
    background: var(--cms-accent);
    color: var(--cms-on-accent);
    font-size: 0.9rem;
}

.cms-banner a {
    margin-inline-start: 0.5rem;
    color: var(--cms-on-accent);
}

.cms-prospectus {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* ---------------------------------------------------------------------------
   Pricing
   --------------------------------------------------------------------------- */

.cms-tiers {
    display: grid;
    gap: 1.25rem;
    /* auto-fit with a floor, so three tiers sit in a row on a laptop and stack on a phone with no
       breakpoint of their own. A fourth tier wraps rather than squeezing the other three. */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.5rem), 1fr));
    align-items: stretch;
}

.cms-tier {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;

    /*
     * The top padding RESERVES the recommended badge's space in every tier, and the badge is taken
     * out of flow into it. In flow, the badge pushed only the featured tier's contents down, so the
     * three names, prices and feature lists no longer lined up across the row -- which is exactly
     * the comparison the whole table exists to make.
     */
    position: relative;
    padding: 3rem 1.6rem 1.6rem;
    border: 1px solid var(--cms-line);
    border-radius: var(--radius-xl);
    background: var(--cms-surface);
    box-shadow: var(--shadow-sm);
}

.cms-tier.is-featured {
    border-color: var(--cms-accent);
    /* An inset ring as well as a shadow: the recommended tier has to read as chosen on a projector
       in a bright room, where a shadow disappears entirely. */
    box-shadow: inset 0 0 0 1px var(--cms-accent), var(--shadow-lg);
}

.cms-tier-flag {
    position: absolute;
    top: 1.1rem;
    inset-inline-start: 1.6rem;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    background: var(--cms-accent);
    color: var(--cms-on-accent);
    font-size: 0.75rem;
    font-weight: 700;
}

.cms-tier-name {
    margin: 0;
    font-size: 1.2rem;
}

.cms-tier-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem;
    margin: 0;
}

.cms-tier-amount {
    font-family: var(--cms-font-display);
    font-size: clamp(1.9rem, 1.6rem + 1vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    /* Tabular figures on anything financial: without them a column of prices does not line up. */
    font-variant-numeric: tabular-nums;
    color: var(--cms-ink);
}

.cms-tier-period,
.cms-tier-blurb {
    color: var(--cms-muted);
    font-size: 0.92rem;
}

.cms-tier-blurb {
    margin: 0;
}

.cms-tier-features {
    margin: 0.25rem 0 0.5rem;
}

.cms-tier .cms-btn {
    margin-top: auto;
}

.cms-pricing.is-teaser .cms-tier {
    padding-bottom: 1.4rem;
}

.cms-pricing-note {
    margin: 1.5rem 0 0;
    color: var(--cms-muted);
    font-size: 0.9rem;
    text-align: center;
}

/* ---------------------------------------------------------------------------
   Tables — wide content scrolls inside its own container, never the page
   --------------------------------------------------------------------------- */

.cms-table-scroll {
    overflow-x: auto;
    border: 1px solid var(--cms-line);
    border-radius: var(--radius-lg);
    background: var(--cms-surface);
}

.cms-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.94rem;
}

.cms-table th,
.cms-table td {
    padding: 0.75rem 1rem;
    text-align: start;
    border-bottom: 1px solid var(--cms-line);
    vertical-align: top;
}

.cms-table thead th {
    background: var(--cms-accent-wash);
    color: var(--cms-accent-deep);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

.cms-table tbody th {
    font-weight: 600;
}

.cms-table tbody tr:last-child th,
.cms-table tbody tr:last-child td {
    border-bottom: 0;
}

.cms-richtext table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

/* ---------------------------------------------------------------------------
   Documentation, callouts, contents
   --------------------------------------------------------------------------- */

.cms-doc,
.cms-richtext {
    max-width: 52rem;
}

.cms-doc-heading {
    /* Scrolled to by an in-page link, so it needs room above it or the sticky header covers the
       very line somebody just followed a link to. */
    scroll-margin-top: 6rem;
    margin: 0 0 0.75rem;
    font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.7rem);
}

.cms-doc-anchor {
    margin-inline-start: 0.4rem;
    color: var(--cms-line);
    text-decoration: none;
    font-weight: 400;
}

.cms-doc-heading:hover .cms-doc-anchor,
.cms-doc-anchor:focus {
    color: var(--cms-accent);
}

.cms-doc-body {
    margin: 0 0 1rem;
}

.cms-doc-bullets,
.cms-doc-walkthrough {
    display: grid;
    gap: 0.5rem;
    margin: 0 0 1.25rem;
    padding-inline-start: 1.25rem;
}

.cms-doc-figure {
    margin: 1.25rem 0;
}

.cms-doc-link,
.cms-callout-link {
    margin: 1rem 0 0;
}

.cms-callout {
    margin: 1.25rem 0 0;
    padding: 1rem 1.25rem;
    border-inline-start: 4px solid var(--cms-accent);
    border-radius: var(--cms-radius);
    background: var(--cms-accent-wash);
}

.cms-callout p {
    margin: 0;
}

.cms-block-callout .cms-callout {
    margin-block: calc(var(--section) / 2);
    max-width: 52rem;
}

.cms-callout.is-warning {
    /* Semantic, and paired with words in the markup: colour alone is not a warning to a reader who
       cannot distinguish it. */
    border-inline-start-color: var(--cms-critical, #b3261e);
    background: color-mix(in srgb, var(--cms-critical, #b3261e) 8%, var(--cms-page));
}

.cms-toc {
    padding: 1.5rem 0;
}

.cms-toc-heading {
    margin: 0 0 0.75rem;
    font-family: var(--cms-font-body);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cms-muted);
}

.cms-toc-list {
    margin: 0;
    padding-inline-start: 1.2rem;
    columns: 2;
    column-gap: 2rem;
}

.cms-toc-list a {
    /* The theme's own accent, not the browser default. Eighteen underlined blue links in a row read
       as an unstyled document rather than as the contents of one. */
    color: var(--cms-accent-deep);
    text-decoration: none;
}

.cms-toc-list a:hover,
.cms-toc-list a:focus {
    text-decoration: underline;
}

.cms-toc-list li {
    break-inside: avoid;
    margin-bottom: 0.35rem;
}

@media (max-width: 599.98px) {
    .cms-toc-list {
        columns: 1;
    }
}

/* ---------------------------------------------------------------------------
   Quotes
   --------------------------------------------------------------------------- */

.cms-quote {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    margin: 0;
    padding: 1.5rem;
    border: 1px solid var(--cms-line);
    border-radius: var(--radius-xl);
    background: var(--cms-surface);
    box-shadow: var(--shadow-sm);
}

.cms-quote blockquote {
    position: relative;
    margin: 0;
    padding-top: 1.75rem;
}

.cms-quote blockquote::before {
    content: "\201C";
    position: absolute;
    top: -0.75rem;
    inset-inline-start: 0;
    font-family: var(--cms-font-display);
    font-size: 3.5rem;
    line-height: 1;
    color: var(--gold);
}

.cms-quote blockquote p {
    margin: 0;
    font-size: 1.04rem;
}

.cms-quote figcaption {
    display: grid;
    gap: 0.1rem;
    font-size: 0.875rem;
}

.cms-quote cite {
    font-style: normal;
    font-weight: 700;
}

.cms-quote-role,
.cms-quote-school {
    color: var(--cms-muted);
}

.cms-quote.is-placeholder {
    border-style: dashed;
    opacity: 0.8;
}

.cms-placeholder-note {
    margin: 0;
    padding: 0.35rem 0.6rem;
    border-radius: var(--cms-radius);
    background: #fdf3d8;
    color: #5b4a12;
    font-size: 0.78rem;
}

/* ---------------------------------------------------------------------------
   The enquiry form — the one screen that converts
   --------------------------------------------------------------------------- */

.cms-enquiry {
    display: grid;
    gap: 2rem;
}

@media (min-width: 900px) {
    .cms-enquiry {
        grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
        align-items: start;
    }
}

.cms-enquiry-intro h2 {
    margin-top: 0;
    font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.1rem);
}

.cms-enquiry-intro p {
    color: var(--cms-muted);
}

.cms-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
    gap: 1rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid var(--cms-line);
    border-radius: var(--radius-xl);
    background: var(--cms-surface);
    box-shadow: var(--shadow-md);
}

.cms-field-wide {
    grid-column: 1 / -1;
}

.cms-field label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.cms-optional {
    font-weight: 400;
    color: var(--cms-muted);
}

.cms-field input,
.cms-field textarea,
.cms-field select {
    width: 100%;
    min-height: 46px;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--cms-radius);
    background: var(--cms-page);
    color: var(--cms-ink);

    /* 16px exactly. Anything smaller makes iOS Safari zoom the page on focus, and the parent then
       has to pinch back out to reach the next field. */
    font-size: 16px;
    font-family: inherit;
}

.cms-field input:focus,
.cms-field textarea:focus,
.cms-field select:focus {
    outline: 3px solid color-mix(in srgb, var(--cms-accent) 35%, transparent);
    outline-offset: 0;
    border-color: var(--cms-accent);
}

.cms-field .cms-btn {
    width: 100%;
}

/*
 * The honeypot. Moved off-screen rather than display:none: some bots skip fields that are
 * display:none specifically because they know it is a trap.
 */
.cms-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------------------------------------------------------------------------
   Contact
   --------------------------------------------------------------------------- */

.cms-contact-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

.cms-contact-item {
    padding: 1.25rem;
    border: 1px solid var(--cms-line);
    border-radius: var(--radius-lg);
    background: var(--cms-surface);
}

.cms-contact-item h3 {
    margin: 0 0 0.4rem;
    font-family: var(--cms-font-body);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cms-muted);
}

.cms-contact-item address {
    font-style: normal;
}

.cms-contact-item p {
    margin: 0 0 0.35rem;
}

.cms-contact-note {
    color: var(--cms-muted);
    font-size: 0.85rem;
}

/* ---------------------------------------------------------------------------
   Checkout
   --------------------------------------------------------------------------- */

.cms-checkout {
    max-width: 720px;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.cms-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
    gap: 0.7rem;
    margin-bottom: 0.8rem;
}

.cms-plan {
    display: block;
    padding: 0.9rem;
    border: 2px solid var(--cms-line);
    border-radius: var(--radius-lg);
    background: var(--cms-surface);
    cursor: pointer;
}

/* The selected plan is marked by a border AND the radio itself, not by a tint alone -- this is the
   control that decides what somebody is charged. */
.cms-plan:has(input:checked) {
    border-color: var(--cms-accent);
    background: var(--cms-accent-wash);
}

.cms-plan-name {
    display: block;
    font-weight: 700;
    font-family: var(--cms-font-display);
}

.cms-plan-price {
    display: block;
    margin: 0.2rem 0;
    font-size: 1.25rem;
    font-family: var(--cms-font-numeric);
    font-variant-numeric: tabular-nums;
}

.cms-plan-price small {
    display: block;
    font-size: 0.72rem;
    font-family: var(--cms-font-body);
    color: var(--cms-muted);
}

.cms-plan-blurb,
.cms-plan-limits {
    display: block;
    font-size: 0.78rem;
    color: var(--cms-muted);
}

.cms-plan-limits {
    margin-top: 0.35rem;
}

.cms-credentials {
    margin: 1.2rem 0;
    padding: 1rem;
    border: 2px solid var(--cms-accent);
    border-radius: var(--radius-lg);
    background: var(--cms-accent-wash);
}

.cms-credentials dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.3rem 1rem;
    margin: 0.6rem 0;
}

.cms-credentials dt {
    color: var(--cms-muted);
    font-size: 0.82rem;
}

.cms-credentials dd {
    margin: 0;
    font-weight: 600;
}

.cms-credentials code {
    /* Large and monospaced: this gets read out over a phone or copied by hand, and a proportional
       face makes l, 1 and I indistinguishable. */
    font-family: var(--cms-font-numeric);
    font-size: 1.1rem;
    letter-spacing: 0.05em;
}

.cms-fineprint {
    margin-top: 0.8rem;
    font-size: 0.78rem;
    color: var(--cms-muted);
}

.cms-form-error:not(:empty) {
    padding: 0.6rem 0.8rem;
    margin-bottom: 1rem;
    border-radius: var(--cms-radius);
    border: 1px solid var(--cms-critical);
    color: var(--cms-critical);
}

/* ---------------------------------------------------------------------------
   Advertising
   --------------------------------------------------------------------------- */

.cms-ad {
    padding-block: 1.5rem;
}

.cms-ad-label {
    margin: 0 0 0.4rem;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cms-muted);
}

/* ---------------------------------------------------------------------------
   Cookie banner and builder chrome
   --------------------------------------------------------------------------- */

.cms-consent {
    position: fixed;
    inset-inline: 1rem;
    bottom: 1rem;
    z-index: 90;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    max-width: 640px;
    margin-inline: auto;
    padding: 1rem 1.1rem;
    border: 1px solid var(--cms-line);
    border-radius: var(--radius-lg);
    background: var(--cms-surface);
    box-shadow: var(--shadow-lg);
}

.cms-consent p {
    margin: 0;
    font-size: 0.9rem;
}

.cms-consent-actions {
    display: flex;
    gap: 0.5rem;
}

.cms-builder-bar {
    padding: 0.5rem 1rem;
    background: #4a3f1a;
    color: #ffffff;
    font-size: 0.85rem;
    text-align: center;
}

.cms-hidden-note,
.cms-unknown-block {
    margin: 0;
    padding: 0.4rem 1rem;
    background: #fdf3d8;
    color: #5b4a12;
    font-size: 0.8rem;
}

/* ---------------------------------------------------------------------------
   Motion and print
   --------------------------------------------------------------------------- */

/* Cards rising into place as a section scrolls into view. .cms-rise is only ever added by site.js,
   and only to cards below the fold, so without the script every card is simply there. */
.cms-rise {
    opacity: 0;
    transform: translateY(1.25rem) scale(0.98);
}

.cms-rise-in {
    transition: opacity 0.55s ease-out, transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* A card in a grid lifts a little under the pointer — on devices that have one. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .cms-grid > .cms-card,
    .cms-step {
        transition: transform 0.25s ease, box-shadow 0.25s ease;
    }

    .cms-grid > .cms-card:hover,
    .cms-step:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media print {
    .cms-header,
    .cms-footer,
    .cms-consent,
    .cms-builder-bar,
    .cms-hero-actions,
    .cms-hero-visual,
    .cms-form,
    .cms-cta {
        display: none !important;
    }

    body {
        font-size: 11pt;
    }
}

/* ---------------------------------------------------------------------------
   Light and dark
   The dark palette is the active theme's own tokens re-derived for a dark page
   (CmsThemeCss.ToDarkCssVariables), so everything above that reads a token is
   already right. These rules only swap what is not a token: the brand mark
   (drawn twice, once per shade) and the toggle's own icon and words.
   --------------------------------------------------------------------------- */

.cms-brand-mark {
    direction: ltr;
    display: inline-flex;
}

.cms-brand-mark.is-dark,
.cms-theme-sun,
.cms-when-dark {
    display: none;
}

:root[data-site-theme="dark"] .cms-brand-mark.is-light,
:root[data-site-theme="dark"] .cms-theme-moon,
:root[data-site-theme="dark"] .cms-when-light {
    display: none;
}

:root[data-site-theme="dark"] .cms-brand-mark.is-dark,
:root[data-site-theme="dark"] .cms-theme-sun {
    display: inline-flex;
}

:root[data-site-theme="dark"] .cms-when-dark {
    display: inline;
}

.cms-theme-toggle {
    display: inline-grid;
    place-items: center;
    flex: none;
    inline-size: 40px;
    block-size: 40px;
    padding: 0;
    color: var(--cms-ink);
    background: transparent;
    border: 1px solid var(--cms-line);
    border-radius: 999px;
    cursor: pointer;
}

.cms-theme-toggle:hover {
    background: var(--tint);
}

.cms-theme-toggle:focus-visible,
.cms-drawer-theme:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--cms-accent) 55%, transparent);
    outline-offset: 2px;
}

.cms-drawer-theme {
    inline-size: 100%;
    margin-block: 0.75rem;
}

/* Photographs are not inverted or recoloured; on a dark page they are only taken down a touch so a
   bright picture is not a lamp in a dark room. SVG illustrations draw from the tokens already. */
:root[data-site-theme="dark"] main img:not([src$=".svg"]) {
    filter: brightness(0.92);
}

@media (prefers-reduced-motion: no-preference) {
    body,
    .cms-header {
        transition: background-color 0.2s ease, color 0.2s ease;
    }
}
