: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 */
    --color-secondary-dark: #5e4536;
    --color-secondary-light: #e9dfd6; /* sand */
    --color-accent: #b4530f;          /* burnt amber */
    --color-accent-dark: #8f3f0a;
    /* Background Colors */
    --bg-main: #FFFFFF;
    --bg-darker: #1e1510;
    --bg-light: #faf7f5;    /* warm off-white */
    --bg-accent: #FFF5EB;
    /* Text Colors */
    --text-main: #1e1510;
    --text-light: #FFFFFF;
    --text-muted: #6f645c;  /* warm grey */
    /* Borders */
    --border-color: #e7e0da; /* warm light border */
    /* 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 */
    --form-width: 40rem;                /* contact form */
    --border-color-hover: #d6ccc4;
    --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);
    --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;
    --burger-grow: 0.2s;                /* menu icon closing: the middle line grows back (after this delay) */
    --hero-word-speed: 0.3s;            /* empty word box easing to the next word's width */
    --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);
}

/* Base Elements */
*, *::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;
    transition: background-color var(--transition-normal);
    position: relative;
    min-height: 100vh;
    padding-top: var(--header-height);
}

/* Logged-in admins: room for both the admin bar and the fixed header */
html body.has-adminbar {
    padding-top: calc(var(--neuno-adminbar-height, 0px) + var(--header-height));
}

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

/* Apply mobile font smoothing and rendering optimization globally or to Aristotelica elements */
body, h1, h2, h3, h4, h5, h6, p, span, a, button, input, textarea {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Headings: one size per level, one weight for all. Components may change colour or
   spacing, but every h1 on the site uses exactly this size and weight. */
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); }
h6 { font-size: var(--font-size-base); }

h1.content-title {
    text-align: center;
}

h1, h2 {
    text-wrap: balance;
}

/* Lead / intro paragraph: larger than body, always clearly smaller than h1 */
.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);
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: all var(--transition-fast);
}

a:hover {
}

p {
    margin-bottom: var(--space-md);
}

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

.container {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
}

/* ========================================================================== Header & Burger Menu ========================================================================== */
header {
    position: fixed;
    top: var(--neuno-adminbar-height, 0px);
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: var(--overlay-z-index);
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
    background-color: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 calc((100vw - var(--container-width)) / 2 + var(--space-md));
}

@media (max-width: 1200px) {
    header {
        padding: 0 var(--space-md);
    }
}

header.scrolled,
body.menu-open header,
body.menu-closing header,
body.lang-open header {
    background-color: var(--bg-main);
}

/* Solid straight away when a menu opens (no fade) */
body.menu-open header,
body.lang-open header {
    transition: none;
}

/* While a menu is open the page behind it doesn't scroll. The gutter keeps
   the layout from jumping when the scrollbar disappears. */
html.scroll-locked {
    overflow: hidden;
    scrollbar-gutter: stable;
}

html.scroll-locked body {
    overflow: hidden;
}

/* Section dividers: add class="divider-top" or "divider-bottom" to any full-width section.
   The line always spans the content width, matching the header and footer. */
.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;
}

.logo-container {
    z-index: var(--menu-z-index);
}

.site-logo {
    display: flex;
    align-items: center;
    line-height: var(--line-height-none);
}

.site-logo picture,
.footer-logo picture {
    display: block;
}

.site-logo img {
    height: var(--logo-height);
    width: auto;
    display: block;
}

/* Hamburger Menu Button */
.burger-button {
    height: 50px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    z-index: var(--menu-z-index);
    position: relative;
}

.burger-line {
    width: 24px;
    height: 2px;
    background-color: var(--color-primary);
    border-radius: var(--border-radius-full);
    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 (--transition-normal) */
}

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 Overlay - Slide without fade */
.menu-overlay {
    position: fixed;
    /* Starts below the header, so the links never scroll up behind it */
    top: calc(var(--neuno-adminbar-height, 0px) + var(--header-height));
    left: 0;
    width: 100%;
    height: calc(100% - var(--neuno-adminbar-height, 0px) - 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;
    opacity: 1; /* Instant opacity, no fade */
    /* Opens and closes as a wipe inside its own box (below the header), so
       nothing ever slides over the header */
    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);
}

/* Centred when the links fit; when they don't, they start at the top and scroll */
.menu-overlay > nav {
    margin: auto 0;
}

/* A menu link was tapped: close at once, without the wipe */
body.menu-instant .menu-overlay,
body.menu-instant .menu-item,
body.menu-instant header {
    transition: none;
}

body.menu-open .menu-overlay {
    visibility: visible;
    opacity: 1;
    clip-path: inset(0);
}

/* ========================================================================== Enhanced Menu Styling to Support Subcategories and Responsiveness ========================================================================== */
/* Modify existing menu styles */
.main-menu {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    list-style: none;
    text-align: center;
    padding: 0;
    margin: 0;
    width: 100%;
}

.menu-item {
    transform: translateY(-30px);
    opacity: 0;
    transition: transform var(--transition-normal), opacity var(--transition-normal);
    transition-delay: calc(var(--index, 0) * 0.1s);
}

body.menu-open .menu-item {
    transform: translateY(0);
    opacity: 1;
}

/* For child menus */
.main-menu .has-submenu {
    position: relative;
}

/* Submenu indicator */
.main-menu .has-submenu > a:after {
    content: "+";
    margin-left: var(--space-sm);
    font-size: var(--font-size-xl);
    transition: transform var(--transition-base);
}

/* Change indicator when submenu is open */
.main-menu .has-submenu.submenu-open > a:after {
    content: "-";
}

/* Submenu styling */
.main-menu .has-submenu > ul {
    display: none;
    list-style: none;
    padding: 0;
    margin: var(--space-sm) 0 0;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity var(--transition-medium), max-height var(--transition-medium);
}

/* When submenu is open */
.main-menu .has-submenu.submenu-open > ul {
    display: block;
    opacity: 1;
    max-height: 9999px;
}

/* Styling submenu items */
.main-menu .has-submenu > ul > li {
    margin: var(--space-xs) 0;
    padding: 0;
    font-size: var(--font-size-sm);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity var(--transition-base), transform var(--transition-base);
    transition-delay: calc(var(--submenu-index, 0) * 0.05s);
}

/* When submenu is open, animate items */
.main-menu .has-submenu.submenu-open > ul > li {
    opacity: 1;
    transform: translateY(0);
}

/* Styling for deeper nested submenus */
.main-menu .has-submenu .has-submenu > ul {
    margin-left: var(--space-sm);
    border-left: 1px solid var(--ink-a10);
    padding-left: var(--space-sm);
}

/* Menu link styling */
.menu-link {
    font-family: var(--font-main);
    color: var(--color-primary);
    display: inline-block;
    position: relative;
    padding: var(--space-xs) var(--space-md);
    text-align: center;
}

/* Links to other websites: arrow pointing up-right that nudges on hover */
.menu-link[data-external] {
    display: inline-flex;
    align-items: center;  /* icon centred with the text */
    gap: var(--space-xs);
}

.menu-external-icon {
    flex-shrink: 0;
    width: var(--icon-size);
    height: var(--icon-size);
    transition: transform var(--transition-fast);
}

.menu-link[data-external]:hover .menu-external-icon,
.menu-link[data-external]:focus-visible .menu-external-icon {
    transform: translate(calc(var(--arrow-nudge) * 0.6), calc(var(--arrow-nudge) * -0.6));
}

@media (prefers-reduced-motion: reduce) {
    .menu-external-icon { transition: none; }
}

/* Root-level items - bigger */
.main-menu > .menu-item > .menu-link, .main-menu > li > .menu-link {
    font-size: var(--font-size-menu);
    font-weight: var(--font-weight-medium);
    opacity: 1;
}

/* Submenu items - smaller, muted */
.main-menu .has-submenu > ul .menu-link {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--text-muted);
    padding: 0 var(--space-sm);
}

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

/* Section Styling */
section {
    padding: var(--space-xl) 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-xl);
}

/* Pagination */
.pagination {
    margin-top: var(--space-lg);
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
}

.pagination a, .pagination .current-page {
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    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);
    color: white;
}

/* Breadcrumbs */
.breadcrumbs {
    margin-top: var(--header-height) !important;
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-sm);
    text-align: left;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.breadcrumbs a {
    color: var(--color-primary);
}

.breadcrumbs a:hover {
    color: var(--color-primary-light);
}

.breadcrumbs span {
    color: var(--text-main);
}

/* ========================================================================== Structure and columns ========================================================================== */
.content-columns {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin: 1em 0;
    width: 100%;
    box-sizing: border-box;
}

.column {
    padding: var(--space-sm);
    background-color: var(--bg-accent);
    border-radius: var(--border-radius-sm);
    box-sizing: border-box;
    min-height: 60px;
    transition: flex-basis var(--transition-base);
}

/* Default (large screens): 4 columns */
.columns-4 .column {
    flex: 0 0 calc(25% - 15px);
}

.columns-3 .column {
    flex: 0 0 calc(33.333% - 14px);
}

.columns-2 .column {
    flex: 0 0 calc(50% - 10px);
}

/* ========================================================================== Card Components (Articles & Projects) ========================================================================== */
/* Common grid layouts */
.articles-grid, .projects-grid {
    display: grid;
    gap: var(--space-md);
}

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

/* Limit to 2 articles ONLY on the homepage */
.home-articles-section .articles-grid > *:nth-child(n+3) {
    display: none !important;
}

.projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

/* Article Cards */
.content-details, .page-details, .project-details {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-lg);
}

.content-main, .page-content, .project-content {
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-xl);
}

.article-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-bounce), box-shadow var(--transition-normal);
    position: relative;
    top: 0;
}

/* Stretch the title link to cover the entire card */
.article-card h3 a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Trigger the underline on the title text whenever the card container is hovered */
.article-card:hover h3 a {
  text-decoration: underline var(--text-main);
}

/* Keep other inner links clickable above the overlay */
.article-card a:not(.article-card h3 a) {
  position: relative;
  z-index: 2;
}

/* Hide the article summary paragraph/div */
.article-card .article-summary {
    display: none !important;
}

/* Hide the "Read more" link */
.article-card a.read-more, 
.article-card .read-more {
    display: none !important;
}

.article-thumbnail {
    height: auto;
    aspect-ratio: 1.5;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.article-thumbnail::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, var(--ink-a00) 0%, var(--ink-a60) 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-normal);
}

.article-category {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin: 0 0 var(--space-xs);
}

.article-content {
    padding: var(--space-md) var(--space-md) var(--space-lg);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-card h3 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-medium);
    transition: color var(--transition-fast);
    margin: var(--space-sm) 0;
    padding: 0;
}

.article-card h3:hover {
    text-decoration: underline var(--text-main);
}

.article-date {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
}

.article-tags, .project-category {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin: var(--space-sm) 0;
}

.project-seo-desc {
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-sm);
}

.tag-link {
    background-color: var(--color-primary-light);
    color: var(--text-main);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-xs);
    transition: all var(--transition-fast);
}

.tag-link:hover {
    background-color: var(--color-primary);
    color: var(--text-light);
    transform: translateY(-2px);
}

.category-badge {
    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);
    transition: all var(--transition-fast);
}

.category-badge:hover {
    background-color: var(--color-secondary);
    color: var(--text-light);
    transform: translateY(-2px);
}


/* Project Cards */
.project-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    aspect-ratio: 4/3;
    box-shadow: var(--box-shadow-sm);
    transition: transform var(--transition-bounce), box-shadow var(--transition-normal);
    top: 0;
}

.project-card:hover {
    box-shadow: var(--box-shadow-lg);
}

.project-thumbnail {
    width: 100%;
    height: 100%;
    position: relative;
}

.project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
    filter: brightness(0.8);
}

.project-card:hover .project-thumbnail img {
    transform: scale(1.1);
    filter: brightness(0.4);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 90%;
    padding: var(--space-md);
    color: var(--text-light);
    background: linear-gradient(to top, var(--ink-a80) 0%, var(--ink-a00) 100%);
    transition: transform var(--transition-normal), opacity var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.project-card:hover .project-overlay {
    transform: translateY(0);
    background: linear-gradient(to top, var(--ink-a90) 0%, var(--ink-a70) 60%, var(--ink-a00) 100%);
}

.project-card h3 {
    color: var(--text-light);
    margin-bottom: var(--space-sm);
    font-size: var(--font-size-xl);
    text-shadow: 0 2px 4px var(--ink-a30);
    transform: translateY(0);
    transition: transform var(--transition-normal);
}

.project-card:hover h3 {
    transform: translateY(-10px);
}

.project-date {
    font-size: var(--font-size-sm);
    opacity: 0.8;
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin: var(--space-sm) 0;
    transform: translateY(20px);
    opacity: 0;
    transition: transform var(--transition-normal), opacity var(--transition-normal);
}

.project-card:hover .project-tags {
    transform: translateY(0);
    opacity: 1;
}

.project-excerpt {
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-md);
    opacity: 0;
    transform: translateY(20px);
    transition: transform var(--transition-normal) 0.1s, opacity var(--transition-normal) 0.1s;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.project-card:hover .project-excerpt {
    opacity: 1;
    transform: translateY(0);
}

.view-project {
    display: inline-flex;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background-color: var(--color-accent);
    color: var(--text-light);
    border-radius: var(--border-radius-full);
    font-weight: var(--font-weight-medium);
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-normal) 0.2s;
    margin: 0;
}

/* ========================================================================== Buttons ========================================================================== */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-sm) var(--space-lg);
    background-color: var(--color-primary);
    color: var(--text-light);
    border: 2px solid var(--color-primary);
    border-radius: var(--border-radius-md);
    font-family: var(--font-headings);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-base);
    cursor: pointer;
    text-decoration: none;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.button:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-a35);
}

.button:active {
    transform: translateY(0);
}

.button-secondary {
    background-color: transparent;
    color: var(--color-secondary);
    border-color: var(--color-secondary);
}

.button-secondary:hover {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
    color: var(--text-light);
    box-shadow: 0 6px 20px var(--clay-a30);
}

/* Admin edit link */
.admin-edit-link {
    position: fixed;
    bottom: var(--space-md);
    left: var(--space-md);
    z-index: 900;
}

.admin-edit-link .button {
    font-size: var(--font-size-sm);
    padding: var(--space-sm) var(--space-md);
    box-shadow: var(--box-shadow-md);
}

/* ========================================================================== Prose - code & pre blocks ========================================================================== */
code {
    font-family: 'Courier New', Courier, monospace;
    font-size: var(--font-size-code);
    background: var(--ink-a08);
    color: var(--color-accent);
    border: 1px solid var(--ink-a12);
    border-radius: var(--border-radius-sm);
    padding: 0 var(--space-xs);
}

pre {
    margin: var(--space-md) 0;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--primary-a15);
    overflow-x: auto;
    background: var(--bg-darker);
    position: relative;
}

pre::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
    border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
}

pre code {
    display: block;
    padding: var(--space-md);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
    color: var(--code-text);
    background: transparent;
    border: none;
    border-radius: var(--border-radius-none);
    white-space: pre;
    overflow-x: auto;
}

/* Syntax highlight token colours (from markdown parser classes) */
pre code .keyword {
    color: var(--code-keyword);
}

pre code .string {
    color: var(--code-string);
}

pre code .comment {
    color: var(--code-comment);
    font-style: italic;
}

pre code .function {
    color: var(--code-function);
}

pre code .number {
    color: var(--code-number);
}

pre code .operator {
    color: var(--color-primary);
}

pre code .variable {
    color: var(--code-variable);
}

.project-card:hover .view-project {
    opacity: 1;
    transform: translateY(0);
}

.view-project:hover {
    background-color: var(--color-accent-dark);
    transform: scale(1.05);
    color: var(--text-light);
}

/* ========================================================================== Featured Images & Galleries ========================================================================== */
.featured-image {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    margin-bottom: var(--space-lg);
    box-shadow: var(--box-shadow-md);
    position: relative;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.content-gallery, .gallery-grid {
    margin: var(--space-xl) 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-md);
}

.gallery-image {
    position: relative;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--box-shadow-sm);
    cursor: pointer;
    transition: transform var(--transition-bounce), box-shadow var(--transition-normal);
}

.gallery-image:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--box-shadow-md);
    z-index: 10;
}

.gallery-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.gallery-image:hover img {
    transform: scale(1.1);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: var(--space-sm);
    background: linear-gradient(to top, var(--ink-a80) 0%, var(--ink-a00) 100%);
    color: var(--text-light);
    transform: translateY(100%);
    transition: transform var(--transition-normal);
}

.gallery-image:hover .gallery-caption {
    transform: translateY(0);
}

/* ========================================================================== Footer Styling ========================================================================== */

.back-to-top-bar {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    color: var(--text-main);
    padding: 0;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    text-decoration: none;
    border: none;
    outline: none;
    cursor: pointer;
}

.back-to-top-bar:hover {
    background-color: transparent;
    color: var(--text-main);
}

footer {
    color: var(--text-main);
    position: relative;
    width: 100%;
    /* Clear border from footer element itself */
    border-top: none;
    /* Apply fluid padding so the footer contents stay inside the 1200px bounds with side padding on mobile */
    padding: 0 calc((100vw - var(--container-width)) / 2 + var(--space-md));
}

@media (max-width: 1200px) {
    footer {
        padding: 0 var(--space-md);
    }
}

.footer-top {
    /* Constrain top section to 1200px max width and render the gradient border via pseudo-element here */
    max-width: var(--container-width);
    margin: 0 auto;
    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: stretch;
    align-self: stretch;
    justify-self: end;
    padding-left: 0;
    border-left: 1px solid var(--ink-a25);
}

.footer-brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: 0;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    line-height: var(--line-height-none);
    margin-bottom: 0;
}

.footer-logo img {
    height: var(--logo-height);
    width: auto;
    display: block;
}

.footer-desc {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    line-height: var(--line-height-relaxed);
    max-width: 300px;
    margin: 0;
}

.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;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-links a {
    font-size: var(--font-size-base);
    color: var(--ink-a75);
    transition: color var(--transition-fast), padding-left var(--transition-fast);
    display: inline-block;
    font-weight: var(--font-weight-regular);
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Recent articles list */
.footer-recent {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-recent a {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0;
    border: 1px solid transparent;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.footer-recent time {
    font-size: var(--font-size-2xs);
    font-family: var(--font-headings);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-caps);
    color: var(--color-primary);
    opacity: 0.7;
    display: none !important;
}

.footer-recent span {
    font-size: var(--font-size-sm);
    color: var(--ink-a75);
    line-height: var(--line-height-snug);
    transition: color var(--transition-fast);
}

.footer-recent span:hover {
    text-decoration: underline;
}

/* Footer bottom bar */
.footer-bottom {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 0 var(--space-md) 0;
    display: flex;
    align-items: center;
}

.footer-bottom .footer-text {
    font-size: var(--font-size-sm);
    color: var(--ink-a75);
    margin: 0;
}

.footer-bottom .footer-text a {
    color: var(--ink-a75);
    transition: color var(--transition-fast);
}

.footer-bottom .footer-text a:hover {
    color: var(--color-primary);
}

.social-links {
    display: flex;
    justify-content: flex-start;
    gap: var(--space-sm);
    margin: 0;
}

.social-icon svg {
    width: 18px;
    height: 18px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius-full);
    background: var(--ink-a10);
    color: var(--text-main);
    transition: background var(--transition-fast), color var(--transition-fast);
    text-decoration: none;
}

.footer-legal-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-top: 0;
    gap: var(--space-md);
    list-style: none;
    padding: 0;
}

.footer-legal-links li {
    margin: 0;
}

.footer-legal-links a {
    font-size: var(--font-size-sm);
    white-space: nowrap;
}

.footer-brand .social-links {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-xs);
}

.footer-brand .social-icon {
    color: var(--text-main);
    transition: color var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xs);
    border-radius: var(--border-radius-full);
    background: var(--primary-light-a25);
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: auto 1fr auto;
        gap: var(--space-lg);
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-desc {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr auto;
        gap: var(--space-lg);
    }

    .footer-back-to-top-column {
        grid-column: 2;
        grid-row: 1 / 3;
    }
}

.footer-stripes {
    height: 30px;
    background: linear-gradient(
        to bottom,
        var(--color-primary-light) 0px,
        var(--color-primary-light) 10px,
        var(--color-primary) 10px,
        var(--color-primary) 20px,
        var(--color-primary-dark) 20px,
        var(--color-primary-dark) 35px
    );
}

.view-all {
    margin-top: var(--space-md);
    text-align: center;
}

.view-all a {
    display: inline-flex;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background-color: var(--bg-accent);
    color: var(--color-primary);
    border-radius: var(--border-radius-md);
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-normal);
}

.view-all a:hover {
    background-color: var(--color-primary);
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-sm);
}

.view-all a:after {
    content: '\2192';
    margin-left: var(--space-xs);
    transition: transform var(--transition-fast);
}

.view-all a:hover:after {
    transform: translateX(4px);
}

/* ========================================================================== Hero & Home sections ========================================================================== */
.hero-section {
    min-height: var(--hero-height);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;  /* text centred in the beam above the sofa */
    text-align: center;
    position: relative;
    background-color: var(--bg-main);  /* white sides around the photo */
    margin-top: calc(var(--header-height) * -1);  /* slide up under the header */
    /* Top padding clears the header; bottom padding keeps the text above the sofa */
    padding: calc(var(--header-height) + var(--space-lg)) var(--space-md) calc(var(--hero-height) * var(--hero-sofa-share) + var(--space-md));
    overflow: hidden;
}

/* Sofa photo: always as tall as the hero, centred, so the whole photo shows and
   the white page continues its white sides. Its top edge meets the header. */
.hero-media {
    position: absolute;
    inset: 0;
}

/* Soft white fades at the top (under the transparent header) and the bottom,
   so the photo melts into the page */
.hero-media::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    z-index: 1;
    height: var(--hero-fade-top-height);
    background: linear-gradient(to top, var(--white-a00), var(--white-a60));
    pointer-events: none;
}

.hero-media::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--hero-fade-height);
    background: linear-gradient(to bottom, var(--white-a00), var(--bg-main));
    pointer-events: none;
}

.hero-bg-image {
    position: absolute;
    bottom: 0;
    left: 50%;
    height: 100%;
    width: auto;
    max-width: none;
    transform: translateX(-50%);
}

/* Text sits on the light beam above the sofa */
.hero-content {
    position: relative;
    z-index: 1;
    width: var(--hero-content-width);
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-eyebrow {
    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-wide);
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}

.hero-title {
    font-size: var(--hero-title-size);
    font-weight: var(--font-weight-semibold);
    color: var(--text-main);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
    margin-bottom: var(--space-md);
    text-wrap: balance;
}

/* Highlighted word in brand red, as elsewhere on the site */
.hero-title .text-primary {
    color: var(--color-primary);
}

/* The red word sits on its own last line and is typed out, deleted and
   replaced by the next word (hero-rotator.js). The box keeps the finished
   word's width so the centred line never shifts while letters appear; the
   full stop follows the last typed letter. Between words the empty box eases to the
   next word's width. */
.hero-rotator {
    display: block;
}

.hero-rotator-words {
    position: relative;
    display: inline-block;
    white-space: nowrap;
    text-align: left;
    vertical-align: bottom;
    color: var(--color-primary);
    transition: width var(--hero-word-speed) ease;
}

.hero-rotator-words.no-transition {
    transition: none;
}

.hero-word-end {
    color: var(--text-main);
}

/* invisible copies used to measure each word's width */
.hero-word-measure {
    position: absolute;
    white-space: nowrap;
    left: 0;
    top: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Phones: tighter spacing so the text fits above the sofa */
@media (max-width: 576px) {
    .hero-section {
        --hero-title-size: calc(var(--hero-height) * 0.072);
        --hero-scroll-size: 44px;
        padding-top: calc(var(--header-height) + var(--space-md));
    }

    .hero-title {
        margin-bottom: var(--space-sm);
    }
}

/* Arrow down to the "Your move" section */
.hero-scroll {
    display: block;
    margin-top: var(--space-md);
    color: var(--color-primary);
    border-radius: var(--border-radius-sm);
}

.hero-scroll svg {
    display: block;
    width: var(--hero-scroll-size);
    height: var(--hero-scroll-size);
    animation: hero-scroll-nudge 2s ease-in-out infinite;
}

.hero-scroll:hover svg {
    animation: none;
}

.hero-scroll:focus-visible {
    outline: 0;
    box-shadow: var(--focus-ring);
}

@keyframes hero-scroll-nudge {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(5px); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-scroll svg {
        animation: none;
    }
}

/* Leave room for the fixed header when jumping to a section */
.home-join-section {
    scroll-margin-top: var(--header-height);
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.hero-scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-scroll-hint span {
    display: block;
    width: 20px;
    height: 32px;
    border: 2px solid var(--primary-a40);
    border-radius: var(--border-radius-sm);
    position: relative;
}

.hero-scroll-hint span::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--color-primary);
    border-radius: var(--border-radius-xs);
    animation: scrollDot 1.6s ease infinite;
}

@keyframes scrollDot {
    0% {
        top: 5px;
        opacity: 1;
    }

    100% {
        top: 16px;
        opacity: 0;
    }
}

.home-section {
    padding: var(--space-xl) 0;
}

.home-articles-section {
    background: var(--bg-main);
}

.home-projects-section {
    background: var(--bg-main);
    position: relative;
}

.home-projects-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: var(--page-gutter);
    right: var(--page-gutter);
    height: 1px;
    background: var(--border-color);
}

.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);
    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-section-link,
.arrow-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
    text-decoration: none;
    white-space: nowrap;
}

.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);
}

/* Arrows move a little in their own direction on hover */
a:hover > .home-section-link-icon,
a:hover > .arrow-link-icon,
button:hover > .arrow-link-icon {
    transform: translateX(var(--arrow-nudge));
}

.back-to-news-link:hover svg {
    transform: translateX(calc(var(--arrow-nudge) * -1));
}

.back-to-top-bar:hover .back-to-top-icon {
    transform: translateY(calc(var(--arrow-nudge) * -1));
}

.hero-scroll:hover svg {
    transform: translateY(var(--arrow-nudge));
}

.home-section-link:hover span,
.arrow-link:hover span {
    text-decoration: underline;
}

/* About: brand-red band */
.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: var(--space-md);
}

.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);
    display: none;
}

/* Reach: centred statement */
.home-reach-section {
    text-align: center;
}

.home-reach-section h1,
.home-reach-section .lead,
.home-reach-text {
    margin-left: auto;
    margin-right: auto;
}

.home-reach-section .lead {
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-md);
}

.home-reach-text {
    max-width: 44rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Join: closing call to action */
.home-join-section .lead {
    margin-bottom: var(--space-md);
}

/* ========================================================================== Responsive Design ========================================================================== */
/* Large tablets and smaller desktops (1200px and below): 4 columns to 3 */
@media (max-width: 1200px) {
    :root {
        --space-xl: 40px;
    }

    .container {
        max-width: 100%;
    }

    .columns-4 .column {
        flex: 0 0 calc(33.333% - 14px);
    }
}

/* Medium tablets (992px and below): 3 columns to 2 */
@media (max-width: 992px) {
    :root {
        --space-lg: 25px;
        --space-xl: 35px;
    }

    .columns-4 .column, .columns-3 .column {
        flex: 0 0 calc(50% - 10px);
    }

    .articles-grid, .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        gap: var(--space-md);
    }
}

/* For tablet and larger mobile */
@media (min-width: 481px) and (max-width: 768px) {
    .main-menu {
        padding: var(--space-md);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 56px;
        /* --font-size-base: 15px; */
        --font-size-3xl: 1.75rem;
        --font-size-4xl: 2rem;
        --space-lg: 20px;
        --space-xl: 30px;
    }

    body {
        padding-top: var(--header-height);
    }

    header {
        padding: 0 var(--space-md);
    }

    .content-columns {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .columns-4 .column, .columns-3 .column, .columns-2 .column {
        flex: 0 0 100%;
        margin-bottom: var(--space-sm);
    }

    .articles-grid, .projects-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .menu-link {
        font-size: var(--font-size-xl);
    }

    .featured-image {
        max-height: 300px;
    }

    .menu-link {
        font-size: var(--font-size-xl);
    }

    .main-menu .has-submenu > ul .menu-link {
        font-size: var(--font-size-lg);
    }

    .main-menu {
        gap: var(--space-md);
    }

    .menu-overlay nav {
        width: 100%;
        padding: 0 var(--space-md);
    }
}

@media (max-width: 576px) {
    :root {
        --header-height: 56px;
        --font-size-2xl: 1.375rem;
        --font-size-3xl: 1.5rem;
        --font-size-4xl: 1.75rem;
        --space-md: 15px;
        --space-lg: 20px;
        --space-xl: 25px;
    }

    .site-logo {
        font-size: var(--font-size-lg);
    }

    .burger-button {
        height: 40px;
    }

    .burger-line {
        width: 24px;
    }

    .menu-link {
        font-size: var(--font-size-lg);
    }
}

@media (max-width: 480px) {
    .menu-link {
        font-size: var(--font-size-lg);
    }

    .main-menu .has-submenu > ul .menu-link {
        font-size: var(--font-size-base);
    }

    .main-menu {
        gap: var(--space-sm);
    }
}

/* ========================================================================== Nova - Shortcodes, TOC, Collapsibles, Tabs, Custom Fields ========================================================================== */
/* -- TOC --------------------------------------------------------------------- */
.sc-toc {
    background-color: var(--bg-darker);
    border-color: var(--color-primary);
    border-left-width: 4px;
    border-radius: var(--border-radius-md);
    padding: var(--space-md);
}

.sc-toc::before {
    color: var(--color-primary);
    font-family: var(--font-headings);
    font-size: var(--font-size-2xs);
    letter-spacing: var(--letter-spacing-caps);
    border-bottom-color: var(--white-a10);
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.sc-toc li a {
    color: var(--white-a75);
    font-size: var(--font-size-sm);
    opacity: 1;
    transition: color var(--transition-fast), padding-left var(--transition-fast);
}

.sc-toc li a:hover {
    color: var(--color-primary-light);
    padding-left: var(--space-xs);
    opacity: 1;
}

.sc-toc .sc-toc-sub a {
    color: var(--white-a55);
    font-size: var(--font-size-sm);
}

.sc-toc .sc-toc-sub a:hover {
    color: var(--color-primary-light);
}

.sc-toc .sc-toc-sub::before {
    color: var(--color-primary);
    opacity: 0.6;
}

/* -- Collapsibles ------------------------------------------------------------ */
.c-col {
    border-color: var(--primary-a20);
    border-radius: var(--border-radius-md);
    background: var(--ink-a60);
}

.c-col > .c-head {
    background: var(--primary-a06);
}

.c-col > .c-head:hover {
    background: var(--primary-a12);
}

.c-col > .c-head .c-title {
    color: var(--color-primary-light);
    font-family: var(--font-headings);
}

.c-col > .c-head .c-chevron::before {
    border-top-color: var(--color-primary);
}

.c-col > .c-body {
    color: var(--white-a85);
}

.c-col > .c-body p {
    color: var(--white-a85);
    line-height: var(--line-height-relaxed);
}

/* Nested levels */
.c-col[data-level="2"] {
    background: var(--clay-a05);
    border-color: var(--clay-a20);
}

.c-col[data-level="2"] > .c-head .c-title {
    color: var(--color-secondary-light);
}

.c-col[data-level="2"] > .c-head .c-chevron::before {
    border-top-color: var(--color-secondary);
}

.c-col[data-level="3"], .c-col[data-level="4"] {
    background: var(--white-a03);
    border-color: var(--white-a08);
}

/* -- Tabs -------------------------------------------------------------------- */
.tab-group {
    background: var(--bg-darker);
    border-color: var(--primary-a20);
    border-radius: var(--border-radius-md);
}

.get-in-touch-link:hover span {
  text-decoration: underline;
}

.tab-group .tabs {
    background: var(--ink-a30);
    padding: 0 var(--space-sm);
    gap: var(--space-xs);
    border-bottom: 1px solid var(--primary-a15);
}

.tab-group .tab-btn {
    color: var(--white-a55);
    font-family: var(--font-headings);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    background: transparent;
    border-color: transparent;
    padding: var(--space-sm) var(--space-md);
    margin-top: var(--space-sm);
    transition: color var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}

.tab-group .tab-btn:hover {
    color: var(--white-a85);
    opacity: 1;
}

.tab-group .tab-btn.active {
    color: var(--color-primary);
    background: var(--bg-darker);
    border-color: var(--primary-a25);
    opacity: 1;
}

.tab-group > .c-col > .c-body {
    color: var(--white-a85);
    padding: var(--space-md);
}

.tab-group > .c-col > .c-body p, .tab-group > .c-col > .c-body li {
    color: var(--white-a85);
    line-height: var(--line-height-relaxed);
}

/* -- Callouts ---------------------------------------------------------------- */
.sc-callout {
    border-radius: var(--border-radius-md) !important;
    padding: var(--space-md) !important;
    margin: var(--space-md) 0 !important;
}

.sc-callout-body {
    color: var(--text-main) !important;
    font-size: var(--font-size-base);
}

.sc-callout-body p {
    color: var(--text-main) !important;
}

.sc-callout-info {
    background-color: var(--clay-a08) !important;
    border-color: var(--color-secondary) !important;
    border-left-width: 4px;
}

.sc-callout-info .sc-callout-body, .sc-callout-info .sc-callout-body p {
    color: var(--text-main) !important;
}

.sc-callout-tip {
    background-color: var(--primary-a08) !important;
    border-color: var(--color-primary) !important;
    border-left-width: 4px;
}

.sc-callout-tip .sc-callout-body, .sc-callout-tip .sc-callout-body p {
    color: var(--text-main) !important;
}

.sc-callout-warning {
    background-color: var(--accent-a08) !important;
    border-color: var(--color-accent) !important;
    border-left-width: 4px;
}

.sc-callout-warning .sc-callout-body, .sc-callout-warning .sc-callout-body p {
    color: var(--text-main) !important;
}

.sc-callout-danger {
    background-color: var(--primary-a08) !important;
    border-color: var(--color-primary) !important;
    border-left-width: 4px;
}

.sc-callout-danger .sc-callout-body, .sc-callout-danger .sc-callout-body p {
    color: var(--text-main) !important;
}

/* -- Toggle bar (expand/collapse all) ----------------------------------- */
.c-toggle-bar {
    display: flex;
    gap: var(--space-sm);
    margin: var(--space-md) 0 0;
    padding: 0;
}

.c-toggle-bar button {
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--primary-a30);
    background: var(--primary-a08);
    color: var(--color-primary);
    font-family: var(--font-headings);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    opacity: 1;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.c-toggle-bar button:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--text-light);
    opacity: 1;
}

/* -- Tables -------------------------------------------------------------------- */
/* Base reset for all theme tables (overrides gallery-layout.css defaults) */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
    margin: var(--space-md) 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: var(--ink-a06);
    border-bottom: 2px solid var(--primary-a20);
}

td {
    padding: var(--space-sm) var(--space-md);
    vertical-align: top;
    color: var(--text-main);
    line-height: var(--line-height-base);
    border-bottom: 1px solid var(--ink-a08);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: var(--primary-a03);
}

/* table-default - subtle rows */
.table-default th {
    background: var(--ink-a06);
}

.table-default tr:nth-child(even) td {
    background: var(--ink-a03);
}

/* table-striped - alternating orange tint */
.table-striped th {
    background: var(--bg-darker);
    color: var(--color-primary);
}

.table-striped tr:nth-child(odd) td {
    background: var(--primary-a04);
}

.table-striped tr:nth-child(even) td {
    background: var(--primary-a09);
}

/* table-bordered - all cell borders */
.table-bordered {
    border: 1px solid var(--ink-a15);
}

.table-bordered th, .table-bordered td {
    border: 1px solid var(--ink-a12);
}

.table-bordered th {
    background: var(--bg-darker);
    color: var(--color-primary-light);
    border-color: var(--primary-a20);
}

/* table-minimal - no background, just bottom borders */
.table-minimal th {
    background: transparent;
    color: var(--text-muted);
    border-bottom: 2px solid var(--ink-a15);
    font-size: var(--font-size-2xs);
}

.table-minimal td {
    background: transparent;
    border-bottom: 1px solid var(--ink-a07);
}

.table-minimal tr:hover td {
    background: transparent;
}

/* -- Custom fields ----------------------------------------------------------- */
.nova-custom-fields {
    margin: 0 0 var(--space-lg);
}

.custom-fields-block {
    margin: 0 0 var(--space-lg);
}

.custom-fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1px;
    border: 1px solid var(--primary-a18);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    list-style: none;
}

.cf-row {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--ink-a55);
    border-right: 1px solid var(--primary-a10);
    border-bottom: 1px solid var(--primary-a10);
    transition: background var(--transition-fast);
}

.cf-row:hover {
    background: var(--ink-a80);
}

.custom-fields dt {
    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);
    color: var(--color-primary);
    line-height: var(--line-height-flat);
    margin: 0;
}

.custom-fields dd {
    font-size: var(--font-size-sm);
    color: var(--white-a85);
    line-height: var(--line-height-snug);
    margin: 0;
    word-break: break-word;
}

.custom-fields dd a {
    color: var(--color-secondary-light);
    text-decoration: underline;
    text-decoration-color: var(--clay-a35);
    transition: color var(--transition-fast);
}

.custom-fields dd a:hover {
    color: var(--color-secondary);
    text-decoration-color: var(--color-secondary);
}

@media (max-width: 768px) {
    .custom-fields {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .custom-fields {
        grid-template-columns: 1fr;
    }

    .cf-row {
        padding: var(--space-sm);
    }
}

/* -- Related items -------------------------------------------------------- */
.related-items {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--primary-a15);
}

.related-items-title {
    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);
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}

.related-items-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.related-item a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--ink-a50);
    border: 1px solid var(--primary-a12);
    border-radius: var(--border-radius-sm);
    color: var(--white-a80);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.related-item a:hover {
    background: var(--ink-a85);
    border-color: var(--primary-a35);
    color: var(--text-light);
}

.related-item-type {
    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);
    color: var(--color-primary);
    background: var(--primary-a12);
    border: 1px solid var(--primary-a20);
    border-radius: var(--border-radius-sm);
    padding: 0 var(--space-xs);
    flex-shrink: 0;
    transition: background var(--transition-fast);
}

.related-item a:hover .related-item-type {
    background: var(--primary-a22);
}

.related-item--project .related-item-type {
    color: var(--color-secondary-light);
    background: var(--clay-a10);
    border-color: var(--clay-a20);
}

.related-item--project a:hover .related-item-type {
    background: var(--clay-a20);
}

.related-item--page .related-item-type {
    color: var(--white-a60);
    background: var(--white-a06);
    border-color: var(--white-a12);
}

/* -- Search result badges (override search.css hardcoded colors) --------- */
.result-type.article {
    background-color: var(--color-primary);
    color: var(--text-light);
}

.result-type.page {
    background-color: var(--ink-a08);
    color: var(--text-main);
}

.result-type.project {
    background-color: var(--color-secondary);
    color: var(--text-light);
}

/* Search result title links */
.result-title-heading a {
    color: var(--color-primary-light) !important;
}

.result-title-heading a:hover {
    color: var(--color-primary) !important;
}


/* ==========================================================================
   Page content components (used in page bodies: Contact, What we do, Join us)
   ========================================================================== */

/* Centred column for page content */
.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;
}

/* Disabled arrow link (e.g. paused applications) */
.arrow-link.is-disabled {
    color: var(--text-muted);
    opacity: 0.6;
    pointer-events: none;
    cursor: not-allowed;
}

/* Large choice buttons (Contact: creator / brand) */
.choice-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    margin: 0 0 var(--space-xl);
}

.choice-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    width: 100%;
    max-width: 25rem;
    min-height: var(--choice-link-height);
    padding: var(--space-sm) var(--space-lg);
    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;
    text-decoration: none;
    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 .arrow-link-icon {
    color: var(--color-primary);
}

/* Notice pill (dates, paused states) */
.notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    max-width: 25rem;
    margin: 0 auto 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 svg {
    flex-shrink: 0;
}

/* Small print under a page */
.small-print {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin: 0;
}

.small-print a {
    color: inherit;
    text-decoration: underline;
}

/* Feature list (What we do) */
.feature-list {
    margin: 0 0 var(--space-xl);
}

.feature {
    padding: var(--space-lg) 0;
}

.feature + .feature {
    border-top: 1px solid var(--border-color);
}

.feature-icon {
    display: block;
    width: var(--icon-size);
    height: var(--icon-size);
    margin-bottom: var(--space-md);
    color: var(--color-primary);
}

.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);
}

.feature h2 {
    margin-bottom: var(--space-sm);
}

.feature p {
    color: var(--text-muted);
    margin: 0;
}

/* Closing call to action at the end of a page */
.page-cta {
    text-align: center;
    padding-top: var(--space-lg);
}

.page-cta .lead {
    margin: 0 auto var(--space-sm);
}

/* ==========================================================================
   Header actions: language menu (globe) next to the burger
   ========================================================================== */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    z-index: var(--menu-z-index);
}

.lang-switch {
    position: static;
}

.lang-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    height: var(--icon-size);
    color: var(--color-primary);
    cursor: pointer;
    list-style: none;
}

.lang-button::-webkit-details-marker {
    display: none;
}

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

.lang-icon {
    width: var(--icon-size-sm);
    height: var(--icon-size-sm);
}

/* Arrow next to the globe: points down when closed, up when the menu is open */
.lang-chevron {
    width: var(--icon-size-xs);
    height: var(--icon-size-xs);
    transition: transform var(--transition-fast);
}

.lang-switch[open] .lang-chevron {
    transform: rotate(180deg);
}

.lang-switch.is-closing .lang-chevron {
    transform: none;
}

/* Dims the page below the header while the language menu is open */
.lang-backdrop {
    position: fixed;
    top: calc(var(--neuno-adminbar-height, 0px) + var(--header-height));
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay-dim);
    cursor: pointer;
}

/* Fade in when opening, fade out when closing (closing is timed in interactions.js) */
.lang-switch[open] .lang-menu,
.lang-switch[open] .lang-backdrop {
    animation: lang-fade-in var(--transition-fast) both;
}

.lang-switch.is-closing .lang-menu,
.lang-switch.is-closing .lang-backdrop {
    animation: lang-fade-out var(--transition-fast) both;
    pointer-events: none;
}

@keyframes lang-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes lang-fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .lang-switch[open] .lang-menu,
    .lang-switch[open] .lang-backdrop {
        animation: none;
    }
}

/* Full-width panel under the header, languages on the left */
.lang-menu {
    position: fixed;
    top: calc(var(--neuno-adminbar-height, 0px) + var(--header-height));
    left: 0;
    right: 0;
    padding: var(--space-sm) var(--page-gutter);
    background: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
}

.lang-menu-title {
    margin: 0 0 var(--space-xs);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    text-align: left;
}

.lang-list {
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: left;
}

.lang-list a {
    display: block;
    padding: var(--space-sm) 0;
    color: var(--text-main);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-snug);
}

.lang-list a:hover {
    text-decoration: underline;
}

.lang-list a[aria-current="true"] {
    color: var(--color-primary);
    font-weight: var(--font-weight-semibold);
}

/* ==========================================================================
   News: list title and "Back to news" link (moved from inline styles)
   ========================================================================== */
.content-list-title {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.back-to-news {
    margin-bottom: var(--space-md);
}

.back-to-news-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    color: var(--color-primary);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
}

.back-to-news-link svg {
    flex-shrink: 0;
    display: block;
    width: var(--arrow-icon-size);
    height: var(--arrow-icon-size);
    transition: transform var(--transition-fast);
}

.back-to-news-link:hover span {
    text-decoration: underline;
}

/* ==========================================================================
   Footer pieces (moved from inline styles in footer.php)
   ========================================================================== */
.social-intro-text {
    display: none;
}

.footer-social-icons {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-xs);
}

.back-to-top-bar {
    justify-content: center;
    padding-left: var(--space-md);
    text-decoration: none;
}

.back-to-top-bar:hover span {
    text-decoration: underline;
}

.back-to-top-icon {
    flex-shrink: 0;
    display: block;
    transition: transform var(--transition-fast);
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding-top: var(--space-md);
    border-top: 1px solid var(--ink-a25);
}

.copyright-text {
    white-space: nowrap;
}


/* ==========================================================================
   Forms made with the Form Builder plugin (e.g. the Contact page form).
   "html body" outranks the plugin's own neutral defaults.
   ========================================================================== */
html body .fb-form {
    max-width: var(--form-width);
    margin: var(--space-lg) auto;
    gap: var(--space-md);
    text-align: left;
}

html body .fb-form[hidden],
html body .fb-success[hidden],
html body .fb-message[hidden] {
    display: none;
}

html body .fb-fields-inline {
    gap: var(--space-md);
}

html body .fb-field {
    gap: var(--space-xs);
}

html body .fb-field label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--text-main);
}

html body .fb-field input[type="text"],
html body .fb-field input[type="email"],
html body .fb-field input[type="tel"],
html body .fb-field input[type="number"],
html body .fb-field select,
html body .fb-field textarea {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-full);
    background-color: var(--bg-main);
    color: var(--text-main);
    font: inherit;
    line-height: var(--line-height-base);
    transition: border-color var(--transition-fast);
}

html body .fb-field textarea {
    min-height: 9rem;
    border-radius: var(--border-radius-md);
    resize: vertical;
}

html body .fb-field input:hover,
html body .fb-field select:hover,
html body .fb-field textarea:hover {
    border-color: var(--border-color-hover);
}

html body .fb-field input:focus,
html body .fb-field select:focus,
html body .fb-field textarea:focus {
    outline: 0;
    border-color: var(--color-primary);
}

/* Send button: the site's red arrow link */
html body .fb-submit {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    padding: var(--space-sm) 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--color-primary);
    font: inherit;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
}

html body .fb-submit:hover:not(:disabled) {
    background: none;
}

html body .fb-submit:hover:not(:disabled) .fb-submit-label {
    text-decoration: underline;
}

html body .fb-submit:focus-visible {
    outline: 0;
    box-shadow: var(--focus-ring);
    border-radius: var(--border-radius-sm);
}

.fb-submit-icon {
    flex-shrink: 0;
    display: block;
    width: var(--arrow-icon-size);
    height: var(--arrow-icon-size);
    transition: transform var(--transition-fast);
}

.fb-submit:hover:not(:disabled) .fb-submit-icon {
    transform: translateX(var(--arrow-nudge));
}

html body .fb-message,
html body .fb-success {
    padding: var(--space-sm) var(--space-md);
    border: 0;
    border-radius: var(--border-radius-md);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-snug);
}

html body .fb-message--error {
    background: var(--primary-a10);
    color: var(--color-primary);
}

html body .fb-success {
    max-width: var(--form-width);
    margin: var(--space-lg) auto;
    background: var(--bg-accent);
    color: var(--color-accent-dark);
    text-align: center;
}

html body .fb-success:focus {
    outline: 0;
}

/* Cookie policy page: "Customize cookie preferences" (an .arrow-link like the others) */
.cookie-settings-action {
    margin: 0 0 var(--space-lg);
}
