:root {
    /* Brand palette — Outlook visual identity, section 07.
       Oxford Blue leads; French Wine is the accent and should stay under
       1/4 of any layout. Extended tones are for section/category colour only. */
    --brand-oxford-blue: #101551;   /* primary: trustworthy, stable */
    --brand-american-blue: #38427a; /* secondary: familiar, mature */
    --brand-french-wine: #af1b3e;   /* secondary accent: elegant, warm */
    --brand-raisin-black: #262626;  /* neutral: bold, classy */
    --brand-light-gray: #d7d4d5;    /* neutral: calm, balanced */

    --brand-ext-linen: #f5f0ec;
    --brand-ext-sand: #d4bfaa;
    --brand-ext-clay: #b8775b;
    --brand-ext-coral: #e27d61;
    --brand-ext-mustard: #e9c16a;
    --brand-ext-olive: #8a9a5b;
    --brand-ext-forest: #2f6b52;
    --brand-ext-teal: #397689;
    --brand-ext-sky: #a2c6ea;
    --brand-ext-periwinkle: #a1a4eb;
    --brand-ext-rose: #c98b90;
    --brand-ext-plum: #5e3958;

    /* Roles */
    --color-primary: var(--brand-oxford-blue);
    --color-primary-light: var(--brand-american-blue); /* hover */
    --color-primary-translucent: rgba(16, 21, 81, 0.96);
    --color-accent: var(--brand-french-wine);
    --color-accent-dark: var(--brand-french-wine);
    --color-success: var(--brand-ext-forest);
    --color-background-white: #FFFFFF;
    --color-background-ice: var(--brand-ext-linen);
    --color-text-dark: var(--brand-raisin-black);
    --color-text-muted: var(--brand-raisin-black);
    --color-border-soft: var(--brand-light-gray);
    --color-tag-bg: var(--brand-light-gray);
    --color-tag-text: var(--brand-oxford-blue);

    /* Theme roles. --color-primary is brand-coloured text (headings, links);
       these are the solid surfaces behind white text, and they stay separate
       so dark mode can lighten the text without washing out the fills. */
    --color-band: var(--brand-oxford-blue);       /* footer, heroes */
    --color-fill: var(--brand-oxford-blue);       /* buttons, selected states */
    --color-fill-hover: var(--brand-american-blue);
    --color-on-fill: #fff;
    --color-accent-fill: var(--brand-french-wine); /* "Join us" and similar */
    --color-surface-raised: #FFFFFF;               /* cards, inputs, menus */
    --color-field-border: rgba(16, 21, 81, 0.3);
    --shadow-card-hover: 0 10px 24px rgba(16, 21, 81, 0.08);

    /* Typography — the brand book is set in Myriad Pro. Source Sans 3 is
       Adobe's open-licence humanist sans from the same design lineage. */
    /* Arabic: Cairo, per the brand book. Source Sans 3 has no Arabic glyphs,
       so Arabic text falls through to Cairo and Latin text is unchanged. */
    --font-heading: 'Source Sans 3', 'Cairo', 'Myriad Pro', 'Segoe UI', sans-serif;
    --font-body: 'Source Sans 3', 'Cairo', 'Myriad Pro', 'Segoe UI', sans-serif;
    --font-ui: 'Source Sans 3', 'Cairo', 'Myriad Pro', 'Segoe UI', sans-serif;

    /* Spacing */
    --spacing-unit: 8px;
    --container-max-width: 1200px;
    --header-height: 80px;
    --header-height-compact: 60px;

    /* Borders */
    --border-radius-card: 6px;
    --border-soft: 1px solid var(--color-border-soft);

    color-scheme: light;
}

/* Dark theme. The inline script in includes/theme_init.html sets data-theme
   before first paint, from the visitor's saved choice or their OS setting.
   Oxford Blue anchors the canvas and masthead. American Blue is mixed into
   the canvas to distinguish alternating sections, panels and selected rows. */
html[data-theme="dark"] {
    color-scheme: dark;

    --color-primary: #fff;
    --color-primary-light: color-mix(in srgb, var(--brand-american-blue) 25%, white);
    --color-accent: color-mix(in srgb, var(--brand-french-wine) 50%, white);
    --color-accent-dark: var(--color-accent);
    --color-success: color-mix(in srgb, var(--brand-ext-forest) 50%, white);
    --color-background-white: color-mix(in srgb, var(--brand-oxford-blue) 65%, var(--brand-raisin-black));
    --color-background-ice: color-mix(in srgb, var(--brand-american-blue) 18%, var(--color-background-white));
    --color-text-dark: color-mix(in srgb, var(--brand-light-gray) 55%, white);
    --color-text-muted: color-mix(in srgb, var(--brand-light-gray) 82%, var(--brand-american-blue));
    --color-border-soft: color-mix(in srgb, var(--brand-light-gray) 22%, var(--brand-american-blue));
    --color-tag-bg: color-mix(in srgb, var(--brand-american-blue) 64%, var(--color-background-white));
    --color-tag-text: #fff;

    --color-fill: var(--brand-american-blue);
    --color-fill-hover: color-mix(in srgb, var(--brand-american-blue) 84%, white);
    --color-surface-raised: color-mix(in srgb, var(--brand-american-blue) 38%, var(--color-background-white));
    --color-field-border: color-mix(in srgb, var(--brand-light-gray) 48%, var(--brand-american-blue));
    --shadow-card-hover: 0 10px 24px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] :is(input, textarea)::placeholder {
    color: inherit;
    opacity: 0.8;
}

/* Swap artwork that has a light and a dark version, e.g. the 404 mark. */
html[data-theme="dark"] .theme-light-only,
html:not([data-theme="dark"]) .theme-dark-only {
    display: none !important;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    /* Footer sits at the bottom even when the page is short. */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: var(--font-body);
    color: var(--color-text-dark);
    background-color: var(--color-background-white);
    line-height: 1.6;
    font-size: 18px; /* High legibility */
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1rem;
}

h1 { font-size: 3.5rem; font-weight: 800; letter-spacing: -0.015em; }
h2 { font-size: 2.5rem; letter-spacing: -0.01em; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; font-weight: 700; }

p {
    margin-bottom: 1.5rem;
}

.rich-text p {
    font-family: var(--font-body);
    font-size: 1.125rem;
    color: var(--color-text-dark);
}

.rich-text a,
.article-content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
    text-underline-offset: 3px;
}

.rich-text a:hover,
.article-content a:hover {
    color: var(--color-accent);
}

::selection {
    background: var(--color-fill);
    color: var(--color-on-fill);
}

:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background-color: var(--color-fill);
    color: var(--color-on-fill);
    padding: 12px 24px;
    font-family: var(--font-ui);
    font-weight: 700;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: background-color 0.2s ease;
}

.btn-primary:hover {
    background-color: var(--color-fill-hover);
}

/* Header & Nav */
/* The header keeps a fixed layout height; only the painted bar (::before) and
   the content row shrink on scroll. Resizing the sticky box itself would change
   the page height and make the scroll position jitter around the threshold. */
.site-header {
    --bar-h: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: flex-start;
    pointer-events: none;
    transition: color 0.3s ease;
}

.site-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--bar-h);
    background-color: var(--color-background-white);
    border-bottom: var(--border-soft);
    transition: height 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.site-header.scrolled {
    --bar-h: var(--header-height-compact);
    color: #fff;
}

.site-header.scrolled::before {
    background-color: var(--color-primary-translucent);
    border-bottom-color: transparent;
}

html[data-theme="dark"] .site-header::before {
    background-color: var(--color-band);
    border-bottom-color: var(--brand-french-wine);
}

.site-header .container {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: var(--bar-h);
    pointer-events: auto;
    transition: height 0.3s ease;
}

/* Reading progress along the bottom edge of the bar; article pages only. */
.read-progress {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(var(--bar-h) - 2px);
    height: 2px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: top 0.3s ease;
    pointer-events: none;
}

.site-header.scrolled .read-progress {
    background: #fff;
}

html[dir="rtl"] .read-progress {
    transform-origin: right center;
}

.brand-logo {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--color-primary);
}

.brand-logo__wordmark {
    display: block;
    clip-path: inset(0);
    transform-origin: left center;
}

/* Keep the home-link hit area fixed while the wordmark folds into its O. */
@media (prefers-reduced-motion: no-preference) {
    .brand-logo__wordmark {
        transition: clip-path 640ms cubic-bezier(0.645, 0.045, 0.355, 1),
                    transform 390ms ease-out;
    }

    .brand-logo:focus-visible .brand-logo__wordmark {
        clip-path: inset(0 83.4% 0 0);
        transform: scale(1.18);
        /* A small overshoot gives the O a soft pop, then settles at 1.18.
           Transitions also reverse smoothly when the pointer leaves early. */
        transition: clip-path 640ms cubic-bezier(0.645, 0.045, 0.355, 1),
                    transform 520ms 280ms cubic-bezier(0.34, 2, 0.64, 1);
    }

    @media (hover: hover) and (pointer: fine) {
        .brand-logo:hover .brand-logo__wordmark {
            clip-path: inset(0 83.4% 0 0);
            transform: scale(1.18);
            transition: clip-path 640ms cubic-bezier(0.645, 0.045, 0.355, 1),
                        transform 520ms 280ms cubic-bezier(0.34, 2, 0.64, 1);
        }

    }
}

.brand-logo:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 8px;
    border-radius: 2px;
}

.brand-logo img {
    display: block;
    height: 26px;
    width: auto;
    transition: height 0.3s ease;
}

.site-header.scrolled .brand-logo img {
    height: 22px;
}

.brand-logo .brand-logo--light {
    display: none;
}

.site-header.scrolled .brand-logo .brand-logo--dark {
    display: none;
}

.site-header.scrolled .brand-logo .brand-logo--light {
    display: block;
}


.site-header.scrolled .brand-logo {
    color: #fff;
}

/* Dark theme: the approved negative wordmark (white) on the dark bar. */
html[data-theme="dark"] .brand-logo .brand-logo--dark {
    display: none;
}

html[data-theme="dark"] .brand-logo .brand-logo--light {
    display: block;
}

/* Appearance menu (includes/theme_switch.html, js/theme.js). Hidden until
   the theme script has run, so visitors without JavaScript see no dead button. */
.theme-switch {
    position: relative;
    display: flex;
    align-items: center;
}

html:not([data-theme]) .theme-switch {
    display: none;
}

.theme-switch__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.theme-switch__button:hover,
.theme-switch__button[aria-expanded="true"] {
    border-color: currentColor;
}

.theme-switch__button svg {
    width: 20px;
    height: 20px;
}

/* The icon shows the theme in use: a moon when dark, a sun when light. */
html[data-theme="dark"] .theme-switch__sun,
html:not([data-theme="dark"]) .theme-switch__moon {
    display: none;
}

.theme-switch__panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 10;
    min-width: 200px;
    margin: 0;
    padding: 12px;
    border: var(--border-soft);
    border-radius: var(--border-radius-card);
    background: var(--color-surface-raised);
    color: var(--color-text-dark);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
    font-family: var(--font-ui);
    font-size: 0.95rem;
    letter-spacing: normal;
    text-transform: none;
    text-align: left;
}

.theme-switch__panel[hidden] {
    display: none;
}

.theme-switch__panel legend {
    float: left;
    width: 100%;
    margin-bottom: 6px;
    padding: 0 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.theme-switch__panel label {
    clear: both;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 0 8px;
    border-radius: 4px;
    cursor: pointer;
}

.theme-switch__panel label:hover {
    background: var(--color-tag-bg);
}

.theme-switch__panel input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--color-fill);
}

html[data-theme="dark"] .theme-switch__panel input {
    accent-color: var(--color-primary);
}

.theme-switch__panel label:has(input:focus-visible) {
    outline: 2px solid var(--color-accent);
    outline-offset: -2px;
}

.theme-switch__panel input:focus-visible {
    outline: none; /* the row's outline above shows focus */
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 24px;
}

.main-nav a {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    padding-bottom: 6px;
    position: relative;
}

/* Underline slides in from the reading-direction start. */
.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

html[dir="rtl"] .main-nav a::after {
    transform-origin: right center;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after,
.main-nav a[aria-current="page"]::after {
    transform: scaleX(1);
}

.site-header.scrolled .main-nav a::after {
    background: #fff;
}

.site-content {
    flex: 1 0 auto;
}

/* Layout Grid */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 16px;
}

.grid-12 {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    margin-top: 40px;
}

/* Editorial Hero (Lead Story) */
.hero-section {
    padding: 60px 0;
    border-bottom: var(--border-soft);
}

.hero-content {
    grid-column: span 12;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 40px;
    align-items: center;
}

.hero-text {
    grid-column: span 5;
}

.hero-image {
    grid-column: span 7;
}

.hero-image img {
    border-radius: var(--border-radius-card);
}

/* Editorial App Grid (Cards) */
.app-grid {
    padding: 40px 0;
}

.card {
    background: var(--color-surface-raised);
    border: var(--border-soft);
    border-radius: var(--border-radius-card);
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-card-hover);
}

.card:hover .card-title {
    color: var(--color-primary-light);
}

.card-tag {
    display: inline-block;
    background-color: transparent;
    color: var(--color-accent);
    padding: 0 0 0 10px;
    border-left: 3px solid var(--color-accent);
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
    margin-bottom: 12px;
    align-self: flex-start;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.card-excerpt {
    font-size: 1rem;
    color: var(--color-text-muted);
    flex-grow: 1;
}

.card-meta {
    margin-top: 16px;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Sidebar "Voice of the Student" */
.sidebar {
    background-color: var(--color-background-ice);
    padding: 32px; /* Increased padding */
    border-radius: var(--border-radius-card); /* Keep consistent rounding */
}

/* Ensure sidebar content has some breathing room */
.sidebar h3 {
    margin-top: 0;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--color-primary);
    margin-bottom: 24px;
}

.sidebar-item {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-border-soft);
}

.sidebar-item:last-child {
    border-bottom: none;
}

/* Article Page */
.article-header {
    text-align: center;
    max-width: 800px;
    margin: 60px auto 40px;
}

.article-content {
    max-width: 720px;
    margin: 0 auto 80px;
    font-size: 1.2rem;
}

/* Homepage: recruitment mode */
.btn-ghost {
    display: inline-block;
    padding: 11px 22px;
    font-family: var(--font-ui);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1.5px solid var(--color-primary);
    color: var(--color-primary);
    border-radius: 2px;
}

.main-nav .nav-cta {
    background: var(--color-accent-fill);
    color: #fff;
    padding: 8px 16px;
    border-radius: 2px;
}

.main-nav .nav-cta::after {
    display: none;
}

.main-nav .nav-cta:hover {
    background: var(--color-accent-fill);
}

/* One soft pulse the first time a visitor lands (set by mysite.js, once per session). */
@keyframes cta-pulse {
    0% { box-shadow: 0 0 0 0 rgba(175, 27, 62, 0.5); }
    100% { box-shadow: 0 0 0 12px rgba(175, 27, 62, 0); }
}

@media (prefers-reduced-motion: no-preference) {
    .main-nav .nav-cta--pulse {
        animation: cta-pulse 1.2s ease-out 0.8s 2;
    }
}

/* Cards fade up as they scroll into view. mysite.js adds .reveal only when
   motion is allowed, then removes it, so hover and no-JS rendering are untouched. */
.card.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.card.reveal.is-in {
    opacity: 1;
    transform: none;
}

.recruit-hero {
    position: relative;
    overflow: hidden;
    background: var(--color-band);
    color: #fff;
    padding: 96px 0 88px;
}

/* The Outlook "O" as a large watermark, as on the brand's social covers. */
.recruit-hero::after {
    content: "";
    position: absolute;
    right: -6%;
    top: 50%;
    width: min(46vw, 560px);
    aspect-ratio: 874 / 850;
    transform: translateY(-50%);
    background: url("../brand/icon/outlook-icon-ablue.a4f1d470cc5c.svg") center / contain no-repeat;
    opacity: 0.55;
    pointer-events: none;
}

.recruit-hero .container {
    position: relative;
    z-index: 1;
}

.recruit-hero h1 {
    color: #fff;
    font-size: 6rem;
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.03em;
    margin: 0 0 22px;
    max-width: 900px;
}

.recruit-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.recruit-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-ext-mustard);
}

.recruit-lede {
    font-size: 1.3rem;
    opacity: 0.88;
    max-width: 620px;
    margin-bottom: 32px;
}

.recruit-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.recruit-actions .btn-primary {
    background: var(--color-accent-fill);
    color: #fff;
}

.recruit-actions .btn-primary:hover {
    background: var(--color-accent-fill);
}

.recruit-actions .btn-ghost {
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

.recruit-closed {
    margin: 0;
    opacity: 0.9;
}

.recruit-closed a {
    text-decoration: underline;
}

.recruit-stats {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 56px;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    opacity: 0.8;
}

.recruit-stats b {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.8rem;
}

.home-section {
    padding-top: 72px;
}

.home-section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.home-section-head h2 {
    margin: 0;
    font-size: 2.2rem;
}

.home-section-head p {
    margin: 0;
    color: var(--color-text-muted);
    font-family: var(--font-ui);
    font-size: 0.95rem;
}

.news-grid,
.soon-grid,
.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.news-grid {
    grid-template-columns: repeat(3, 1fr);
}

.soon {
    display: flex;
    flex-direction: column;
    min-height: 210px;
    padding: 22px;
    border: 1.5px dashed var(--color-border-soft);
    border-radius: var(--border-radius-card);
    background: var(--color-background-ice);
}

.soon-tag {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.soon h3 {
    font-size: 1.25rem;
    margin: 10px 0 8px;
}

.soon p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin: 0;
}

.soon-pill {
    align-self: flex-start;
    margin-top: auto;
    padding: 3px 10px;
    border: 1px solid var(--color-border-soft);
    border-radius: 999px;
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.soon p + .soon-pill {
    margin-top: 16px;
}

.team-groups {
    display: grid;
    gap: 40px;
}

.team-group-name {
    margin: 0 0 14px;
    font-size: 1.35rem;
}

.team-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    border: var(--border-soft);
    border-radius: var(--border-radius-card);
    background: var(--color-surface-raised);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.team-card:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-card-hover);
}

.team-card:hover .team-go {
    color: var(--color-accent);
}

.team-card h3 {
    margin: 0;
    font-size: 1.35rem;
}

.team-go {
    margin-top: auto;
    padding-top: 18px;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-primary);
}

.steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: var(--border-soft);
    border-radius: var(--border-radius-card);
    overflow: hidden;
    background: var(--color-background-ice);
}

.steps li {
    padding: 24px;
    border-right: var(--border-soft);
}

.steps li:last-child {
    border-right: 0;
}

.steps b {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    line-height: 1;
    color: var(--color-primary);
}

.steps h4 {
    margin: 10px 0 4px;
    font-size: 1.05rem;
}

.steps p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.site-footer {
    margin-top: 60px;
    padding: 64px 0 40px;
    background-color: var(--color-band);
    border-top: 4px solid var(--brand-french-wine);
    color: #fff;
    text-align: center;
}

.footer-brand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px 28px;
    margin-bottom: 24px;
}

.footer-wordmark {
    height: 34px;
    width: auto;
}

.footer-wordmark-ar {
    height: 40px;
    width: auto;
    padding-left: 28px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.footer-tagline {
    margin-bottom: 0;
    opacity: 0.8;
}

.footer-legal {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.9rem;
    opacity: 0.65;
}

.footer-legal p {
    margin: 0;
}

.footer-links a {
    padding: 10px 4px;
    border-bottom: 2px solid transparent;
}

.footer-links a:hover {
    border-bottom-color: var(--color-accent);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 16px;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

@media (max-width: 480px) {
    .footer-wordmark { height: 26px; }
    .footer-wordmark-ar { height: 32px; padding-left: 0; border-left: 0; }
}

@media (max-width: 900px) {
    .news-grid, .soon-grid, .team-grid { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .steps li:nth-child(2) { border-right: 0; }
    .steps li:nth-child(-n+2) { border-bottom: var(--border-soft); }
}

@media (max-width: 768px) {
    .recruit-hero h1 { font-size: 4.5rem; }
}

@media (max-width: 560px) {
    .recruit-hero { padding: 56px 0; }
    .recruit-hero::after { width: 70vw; right: -30vw; opacity: 0.3; }
    .recruit-hero h1 { font-size: 3.2rem; }
    .recruit-lede { font-size: 1.1rem; }
    .recruit-stats { gap: 24px; margin-top: 36px; }
    .news-grid, .soon-grid, .team-grid { grid-template-columns: 1fr; }
    .soon { min-height: 0; }
    .home-section { padding-top: 56px; }
    .home-section-head h2 { font-size: 1.8rem; }
}

/* Mobile Adaptability */
@media (max-width: 768px) {
    .grid-12, .hero-content {
        display: flex;
        flex-direction: column;
    }
    
    .hero-text, .hero-image {
        grid-column: span 12;
    }

    .hero-text {
        order: 2; /* Image first on mobile */
    }
    
    .hero-image {
        order: 1;
        margin-bottom: 24px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    /* One compact row so the sticky header doesn't eat the screen. */
    .site-header .container {
        padding: 10px 16px;
        gap: 12px;
    }

    .brand-logo img { height: 20px; }
    .main-nav ul { gap: 14px; align-items: center; }
    .main-nav a { display: inline-block; padding: 10px 0; font-size: 0.82rem; }
    .main-nav .nav-cta { padding: 8px 12px; }

    .site-header {
      height: auto;
    }
}

/* Narrow screens: the wordmark keeps its proportions (brand book: never
   squash the logo); when the row is full, whole nav items wrap instead. */
@media (max-width: 768px) {
    .brand-logo { flex-shrink: 0; }
    .main-nav { flex: 1 1 auto; min-width: 0; }
    .main-nav ul { flex-wrap: wrap; justify-content: flex-end; row-gap: 0; }
    /* A wrapped nav makes the bar taller; a single row keeps the usual height. */
    .site-header .container { height: auto; min-height: var(--bar-h); }
    .site-header::before { height: auto; bottom: 0; }
    .read-progress { top: auto; bottom: 0; }
}

/* Phones: keep each nav label on one line; whole items wrap instead. */
@media (max-width: 480px) {
    .main-nav a { white-space: nowrap; }
    .main-nav .nav-home { display: none; } /* the logo already goes home */
    .theme-switch__button { width: 32px; height: 32px; }
}

@media (max-width: 350px) {
    .brand-logo img { height: 16px; }
    .main-nav ul { gap: 10px; }
}

/* Author pages and the "about the author" box on articles */
/* The picture sits above the hero, never behind the name. */
.author-cover {
    display: block;
    width: 100%;
    height: 160px;
    object-fit: cover;
}

@media (min-width: 900px) {
    .author-cover { height: 220px; }
}

.author-hero {
    background-color: var(--color-background-ice);
    border-bottom: var(--border-soft);
    padding: 56px 0;
}

.author-hero-inner {
    display: flex;
    align-items: center;
    gap: 32px;
}

.author-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-photo--initial {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-band);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
}

.author-name {
    font-size: 2.5rem;
    margin: 12px 0 4px;
}

.author-role {
    font-family: var(--font-ui);
    color: var(--color-text-muted);
    margin: 0 0 12px;
}

.author-bio {
    max-width: 640px;
    font-size: 1.1rem;
    margin: 0 0 12px;
}

.author-links {
    display: flex;
    gap: 16px;
    font-family: var(--font-ui);
    font-weight: 600;
    margin: 0;
}

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

.author-articles {
    padding-top: 48px;
    padding-bottom: 72px;
}

.author-articles h2 {
    margin-bottom: 24px;
}

.author-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

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

.author-box {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 48px;
    padding: 24px;
    border: var(--border-soft);
    border-radius: var(--border-radius-card);
    background: var(--color-background-ice);
}

.author-box-photo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    font-size: 1.6rem;
}

.author-box-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-text-dark);
}

.author-box p {
    margin: 6px 0 0;
    font-size: 0.95rem;
}

@media (max-width: 700px) {
    .author-hero-inner {
        flex-direction: column;
        text-align: center;
    }

    .author-links {
        justify-content: center;
    }
}

/* 404 */
.error-page {
    max-width: 640px;
    padding-top: 96px;
    padding-bottom: 96px;
    text-align: center;
}

.error-page-mark {
    width: 96px;
    margin: 0 auto 24px;
}

.error-page-code {
    margin-bottom: 8px;
    font-family: var(--font-ui);
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--color-accent);
}
