/* Cosmos independent publisher frontend — Cobalt International Trade & Academic Discovery */
@font-face {
    font-family: 'Manrope';
    src: url('/assets/fonts/Manrope.ttf') format('truetype');
    font-display: swap;
    font-weight: 200 800;
}
@font-face {
    font-family: 'Source Sans 3';
    src: url('/assets/fonts/SourceSans3-Regular.woff2') format('woff2');
    font-display: swap;
    font-weight: 400;
}
@font-face {
    font-family: 'Source Sans 3';
    src: url('/assets/fonts/SourceSans3-Semibold.woff2') format('woff2');
    font-display: swap;
    font-weight: 600;
}

:root {
    --blue: #2543c2;
    --blue-deep: #171c3e;
    --blue-bright: #1736ac;
    --ink: #0f1d38;
    --muted: #4b5c7b;
    --paper: #f0f1f4;
    --surface: #ffffff;
    --line: #dcdfe6;
    --accent: #2742bd;
    --accent-hover: #193197;
    --display-font: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    --body-font: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 24px;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--surface);
    font: 400 17px/1.68 var(--body-font);
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--blue);
    color: #ffffff;
}

input, textarea, select {
    caret-color: var(--accent);
}

h1, h2, h3, h4 {
    font-family: var(--display-font);
    color: inherit;
    margin: 0 0 16px;
    line-height: 1.18;
    letter-spacing: -0.03em;
    font-weight: 700;
    text-wrap: balance;
}

h1 {
    font-size: clamp(28px, 3.6vw, 48px);
}

h2 {
    font-size: clamp(22px, 2.5vw, 32px);
}

h3 {
    font-size: clamp(18px, 1.8vw, 22px);
    line-height: 1.32;
}

p {
    margin: 0 0 16px;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

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

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

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

.cpx-skip {
    position: absolute;
    left: 20px;
    top: -120px;
    z-index: 200;
    background: var(--accent);
    color: #ffffff;
    padding: 12px 20px;
    font: 700 14px/1 var(--display-font);
    border-radius: 3px;
}

.cpx-skip:focus {
    top: 14px;
}

.cpx-wrap {
    width: min(1260px, calc(100% - 64px));
    margin-inline: auto;
}

/* Header & Masthead */
.cpx-header {
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
}

.cpx-edition-masthead {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 74px;
    gap: 24px;
    padding-block: 14px;
}

.cpx-edition-brand {
    display: inline-flex;
    flex-direction: column;
    line-height: 1;
    color: var(--blue);
}

.cpx-edition-brand strong {
    font: 800 clamp(24px, 2.8vw, 34px)/1 var(--display-font);
    letter-spacing: -0.03em;
}

.cpx-edition-brand small {
    font: 700 10px/1.2 var(--display-font);
    letter-spacing: 0.28em;
    color: var(--ink);
    margin-top: 7px;
}

.cpx-edition-brand img {
    max-width: 220px;
    max-height: 68px;
}

.cpx-header-tools {
    display: flex;
    align-items: center;
    gap: 24px;
    font: 600 14px/1.4 var(--display-font);
}

.cpx-header-tools a {
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
}

.cpx-header-tools a:hover {
    color: var(--blue);
}

.cpx-tool-search {
    padding: 6px 10px;
    background: var(--paper);
}

.cpx-tool-search:hover {
    background: rgba(255, 255, 255, 0.18);
}

.cpx-header-tools svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.cpx-nav-row {
    background: var(--blue);
}

.cpx-primary > ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 3px clamp(12px, 1.5vw, 24px);
    margin: 0;
    padding: 0;
}

.cpx-primary > ul > li > a,
.cpx-primary > ul > li > details > summary {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    font: 600 14px/1.4 var(--display-font);
    color: var(--ink);
    cursor: pointer;
    list-style: none;
    border-bottom: 3px solid transparent;
    padding-block: 10px;
}

.cpx-primary > ul > li > a::-webkit-details-marker,
.cpx-primary > ul > li > details > summary::-webkit-details-marker {
    display: none;
}

.cpx-primary > ul > li > a:hover,
.cpx-primary > ul > li > details > summary:hover,
.cpx-primary > ul > li > a[aria-current="page"],
.cpx-primary > ul > li > details > summary[aria-current="page"] {
    color: var(--blue);
    border-bottom-color: currentColor;
}

.cpx-primary details {
    position: relative;
}

.cpx-primary details > summary,
.cm-menu nav details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cpx-primary details > summary::after,
.cm-menu nav details > summary::after {
    content: "";
    width: 6px;
    height: 6px;
    border-right: 1.8px solid currentColor;
    border-bottom: 1.8px solid currentColor;
    transform: rotate(45deg);
    margin-top: -2px;
    flex-shrink: 0;
}

.cpx-primary details > ul {
    position: absolute;
    z-index: 50;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: var(--surface);
    color: var(--ink);
    padding: 12px 0;
    margin: 0;
    list-style: none;
    border-radius: 3px;
    border: 1px solid var(--line);
    box-shadow: 0 18px 36px -8px rgba(7, 25, 63, 0.24);
}

.cpx-primary details > ul li a {
    display: block;
    padding: 9px 20px;
    font: 600 14px/1.4 var(--display-font);
    color: var(--ink);
}

.cpx-primary details > ul li a:hover,
.cpx-primary details > ul li a[aria-current="page"] {
    background: var(--paper);
    color: var(--blue);
}

.cm-menu {
    display: none;
}

.cm-menu-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

/* Buttons */
button, .cpx-button, .cm-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 11px 22px;
    background: var(--blue);
    color: #ffffff;
    border: 1px solid transparent;
    border-radius: 3px;
    font: 700 14px/1.3 var(--display-font);
    cursor: pointer;
    text-decoration: none;
}

button:hover, .cpx-button:hover, .cm-button:hover {
    background: var(--blue-bright);
    color: #ffffff;
}

.cpx-button-light {
    background: var(--accent);
    color: #ffffff;
}

.cpx-button-light:hover {
    background: var(--accent-hover);
    color: #ffffff;
}

.cpx-button-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 11px 22px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 3px;
    font: 700 14px/1.3 var(--display-font);
}

.cpx-button-ghost:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: #ffffff;
}

/* Section Headers */
.cpx-section-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px 24px;
    margin-bottom: 28px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--ink);
}

.cpx-section-head h2 {
    margin: 0;
}

.cpx-section-link {
    font: 700 14px/1.4 var(--display-font);
    color: var(--blue);
}

.cpx-section-link:hover {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Catalogue Shelf & Cards */
.cosmos-catalogue-section {
    padding-block: clamp(44px, 6vw, 76px);
}

.cpx-subject-pills {
    margin-bottom: 28px;
}

.cpx-subject-pills ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.cpx-subject-pills a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 6px 16px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 3px;
    font: 600 14px/1.3 var(--display-font);
    color: var(--ink);
}

.cpx-subject-pills a:hover {
    background: var(--blue);
    color: #ffffff;
    border-color: var(--blue);
}

.cpx-catalogue-grid,
.cpx-related-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px 26px;
}

.cpx-card {
    min-width: 0;
}

.cpx-card-book {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cpx-card-book:hover {
    color: var(--blue);
}

.cpx-cover {
    height: clamp(210px, 22vw, 325px);
    background: var(--paper);
    padding: clamp(16px, 2vw, 32px);
    display: grid;
    place-items: center;
    grid-template-rows: minmax(0, 1fr);
}

.cpx-cover img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 10px 22px -6px rgba(15, 29, 56, 0.25);
}

.cpx-card-copy {
    padding: 14px 0 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 12px;
}

.cpx-card :is(h2, h3) {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 0;
}

.cpx-card :is(h2, h3) a:hover {
    color: var(--blue);
}

.cpx-card-book .cpx-excerpt {
    display: none;
}

.cpx-read {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    font: 700 13px/1.4 var(--display-font);
    color: var(--blue);
}

.cpx-read:hover {
    color: var(--accent);
}

/* Homepage Spotlight */
.cosmos-spotlight {
    background: var(--paper);
    border-block: 1px solid var(--line);
    padding-block: clamp(40px, 5vw, 64px);
}

.cosmos-spotlight-grid {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: clamp(28px, 4.5vw, 56px);
    align-items: center;
}

.cosmos-spotlight-cover {
    background: var(--surface);
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 3px;
    display: grid;
    place-items: center;
}

.cosmos-spotlight-cover img {
    max-height: 260px;
    width: auto;
    object-fit: contain;
    box-shadow: 0 12px 24px -8px rgba(15, 29, 56, 0.25);
}

.cosmos-spotlight-copy h2 {
    font-size: clamp(24px, 2.8vw, 34px);
    margin-bottom: 14px;
}

.cosmos-spotlight-copy p {
    color: var(--muted);
    max-width: 72ch;
    margin-bottom: 22px;
}

/* Services & Workflow Pillars */
.cosmos-services {
    padding-block: clamp(44px, 6vw, 76px);
    border-bottom: 1px solid var(--line);
}

.cosmos-service-pillars {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.cosmos-pillar {
    background: var(--paper);
    border: 1px solid var(--line);
    border-top: 3px solid var(--blue);
    border-radius: 3px;
    padding: 26px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cosmos-pillar h3 {
    margin: 0;
    font-size: 20px;
}

.cosmos-pillar p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
}

/* News & Dispatches */
.cosmos-news-section {
    padding-block: clamp(44px, 6vw, 76px);
}

.cpx-news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}

.cpx-news-card {
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cpx-news-card-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
}

.cpx-news-card time,
.cpx-card time,
.cpx-date {
    font: 700 13px/1.4 var(--display-font);
    color: var(--accent);
}

.cpx-news-card h3 {
    margin: 0;
    font-size: 18px;
}

.cpx-news-card p {
    margin: 0;
    font-size: 15px;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Inner Page Banners & Breadcrumbs */
.cpx-page-banner {
    background: var(--paper);
    color: var(--ink);
    padding-block: clamp(24px, 3vw, 40px);
}

.cpx-page-banner h1 {
    margin: 0;
    color: var(--ink);
    max-width: 40ch;
}

.cpx-crumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font: 600 13px/1.4 var(--display-font);
    color: var(--muted);
    margin-bottom: 14px;
}

.cpx-crumb a {
    color: var(--blue);
}

.cpx-crumb a:hover {
    text-decoration: underline;
}

/* Archive / Search Page */
.cpx-archive,
.cpx-book,
.cpx-article,
.cpx-document,
.cpx-reader-messages {
    padding-bottom: clamp(48px, 6vw, 80px);
}

.cpx-archive {
    padding-top: 36px;
}

.cpx-collection-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
    gap: 24px;
    align-items: end;
    padding-bottom: 24px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

.cpx-collection-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cpx-collection-tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 8px 18px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 3px;
    font: 700 14px/1.3 var(--display-font);
    color: var(--ink);
}

.cpx-collection-tabs a:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.cpx-collection-tabs a[aria-current="page"] {
    background: var(--blue);
    border-color: var(--blue);
    color: #ffffff;
}

.cpx-search-form label {
    display: block;
    font: 700 13px/1.4 var(--display-font);
    margin-bottom: 6px;
    color: var(--ink);
}

.cpx-search-form > div {
    display: flex;
    gap: 8px;
}

input:not([type="hidden"]),
textarea,
select {
    min-width: 0;
    max-width: 100%;
    min-height: 46px;
    border: 1px solid #b5c4dc;
    border-radius: 3px;
    background: var(--surface);
    padding: 10px 14px;
    color: var(--ink);
    font-size: 16px;
}

input:not([type="hidden"]):focus,
textarea:focus,
select:focus {
    border-color: var(--blue);
}

.cpx-search-form input[type="search"] {
    flex: 1;
}

.cpx-results-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    font: 600 14px/1.4 var(--display-font);
    color: var(--muted);
}

.cpx-results-bar p {
    margin: 0;
}

.cpx-results-bar a {
    color: var(--blue);
    font-weight: 700;
}

/* Story / News List in Archive */
.cpx-story-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}

.cpx-card-article {
    display: grid;
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.cpx-card-article:has(.cpx-news-image) {
    grid-template-columns: 240px minmax(0, 1fr);
    align-items: start;
}

.cpx-news-image img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 2px;
}

.cpx-excerpt {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.62;
    margin: 0;
    max-width: 100%;
}

.cpx-empty {
    grid-column: 1 / -1;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 36px;
    text-align: center;
}

.cpx-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin-top: 40px;
    font: 700 14px/1.4 var(--display-font);
}

/* Book Detail Layout */
.cpx-book-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: clamp(32px, 5vw, 64px);
    align-items: start;
    padding-top: 42px;
}

.cpx-book-sidebar {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 24px;
}

.cpx-book-cover {
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 18px;
    margin-bottom: 20px;
    display: grid;
    place-items: center;
}

.cpx-book-cover img {
    max-height: 320px;
    width: auto;
    object-fit: contain;
    box-shadow: 0 12px 26px -8px rgba(15, 29, 56, 0.28);
}

.cpx-facts {
    margin: 0 0 22px;
    font-size: 14px;
}

.cpx-facts > div {
    border-top: 1px solid var(--line);
    padding: 10px 0;
}

.cpx-facts dt {
    font: 700 12px/1.4 var(--display-font);
    color: var(--muted);
}

.cpx-facts dd {
    margin: 3px 0 0;
    font-weight: 600;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.cpx-book-sidebar .cpx-button {
    width: 100%;
}

.cpx-book-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 16px;
    margin-bottom: 28px;
    font: 700 14px/1.4 var(--display-font);
    color: var(--blue);
}

.cpx-prose,
.cpx-document-body {
    max-width: 100%;
    line-height: 1.76;
    overflow-wrap: anywhere;
}

.cpx-prose h2,
.cpx-document-body h2 {
    margin-top: 32px;
    margin-bottom: 14px;
}

.cpx-prose p,
.cpx-document-body p {
    margin-bottom: 18px;
}

/* Article Detail */
.cpx-article .cpx-page-banner .cpx-date {
    color: var(--muted);
    margin-bottom: 10px;
}

.cpx-article-layout {
    padding-top: 40px;
    max-width: 820px;
}

.cpx-article-layout figure {
    margin: 0 0 28px;
}

.cpx-article-layout figure img {
    border-radius: 3px;
    max-height: 480px;
    object-fit: contain;
}

.cpx-related {
    margin-top: 56px;
    padding-top: 36px;
    border-top: 1px solid var(--line);
}

.cpx-story-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.cpx-story-links li {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 20px;
}

.cpx-story-links time {
    display: block;
    font: 700 12px/1.4 var(--display-font);
    color: var(--accent);
    margin-bottom: 8px;
}

.cpx-story-links a {
    font: 700 16px/1.4 var(--display-font);
}

.cpx-story-links a:hover {
    color: var(--blue);
}

/* Document / Single Pages & Markdown TOC */
.cpx-document-body {
    padding-top: 40px;
    max-width: none;
}

.cpx-document-body > p,
.cpx-document-body > ul,
.cpx-document-body > ol,
.cpx-document-body > h2,
.cpx-document-body > h3 {
    max-width: 100%;
}

.cpx-document-body .md-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 44px;
    align-items: start;
}

.cpx-document-body .md-index {
    background: var(--paper);
    border: 1px solid var(--line);
    border-top: 3px solid var(--blue);
    border-radius: 3px;
    padding: 20px;
    display: grid;
    gap: 10px;
    font: 600 14px/1.4 var(--display-font);
}

.cpx-document-body .md-index-label {
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-weight: 800;
}

.cpx-document-body .md-index a {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: baseline;
    gap: 10px;
    color: var(--ink);
}

.cpx-document-body .md-index a > span {
    min-width: 2ch;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    color: var(--blue);
    font-weight: 800;
}

.cpx-document-body .md-content {
    max-width: 100%;
}

.cpx-document-body .md-section {
    margin-bottom: 36px;
    scroll-margin-top: 24px;
}

.cpx-document-body .md-detail {
    display: grid;
    grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.cpx-document-body .md-detail :is(h4, p) {
    margin: 0;
}

.cpx-document-body table {
    width: 100%;
    border-collapse: collapse;
    display: block;
    overflow-x: auto;
}

.cpx-document-body :is(th, td) {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

/* Contact & Enquiry Form */
.cpx-enquiry-form {
    max-width: 780px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-top: 3px solid var(--blue);
    border-radius: 3px;
    padding: clamp(22px, 4vw, 36px);
    margin-top: 28px;
    display: grid;
    gap: 18px;
}

.cpx-enquiry-form label {
    display: block;
    font: 700 14px/1.4 var(--display-font);
}

.cpx-enquiry-form label span {
    font-weight: 400;
    color: var(--muted);
}

.cpx-enquiry-form :is(input:not([type="hidden"]), textarea) {
    display: block;
    width: 100%;
    margin-top: 6px;
}

.cpx-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.cpx-form-note {
    font-size: 14px;
    color: var(--muted);
    margin: 0;
}

.cpx-honeypot {
    position: absolute;
    width: 1px;
    height: 1px;
    clip-path: inset(50%);
    overflow: hidden;
}

.cpx-success {
    padding: 14px 18px;
    background: #e6f0ff;
    border-left: 3px solid var(--blue);
    margin: 0;
    font-weight: 600;
}

.cpx-reader-messages {
    padding-top: 32px;
}

.cpx-reader-messages article {
    max-width: 100%;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 20px;
    margin-bottom: 16px;
}

/* Footer */
.cpx-footer {
    background: var(--blue-deep);
    color: #dbe6fb;
    padding: 64px 0 28px;
    margin-top: 40px;
    border-top: 4px solid var(--blue);
}

.cpx-footer-grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(4, minmax(120px, 1fr));
    gap: 28px;
}

.cpx-footer-wordmark {
    font: 800 22px/1.2 var(--display-font);
    color: #ffffff;
    display: inline-block;
}

.cpx-footer-brand p {
    font-size: 15px;
    color: #a9bee8;
    margin: 14px 0 20px;
    max-width: 44ch;
}

.cpx-footer-cta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font: 600 14px/1.4 var(--display-font);
}

.cpx-footer-link {
    color: #ffffff;
}

.cpx-footer-mail {
    color: var(--ink);
}

.cpx-footer h2 {
    font: 700 15px/1.4 var(--display-font);
    color: #ffffff;
    margin: 0 0 14px;
}

.cpx-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 9px;
    font-size: 14px;
}

.cpx-footer ul a {
    color: #b7caef;
}

.cpx-footer ul a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.cpx-copyright {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    margin-top: 44px;
    padding-top: 22px;
    font-size: 13px;
    color: #8fa9dc;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .cosmos-hero-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .cosmos-hero-stage {
        max-width: 640px;
    }
    .cpx-catalogue-grid,
    .cpx-related-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .cosmos-service-pillars,
    .cpx-news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .cpx-wrap {
        width: calc(100% - 36px);
    }
    .cpx-primary,
    .cpx-header-tools {
        display: none;
    }
    .cm-menu {
        display: block;
    }
    .cpx-edition-masthead {
        position: relative;
        min-height: 72px;
    }
    .cm-menu > summary {
        min-height: 44px;
        cursor: pointer;
        list-style: none;
        font: 700 14px/1 var(--display-font);
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 10px 14px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 3px;
    }
    .cm-menu > summary::-webkit-details-marker {
        display: none;
    }
    .cm-menu > nav {
        position: absolute;
        z-index: 60;
        top: 100%;
        left: -18px;
        right: -18px;
        background: var(--surface);
        color: var(--ink);
        padding: 20px 24px;
        border-bottom: 3px solid var(--accent);
        box-shadow: 0 18px 36px rgba(7, 25, 63, 0.28);
        max-height: 75vh;
        overflow-y: auto;
    }
    .cm-menu nav > ul {
        list-style: none;
        padding: 0;
        margin: 0 0 14px;
    }
    .cm-menu nav a,
    .cm-menu nav summary {
        display: flex;
        align-items: center;
        min-height: 44px;
        font: 600 15px/1.4 var(--display-font);
        color: var(--ink);
    }
    .cm-menu nav > ul > li {
        border-bottom: 1px solid var(--line);
    }
    .cm-menu nav details > ul {
        list-style: none;
        padding: 4px 0 10px 16px;
    }
    .cm-menu-search {
        background: var(--blue);
        color: #ffffff !important;
        justify-content: center;
        border-radius: 3px;
        margin-top: 8px;
    }
    .cosmos-hero-stage {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .cosmos-jacket-card:nth-child(3) {
        display: none;
    }
    .cosmos-jacket-card:nth-child(2) {
        transform: none;
    }
    .cpx-catalogue-grid,
    .cpx-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px 16px;
    }
    .cpx-cover {
        height: 200px;
        padding: 14px;
    }
    .cosmos-spotlight-grid,
    .cosmos-service-pillars,
    .cpx-news-grid,
    .cpx-collection-toolbar,
    .cpx-book-layout,
    .cpx-document-body .md-layout,
    .cpx-form-row,
    .cpx-story-links,
    .cpx-card-article:has(.cpx-news-image) {
        grid-template-columns: 1fr;
    }
    .cpx-book .cpx-page-banner h1 {
        font-size: 22px;
        line-height: 1.32;
    }
    .cpx-article h1 {
        font-size: 22px;
        line-height: 1.32;
    }
    .cpx-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .cpx-footer-brand {
        grid-column: 1 / -1;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .cosmos-jacket-card,
    .cpx-card-book,
    a {
        transition: none;
    }
}

.cpx-card-article .cpx-card-copy { padding: 0; gap: 7px; }
.cpx-card-article h2 { font-size: clamp(19px, 1.8vw, 25px); }
.cpx-prose p, .cpx-document-body .md-content p { text-align: justify; hyphens: auto; }
.cosmos-pillar { border: 0; }
@media (min-width: 761px) and (max-width: 1024px) {
    .cosmos-service-pillars { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (min-width: 761px) and (max-width: 1120px) {
    .cpx-footer-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
    .cpx-footer-brand { grid-column: 1 / -1; }
    .cpx-header-tools > a:not(.cpx-tool-search) { display: none; }
    .cpx-edition-masthead { gap: 14px; }
    .cpx-primary > ul { gap: 3px 13px; }
}

.cpx-mixed-results .cpx-card-book {
    display: grid;
    grid-template-columns: clamp(62px, 10vw, 106px) minmax(0, 1fr);
    gap: clamp(14px, 2vw, 28px);
    align-items: start;
    padding-block: 18px;
    border-bottom: 1px solid var(--line);
}
.cpx-mixed-results .cpx-cover {
    height: auto;
    aspect-ratio: 2 / 3;
    padding: 5px;
}
.cpx-mixed-results .cpx-card-copy {
    padding: 0;
    gap: 7px;
}
.cpx-mixed-results h2 {
    display: block;
    font-size: clamp(18px, 1.8vw, 25px);
}
.cpx-mixed-results .cpx-card-book .cpx-excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}
.cpx-card-page { padding-block: 18px; border-bottom: 1px solid var(--line); }
@media (min-width: 761px) {
    .cpx-related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .cpx-related-grid { grid-template-columns: 1fr; }
    .cpx-related-grid .cpx-card-book { display: grid; grid-template-columns: 72px minmax(0,1fr); gap: 16px; align-items: center; }
    .cpx-related-grid .cpx-cover { height: 106px; padding: 4px; }
    .cpx-related-grid .cpx-card-copy { padding: 0; }
}

.cpx-result-type {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
}
.cpx-results-bar {
    flex-wrap: wrap;
    gap: 8px 16px;
    overflow-wrap: anywhere;
}
.cpx-pagination {
    flex-wrap: wrap;
    gap: 8px 16px;
}
.cpx-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding-inline: 14px;
}
.cpx-document-body .md-index a {
    min-height: 36px;
    align-items: baseline;
}
@media (pointer: coarse) {
    .cpx-document-body .md-index a { min-height: 44px; }
}
@media (min-width: 1024px) and (min-height: 640px) {
    .cpx-document-body .md-index {
        position: sticky;
        top: 1.25rem;
        max-height: calc(100vh - 2.5rem);
        overflow-y: auto;
    }
}

.cpx-document-body .md-index-label {
    cursor: pointer;
    min-height: 44px;
    align-content: center;
    margin: 0;
    text-transform: uppercase;
}
.cpx-document-body .md-index-links {
    display: grid;
    gap: 4px;
    padding-top: 4px;
}
.cpx-document-body .md-index-links a:hover {
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

@media (max-width: 600px) {
    .cpx-document-body .md-detail {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }
}
