/* ==========================================================================
   SAInbox - marketing site
   One stylesheet, no framework, no CDN required.
   Sections: tokens, base, layout, nav, hero, cards, split, gallery,
             forms, footer, utilities, responsive, motion
   ========================================================================== */

/* ---------- tokens ----------
   Four themes. Every colour in this file comes from these variables, so a theme is a
   block of variables and nothing else. The theme is set on <html data-theme="...">
   before the first paint, by the small script in the head of each page.
   ------------------------------------------------------------------------- */

:root,
[data-theme="midnight"] {
    color-scheme: dark;
    --field-solid: #121a2c;
    --ink: #0a0e1a;
    --ink-2: #101728;
    --panel: rgba(255, 255, 255, 0.045);
    --panel-2: rgba(255, 255, 255, 0.075);
    --line: rgba(255, 255, 255, 0.11);
    --line-strong: rgba(255, 255, 255, 0.2);
    --text: #e8edf7;
    --muted: #9aa7bd;
    --muted-2: #6f7d95;
    --brand: #7c6cff;
    --cta: #6455e8;
    --brand-2: #22d3ee;
    --brand-3: #34d399;
    --card-from: rgba(255, 255, 255, 0.055);
    --card-to: rgba(255, 255, 255, 0.018);
    --card-from-hover: rgba(255, 255, 255, 0.075);
    --glow-1: rgba(124, 108, 255, 0.30);
    --glow-2: rgba(34, 211, 238, 0.20);
    --glow-3: rgba(52, 211, 153, 0.13);
    --bg-1: #070b14;
    --bg-2: #0a0f1c;
    --grid: rgba(255, 255, 255, 0.028);
    --nav-bg: rgba(7, 11, 20, 0.72);
    --nav-bg-stuck: rgba(7, 11, 20, 0.9);
    --nav-open: #080c16;
    --field: rgba(255, 255, 255, 0.04);
    --field-focus: rgba(255, 255, 255, 0.06);
    --btn-ghost-text: #e8edf7;
    --frame-bg: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.03));
    --dot: rgba(255, 255, 255, 0.22);
    --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.75);
    --shadow-sm: 0 12px 30px -18px rgba(0, 0, 0, 0.7);
}

/* ---------- two more: forest, plum ---------- */

[data-theme="forest"] {
    color-scheme: dark;
    --field-solid: #0b2018;
    --ink: #06130e;
    --ink-2: #0a1c14;
    --panel: rgba(255, 255, 255, 0.05);
    --panel-2: rgba(255, 255, 255, 0.08);
    --line: rgba(255, 255, 255, 0.11);
    --line-strong: rgba(255, 255, 255, 0.2);
    --text: #e6f4ec;
    --muted: #9db8aa;
    --muted-2: #71907f;
    --brand: #34d399;
    --cta: #0f7a52;
    --brand-2: #5eead4;
    --brand-3: #a3e635;
    --card-from: rgba(255, 255, 255, 0.06);
    --card-to: rgba(255, 255, 255, 0.02);
    --card-from-hover: rgba(255, 255, 255, 0.08);
    --glow-1: rgba(52, 211, 153, 0.26);
    --glow-2: rgba(94, 234, 212, 0.18);
    --glow-3: rgba(163, 230, 53, 0.12);
    --bg-1: #04120c;
    --bg-2: #071a12;
    --grid: rgba(255, 255, 255, 0.026);
    --nav-bg: rgba(4, 18, 12, 0.72);
    --nav-bg-stuck: rgba(4, 18, 12, 0.9);
    --nav-open: #05160f;
    --field: rgba(255, 255, 255, 0.045);
    --field-focus: rgba(255, 255, 255, 0.07);
    --btn-ghost-text: #e6f4ec;
    --frame-bg: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.03));
    --dot: rgba(255, 255, 255, 0.22);
    --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.75);
    --shadow-sm: 0 12px 30px -18px rgba(0, 0, 0, 0.7);
}

[data-theme="plum"] {
    color-scheme: dark;
    --field-solid: #1d0e28;
    --ink: #12061a;
    --ink-2: #1a0a26;
    --panel: rgba(255, 255, 255, 0.05);
    --panel-2: rgba(255, 255, 255, 0.085);
    --line: rgba(255, 255, 255, 0.11);
    --line-strong: rgba(255, 255, 255, 0.2);
    --text: #f4e9fb;
    --muted: #b7a1c7;
    --muted-2: #8d779e;
    --brand: #e879f9;
    --cta: #a21caf;
    --brand-2: #f0abfc;
    --brand-3: #fb7185;
    --card-from: rgba(255, 255, 255, 0.06);
    --card-to: rgba(255, 255, 255, 0.02);
    --card-from-hover: rgba(255, 255, 255, 0.08);
    --glow-1: rgba(232, 121, 249, 0.26);
    --glow-2: rgba(251, 113, 133, 0.18);
    --glow-3: rgba(240, 171, 252, 0.14);
    --bg-1: #0d0512;
    --bg-2: #150a1e;
    --grid: rgba(255, 255, 255, 0.026);
    --nav-bg: rgba(13, 5, 18, 0.72);
    --nav-bg-stuck: rgba(13, 5, 18, 0.9);
    --nav-open: #12071a;
    --field: rgba(255, 255, 255, 0.045);
    --field-focus: rgba(255, 255, 255, 0.07);
    --btn-ghost-text: #f4e9fb;
    --frame-bg: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.03));
    --dot: rgba(255, 255, 255, 0.22);
    --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.78);
    --shadow-sm: 0 12px 30px -18px rgba(0, 0, 0, 0.72);
}


[data-theme="daylight"] {
    color-scheme: light;
    --field-solid: #ffffff;
    --ink: #f7f9fc;
    --ink-2: #eef2f8;
    --panel: rgba(15, 23, 42, 0.035);
    --panel-2: rgba(15, 23, 42, 0.06);
    --line: rgba(15, 23, 42, 0.12);
    --line-strong: rgba(15, 23, 42, 0.22);
    --text: #16233b;
    --muted: #4c5a72;
    --muted-2: #6b7a92;
    --brand: #5b46f0;
    --cta: #5b46f0;
    --brand-2: #0e7490;
    --brand-3: #0f7a4d;
    --card-from: #ffffff;
    --card-to: #fbfcfe;
    --card-from-hover: #ffffff;
    --glow-1: rgba(91, 70, 240, 0.14);
    --glow-2: rgba(8, 145, 178, 0.12);
    --glow-3: rgba(15, 157, 99, 0.10);
    --bg-1: #f7f9fc;
    --bg-2: #eef2f8;
    --grid: rgba(15, 23, 42, 0.04);
    --nav-bg: rgba(247, 249, 252, 0.82);
    --nav-bg-stuck: rgba(247, 249, 252, 0.96);
    --nav-open: #ffffff;
    --field: #ffffff;
    --field-focus: #ffffff;
    --btn-ghost-text: #16233b;
    --frame-bg: linear-gradient(180deg, #ffffff, #f2f6fb);
    --dot: rgba(15, 23, 42, 0.18);
    --shadow: 0 24px 50px -28px rgba(15, 23, 42, 0.35);
    --shadow-sm: 0 12px 26px -20px rgba(15, 23, 42, 0.3);
}

[data-theme="ocean"] {
    color-scheme: dark;
    --field-solid: #0a1f2e;
    --ink: #04121c;
    --ink-2: #07202f;
    --panel: rgba(255, 255, 255, 0.05);
    --panel-2: rgba(255, 255, 255, 0.085);
    --line: rgba(125, 211, 252, 0.18);
    --line-strong: rgba(125, 211, 252, 0.32);
    --text: #e4f4ff;
    --muted: #93b6cc;
    --muted-2: #6d93a9;
    --brand: #0ea5e9;
    --cta: #0369a1;
    --brand-2: #22d3ee;
    --brand-3: #2dd4bf;
    --card-from: rgba(14, 165, 233, 0.10);
    --card-to: rgba(255, 255, 255, 0.015);
    --card-from-hover: rgba(14, 165, 233, 0.16);
    --glow-1: rgba(14, 165, 233, 0.28);
    --glow-2: rgba(34, 211, 238, 0.20);
    --glow-3: rgba(45, 212, 191, 0.14);
    --bg-1: #04121c;
    --bg-2: #06202e;
    --grid: rgba(125, 211, 252, 0.05);
    --nav-bg: rgba(4, 18, 28, 0.72);
    --nav-bg-stuck: rgba(4, 18, 28, 0.92);
    --nav-open: #051824;
    --field: rgba(255, 255, 255, 0.05);
    --field-focus: rgba(255, 255, 255, 0.08);
    --btn-ghost-text: #e4f4ff;
    --frame-bg: linear-gradient(180deg, rgba(125,211,252,0.12), rgba(255,255,255,0.02));
    --dot: rgba(125, 211, 252, 0.3);
    --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
    --shadow-sm: 0 12px 30px -18px rgba(0, 0, 0, 0.75);
}

[data-theme="sand"] {
    color-scheme: light;
    --field-solid: #fffef8;
    /* warmer and yellower than it was: cream ground, gold accents */
    --ink: #fffaea;
    --ink-2: #fdf2cf;
    --panel: rgba(120, 88, 20, 0.05);
    --panel-2: rgba(120, 88, 20, 0.09);
    --line: rgba(120, 88, 20, 0.16);
    --line-strong: rgba(120, 88, 20, 0.3);
    --text: #2f2510;
    --muted: #6b5626;
    --muted-2: #8a7434;
    --brand: #ca8a04;
    --cta: #a16207;
    /* the gradient accents stay in the same warm family as the ground */
    --brand-2: #a16207;
    --brand-3: #6b8e0f;
    --card-from: #fffdf3;
    --card-to: #fdf4d4;
    --card-from-hover: #fffff8;
    --glow-1: rgba(202, 138, 4, 0.20);
    --glow-2: rgba(234, 179, 8, 0.16);
    --glow-3: rgba(15, 118, 110, 0.09);
    --bg-1: #fffaea;
    --bg-2: #fdf2cf;
    --grid: rgba(120, 88, 20, 0.055);
    --nav-bg: rgba(255, 250, 234, 0.86);
    --nav-bg-stuck: rgba(255, 250, 234, 0.97);
    --nav-open: #fffdf3;
    --field: #fffef8;
    --field-focus: #fffffb;
    --btn-ghost-text: #2f2510;
    --frame-bg: linear-gradient(180deg, #ffffff, #fdf3d6);
    --dot: rgba(120, 88, 20, 0.22);
    --shadow: 0 24px 50px -28px rgba(120, 88, 20, 0.35);
    --shadow-sm: 0 12px 26px -20px rgba(120, 88, 20, 0.3);
}

:root {
    --radius: 18px;
    --radius-sm: 12px;

    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
            "Helvetica Neue", Arial, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

    --wrap: 1160px;
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    /* rem, not px: the text-size control scales the root, and a fixed size here would
       ignore it. 1.03rem is the same 16.5px at the default root size. */
    font-size: 1.03rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--ink);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* the soft light behind everything */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(720px 520px at 12% -8%, var(--glow-1), transparent 65%),
        radial-gradient(760px 520px at 92% 4%, var(--glow-2), transparent 62%),
        radial-gradient(680px 620px at 50% 108%, var(--glow-3), transparent 68%),
        linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 48%, var(--bg-1) 100%);
}

/* a very fine grid, so the dark area is not flat */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.35;
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at 50% 0%, #000 40%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 40%, transparent 78%);
}

img, svg { display: block; max-width: 100%; height: auto; }

a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 2.9vw, 2.3rem); }
h3 { font-size: 1.16rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.15em; }
li { margin-bottom: 0.45em; }

:focus-visible {
    outline: 2px solid var(--brand-2);
    outline-offset: 3px;
    border-radius: 6px;
}

::selection { background: rgba(124, 108, 255, 0.45); color: #fff; }

.skip {
    position: absolute;
    left: -9999px;
    top: 0;
    padding: 12px 18px;
    background: var(--brand);
    color: #fff;
    border-radius: 0 0 10px 0;
    z-index: 100;
}
.skip:focus { left: 0; }

/* ---------- layout ---------- */
.wrap {
    width: min(100% - 2.5rem, var(--wrap));
    margin-inline: auto;
}

section { padding: clamp(3.2rem, 7vw, 6rem) 0; position: relative; }

.section-head { max-width: 720px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--muted); font-size: 1.06rem; margin-bottom: 0; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand-2);
    margin-bottom: 0.9rem;
}
.eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.lead { font-size: clamp(1.02rem, 1.5vw, 1.19rem); color: var(--muted); max-width: 62ch; }

/* ---------- nav ---------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    background: var(--nav-bg);
    border-bottom: 1px solid transparent;
    transition: border-color 200ms var(--ease), background 200ms var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--line); background: var(--nav-bg-stuck); }

.nav-inner {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    min-height: 68px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.02rem;
    letter-spacing: -0.01em;
    color: var(--text);
}
.brand:hover { text-decoration: none; }
/* the mark is the envelope tile: an image, so it is identical on every device */
.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: block;
    flex: 0 0 auto;
    object-fit: contain;
    box-shadow: 0 8px 20px -10px rgba(124, 108, 255, 0.9);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
    list-style: none;
    padding: 0;
}
.nav-links a {
    display: block;
    padding: 0.5rem 0.78rem;
    white-space: nowrap;
    border-radius: 9px;
    color: var(--muted);
    font-size: 0.94rem;
    font-weight: 500;
    transition: color 150ms var(--ease), background 150ms var(--ease);
}
.nav-links a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--text); background: var(--panel-2); }

/* The menu's call to action.
   It used to be styled as a nav link: .nav-links a carries color, padding and font-size at a
   higher specificity than .btn-primary, so the button ended up with grey text on a purple
   fill and a cramped box - wrong on every theme. This rule wins on specificity instead of
   fighting with !important, and the colours are deliberately theme-independent: white on
   the brand colour reads correctly on a dark header and a light one alike. */
.nav-links .nav-cta {
    margin-left: 0.75rem;
}

.nav-links .nav-cta a.btn,
.nav-links .nav-cta a.btn:visited {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.58rem 1.1rem;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 0.89rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    line-height: 1.2;
    white-space: nowrap;
    background-image: linear-gradient(180deg,
        color-mix(in srgb, var(--cta) 84%, #ffffff) 0%,
        var(--cta) 55%,
        color-mix(in srgb, var(--cta) 90%, #000000) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 8px 18px -10px rgba(10, 14, 26, 0.65);
    transition: transform 150ms var(--ease), box-shadow 180ms var(--ease),
                filter 150ms var(--ease);
}

.nav-links .nav-cta a.btn:hover {
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    filter: saturate(1.06) brightness(1.04);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        0 12px 24px -12px rgba(10, 14, 26, 0.7);
}

.nav-links .nav-cta a.btn:active {
    transform: translateY(0);
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.18),
        0 6px 14px -10px rgba(10, 14, 26, 0.6);
}

.nav-links .nav-cta a.btn:focus-visible {
    outline: 2px solid var(--brand-2);
    outline-offset: 3px;
}

/* an arrow that nudges on hover, so the button reads as an action rather than a label */
.nav-links .nav-cta a.btn::after {
    content: "";
    width: 7px;
    height: 7px;
    border-top: 1.7px solid currentColor;
    border-right: 1.7px solid currentColor;
    transform: rotate(45deg);
    margin-left: 1px;
    transition: transform 160ms var(--ease);
}

.nav-links .nav-cta a.btn:hover::after {
    transform: translateX(2px) rotate(45deg);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
    font-size: 1.1rem;
    cursor: pointer;
}

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.72rem 1.25rem;
    border-radius: 11px;
    border: 1px solid transparent;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 140ms var(--ease), box-shadow 200ms var(--ease),
                background 160ms var(--ease), border-color 160ms var(--ease);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    color: #fff;
    /* both stops come from the theme: a fixed indigo here made a gold theme look purple */
    background: linear-gradient(135deg, var(--brand), var(--cta));
    box-shadow: 0 16px 34px -18px color-mix(in srgb, var(--brand) 85%, transparent);
}
.btn-primary:hover { box-shadow: 0 22px 44px -20px color-mix(in srgb, var(--brand) 95%, transparent); }

.btn-ghost {
    color: var(--btn-ghost-text);
    background: var(--panel);
    border-color: var(--line);
}
.btn-ghost:hover { background: var(--panel-2); border-color: var(--line-strong); }

.btn-sm { padding: 0.55rem 0.95rem; font-size: 0.88rem; border-radius: 9px; }

/* ---------- hero ---------- */
.hero { padding-top: clamp(2.5rem, 5vw, 4rem); padding-bottom: clamp(1.5rem, 3vw, 2.4rem); }

.hero-grid {
    display: grid;
    grid-template-columns: 1.02fr 0.98fr;
    gap: clamp(2rem, 4vw, 3.4rem);
    align-items: center;
}

.hero h1 { margin-bottom: 1rem; }
.hero h1 .grad {
    background: linear-gradient(100deg, #b9b0ff 0%, var(--brand-2) 55%, var(--brand-3) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero .lead { margin-bottom: 1.7rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 1.9rem; }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.34rem 0.8rem 0.34rem 0.42rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--panel);
    font-size: 0.79rem;
    color: var(--muted);
    margin-bottom: 1.2rem;
}
.pill b { color: var(--text); font-weight: 600; }
.pill-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand-3);
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.16);
}

.hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 1.4rem;
    padding-top: 1.3rem;
    border-top: 1px solid var(--line);
    list-style: none;
    margin: 0;
}
.hero-facts li { margin: 0; font-size: 0.86rem; color: var(--muted-2); }
.hero-facts b { display: block; font-size: 1.02rem; color: var(--text); font-weight: 700; }

/* the framed preview */
.frame {
    position: relative;
    border-radius: var(--radius);
    border: 1px solid var(--line-strong);
    background: var(--frame-bg);
    padding: 8px;
    box-shadow: var(--shadow);
}
.frame-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 10px;
}
.frame-bar i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--dot);
}
.frame-bar span {
    margin-left: auto;
    font-size: 0.72rem;
    color: var(--muted-2);
    font-family: var(--mono);
}
.frame img, .frame svg {
    border-radius: 12px;
    width: 100%;
    background: #f6f8fc;
}

.hero-note {
    margin-top: 0.85rem;
    font-size: 0.78rem;
    color: var(--muted-2);
    text-align: right;
}

/* ---------- cards ---------- */
.grid { display: grid; gap: 1.1rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
    position: relative;
    padding: 1.5rem 1.4rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, var(--card-from), var(--card-to));
    box-shadow: var(--shadow-sm);
    transition: transform 220ms var(--ease), border-color 220ms var(--ease),
                background 220ms var(--ease);
    overflow: hidden;
}
.card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(140deg, rgba(124,108,255,0.55), transparent 42%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 220ms var(--ease);
    pointer-events: none;
}
.card:hover { transform: translateY(-3px); background: linear-gradient(180deg, var(--card-from-hover), var(--card-to)); }
.card:hover::after { opacity: 1; }

.card h3 { margin-bottom: 0.4rem; }
.card p { color: var(--muted); font-size: 0.94rem; margin: 0; }

.icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    margin-bottom: 0.95rem;
    background: rgba(124, 108, 255, 0.14);
    border: 1px solid rgba(124, 108, 255, 0.3);
    color: #c9c2ff;
}
.icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.icon.is-cyan { background: rgba(34, 211, 238, 0.12); border-color: rgba(34, 211, 238, 0.3); color: #a5f3fc; }
.icon.is-green { background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.3); color: #a7f3d0; }
.icon.is-amber { background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.3); color: #fde68a; }


/* ---------- icon and badge tints on light themes ----------
   The default tints are light colours, which work on a dark panel and disappear on a
   white one. These two blocks darken them for the light themes only. */

[data-theme="daylight"] .icon { color: #4f46e5; background: rgba(91, 70, 240, 0.10); border-color: rgba(91, 70, 240, 0.28); }
[data-theme="daylight"] .icon.is-cyan { color: #0e7490; background: rgba(8, 145, 178, 0.10); border-color: rgba(8, 145, 178, 0.28); }
[data-theme="daylight"] .icon.is-green { color: #0f7a4d; background: rgba(15, 122, 77, 0.10); border-color: rgba(15, 122, 77, 0.28); }
[data-theme="daylight"] .icon.is-amber { color: #a16207; background: rgba(161, 98, 7, 0.10); border-color: rgba(161, 98, 7, 0.28); }

[data-theme="sand"] .icon { color: #9a3412; background: rgba(154, 52, 18, 0.09); border-color: rgba(154, 52, 18, 0.26); }
[data-theme="sand"] .icon.is-cyan { color: #0f5f59; background: rgba(15, 95, 89, 0.09); border-color: rgba(15, 95, 89, 0.26); }
[data-theme="sand"] .icon.is-green { color: #3f6212; background: rgba(63, 98, 18, 0.09); border-color: rgba(63, 98, 18, 0.26); }
[data-theme="sand"] .icon.is-amber { color: #92400e; background: rgba(146, 64, 14, 0.09); border-color: rgba(146, 64, 14, 0.26); }

[data-theme="daylight"] .badge { color: #0f7a4d; background: rgba(15, 122, 77, 0.10); border-color: rgba(15, 122, 77, 0.32); }
[data-theme="daylight"] .badge.is-warn { color: #a16207; background: rgba(161, 98, 7, 0.10); border-color: rgba(161, 98, 7, 0.32); }
[data-theme="sand"] .badge { color: #3f6212; background: rgba(63, 98, 18, 0.10); border-color: rgba(63, 98, 18, 0.32); }
[data-theme="sand"] .badge.is-warn { color: #92400e; background: rgba(146, 64, 14, 0.10); border-color: rgba(146, 64, 14, 0.32); }

/* ---------- split sections ---------- */
.split {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: clamp(2rem, 4vw, 3.2rem);
    align-items: center;
}
.split.is-flipped .split-media { order: -1; }

.split h2 { margin-bottom: 0.8rem; }
.split p { color: var(--muted); }

.checks { list-style: none; padding: 0; margin: 1.3rem 0 0; }
.checks li {
    position: relative;
    padding-left: 1.9rem;
    margin-bottom: 0.7rem;
    color: var(--text);
    font-size: 0.96rem;
}
.checks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.34em;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(52, 211, 153, 0.16);
    border: 1px solid rgba(52, 211, 153, 0.42);
}
.checks li::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 0.62em;
    width: 6px;
    height: 3px;
    border-left: 1.6px solid var(--brand-3);
    border-bottom: 1.6px solid var(--brand-3);
    transform: rotate(-45deg);
}

/* ---------- steps ---------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.step {
    position: relative;
    padding: 1.6rem 1.4rem 1.4rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--panel);
}
.step::before {
    counter-increment: step;
    content: "0" counter(step);
    display: block;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--brand-2);
    letter-spacing: 0.1em;
    margin-bottom: 0.7rem;
}
.step h3 { font-size: 1.04rem; }
.step p { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* ---------- table ---------- */
.table-wrap {
    border-radius: var(--radius);
    border: 1px solid var(--line);
    overflow: hidden;
    background: var(--panel);
}
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
caption {
    text-align: left;
    padding: 1rem 1.2rem 0.4rem;
    color: var(--muted-2);
    font-size: 0.8rem;
}
th, td { padding: 0.85rem 1.2rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--panel); }
td b { color: var(--text); }

/* ---------- gallery ---------- */
.gallery { display: grid; gap: 2.2rem; }
.shot {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
.shot figcaption { color: var(--muted); font-size: 0.93rem; }
.shot figcaption b { color: var(--text); display: block; font-size: 1rem; margin-bottom: 0.2rem; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.2rem; }
.field.is-wide { grid-column: 1 / -1; }
label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
input, select, textarea {
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--field);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.7rem 0.85rem;
    transition: border-color 160ms var(--ease), background 160ms var(--ease);
}
input:focus, select:focus, textarea:focus {
    border-color: rgba(124, 108, 255, 0.7);
    background: var(--field-focus);
    outline: none;
}
textarea { resize: vertical; min-height: 132px; }
.hint { font-size: 0.78rem; color: var(--muted-2); }

/* ---------- contact / support blocks ---------- */
.info-card {
    padding: 1.4rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--panel);
}
.info-card h3 { font-size: 1rem; margin-bottom: 0.55rem; }
.info-card p, .info-card address {
    margin: 0;
    font-style: normal;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.75;
}
.info-card a { color: var(--brand-2); }

.badge {
    display: inline-block;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(52, 211, 153, 0.14);
    border: 1px solid rgba(52, 211, 153, 0.35);
    color: #a7f3d0;
}
.badge.is-warn { background: rgba(251, 191, 36, 0.13); border-color: rgba(251, 191, 36, 0.35); color: #fde68a; }

/* ---------- accordion ---------- */
details.faq {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel);
    padding: 1rem 1.2rem;
    margin-bottom: 0.7rem;
}
details.faq summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.97rem;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
    content: "+";
    font-size: 1.15rem;
    color: var(--brand-2);
    line-height: 1;
    transition: transform 180ms var(--ease);
}
details.faq[open] summary::after { content: "-"; }
details.faq p { margin: 0.75rem 0 0; color: var(--muted); font-size: 0.93rem; }

/* ---------- cta band ---------- */
.cta-band {
    border-radius: 24px;
    border: 1px solid var(--line-strong);
    background:
        radial-gradient(560px 220px at 15% 0%, var(--glow-1), transparent 70%),
        radial-gradient(520px 220px at 88% 100%, var(--glow-2), transparent 70%),
        var(--field);
    padding: clamp(2rem, 4vw, 3.2rem);
    text-align: center;
}
.cta-band h2 { margin-bottom: 0.6rem; }
.cta-band p { color: var(--muted); max-width: 56ch; margin: 0 auto 1.6rem; }
.cta-actions { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }

/* ---------- footer ---------- */
footer {
    border-top: 1px solid var(--line);
    padding: 3rem 0 2rem;
    color: var(--muted-2);
    font-size: 0.9rem;
}
.foot-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2.2rem;
}
footer h4 { font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.8rem; }
footer ul { list-style: none; padding: 0; margin: 0; }
footer li { margin-bottom: 0.5rem; }
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }
.foot-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.4rem;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.6rem;
    border-top: 1px solid var(--line);
    font-size: 0.84rem;
}
.foot-bottom .credit { color: var(--muted); }

/* ---------- utilities ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 1.2rem; }
.mt-3 { margin-top: 2rem; }
.small { font-size: 0.85rem; color: var(--muted-2); }
.mono { font-family: var(--mono); font-size: 0.86rem; }
.nowrap { white-space: nowrap; }

.note {
    border-left: 3px solid var(--brand-2);
    background: rgba(34, 211, 238, 0.07);
    border-radius: 0 12px 12px 0;
    padding: 1rem 1.2rem;
    font-size: 0.92rem;
    color: var(--muted);
}
.note b { color: var(--text); }
.note h3 {
    font-size: 0.98rem;
    margin: 0 0 0.45rem;
    color: var(--text);
}
.note p { margin: 0; font-size: 0.9rem; line-height: 1.6; }

/* the one that says "this is not optional" */
.note-warn {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.09);
}
.note-warn h3 { color: var(--text); }

/* ---------- reveal on scroll ---------- */
.reveal { transition: opacity 620ms var(--ease), transform 620ms var(--ease); }

/* Hidden only when JavaScript is running, so a blocked or broken script leaves the page
   readable instead of blank. The class is set in the head, before anything paints. */
.js .reveal { opacity: 0; transform: translateY(18px); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
/* The header, at every width.
   The page links have their own row and are never hidden behind a menu: a visitor can
   always see and reach every page, which is the whole point of a site with seven of them.
   Above 1100px the three parts share one row; below that the tools move up beside the
   brand and the links take a row of their own, scrolling sideways if the window is
   genuinely too narrow for six labels. */
.nav-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 1.2rem;
    row-gap: 0.35rem;
    padding: 0.55rem 0;
}

.brand { order: 1; }

.nav-tools {
    order: 3;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.nav-links {
    order: 2;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
    padding: 2px 0;
}

.nav-links li { flex: 0 0 auto; }

/* The header, one row wherever it can be.
   Above 1200px the brand, the six links and the four tool groups share a single line: the
   dots shrink, the size control tightens, and the language shows EN / DE / FR / IT rather
   than full names. Below that it becomes two rows, because a link that is squeezed to
   nothing is a page a visitor cannot find. */
/* The header gets a wider container than the body text. Body copy wants a short measure;
   a menu bar wants room, and 160px more here is the difference between one row and two on
   a normal laptop once the real Inter font is loaded. */
.wrap.nav-inner {
    width: min(100% - 1.6rem, 1320px);
    flex-wrap: wrap;
    align-items: center;
    column-gap: 1rem;
    row-gap: 0.35rem;
    padding: 0.55rem 0;
}

.brand { order: 1; flex: 0 0 auto; }

.nav-tools {
    order: 3;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex: 0 0 auto;
}

.nav-tools .btn { white-space: nowrap; }

.nav-links {
    order: 2;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.1rem;
    flex-wrap: nowrap;
    flex: 0 0 auto;
    overflow: visible;
    padding: 2px 0;
}

.nav-links li { flex: 0 0 auto; }
.nav-links a { white-space: nowrap; }

@media (min-width: 1200px) {
    /* the row may still wrap rather than overlap: the real Inter font is wider than the
       fallback used while building, and that difference is exactly what painted the theme
       button on top of the last link */
    .nav-inner { flex-wrap: wrap; padding: 0.5rem 0; }
    .nav-links { margin-right: 0.3rem; }

    .nav-links a { padding: 0.45rem 0.6rem; font-size: 0.9rem; }

    .theme-switch { padding: 3px 5px; gap: 3px; }
    .theme-switch button { width: 13px; height: 13px; }

    .font-ctl { padding: 2px 3px; gap: 1px; }
    .font-ctl button { width: 18px; height: 20px; font-size: 0.7rem; }
    .font-ctl .fs-value { min-width: 28px; font-size: 0.64rem; }

    .lang-ctl { padding: 4px 18px 4px 8px; font-size: 0.74rem; }

    .nav-tools .btn { padding: 0.45rem 0.75rem; font-size: 0.82rem; }
}

@media (min-width: 1200px) and (max-width: 1400px) {
    .nav-links a { padding: 0.42rem 0.5rem; font-size: 0.86rem; }
    .brand { font-size: 0.95rem; }
}

/* below 1200 the tools take the first row and the links the second */
@media (max-width: 1199px) {
    .nav-tools { order: 2; }
    .nav-links {
        order: 3;
        flex: 1 0 100%;
        margin: 0;
        padding: 0.15rem 0 0.35rem;
        border-top: 1px solid var(--line);
        justify-content: flex-start;
    }
    .nav-links a { padding: 0.5rem 0.7rem; font-size: 0.92rem; }
    .theme-switch button { width: 16px; height: 16px; }
}

@media (max-width: 480px) {
    .brand span:not(.brand-mark) { display: none; }
    .nav-links a { padding: 0.45rem 0.55rem; font-size: 0.88rem; }
}


@media (max-width: 560px) {
    body { font-size: 16px; }
    .wrap { width: min(100% - 1.6rem, var(--wrap)); }
    .hero-facts { gap: 1rem; }
    th, td { padding: 0.7rem 0.85rem; }
    table { font-size: 0.86rem; }
}

/* ---------- motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* ---------- print ---------- */
@media print {
    body { background: #fff; color: #000; }
    body::before, body::after, .nav, .cta-band { display: none; }
    a { color: #000; }
}

/* ---------- theme switcher ---------- */
.theme-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 0.4rem;
    padding: 4px 8px 4px 6px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--panel);
}
.theme-switch button {
    width: 18px;
    height: 18px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    cursor: pointer;
    transition: transform 140ms var(--ease), box-shadow 140ms var(--ease);
}
.theme-switch button:hover { transform: scale(1.12); }
.theme-switch button[aria-pressed="true"] {
    box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--brand-2);
}
.theme-switch .sw-midnight { background: linear-gradient(135deg, #0a0e1a, #7c6cff); }
.theme-switch .sw-daylight { background: linear-gradient(135deg, #ffffff, #5b46f0); }
.theme-switch .sw-ocean { background: linear-gradient(135deg, #04121c, #0ea5e9); }
.theme-switch .sw-sand { background: linear-gradient(135deg, #faf6ef, #b45309); }

@media (max-width: 1250px) {
    .nav-tools { flex-wrap: wrap; }
}

/* ==========================================================================
   Polish pass
   Small refinements only - no layout changes, and nothing that the responsive
   blocks above set (padding, font sizes of the menu) is touched here.
   ========================================================================== */

/* an anchor link must not land under the sticky header */
section[id], main[id], div[id] { scroll-margin-top: 92px; }

/* --- typography --- */
h1, h2 { letter-spacing: -0.028em; }
h2 { line-height: 1.12; }
h3 { letter-spacing: -0.012em; }

.lead { max-width: 60ch; }

.section-head p { font-size: 1.03rem; line-height: 1.68; }

.eyebrow { letter-spacing: 0.16em; font-size: 0.74rem; }

/* prose links read as links without shouting */
p a, .info-card a, .note a, .card p a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
}
p a:hover, .info-card a:hover, .note a:hover, .card p a:hover { text-decoration-color: currentColor; }

/* --- header --- */
.nav { border-bottom: 1px solid var(--line); }
.nav.is-stuck { box-shadow: 0 10px 30px -22px rgba(0, 0, 0, 0.85); }

.nav-links a[aria-current="page"] {
    box-shadow: inset 0 0 0 1px var(--line-strong);
}

/* --- cards --- */
.card {
    border-color: color-mix(in srgb, var(--line-strong) 70%, transparent);
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.card:hover {
    border-color: color-mix(in srgb, var(--brand) 42%, var(--line-strong));
    box-shadow: 0 22px 44px -26px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.card h3 { font-size: 1.12rem; }

.icon { border-radius: 13px; }

/* --- tables --- */
.table-wrap { box-shadow: var(--shadow-sm); }
.table-wrap thead th { background: var(--panel); }
.table-wrap tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--panel) 55%, transparent); }
.table-wrap tbody tr:hover td { background: var(--panel-2); }
.table-wrap td:first-child { color: var(--text); }

/* --- steps and notes --- */
.step { border-color: color-mix(in srgb, var(--line-strong) 60%, transparent); }
.step::before { letter-spacing: 0.14em; }

.note { border-left-width: 3px; }

/* --- footer --- */
footer h4 { letter-spacing: 0.14em; }
footer ul a { text-decoration: none; }
footer ul a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot-bottom { padding-top: 1.8rem; }

/* --- the frame around a preview --- */
.frame { box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08); }

/* --- theme dots: a touch more presence --- */
.theme-switch { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line-strong) 60%, transparent); }

/* one dot per theme, coloured from the theme it selects */
.theme-switch .sw-forest { background: linear-gradient(135deg, #34d399, #0f7a52); }
.theme-switch .sw-plum   { background: linear-gradient(135deg, #e879f9, #a21caf); }

/* ---------- text size ----------
   Every size on this site is in rem, so scaling the root font size scales the page.
   The buttons step it between 90% and 125%, and the choice is remembered. */
.font-ctl {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px 5px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--panel);
}

.font-ctl button {
    width: 24px;
    height: 22px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.font-ctl button:hover { background: var(--panel-2); color: var(--text); }

.font-ctl .fs-value {
    min-width: 34px;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* ---------- language ---------- */
/* The language control is the one place a native control shows through: the list that
   drops down is drawn by the operating system. color-scheme (set per theme above) makes
   that list dark or light to match, and these rules make the closed control itself read
   clearly on every theme - a solid surface, the theme's own text colour, and options that
   do not fall back to black-on-black. */
.lang-ctl {
    appearance: none;
    -webkit-appearance: none;
    padding: 5px 22px 5px 9px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--field-solid, var(--panel));
    color: var(--text);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                      linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: calc(100% - 12px) 50%, calc(100% - 8px) 50%;
    background-size: 4px 4px, 4px 4px;
    background-repeat: no-repeat;
}

.lang-ctl:hover { border-color: var(--brand); }

.lang-ctl:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }

.lang-ctl option {
    background: var(--field-solid, #ffffff);
    color: var(--text);
}

/* the same for the few places a select or an option still shows a native surface */
select, option { color-scheme: inherit; }

.nav-tools { gap: 0.5rem; }

@media (max-width: 1100px) {
    .font-ctl button { width: 26px; height: 24px; }
}

/* ---------- accessibility ----------
   Used by the label of the language control, which needs a name for screen readers but no
   space in a header that has to stay on one line. */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- theme menu ----------
   Seven dots took as much room as the language control and the button together, and the
   row they lived in had to scroll. One button with a palette icon opens a short list
   instead: each theme with its own icon and its own colour, and the name of the one in
   use beside the icon. */
.theme-menu { position: relative; flex: 0 0 auto; }

.theme-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px 4px 7px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--field-solid, var(--panel));
    color: var(--text);
    font: inherit;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    line-height: 1;
}

.theme-btn:hover { border-color: var(--brand); }
.theme-btn:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }

.theme-btn .theme-ico { width: 15px; height: 15px; opacity: 0.85; flex: 0 0 auto; }

/* the colour of the theme in use, as a small ring */
.theme-current {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    flex: 0 0 auto;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.theme-current[data-theme-colour="midnight"] { background: linear-gradient(135deg, #7c6cff, #0a0e1a); }
.theme-current[data-theme-colour="daylight"] { background: linear-gradient(135deg, #ffffff, #c7d2fe); }
.theme-current[data-theme-colour="ocean"]    { background: linear-gradient(135deg, #38bdf8, #0b3954); }
.theme-current[data-theme-colour="sand"]     { background: linear-gradient(135deg, #fde68a, #ca8a04); }
.theme-current[data-theme-colour="forest"]   { background: linear-gradient(135deg, #34d399, #064e3b); }
.theme-current[data-theme-colour="plum"]     { background: linear-gradient(135deg, #e879f9, #4a044e); }

.theme-name { display: none; }

@media (min-width: 1500px) {
    .theme-name { display: inline-block; min-width: 58px; text-align: left; }
}

.theme-pop {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 60;
    min-width: 186px;
    padding: 6px;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: var(--field-solid, var(--panel));
    box-shadow: var(--shadow);
    display: none;
}

.theme-pop.is-open { display: block; }

.theme-pop button {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 7px 9px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.82rem;
    text-align: left;
    cursor: pointer;
}

.theme-pop button:hover { background: var(--panel-2); }

.theme-pop button[aria-checked="true"] { background: var(--panel-2); font-weight: 650; }

.theme-pop button[aria-checked="true"]::after {
    content: "";
    margin-left: auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand);
}

.theme-pop .sw-ico { width: 16px; height: 16px; flex: 0 0 auto; opacity: 0.9; }

.theme-pop button[data-set-theme="midnight"] .sw-ico { color: #8b7cff; }
.theme-pop button[data-set-theme="daylight"] .sw-ico { color: #f59e0b; }
.theme-pop button[data-set-theme="ocean"]    .sw-ico { color: #38bdf8; }
.theme-pop button[data-set-theme="sand"]     .sw-ico { color: #ca8a04; }
.theme-pop button[data-set-theme="forest"]   .sw-ico { color: #34d399; }
.theme-pop button[data-set-theme="plum"]     .sw-ico { color: #e879f9; }

@media (max-width: 1199px) {
    .theme-name { display: none; }
    .theme-btn { padding: 5px 8px; }
}

/* ---------- the brand: Devanagari, then Latin, then what it is ----------
   डाक सारथी is the name. The Latin spelling sits under it for anyone who has to type it,
   and the tagline under that, so a first-time visitor knows what the product is before
   reading a single sentence of the page. */
.brand-words {
    display: flex;
    flex-direction: column;
    line-height: 1.02;
    min-width: 0;
}

.brand-en {
    font-size: 1.14rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
    white-space: nowrap;
    line-height: 1.05;
}

.brand-hi {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--muted);
    margin-top: 3px;
    white-space: nowrap;
}

.brand-tag {
    font-size: 0.63rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--muted-2);
    margin-top: 2px;
    white-space: nowrap;
}

.brand .brand-mark {
    font-family: "Nirmala UI", "Noto Sans Devanagari", "Mangal", "Segoe UI", var(--font);
    font-size: 0.95rem;
    font-weight: 700;
}

/* the tagline is the first thing to go when space is short, then the Latin line */
@media (max-width: 1300px) {
    .brand-tag { display: none; }
}

@media (max-width: 1100px) {
    .brand-hi { display: none; }
    .brand-en { font-size: 1.05rem; }
}

/* the spinner inside a button that is working */
.eh-spin {
    display: inline-block;
    width: .8em;
    height: .8em;
    margin-right: .35em;
    vertical-align: -0.08em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: eh-spin 700ms linear infinite;
}

@keyframes eh-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .eh-spin { animation-duration: 1.8s; }
}

/* ---------- comparison table ----------
   Three columns of verdicts need to be scannable at a glance, in every theme. Colour alone
   is not enough - each cell also carries a word - but the colour is what the eye finds
   first, so it uses the brand green for yes, muted grey for no, and the brand purple for a
   qualified yes. */
.compare th:first-child,
.compare td:first-child {
    font-weight: 600;
    color: var(--text);
}

.compare td.yes {
    color: var(--brand-3);
    font-weight: 600;
}

.compare td.no {
    color: var(--muted-2);
}

.compare td.mid {
    color: var(--brand);
    font-weight: 600;
}

.compare tbody tr:hover td {
    background: color-mix(in srgb, var(--panel-2) 70%, transparent);
}

@media (max-width: 720px) {
    .compare {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
