/* Neuno One. Tokens, base rules, header, menu, footer, links, forms and page components
   follow the main Neuno stylesheet (theme/main/css/style.css and form-pages.css); platform-only
   components at the end use the same tokens. */
/* Design tokens: copied unchanged from the main site (theme/main/css/style.css), so both sites share one set. */
:root {
    /* Color Palette - Neuno: brand red + warm browns */
    --color-primary: #c22400;
    --color-primary-dark: #921b00;
    --color-primary-light: #d15b40;
    --color-secondary: #7a5c48;       /* warm clay brown (was mint green) */
    --color-secondary-dark: #5e4536;
    --color-secondary-light: #e9dfd6; /* sand */
    --color-accent: #b4530f;          /* burnt amber (was hot pink) */
    --color-accent-dark: #8f3f0a;
    /* Background Colors */
    --bg-main: #FFFFFF;
    --bg-darker: #1e1510;
    --bg-light: #faf7f5;    /* warm off-white (was cool grey) */
    --bg-accent: #FFF5EB;
    /* Text Colors */
    --text-main: #1e1510;
    --text-light: #FFFFFF;
    --text-muted: #6f645c;  /* warm grey (was blue-grey) */
    /* Borders */
    --border-color: #e7e0da; /* warm light border (was cool grey) */
    /* Spacing */
    --space-xs: 5px;
    --space-sm: 10px;
    --space-md: 20px;
    --space-lg: 30px;
    --space-xl: 50px;
    /* Typography — every font size, weight and line height in this file uses these tokens */
    --font-main: 'Inter', sans-serif;
    --font-headings: 'Inter', sans-serif;
    /* Type scale (16px root) */
    --font-size-2xs: 0.6875rem; /* 11px  uppercase micro labels */
    --font-size-xs: 0.75rem;    /* 12px  badges, tags, small UI */
    --font-size-sm: 0.875rem;   /* 14px  secondary text, meta */
    --font-size-base: 1rem;     /* 16px  body */
    --font-size-lg: 1.125rem;   /* 18px  column & section titles */
    --font-size-xl: 1.25rem;    /* 20px  small headings */
    --font-size-2xl: 1.5rem;    /* 24px  h3, card titles */
    --font-size-3xl: 2rem;      /* 32px  h2 */
    --font-size-4xl: 2.25rem;   /* 36px  h1 (every page title) */
    --font-size-menu: 2.25rem;  /* 36px  main menu, matches 36px icons; fixed at every screen size */
    --font-size-display: clamp(2.5rem, 6vw, 4.5rem); /* hero */
    --font-size-lead: clamp(1.125rem, 0.95rem + 0.75vw, 1.5rem); /* intro paragraphs: 18px phone -> 24px desktop */
    /* Weights: regular = body text, medium = headings & UI, semibold = emphasis, buttons, labels */
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    /* Line heights */
    --line-height-tight: 1.2;   /* headings */
    --line-height-snug: 1.4;    /* compact UI text */
    --line-height-base: 1.6;    /* body */
    --line-height-relaxed: 1.75;/* long-form reading */
    /* Letter spacing (uppercase labels only) */
    --letter-spacing-tight: -0.02em;
    --arrow-icon-size: 15px;            /* arrow in "Learn more", "View all" etc. */
    --arrow-nudge: 4px;                 /* how far arrows move on hover */
    --choice-link-height: 3.75rem;      /* "I am a creator" / "I represent a brand" pills */
    --letter-spacing-caps: 0.08em;
    --letter-spacing-caps-wide: 0.12em;
    /* Effects */
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --border-radius-full: 9999px;
    --box-shadow-sm: 0 2px 8px rgb(30 21 16 / 0.1);
    --box-shadow-md: 0 8px 24px rgb(30 21 16 / 0.12);
    --box-shadow-lg: 0 16px 48px rgb(30 21 16 / 0.16);
    --burger-grow: 0.2s;    /* menu icon closing: the middle line grows back (after this delay) */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.4s ease;
    --transition-slow: 0.6s ease;
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    /* Layout */
    --header-height: 56px;
    --container-width: 1200px;
    /* Distance from the screen edge to the content edge; used to inset divider lines */
    --page-gutter: max(var(--space-md), calc((100vw - var(--container-width)) / 2 + var(--space-md)));
    --overlay-z-index: 1000;
    --menu-z-index: 1001;
    /* Search Palette */
    --overlay-dim: rgb(0 0 0 / 0.5); /* same dimming as the cookie banner */
    --search-overlay-bg: var(--overlay-dim);
    --search-card-bg: var(--bg-main);
    --search-card-bg-hover: var(--bg-light);
    --search-accent: var(--color-primary);
    --search-accent-dark: var(--color-primary-dark);
    --search-accent-light: var(--color-primary-light);
    --search-text: var(--text-main);
    --search-section-heading: var(--text-muted);
    --border-radius-sm: 4px;

    /* Header buttons, language menu */
    --icon-size: 36px;
    --icon-size-sm: 24px;
    --icon-size-xs: 16px;
    --logo-height: 25px;
    --lang-menu-min-width: 9rem;
    /* Home hero: sofa photo with the text on the light beam above it.
       It starts at the very top of the page, under the transparent header.
       Height: the full screen, but no taller than the photo is at full width
       (so it is never cropped), and never too short for the text. */
    --hero-photo-ratio: 0.9;            /* photo width / height (2198 x 2440) */
    --hero-sofa-share: 0.23;            /* sofa: lowest 23% of the photo */
    --hero-min-height: 22rem;           /* includes the header area */
    --hero-scroll-size: 56px;
    --hero-fade-height: 14%;            /* white fade over the bottom of the photo */
    --hero-fade-top-height: 12%;        /* white fade over the top, under the header */
    --hero-height: max(min(100svh, calc(100vw / var(--hero-photo-ratio))), var(--hero-min-height));
    /* Text scales with the photo so it always fits inside the beam, which
       narrows to about 65% of the photo width at the sofa */
    --hero-content-width: calc(var(--hero-height) * var(--hero-photo-ratio) * 0.62);
    --hero-title-size: min(5.5rem, calc(var(--hero-height) * 0.08));
    --focus-ring: 0 0 0 3px var(--primary-a25);
    /* Alpha tints of the brand colours, code block palette and extra steps.
       Every colour in this file must come from a token in :root. */
    --accent-a08: rgb(180 83 15 / 0.08);
    --border-radius-none: 0;
    --border-radius-xs: 2px;
    --clay-a05: rgb(122 92 72 / 0.05);
    --clay-a08: rgb(122 92 72 / 0.08);
    --clay-a10: rgb(122 92 72 / 0.1);
    --clay-a20: rgb(122 92 72 / 0.2);
    --clay-a30: rgb(122 92 72 / 0.3);
    --clay-a35: rgb(122 92 72 / 0.35);
    --code-comment: #9a8a7f;
    --code-function: #f2c879;
    --code-keyword: #ff9e80;
    --code-number: #f78c6c;
    --code-string: #d4c38c;
    --code-text: #f3ece6;
    --code-variable: #e9dfd6;
    --font-size-code: 0.875em;
    --ink-a00: rgb(30 21 16 / 0);
    --ink-a03: rgb(30 21 16 / 0.03);
    --ink-a06: rgb(30 21 16 / 0.06);
    --ink-a07: rgb(30 21 16 / 0.07);
    --ink-a08: rgb(30 21 16 / 0.08);
    --ink-a10: rgb(30 21 16 / 0.1);
    --ink-a12: rgb(30 21 16 / 0.12);
    --ink-a15: rgb(30 21 16 / 0.15);
    --ink-a25: rgb(30 21 16 / 0.25);
    --ink-a30: rgb(30 21 16 / 0.3);
    --ink-a50: rgb(30 21 16 / 0.5);
    --ink-a55: rgb(30 21 16 / 0.55);
    --ink-a60: rgb(30 21 16 / 0.6);
    --ink-a70: rgb(30 21 16 / 0.7);
    --ink-a75: rgb(30 21 16 / 0.75);
    --ink-a80: rgb(30 21 16 / 0.8);
    --ink-a85: rgb(30 21 16 / 0.85);
    --ink-a90: rgb(30 21 16 / 0.9);
    --line-height-flat: 1;
    --line-height-none: 0;
    --primary-a03: rgb(194 36 0 / 0.03);
    --primary-a04: rgb(194 36 0 / 0.04);
    --primary-a06: rgb(194 36 0 / 0.06);
    --primary-a08: rgb(194 36 0 / 0.08);
    --primary-a09: rgb(194 36 0 / 0.09);
    --primary-a10: rgb(194 36 0 / 0.1);
    --primary-a12: rgb(194 36 0 / 0.12);
    --primary-a15: rgb(194 36 0 / 0.15);
    --primary-a18: rgb(194 36 0 / 0.18);
    --primary-a20: rgb(194 36 0 / 0.2);
    --primary-a22: rgb(194 36 0 / 0.22);
    --primary-a25: rgb(194 36 0 / 0.25);
    --primary-a30: rgb(194 36 0 / 0.3);
    --primary-a35: rgb(194 36 0 / 0.35);
    --primary-a40: rgb(194 36 0 / 0.4);
    --primary-light-a25: rgb(209 91 64 / 0.25);
    --transition-base: 0.3s ease;
    --transition-medium: 0.5s ease;
    --white-a00: rgb(255 255 255 / 0);
    --white-a03: rgb(255 255 255 / 0.03);
    --white-a06: rgb(255 255 255 / 0.06);
    --white-a08: rgb(255 255 255 / 0.08);
    --white-a10: rgb(255 255 255 / 0.1);
    --white-a100: rgb(255 255 255 / 1);
    --white-a12: rgb(255 255 255 / 0.12);
    --white-a55: rgb(255 255 255 / 0.55);
    --white-a60: rgb(255 255 255 / 0.6);
    --white-a75: rgb(255 255 255 / 0.75);
    --white-a80: rgb(255 255 255 / 0.8);
    --white-a85: rgb(255 255 255 / 0.85);

    /* Neuno One only */
    --color-success: #2f6b3f;
    --bg-success: #e8f1e6;
    --bg-danger: #fbe9e4;
}

/* ========================================================================== Base ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: var(--font-size-base); scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    line-height: var(--line-height-base);
    color: var(--text-main);
    background-color: var(--bg-main);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    padding-top: var(--header-height);
}

/* Pages that start with a full-width hero (the home page) run under the header,
   so the header has no background until the page is scrolled, as on the main site. */
body.layout-full { padding-top: 0; }
body.layout-full main { min-height: 100vh; }
.flash-strip { padding-top: calc(var(--header-height) + var(--space-md)); padding-bottom: 0; }

main {
    min-height: calc(100vh - var(--header-height));
}

body, h1, h2, h3, h4, h5, h6, p, span, a, button, input, textarea, select {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-tight);
    margin: 0 0 var(--space-sm);
    color: var(--text-main);
}
h1 { font-size: var(--font-size-4xl); margin-bottom: var(--space-md); }
h2 { font-size: var(--font-size-3xl); margin-bottom: var(--space-md); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h1, h2 { text-wrap: balance; }

.lead {
    font-size: var(--font-size-lead);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-snug);
    color: inherit;
    max-width: 46rem;
    margin: 0 0 var(--space-lg);
    text-wrap: pretty;
}

.text-primary { color: var(--color-primary); }
.text-muted { color: var(--text-muted); }

a { color: var(--text-main); text-decoration: none; transition: all var(--transition-fast); }
p { margin-bottom: var(--space-md); }
img { max-width: 100%; height: auto; display: block; }

.text-link { color: var(--color-primary); font-weight: var(--font-weight-medium); }
.text-link:hover { text-decoration: underline; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ========================================================================== Header & Burger Menu ========================================================================== */
body > header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: var(--overlay-z-index);
    transition: background-color var(--transition-normal);
    background-color: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--page-gutter);
}
body > header.scrolled,
body.menu-open > header,
body.menu-closing > header { background-color: var(--bg-main); }
/* Solid straight away when the menu opens (no fade) */
body.menu-open > header { transition: none; }
/* While the menu is open the page behind it doesn't scroll; the gutter stops the layout jumping. */
html.scroll-locked { overflow: hidden; scrollbar-gutter: stable; }
html.scroll-locked body { overflow: hidden; }

.logo-container { z-index: var(--menu-z-index); }
.site-logo { display: flex; align-items: center; line-height: 0; }
.site-logo img { height: 25px; width: auto; display: block; }

.header-actions { display: flex; align-items: center; gap: var(--space-md); z-index: var(--menu-z-index); }
.header-link { font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); color: var(--color-primary); }
.header-link:hover { text-decoration: underline; }
body.menu-open .header-link { visibility: hidden; }

.burger-button {
    height: 50px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    position: relative;
}
.burger-line {
    width: 24px;
    height: 2px;
    background-color: var(--color-primary);
    border-radius: 80px;
    transition: all var(--transition-normal);
    position: relative;
}
/* Opening (unchanged): the outer lines turn into an X while the middle one
   fades out to the right. Closing: the middle line does not fade back in;
   it reappears at once at zero width and grows out from its centre while
   the X opens back into lines. */
.burger-line:nth-child(2) { transition: opacity 0s, transform 0s, scale var(--burger-grow) ease var(--burger-grow); }
body.menu-open .burger-line:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.menu-open .burger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
    scale: 0 1;
    transition: opacity var(--transition-normal), transform var(--transition-normal), scale 0s linear 0.4s; /* after the fade-out */
}
body.menu-open .burger-line:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
@media (prefers-reduced-motion: reduce) {
    .burger-line, body.menu-open .burger-line { transition: none !important; }
}

/* Menu: opens and closes as a wipe inside its own box below the header (as on the main site) */
.menu-overlay {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100% - var(--header-height));
    background-color: var(--bg-main);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: calc(var(--overlay-z-index) - 1);
    visibility: hidden;
    transition: clip-path var(--transition-normal), visibility var(--transition-normal);
    clip-path: inset(0 0 100% 0);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: var(--space-md) var(--space-md) var(--space-xl);
}
body.menu-open .menu-overlay { visibility: visible; clip-path: inset(0); }
/* A same-page menu link was tapped: close at once, without the wipe */
body.menu-instant .menu-overlay, body.menu-instant > header { transition: none; }
.menu-overlay nav { width: 100%; margin: auto 0; }

.main-menu {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    list-style: none;
    text-align: center;
    width: 100%;
}
/* Menu items appear with the overlay, without their own animation. */

.menu-link {
    font-family: var(--font-main);
    font-size: var(--font-size-menu);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-base); /* same as the main site, which sets the gap between items */
    color: var(--color-primary);
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    text-align: center;
    background: none;
    border: 0;
    cursor: pointer;
}
.menu-link.is-muted { font-size: var(--font-size-base); color: var(--text-muted); }
.menu-user { font-size: var(--font-size-sm); color: var(--text-muted); margin-bottom: var(--space-sm); }

/* ========================================================================== Content & sections ========================================================================== */
.content-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md);
}

.page-section { max-width: 40rem; margin: 0 auto; }
.page-section--wide { max-width: 50rem; }
.page-section--center { text-align: center; }
.page-section--center .lead { margin-left: auto; margin-right: auto; }

section { padding: var(--space-xl) 0; position: relative; }

.divider-top, .divider-bottom { position: relative; }
.divider-top::before, .divider-bottom::after {
    content: '';
    position: absolute;
    left: var(--page-gutter);
    right: var(--page-gutter);
    height: 1px;
    background: var(--border-color);
    pointer-events: none;
}
.divider-top::before { top: 0; }
.divider-bottom::after { bottom: 0; }

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
}
.page-head h1 { margin-bottom: var(--space-xs); }
.page-head p { margin-bottom: 0; }
.page-head-actions { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-xs); }

.eyebrow {
    display: block;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-caps);
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: var(--space-xs);
}

.small-print { font-size: var(--font-size-sm); color: var(--text-muted); margin: 0; }
.small-print a { color: inherit; text-decoration: underline; }

.notice {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin: 0 0 var(--space-md);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--border-radius-md);
    background: var(--bg-accent);
    color: var(--color-accent-dark);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-snug);
    text-align: left;
}
.notice-success { background: var(--bg-success); color: var(--color-success); }
.notice-error { background: var(--bg-danger); color: var(--color-primary-dark); }

.page-cta { text-align: center; padding-top: var(--space-lg); border-top: 1px solid var(--border-color); }
.page-cta .lead { margin: 0 auto var(--space-sm); }

/* ========================================================================== Buttons & links ========================================================================== */
/* Every button looks like the main site's "View all" link: red semibold text followed by the
   36px circle arrow. The arrow is drawn with a mask so it always takes the text colour. */
.button {
    --arrow-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='10.5 10.5 15 15' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 12L24 18L18 24'/%3E%3Cpath d='M12 18H24'/%3E%3C/svg%3E");
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    background: none;
    border: 0;
    border-radius: var(--border-radius-sm);
    color: var(--color-primary);
    font-family: var(--font-main);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-snug);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.button::after {
    content: "";
    flex-shrink: 0;
    width: var(--arrow-icon-size);
    height: var(--arrow-icon-size);
    background-color: currentColor;
    transition: transform var(--transition-fast);
    -webkit-mask: var(--arrow-icon) center / contain no-repeat;
    mask: var(--arrow-icon) center / contain no-repeat;
}
.button:hover { text-decoration: underline; }
.button:hover::after { transform: translateX(var(--arrow-nudge)); }
.button:disabled { opacity: 0.6; cursor: not-allowed; }
.button-small { font-size: var(--font-size-base); }

.button:focus-visible, .arrow-link:focus-visible, .menu-link:focus-visible, .text-link:focus-visible,
.burger-button:focus-visible, .link-button:focus-visible, .choice-link:focus-within {
    outline: 0;
    box-shadow: 0 0 0 3px rgb(194 36 0 / 25%);
}

.link-button {
    background: none;
    border: 0;
    font-family: var(--font-main);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-primary);
    cursor: pointer;
    border-radius: var(--border-radius-sm);
}
.link-button:hover { text-decoration: underline; }
.link-button.is-muted { color: var(--text-muted); }

.home-section-link, .arrow-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    font-family: var(--font-main);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
    text-decoration: none;
    white-space: nowrap;
    background: none;
    border: 0;
    cursor: pointer;
    border-radius: var(--border-radius-sm);
}
.home-section-link-icon, .arrow-link-icon { flex-shrink: 0; display: block; width: var(--arrow-icon-size); height: var(--arrow-icon-size); transition: transform var(--transition-fast); }
.carousel-button .arrow-link-icon { width: 22px; height: 22px; }
.home-section-link:hover span, .arrow-link:hover span { text-decoration: underline; }
/* Arrows move a little in their own direction on hover */
a:hover > .arrow-link-icon, button:hover > .arrow-link-icon, a:hover > .home-section-link-icon { transform: translateX(var(--arrow-nudge)); }
.arrow-link-back .arrow-link-icon { transform: scaleX(-1); } /* same icon, pointing back */
.arrow-link-back:hover > .arrow-link-icon { transform: scaleX(-1) translateX(var(--arrow-nudge)); }

/* ========================================================================== Badges, tabs, pagination ========================================================================== */
.category-badge {
    display: inline-block;
    background-color: var(--color-secondary-light);
    color: var(--text-main);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-tight);
    white-space: nowrap;
}
.badge-pending_payment { background: var(--bg-accent); color: var(--color-accent-dark); }
.badge-open { background: var(--bg-success); color: var(--color-success); }
.badge-closed { background: var(--color-secondary-light); color: var(--color-secondary-dark); }
.badge-refunded { background: var(--bg-danger); color: var(--color-primary-dark); }
.badge-unread { background: var(--color-primary); color: var(--text-light); border-radius: var(--border-radius-full); font-weight: var(--font-weight-semibold); }
.badge-internal { background: var(--bg-darker); color: var(--text-light); }

.pill-nav { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-bottom: var(--space-lg); list-style: none; }
.pill-nav a {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-full);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--text-main);
}
.pill-nav a:hover { border-color: var(--color-primary); background: var(--bg-light); }
.pill-nav a.is-active { background: var(--color-primary); border-color: var(--color-primary); color: var(--text-light); }

.pagination { margin-top: var(--space-lg); display: flex; justify-content: center; flex-wrap: wrap; gap: var(--space-sm); }
.pagination a, .pagination .current-page {
    padding: var(--space-xs) var(--space-sm);
    min-width: 2rem;
    text-align: center;
    border-radius: var(--border-radius-sm);
    color: var(--text-light);
    background-color: var(--bg-darker);
    transition: all var(--transition-normal);
}
.pagination a:hover { background-color: var(--color-primary); transform: translateY(-2px); }
.pagination .current-page { background-color: var(--color-primary-light); }

/* ========================================================================== Tables ========================================================================== */
.table-wrap { overflow-x: auto; margin: 0 0 var(--space-lg); }
table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
    margin: 0;
    border-radius: var(--border-radius-md);
    overflow: hidden;
}
th {
    font-family: var(--font-headings);
    font-size: var(--font-size-2xs);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-caps);
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    color: var(--color-primary);
    background: rgb(30 21 16 / 0.06);
    border-bottom: 2px solid rgb(194 36 0 / 0.2);
    white-space: nowrap;
}
td {
    padding: var(--space-sm) var(--space-md);
    vertical-align: middle;
    color: var(--text-main);
    line-height: var(--line-height-base);
    border-bottom: 1px solid rgb(30 21 16 / 0.08);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgb(194 36 0 / 0.03); }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.col-wide { min-width: 15rem; }
td .inline-form { display: inline-flex; gap: var(--space-xs); align-items: center; }

/* ========================================================================== Forms ========================================================================== */
form.inline { display: inline; }
/* Forms sit directly on the page, without a card outline. */
.form-card { margin-bottom: var(--space-lg); }
label, .field-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-md);
}
label .hint, .hint { font-weight: var(--font-weight-regular); color: var(--text-muted); font-size: var(--font-size-sm); }

input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], textarea, select {
    display: block;
    width: 100%;
    margin-top: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-main);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-base);
    color: var(--text-main);
    background-color: var(--bg-main);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-full);
    -webkit-appearance: none;
    appearance: none;
    transition: border-color var(--transition-fast);
}
textarea { border-radius: var(--border-radius-md); resize: vertical; }
select {
    padding-right: calc(var(--space-md) * 2 + 12px);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23c22400' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-md) center;
}
input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: 0.7; }
input:hover, select:hover, textarea:hover { border-color: #d6ccc4; }
input:focus, textarea:focus, select:focus { outline: 0; border-color: var(--color-primary); }
select.compact, input.compact { display: inline-block; width: auto; margin: 0; padding: var(--space-xs) calc(var(--space-md) + 18px) var(--space-xs) var(--space-md); font-size: var(--font-size-sm); background-position: right var(--space-sm) center; }
input[type=checkbox], input[type=radio] { accent-color: var(--color-primary); }
.check { display: flex; align-items: center; gap: var(--space-sm); font-weight: var(--font-weight-regular); }
fieldset { border: 0; margin-bottom: var(--space-md); }
legend { font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); margin-bottom: var(--space-sm); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 var(--space-md); }
/* One action per row: the button first, any secondary text link on its own line below. */
.form-actions { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-xs); }

.filter-bar { display: flex; gap: var(--space-sm); flex-wrap: wrap; align-items: center; margin-bottom: var(--space-md); }
.filter-bar input[type=search] { margin: 0; max-width: 22rem; }
.filter-bar select { margin: 0; width: auto; }

/* Large choice buttons, used for picking a subject */
.choice-list { display: flex; flex-direction: column; gap: var(--space-sm); margin: 0 0 var(--space-lg); }
.choice-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    width: 100%;
    padding: var(--space-sm) var(--space-lg);
    margin: 0;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-full);
    background: var(--bg-main);
    color: var(--text-main);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    text-align: left;
    cursor: pointer;
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
}
.choice-link:hover { border-color: var(--color-primary); background: var(--bg-light); }
.choice-link:has(input:checked) { border-color: var(--color-primary); background: var(--bg-accent); }
.choice-link input { position: absolute; opacity: 0; pointer-events: none; }
.choice-text { display: flex; flex-direction: column; min-width: 0; }
.choice-text small { font-size: var(--font-size-sm); font-weight: var(--font-weight-regular); color: var(--text-muted); }
.choice-price { color: var(--color-primary); white-space: nowrap; }

.choice-row { display: flex; gap: var(--space-sm); flex-wrap: wrap; margin-bottom: var(--space-md); }
.choice-row .choice-link { width: auto; flex: 1 1 10rem; }

/* ========================================================================== Cards & lists ========================================================================== */
.card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: var(--space-md);
}
.card h3, .card h4 { margin-bottom: var(--space-xs); }
.card-empty { text-align: center; padding: var(--space-xl) var(--space-md); background: var(--bg-light); border-color: transparent; }
.card-empty .lead { margin-left: auto; margin-right: auto; margin-bottom: var(--space-sm); }

.case-list { display: grid; gap: var(--space-sm); margin-bottom: var(--space-lg); }
.case-row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); flex-wrap: wrap; transition: box-shadow var(--transition-fast), border-color var(--transition-fast); }
.case-row:hover { box-shadow: var(--box-shadow-sm); }
.case-row h4 { margin-bottom: var(--space-xs); }
.case-row h4 a:hover { text-decoration: underline; }
.case-meta { font-size: var(--font-size-sm); color: var(--text-muted); margin: 0; }
/* Meta details as separate small chips instead of a line joined with dots */
.meta-list { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-md); list-style: none; margin: var(--space-xs) 0 0; padding: 0; font-size: var(--font-size-sm); color: var(--text-muted); }
.meta-list > li { display: inline-flex; align-items: center; gap: var(--space-xs); }
.link-list { display: flex; flex-direction: column; gap: var(--space-xs); list-style: none; margin: var(--space-sm) 0 0; padding: 0; }
.case-actions { display: flex; align-items: center; gap: var(--space-sm) var(--space-md); flex-wrap: wrap; }
.case-row.has-unread { border-color: var(--color-primary-light); }

.section-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-main);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    margin: var(--space-lg) 0 var(--space-md);
}
.count {
    background: var(--color-secondary-light);
    border-radius: var(--border-radius-full);
    padding: 0 var(--space-sm);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
}

.subject-grid, .stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--space-md); }
.subject-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); } /* cards stretch to fill the row */
.subject-card { background: var(--bg-accent); border-radius: var(--border-radius-md); padding: var(--space-md); }
.subject-card h3 { margin-bottom: var(--space-xs); }
.subject-card p { color: var(--text-muted); font-size: var(--font-size-sm); margin-bottom: var(--space-sm); }
.subject-card .price { font-size: var(--font-size-2xl); font-weight: var(--font-weight-semibold); color: var(--color-primary); margin: 0; }
.subject-card--plain { background: var(--bg-light); }
.subject-card--plain p { margin: 0; }

.stat-grid { margin-bottom: var(--space-lg); }
.stat { background: var(--bg-light); border-radius: var(--border-radius-md); padding: var(--space-md); }
.stat-value { font-size: var(--font-size-3xl); font-weight: var(--font-weight-medium); line-height: var(--line-height-tight); font-variant-numeric: tabular-nums; }
.stat-note { font-size: var(--font-size-sm); color: var(--text-muted); margin: 0; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-lg); }
.feature p { color: var(--text-muted); margin: 0; }

.detail-list { display: grid; grid-template-columns: auto 1fr; gap: var(--space-xs) var(--space-md); font-size: var(--font-size-sm); margin-bottom: var(--space-md); }
.detail-list dt { color: var(--text-muted); }
.detail-list dd { text-align: right; overflow-wrap: anywhere; }

.stars { color: var(--color-accent); letter-spacing: 2px; white-space: nowrap; }
.rating-choices { display: flex; gap: var(--space-sm); flex-wrap: wrap; margin-bottom: var(--space-md); }
.rating-choices label { margin: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: var(--space-xs); width: 4.5rem; text-align: center; }
.rating-choices input { position: absolute; opacity: 0; }
.rating-choices .face {
    display: inline-flex; align-items: center; justify-content: center;
    width: 3.75rem; height: 3.75rem;
    border: 2px solid transparent; border-radius: var(--border-radius-full);
}
.face-svg { display: block; }
.footer-credit { font-size: var(--font-size-xs); }
.footer-credit a { text-decoration: underline; }
.feedback-given { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-xs); }
.rating-choices small { font-size: var(--font-size-xs); font-weight: var(--font-weight-regular); color: var(--text-muted); line-height: var(--line-height-tight); }
.rating-choices input:checked + .face { border-color: var(--color-primary); background: var(--bg-accent); }
.rating-choices input:checked ~ small { color: var(--text-main); font-weight: var(--font-weight-semibold); }
.rating-choices input:focus-visible + .face { box-shadow: 0 0 0 3px rgb(194 36 0 / 25%); }

.currency-picker { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-xs) var(--space-sm); margin-bottom: var(--space-md); font-size: var(--font-size-sm); }
.currency-picker label { display: inline; margin: 0; color: var(--text-muted); font-weight: var(--font-weight-medium); }
.currency-picker select.compact {
    padding: var(--space-xs) var(--space-md);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-full);
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
    cursor: pointer;
}
.currency-picker .small-print { flex-basis: 100%; margin: 0; font-size: var(--font-size-xs); }

/* ========================================================================== Chat ========================================================================== */
.chat-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--space-md); align-items: start; }
.chat-side { display: grid; gap: var(--space-md); }
.chat-side h5 { margin-bottom: var(--space-sm); }

.chat { border: 1px solid var(--border-color); border-radius: var(--border-radius-lg); overflow: hidden; display: flex; flex-direction: column; }
.chat-log {
    height: min(60vh, 560px);
    overflow-y: auto;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    background: var(--bg-light);
}
.chat-log:empty::before { content: "No messages yet."; color: var(--text-muted); margin: auto; }
.msg { max-width: 78%; }
.msg.mine { align-self: flex-end; }
.msg.theirs { align-self: flex-start; }
.msg-meta { display: flex; flex-wrap: wrap; gap: var(--space-sm); font-size: var(--font-size-xs); color: var(--text-muted); margin-bottom: 2px; }
.msg.mine .msg-meta { justify-content: flex-end; }
.msg-body { padding: var(--space-sm) 14px; border-radius: var(--border-radius-md); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.mine .msg-body { background: var(--color-primary); color: var(--text-light); border-bottom-right-radius: var(--border-radius-sm); }
.msg.theirs .msg-body { background: var(--bg-main); border: 1px solid var(--border-color); border-bottom-left-radius: var(--border-radius-sm); }
.msg.internal .msg-body { background: var(--bg-accent); color: var(--text-main); border: 1px dashed var(--color-accent); }
.msg-file { display: block; margin-top: var(--space-xs); font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); text-decoration: underline; color: inherit; }
.msg-image { margin-top: var(--space-xs); max-width: 260px; max-height: 260px; border-radius: var(--border-radius-sm); }
.chat-typing { min-height: 1.5rem; padding: 0 var(--space-md); font-size: var(--font-size-xs); color: var(--text-muted); background: var(--bg-light); }

.chat-form { border-top: 1px solid var(--border-color); padding: var(--space-sm); }
.chat-form textarea { margin: 0; }
.chat-tools { display: flex; align-items: center; gap: var(--space-sm) var(--space-md); flex-wrap: wrap; margin-top: var(--space-sm); }
.chat-tools .spacer { flex: 1; }
.chat-tools label { margin: 0; }
.chat-tools select { margin: 0; width: auto; max-width: 14rem; }
.file-pick { cursor: pointer; color: var(--color-primary); font-weight: var(--font-weight-semibold); }
.file-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-pick:hover span { text-decoration: underline; }
.file-pick:focus-within { box-shadow: 0 0 0 3px rgb(194 36 0 / 25%); border-radius: var(--border-radius-sm); }
.chat-closed {
    padding: var(--space-md);
    border-top: 1px solid var(--border-color);
    background: var(--color-secondary-light);
    color: var(--color-secondary-dark);
    font-size: var(--font-size-sm);
    text-align: center;
}
[hidden] { display: none !important; }

/* ========================================================================== Home intro: panel and text on the left, questions and answers on the right */
.intro-section { background: var(--bg-main); padding: calc(var(--header-height) + var(--space-lg)) 0 var(--space-xl); }
.intro-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--space-xl); align-items: start; }
.intro-main > p { max-width: 46rem; }

.intro-title { font-size: var(--font-size-display); margin-bottom: var(--space-md); }
.intro-main > .lead { margin-bottom: var(--space-lg); }
.hero-buttons.intro-actions { justify-content: flex-start; margin: var(--space-md) 0 var(--space-xl); }

/* Section heading on a tinted bar */
.bar-heading { margin: 0 0 var(--space-md); }

.intro-side .faq--side { margin-top: 0; padding-top: 0; border-top: 0; }

.intro-side .faq--side summary { font-size: var(--font-size-sm); }
.intro-side .faq--side details p { font-size: var(--font-size-sm); }

/* How it works carousel */
.carousel { margin: 0 0 var(--space-md); }
.carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgb(194 36 0 / 25%); }
.carousel-slide { flex: 0 0 100%; scroll-snap-align: center; }
.menu-link-external { display: inline-flex; align-items: center; gap: var(--space-sm); }
.menu-link-external .external-icon, .link-external .external-icon { flex-shrink: 0; display: block; }
.link-external { display: inline-flex !important; align-items: center; gap: var(--space-xs); }
.section-intro { color: var(--text-muted); max-width: 46rem; }
.section-gap { margin-top: var(--space-xl); }

.carousel-slide img { width: 100%; height: auto; border: 0; box-shadow: none; border-radius: 0; }
.carousel-slide figcaption { padding: var(--space-md) 0 0; }
.carousel-slide h4 { margin-bottom: var(--space-xs); }
.carousel-slide p { font-size: var(--font-size-sm); color: var(--text-muted); max-width: 40rem; margin: 0; }
.carousel-controls { display: flex; align-items: center; gap: var(--space-md); margin-top: var(--space-md); }
.carousel-button { background: none; border: 0; padding: 0; line-height: 0; color: var(--color-primary); cursor: pointer; border-radius: var(--border-radius-full); }
.carousel-button:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgb(194 36 0 / 25%); }
.carousel-dots { display: flex; gap: var(--space-sm); }
.carousel-dot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: var(--border-radius-full); background: var(--color-secondary-light); cursor: pointer; }
.carousel-dot[aria-current="true"] { background: var(--color-primary); }
.carousel-dot:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgb(194 36 0 / 25%); }

@media (max-width: 992px) {
    .intro-layout { grid-template-columns: 1fr; }
}
@media (max-width: 576px) {
}

/* ========================================================================== Home ========================================================================== */
.hero-section {
    min-height: min(72vh, 640px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-accent) 100%);
    padding: calc(var(--header-height) + var(--space-xl)) var(--space-md) calc(var(--space-xl) + 56px);
    overflow: hidden;
}
.hero-content { position: relative; max-width: 820px; z-index: 1; }
.hero-title {
    font-size: var(--font-size-display);
    font-weight: var(--font-weight-medium);
    color: var(--text-main);
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-md);
}
.hero-title .text-primary { color: var(--color-primary); }
.hero-subtitle {
    font-size: clamp(var(--font-size-base), 2vw, var(--font-size-xl));
    color: var(--text-muted);
    line-height: var(--line-height-relaxed);
    max-width: 600px;
    margin: 0 auto var(--space-lg);
}
.hero-buttons { display: flex; gap: var(--space-md); justify-content: center; align-items: center; flex-wrap: wrap; }
.hero-arrow { position: absolute; bottom: 24px; left: 50%; margin-left: -28px; z-index: 2; color: var(--color-primary); animation: bounce 2s infinite; }
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(6px); }
    60% { transform: translateY(3px); }
}

.home-section { padding: var(--space-xl) 0; }
.home-section-inner { max-width: var(--container-width); margin: 0 auto; padding: 0 var(--space-md); }
.home-section-header { display: flex; align-items: center; gap: var(--space-md); margin-bottom: var(--space-xl); flex-wrap: wrap; }
.home-section-label {
    font-family: var(--font-main);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--text-main);
    padding: var(--space-xs) 0;
    flex-shrink: 0;
}
.home-about-section { background: var(--color-primary); color: var(--text-light); }
.home-about-section .home-section-link { color: var(--text-light); }
.home-about-section .lead { margin-bottom: 0; }
.home-section-label.pill-label {
    background: var(--bg-main);
    color: var(--color-primary);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--border-radius-full);
}
.home-join-section .lead { margin-bottom: var(--space-md); }

/* Quick questions and answers under the question form */
.faq { margin-top: var(--space-xl); padding: var(--space-lg) 0 0; border-top: 1px solid var(--border-color); }

.faq details { border-bottom: 1px solid var(--border-color); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
    cursor: pointer;
    padding: var(--space-sm) 0;
    font-weight: var(--font-weight-semibold);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--color-primary); font-size: var(--font-size-xl); font-weight: var(--font-weight-regular); line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq summary:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgb(194 36 0 / 25%); border-radius: var(--border-radius-sm); }
.faq details p { color: var(--text-muted); margin: 0 0 var(--space-md); max-width: 44rem; }
.faq details a { color: var(--color-primary); }

/* ========================================================================== Footer ========================================================================== */
footer { color: var(--text-main); position: relative; width: 100%; padding: 0 var(--page-gutter); }
.footer-top {
    padding: var(--space-md) 0;
    position: relative;
    border-top: 4px solid;
    border-image: linear-gradient(to right, var(--color-primary-light) 0% 33.33%, var(--color-primary) 33.33% 66.66%, var(--color-primary-dark) 66.66% 100%) 1;
}
.footer-grid { display: grid; width: 100%; grid-template-columns: auto 1fr auto; gap: var(--space-xl); align-items: start; }
.footer-back-to-top-column {
    display: flex;
    align-items: center;
    align-self: stretch;
    justify-self: end;
    padding-left: var(--space-md);
    border-left: 1px solid rgb(30 21 16 / 25%);
}
.back-to-top-bar {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    color: var(--text-main);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    border: none;
    cursor: pointer;
}
.footer-col-title { margin-bottom: var(--space-sm); font-family: var(--font-main); font-size: var(--font-size-lg); font-weight: var(--font-weight-medium); color: var(--text-main); }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: var(--space-sm); }
.footer-links a, .footer-links button {
    font-family: var(--font-main);
    font-size: var(--font-size-base);
    color: rgb(30 21 16 / 75%);
    display: inline-block;
    font-weight: var(--font-weight-regular);
    background: none;
    border: 0;
    cursor: pointer;
}
.footer-links a:hover, .footer-links button:hover { text-decoration: underline; }
.footer-bottom {
    padding: var(--space-md) 0;
    border-top: 1px solid rgb(30 21 16 / 25%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
}
.footer-brand { display: flex; flex-direction: row; align-items: center; gap: var(--space-md); flex-wrap: wrap; }
.footer-logo { display: inline-flex; align-items: center; line-height: 0; }
.footer-logo img { height: 25px; width: auto; display: block; }
.footer-text { font-size: var(--font-size-sm); color: rgb(30 21 16 / 75%); margin: 0; }
.footer-legal-links { flex-direction: row; align-items: center; gap: var(--space-md); }
.footer-legal-links a { font-size: var(--font-size-sm); white-space: nowrap; }

/* ========================================================================== Responsive ========================================================================== */
@media (max-width: 1200px) {
    :root { --space-xl: 40px; }
}

@media (max-width: 992px) {
    :root { --space-lg: 25px; --space-xl: 35px; }
    .footer-grid { gap: var(--space-lg); }
    .chat-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    :root {
        --font-size-3xl: 1.75rem;
        --font-size-4xl: 2rem;
        --space-lg: 20px;
        --space-xl: 30px;
    }
    .main-menu { gap: var(--space-md); }
    .menu-overlay nav { padding: 0 var(--space-md); }
    .msg { max-width: 92%; }
}

@media (max-width: 576px) {
    :root {
        --font-size-2xl: 1.375rem;
        --font-size-3xl: 1.5rem;
        --font-size-4xl: 1.75rem;
        --space-md: 15px;
        --space-lg: 20px;
        --space-xl: 25px;
    }
    .burger-button { height: 40px; }
    .footer-grid { grid-template-columns: 1fr auto; }
    .footer-grid > .footer-column:not(.footer-back-to-top-column) { grid-column: 1; }
    .footer-back-to-top-column { grid-column: 2; grid-row: 1 / 3; }
    .choice-link { border-radius: var(--border-radius-lg); padding: var(--space-sm) var(--space-md); font-size: var(--font-size-base); }
}

@media (min-width: 481px) and (max-width: 768px) {
    .main-menu { padding: var(--space-md); }
}

@media (max-width: 480px) {
    .main-menu { gap: var(--space-sm); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
    body { padding-top: 0; }
    body > header, .menu-overlay, footer, .no-print { display: none !important; }
    main { min-height: 0; }
}

/* ========================================================================== Neuno One: home and dashboard */
.hero-lead { font-size: var(--font-size-lead); font-weight: var(--font-weight-medium); line-height: var(--line-height-snug); max-width: 48rem; margin-bottom: var(--space-md); text-wrap: pretty; }
.intro-main > h2 { margin-bottom: var(--space-sm); }
.intro-main > .section-intro { margin-bottom: var(--space-lg); }

.platform-head { margin-bottom: var(--space-lg); }
.platform-head h1 { margin-bottom: var(--space-md); }
.platform-head .pill-nav { margin-bottom: 0; }

.tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-md); }
.tile.tile { padding: var(--space-lg); border-radius: var(--border-radius-md); background: var(--bg-light); display: flex; flex-direction: column; align-items: flex-start; }
.tile h3 { margin: var(--space-xs) 0 var(--space-sm); }
.tile > p { color: var(--text-muted); }
.tile .button, .tile .arrow-link { margin-top: auto; }
.tile.tile--enterprise { background: var(--bg-main); border: 2px solid var(--border-color); }
.stat-list { display: flex; flex-wrap: wrap; gap: var(--space-sm) var(--space-lg); list-style: none; padding: 0; margin: 0 0 var(--space-md); }
.stat-list li { font-size: var(--font-size-sm); color: var(--text-muted); }
.stat-list strong { color: var(--text-main); font-weight: var(--font-weight-semibold); }

/* ========================================================================== Analytics */
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-sm) var(--space-md); margin-bottom: var(--space-sm); }
.filter-bar label { display: flex; flex-direction: column; gap: var(--space-xs); margin: 0; font-size: var(--font-size-xs); color: var(--text-muted); }
.filter-bar .compact { min-height: 40px; }
.filter-bar input[type=date].compact { padding-right: var(--space-md); }
.filter-reset { align-self: center; margin-top: var(--space-md); font-size: var(--font-size-sm); }
.range-note { margin: 0 0 var(--space-lg); }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--space-md); list-style: none; padding: 0; margin: 0 0 var(--space-xl); }
.kpi-grid li { display: flex; flex-direction: column; gap: 2px; padding: var(--space-md) 0; border-top: 2px solid var(--text-main); }
.kpi-label { font-size: var(--font-size-sm); color: var(--text-muted); }
.kpi-value { font-size: var(--font-size-2xl); font-weight: var(--font-weight-semibold); line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi-face { display: inline-flex; align-items: center; gap: var(--space-sm); }
.kpi-note { font-size: var(--font-size-xs); color: var(--text-muted); }

.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: var(--space-xl) var(--space-lg); }
.chart-card, .tile { padding: 0; }
.chart-card h4 { margin-bottom: var(--space-md); }
.chart-wrap { width: 100%; }
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid line, .chart-svg .chart-grid { stroke: #ece6e1; stroke-width: 1; }
.chart-svg .chart-base { stroke: #b9aea6; }
.chart-axis { font-family: var(--font-main); font-size: 13px; fill: var(--text-muted); font-variant-numeric: tabular-nums; }
.chart-hit { fill: transparent; }
.chart-col:hover .chart-hit, .chart-col:focus .chart-hit { fill: rgba(194, 36, 0, 0.06); }
.chart-col:focus { outline: none; }
.chart-legend { display: flex; gap: var(--space-md); list-style: none; padding: 0; margin: 0 0 var(--space-sm); font-size: var(--font-size-sm); color: var(--text-main); }
.chart-legend li { display: inline-flex; align-items: center; gap: var(--space-xs); }
.chart-key { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.chart-table { margin-top: var(--space-sm); font-size: var(--font-size-sm); }
.chart-table summary { cursor: pointer; color: var(--color-primary); font-weight: var(--font-weight-medium); }
.chart-table table { margin-top: var(--space-sm); }
.chart-table .num { text-align: right; font-variant-numeric: tabular-nums; }

.hbar-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-sm); }
.hbar-list li { display: grid; grid-template-columns: minmax(120px, 38%) 1fr 4.5em; align-items: center; gap: var(--space-sm); font-size: var(--font-size-sm); outline: none; }
.hbar-list li:hover .hbar-track, .hbar-list li:focus .hbar-track { background: #f1ebe6; }
.hbar-label { display: inline-flex; align-items: center; gap: var(--space-sm); min-width: 0; }
.hbar-label .face-svg { flex-shrink: 0; }
.hbar-track { height: 14px; border-radius: 0 4px 4px 0; }
.hbar-bar { display: block; height: 100%; min-width: 0; background: var(--color-primary); border-radius: 0 4px 4px 0; }
.hbar-value { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-main); }

.chart-tip { position: fixed; z-index: 1000; pointer-events: none; white-space: pre-line; max-width: 260px; padding: var(--space-xs) var(--space-sm); border-radius: var(--border-radius-sm); background: var(--text-main); color: #fff; font-size: var(--font-size-xs); line-height: 1.5; box-shadow: 0 4px 16px rgba(0,0,0,.15); }
.empty-state { padding: var(--space-xl) 0; }

/* ========================================================================== Home */
.home-split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--space-2xl, 4rem); align-items: start; }
.home-split h2 { margin-bottom: var(--space-lg); }
.price-panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); margin-bottom: var(--space-sm); }
.price-panel-head h4 { margin: 0; }
.price-panel .currency-picker { margin: 0; }
.price-list { list-style: none; padding: 0; margin: 0 0 var(--space-md); }
.price-list li { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); padding: var(--space-md) 0; border-bottom: 1px solid var(--border-color); }
.price-list li:first-child { border-top: 2px solid var(--text-main); }
.price-name { display: flex; flex-direction: column; font-weight: var(--font-weight-semibold); }
.price-name small { font-weight: var(--font-weight-regular); color: var(--text-muted); font-size: var(--font-size-sm); }
.price-list .price { font-size: var(--font-size-xl); font-weight: var(--font-weight-semibold); color: var(--color-primary); margin: 0; }
.list-heading { margin-bottom: var(--space-md); }
.topic-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-lg); }
.topic-list li { display: flex; flex-direction: column; gap: var(--space-xs); padding-top: var(--space-md); border-top: 2px solid var(--text-main); }
.topic-list span { color: var(--text-muted); font-size: var(--font-size-sm); }
.faq--columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-xl); margin-top: var(--space-md); }
.faq--columns details:last-child, .faq--columns details:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
@media (max-width: 900px) {
    .home-split { grid-template-columns: 1fr; gap: var(--space-xl); }
    .faq--columns { grid-template-columns: 1fr; }
    .faq--columns details:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--border-color); }
}

/* Back to top: the arrow lifts a little on hover, as on the main site */
.back-to-top-icon { flex-shrink: 0; display: block; transition: transform var(--transition-fast); }
.back-to-top-bar:hover .back-to-top-icon { transform: translateY(calc(var(--arrow-nudge) * -1)); }
.site-logo picture, .footer-logo picture { display: block; }

/* ========================================================================== Plugins: announcement bar */
/* The bar sits inside the fixed header, above the logo row, so every page offset that uses
   --header-height (page padding, the menu) automatically makes room for it. */
body.has-announcement { --announcement-height: 40px; --header-height: calc(56px + var(--announcement-height)); }
.announcement-bar { display: none; }
body.has-announcement .announcement-bar {
    position: absolute; top: 0; left: 0; right: 0; height: var(--announcement-height);
    display: flex; align-items: center; justify-content: center; gap: var(--space-sm);
    padding: 0 calc(var(--page-gutter) + 32px); background: var(--color-primary); color: #fff;
    font-size: var(--font-size-sm); font-weight: var(--font-weight-medium);
}
body.has-announcement > header { padding-top: var(--announcement-height); }
.announcement-bar p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.announcement-bar a { color: #fff; text-decoration: underline; }
.announcement-close { position: absolute; right: var(--page-gutter); top: 50%; transform: translateY(-50%); width: 28px; height: 28px; padding: 0; border: 0; background: none; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; border-radius: var(--border-radius-sm); }
.announcement-close:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
