/* Cosmos Prize — site styles. Colours and fonts come from theme.json presets. */

:root {
	--cp-ink: var(--wp--preset--color--ink);
	--cp-paper: var(--wp--preset--color--paper);
	--cp-cream: var(--wp--preset--color--cream);
	--cp-sand: var(--wp--preset--color--sand);
	--cp-gold: var(--wp--preset--color--gold);
	--cp-gold-dark: var(--wp--preset--color--gold-dark);
	--cp-body: var(--wp--preset--color--body);
	--cp-muted: var(--wp--preset--color--muted);
	--cp-line: var(--wp--preset--color--line);
	--cp-on-dark: #C9CEDA;
	--cp-serif: var(--wp--preset--font-family--serif);
}

body { margin: 0; }
.cp-main { margin-block-start: 0 !important; }
.wp-site-blocks { padding-left: 0; padding-right: 0; }
.wp-site-blocks > * { margin-block-start: 0; }

/* Inner width wrapper used inside full-width bands */
.cp-inner { max-width: 1200px; margin-left: auto !important; margin-right: auto !important; padding-left: 24px; padding-right: 24px; box-sizing: border-box; }

/* Header */
.cp-header { background: var(--cp-ink); color: var(--cp-cream); }
.cp-header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.cp-brand { display: flex; align-items: center; gap: 12px; color: var(--cp-cream) !important; text-decoration: none; }
.cp-brand svg { width: 44px; height: 44px; flex-shrink: 0; fill: var(--cp-cream); }
.cp-brand-text { display: flex; flex-direction: column; gap: 2px; }
.cp-brand-name { font-family: var(--cp-serif); font-size: 24px; line-height: 1.1; letter-spacing: 0.01em; }
.cp-brand-tag { font-size: 10.5px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--cp-gold); }
.cp-nav { font-size: 15px; gap: 28px; }
@media (max-width: 1180px) { .cp-nav { font-size: 14px; gap: 18px; } }
.cp-nav a { color: var(--cp-cream) !important; text-decoration: none; padding: 12px 0; border-bottom: 2px solid transparent; }
.cp-nav .current-menu-item > a, .cp-nav a:hover { border-bottom-color: var(--cp-gold); }
.cp-nav .wp-block-navigation__responsive-container-open svg { fill: var(--cp-cream); }

/* Footer */
.cp-footer { background: var(--cp-ink); color: #A3ABBE; margin-top: 0; }
.cp-footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-top: 28px; padding-bottom: 28px; font-size: 14px; }
.cp-footer-name { margin: 0; }
.cp-footer-decade img { height: 44px; width: auto; display: block; }

/* Shared type */
.cp-eyebrow { margin: 0; font-size: 14px !important; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cp-gold-dark); }
.cp-lead { font-size: 19px; line-height: 1.6; max-width: 700px; }
.cp-h-small { font-size: 2rem !important; }
.cp-section { padding-top: 88px; padding-bottom: 88px; }
.cp-section-tight { padding-top: 40px; padding-bottom: 96px; }
.cp-section > * + *, .cp-inner > * + * { margin-block-start: 1.25rem; }

/* Dark bands: hero, page heads, contact */
.cp-hero, .cp-pagehead, .cp-band-navy { background: var(--cp-ink); color: var(--cp-cream); }
.cp-hero h1, .cp-hero h2, .cp-pagehead h1, .cp-band-navy h2, .cp-band-navy h3 { color: var(--cp-cream); }
.cp-hero .cp-eyebrow, .cp-pagehead .cp-eyebrow, .cp-band-navy .cp-eyebrow { color: var(--cp-gold); }
.cp-hero p, .cp-pagehead p, .cp-band-navy p { color: var(--cp-on-dark); }
.cp-hero a:not(.wp-block-button__link), .cp-pagehead a, .cp-band-navy a:not(.wp-block-button__link) { color: var(--cp-cream); }
.cp-hero { padding-top: 96px; padding-bottom: 104px; }
.cp-hero .wp-block-columns { align-items: center; gap: 56px; }
.cp-hero h1 { font-size: var(--wp--preset--font-size--xx-large); line-height: 1.04; margin: 0; }
.cp-pagehead { padding-top: 72px; padding-bottom: 80px; }
.cp-pagehead h1 { font-size: clamp(2.4rem, 5vw, 3.5rem); line-height: 1.08; max-width: 860px; margin: 0; }
.cp-hero figure figcaption, .cp-pagehead figure figcaption { color: #A3ABBE; }

/* Light bands */
.cp-band-sand { background: var(--cp-sand); padding-top: 72px; padding-bottom: 80px; }
.cp-band-white { background: #fff; border-bottom: 1px solid var(--cp-line); }

/* Buttons */
.wp-block-button.is-style-cp-gold .wp-block-button__link { background: var(--cp-gold); color: var(--cp-ink); }
.wp-block-button.is-style-cp-gold .wp-block-button__link:hover { background: #F0C46A; color: var(--cp-ink); }
.wp-block-button.is-style-cp-ghost .wp-block-button__link { background: transparent; color: var(--cp-cream); border: 1px solid #5A6782; }
.wp-block-button.is-style-cp-ghost .wp-block-button__link:hover { border-color: var(--cp-gold); color: var(--cp-gold); }
.cp-link-arrow a { font-weight: 600; }

/* Images */
.cp-photo img, .wp-block-image.cp-photo img { border-radius: 6px; width: 100%; height: auto; }
.cp-photo figcaption { font-size: 13px; margin-top: 10px; }

/* Cards */
.cp-card-plain { background: #fff; border: 1px solid var(--cp-line); border-radius: 6px; padding: 36px !important; }
.cp-card-navy { background: var(--cp-ink); color: var(--cp-cream); border-radius: 6px; padding: 36px !important; }
.cp-card-navy h3 { color: var(--cp-cream); }
.cp-card-navy p { color: var(--cp-on-dark); }
.cp-card-navy .cp-eyebrow { color: var(--cp-gold); }
.cp-card-plain h3, .cp-card-navy h3 { font-size: 2rem; margin: 0.4rem 0; }

/* Year steps */
.cp-step { border-top: 2px solid var(--cp-ink); padding-top: 20px; }
.cp-step-num { font-family: var(--cp-serif); font-size: 2rem; color: var(--cp-gold-dark); margin: 0; }
.cp-step h4 { font-family: var(--wp--preset--font-family--sans); font-size: 18px; font-weight: 600; margin: 8px 0; }
.cp-step p { font-size: 16px; color: var(--cp-body); }

/* Edition tiles */
.cp-tile { background: #fff; border: 1px solid var(--cp-line); border-radius: 6px; padding: 28px !important; }
.cp-tile h3 { font-size: 1.6rem; margin: 0; }
.cp-tile h3 a { text-decoration: none; }
.cp-tile p { margin: 4px 0 0; font-size: 15px; color: var(--cp-muted); }

/* Edition cards (National Editions page) */
.cp-edition { background: #fff; border: 1px solid var(--cp-line); border-radius: 6px; padding: 36px !important; }
.cp-edition h2 { font-size: 2.1rem; font-weight: 500; margin: 0; }
.cp-edition .cp-edition-name { font-family: var(--cp-serif); font-style: italic; font-size: 1.3rem; color: var(--cp-gold-dark); margin: 6px 0 12px; }
.cp-edition .cp-since { font-size: 14px; color: var(--cp-muted); margin: 0; }
.cp-edition p { font-size: 16px; color: var(--cp-body); }

/* Latest news strip (home) */
.cp-latest-band { background: #fff; border-bottom: 1px solid var(--cp-line); padding-top: 32px; padding-bottom: 36px; }
.cp-latest-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; }
.cp-latest-head h2 { font-family: var(--wp--preset--font-family--sans); font-size: 14px !important; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cp-gold-dark); margin: 0; }
.cp-latest .wp-block-post-template { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; list-style: none; padding: 0; margin: 20px 0 0; }
.cp-latest .wp-block-post { display: grid; grid-template-columns: 112px 1fr; gap: 6px 16px; align-items: center; }
.cp-latest .wp-block-post-featured-image { grid-row: span 2; margin: 0; }
.cp-latest .wp-block-post-featured-image img { width: 112px; height: 76px; object-fit: cover; border-radius: 4px; }
.cp-latest .wp-block-post-date { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cp-muted); margin: 0; }
.cp-latest .wp-block-post-title { font-size: 1.2rem; line-height: 1.25; margin: 0; }
.cp-latest .wp-block-post-title a { text-decoration: none; }

/* News cards */
.cp-chips { list-style: none; padding: 0; margin: 0 0 32px; display: flex; flex-wrap: wrap; gap: 10px; }
.cp-chips li a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--cp-ink); border-radius: 999px; text-decoration: none; font-size: 15px; background: #fff; }
.cp-chips li.current-cat a, .cp-chips li a:hover { background: var(--cp-ink); color: var(--cp-cream); }
.cp-cards { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; list-style: none; padding: 0; margin: 0; }
.cp-card { background: #fff; border: 1px solid var(--cp-line); border-radius: 6px; overflow: hidden; height: 100%; }
.cp-card .wp-block-post-featured-image { margin: 0; }
.cp-card .wp-block-post-featured-image img { width: 100%; height: 180px; object-fit: cover; display: block; }
.cp-card-body { padding: 24px !important; }
.cp-card-body > * + * { margin-block-start: 10px; }
.cp-card-meta { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.cp-card-meta a { color: var(--cp-gold-dark); text-decoration: none; }
.cp-card .wp-block-post-title { font-size: 1.45rem; line-height: 1.25; margin: 0; }
.cp-card .wp-block-post-title a { text-decoration: none; }
.cp-card-date { font-size: 14px; color: var(--cp-muted); }
.wp-block-query-pagination { margin-top: 48px; justify-content: center; }

/* Single post */
.cp-article { padding-top: 56px; padding-bottom: 64px; }
.cp-back a { font-size: 15px; }
.cp-article-meta { font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cp-gold-dark); gap: 12px; }
.cp-article-meta a { color: var(--cp-gold-dark); text-decoration: none; }
.cp-article .wp-block-post-title { font-size: clamp(2.2rem, 4.5vw, 3rem); line-height: 1.1; }
.cp-article-image img { border-radius: 6px; }
.cp-article .wp-block-post-content { font-size: 18px; line-height: 1.75; color: #24304A; }
.cp-standfirst { font-family: var(--cp-serif); font-size: 1.4rem !important; line-height: 1.5; color: var(--cp-body); }
.cp-bookbox { background: #fff; border: 1px solid var(--cp-line); border-radius: 6px; padding: 28px !important; }
.cp-bookbox h3 { font-family: var(--wp--preset--font-family--sans); font-size: 12px !important; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cp-gold-dark); margin: 0 0 8px; }
.cp-bookbox ul { margin: 0; padding-left: 1.1em; font-size: 16px; }
.cp-shortlist { font-size: 15px; color: var(--cp-body); }

/* Founder, quotes, partners */
.cp-founder { background: #fff; border: 1px solid var(--cp-line); border-radius: 6px; padding: 32px !important; }
.cp-founder .wp-block-image img { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; }
.cp-founder blockquote, .cp-quote { font-family: var(--cp-serif); font-style: italic; font-size: 1.35rem; line-height: 1.5; border: 0; padding: 0; margin: 0; }
.cp-founder-name { font-family: var(--cp-serif); font-size: 1.5rem; margin: 0; }
.cp-founder-role { font-size: 15px; color: var(--cp-muted); margin: 0; }
.cp-partners { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; padding: 0; }
.cp-partners li { border: 1px solid #D8D3C5; border-radius: 4px; padding: 12px 18px; font-size: 15px; }
.cp-aim-num { font-family: var(--cp-serif); font-size: 2rem; color: var(--cp-gold-dark); margin: 0; line-height: 1; }
.cp-dashed { border: 1px dashed #B9B3A2; border-radius: 6px; padding: 48px !important; }
.cp-stat { border-radius: 6px; padding: 28px !important; }
.cp-stat-num { font-family: var(--cp-serif); font-size: 3rem; line-height: 1; margin: 0; color: var(--cp-gold); }
.cp-stat.cp-card-plain .cp-stat-num { color: var(--cp-gold-dark); }

/* Roll of Honour */
.cp-roll-filters { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.cp-roll-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cp-roll-filter > span { font-size: 14px; color: var(--cp-muted); width: 80px; }
.cp-roll-filter button { font: inherit; font-size: 15px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--cp-ink); background: #fff; color: var(--cp-ink); cursor: pointer; }
.cp-roll-filter button[aria-pressed="true"] { background: var(--cp-ink); color: var(--cp-cream); }
.cp-roll-table { width: 100%; border-collapse: collapse; border-top: 2px solid var(--cp-ink); }
.cp-roll-table th { text-align: left; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cp-muted); font-weight: 600; padding: 14px 12px 14px 0; border-bottom: 1px solid var(--cp-line); }
.cp-roll-table td { padding: 18px 12px 18px 0; border-bottom: 1px solid #ECE9E0; vertical-align: baseline; font-size: 15px; }
.cp-roll-year { font-family: var(--cp-serif); font-size: 1.3rem; }
.cp-roll-title { font-family: var(--cp-serif); font-style: italic; font-size: 1.15rem; }
.cp-roll-sub { display: block; font-size: 14px; color: var(--cp-muted); margin-top: 4px; }
.cp-roll-prize { font-size: 14px; font-weight: 600; }
.cp-roll-prize.is-students { color: var(--cp-gold-dark); }
.cp-roll-note { font-size: 14px; color: var(--cp-muted); margin-top: 24px; }
@media (max-width: 781px) {
	.cp-roll-table thead { display: none; }
	.cp-roll-table tr { display: grid; grid-template-columns: 1fr; padding: 14px 0; border-bottom: 1px solid #ECE9E0; }
	.cp-roll-table td { border: 0; padding: 2px 0; }
}

/* Downloads (organisers' page) */
.cp-downloads { list-style: none; padding: 0; display: grid; gap: 12px; }
.cp-downloads li a { display: flex; justify-content: space-between; gap: 16px; padding: 18px 22px; background: #fff; border: 1px solid var(--cp-line); border-radius: 6px; text-decoration: none; font-weight: 600; }

@media (max-width: 781px) {
	.cp-hero { padding-top: 56px; padding-bottom: 64px; }
	.cp-section { padding-top: 64px; padding-bottom: 64px; }
}

/* UN Decade band on the home page */
.cp-undecade-home > .wp-block-columns { align-items: center !important; gap: 48px; }
@media (min-width: 782px) { .cp-undecade-home > .wp-block-columns > .wp-block-column:first-child { flex: 0 0 34% !important; } }
.cp-undecade-home figure { margin: 0; }
.cp-undecade-home figure img { max-width: 340px; width: 100%; height: auto; }
.cp-undecade-home h2 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); }
@media (max-width: 781px) {
  .cp-undecade-home > .wp-block-columns { gap: 20px; }
  .cp-undecade-home figure img { max-width: 260px; }
}

/* Compact headings for pages with long titles (UN Decade page) */
.cp-hero-compact h1 { font-size: clamp(2.1rem, 3.6vw, 3rem); }
.cp-main:has(.cp-hero-compact) h2 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); }
.cp-main:has(.cp-hero-compact) h3 { font-size: 1.3rem; }
