/* Ennui Nation: collection pages. Loaded only by custom-collection.hbs, after screen.css.
   Shared parts first, then one block per collection: each has its own hero, series list, article cards and artwork. */

.en-col { --en-accent: #f5c518; --cx-line: rgba(255, 255, 255, 0.16); --cx-bg: #0b0b0b; }
.en-col[data-collection="foreign-ground"] { --en-accent: #4fc3f7; }
.en-col[data-collection="the-standing-record"] { --en-accent: #ff6b5e; }
.en-col[data-collection="britain-reimagined"] { --en-accent: #7ddc8a; }
.en-col [hidden] { display: none !important; }

.cx-demo-note { margin: 0; padding: 10px 14px; font-size: 1.3rem; text-align: center; color: #000; background: var(--en-accent); border-radius: 6px; }

/* ---------- Hero ---------- */
.cx-hero { position: relative; isolation: isolate; text-align: center; padding: clamp(28px, 6vw, 72px) 0 clamp(20px, 4vw, 36px); }
.cx-hero-art { position: absolute; inset: 0; z-index: -1; color: var(--en-accent); opacity: 0.5; pointer-events: none; -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 45%, #000 20%, transparent 78%); mask-image: radial-gradient(ellipse 70% 80% at 50% 45%, #000 20%, transparent 78%); }
.cx-hero-art svg { display: block; width: 100%; height: 100%; }
.cx-hero-copy { max-width: 760px; margin: 0 auto; }

/* ---------- Artwork and images ---------- */
.cx-media { position: relative; display: block; overflow: hidden; background: var(--cx-bg); color: var(--en-accent); }
.cx-media img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; }
.cx-art { display: block; width: 100%; aspect-ratio: 3 / 2; }
.cx-art svg { display: block; width: 100%; height: 100%; }

/* ---------- Text pieces shared by cards ---------- */
.cx-badge { align-self: flex-start; font-size: 1.2rem; font-weight: 600; letter-spacing: 0.04em; color: var(--en-accent); }
.cx-title, .cx-start-title { font-weight: 600; line-height: 1.25; }
.cx-title { font-size: 1.9rem; }
.cx-excerpt { font-size: 1.5rem; line-height: 1.5; opacity: 0.8; }
.cx-meta { font-size: 1.3rem; opacity: 0.6; }
.cx-card-link, .cx-start-card { position: relative; display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.cx-card-body, .cx-start-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cx-card-link:hover .cx-title, .cx-start-card:hover .cx-start-title, .cx-card-link:focus-visible .cx-title { color: var(--en-accent); }
.cx-mark { display: inline-flex; align-items: center; gap: 8px; }
.cx-mark b { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #000; background: var(--en-accent); }
.cx-mark span { font-size: 1.2rem; font-weight: 600; }

/* ---------- Series explainer (one row open at a time) ---------- */
.cx-lede { margin: 0 0 18px; max-width: 62ch; font-size: 1.6rem; line-height: 1.55; opacity: 0.85; }
.cx-row { border-top: 1px solid var(--cx-line); }
.cx-row:last-child { border-bottom: 1px solid var(--cx-line); }
.cx-row-head { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 10px 4px; font: inherit; font-size: 1.8rem; font-weight: 600; color: inherit; text-align: left; background: none; border: 0; cursor: pointer; }
.cx-row-head:hover, .cx-row-head:focus-visible, .cx-row.is-open .cx-row-name { color: var(--en-accent); }
.cx-row-n { flex: none; min-width: 2.2em; font-size: 1.3rem; font-variant-numeric: tabular-nums; color: var(--en-accent); }
.cx-row-name { flex: 1; min-width: 0; }
.cx-row-count { flex: none; font-size: 1.3rem; font-weight: 400; color: #fff; opacity: 0.6; }
.cx-row-plus { flex: none; width: 20px; text-align: center; color: var(--en-accent); }
.cx-row-plus::after { content: "+"; font-size: 2.2rem; line-height: 1; }
.cx-row.is-open .cx-row-plus::after { content: "\2013"; }
.cx-row-body { padding: 0 4px 20px calc(2.2em + 18px); }
.cx-row-desc { margin: 0 0 12px; max-width: 60ch; font-size: 1.6rem; line-height: 1.55; opacity: 0.9; }
.cx-row-none { margin: 0; font-size: 1.4rem; opacity: 0.6; }
.cx-row-pieces { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.cx-row-pieces a { display: inline-flex; align-items: center; min-height: 44px; font-size: 1.5rem; color: var(--en-accent); text-decoration: underline; text-underline-offset: 4px; }
.cx-group-name { margin: 0 0 6px; font-size: 1.3rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--en-accent); }
.cx-groups { display: grid; grid-template-columns: 1fr; gap: 32px 56px; align-items: start; }
@media (min-width: 900px) { .cx-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Feed header and empty state ---------- */
.cx-feed-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cx-feed { display: grid; grid-template-columns: 1fr; gap: 16px; }

/* ---------- Start here ---------- */
.cx-start-title { font-size: clamp(2.2rem, 1vw + 1.9rem, 3rem); }
.cx-start-card { border: 1px solid var(--cx-line); border-radius: 12px; overflow: hidden; }
.cx-start-card:hover { border-color: var(--en-accent); }
.cx-start-text { padding: 20px; }
@media (min-width: 760px) { .cx-start-card { flex-direction: row; } .cx-start-card .cx-media { flex: none; width: 46%; } .cx-start-card .cx-media img, .cx-start-card .cx-art { height: 100%; min-height: 280px; aspect-ratio: auto; } .cx-start-text { justify-content: center; padding: 32px; } }

/* =========================================================
   Britain in the Margins: the machinery. A ruled ledger, numbered lenses, compact list.
   ========================================================= */
[data-collection="britain-in-the-margins"] .cx-feed { gap: 0; }
[data-collection="britain-in-the-margins"] .cx-card { border-top: 1px solid var(--cx-line); }
[data-collection="britain-in-the-margins"] .cx-card:last-child { border-bottom: 1px solid var(--cx-line); }
[data-collection="britain-in-the-margins"] .cx-card-link { flex-direction: row; align-items: flex-start; gap: 18px; padding: 20px 0; }
[data-collection="britain-in-the-margins"] .cx-card .cx-media { flex: none; width: 104px; border-radius: 6px; border: 1px solid var(--cx-line); }
[data-collection="britain-in-the-margins"] .cx-card .cx-media img, [data-collection="britain-in-the-margins"] .cx-card .cx-art { aspect-ratio: 3 / 2; }
[data-collection="britain-in-the-margins"] .cx-card .cx-excerpt { display: none; }
[data-collection="britain-in-the-margins"] .cx-card-body { flex: 1; }
@media (min-width: 700px) {
    [data-collection="britain-in-the-margins"] .cx-card .cx-media { width: 180px; }
    [data-collection="britain-in-the-margins"] .cx-card .cx-excerpt { display: block; }
    [data-collection="britain-in-the-margins"] .cx-title { font-size: 2.1rem; }
}
[data-collection="britain-in-the-margins"] .cx-start-card { border-radius: 4px; border-left: 4px solid var(--en-accent); }
[data-collection="britain-in-the-margins"] .cx-row-head { font-size: 2rem; }

/* =========================================================
   Foreign Ground: the wide view. Airy, image-led, four sections of series.
   ========================================================= */
[data-collection="foreign-ground"] .en-col-inner { gap: clamp(44px, 8vmin, 84px); }
[data-collection="foreign-ground"] .en-col-title { font-size: clamp(4rem, 4vw + 2.6rem, 8rem); }
[data-collection="foreign-ground"] .cx-hero { padding-top: clamp(40px, 9vw, 110px); padding-bottom: clamp(32px, 6vw, 64px); }
[data-collection="foreign-ground"] .cx-hero-art { opacity: 0.6; }
[data-collection="foreign-ground"] .cx-feed { gap: 36px 24px; }
@media (min-width: 700px) { [data-collection="foreign-ground"] .cx-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
[data-collection="foreign-ground"] .cx-card-link { gap: 16px; }
[data-collection="foreign-ground"] .cx-card .cx-media { border-radius: 14px; }
[data-collection="foreign-ground"] .cx-card .cx-media img, [data-collection="foreign-ground"] .cx-card .cx-art { aspect-ratio: 16 / 10; transition: transform 0.5s ease; }
[data-collection="foreign-ground"] .cx-card-link:hover .cx-media img, [data-collection="foreign-ground"] .cx-card-link:hover .cx-art { transform: scale(1.03); }
[data-collection="foreign-ground"] .cx-title { font-size: 2.3rem; }
@media (min-width: 700px) {
    [data-collection="foreign-ground"] .cx-card:first-child { grid-column: 1 / -1; }
    [data-collection="foreign-ground"] .cx-card:first-child .cx-card-link { flex-direction: row; align-items: center; gap: 32px; }
    [data-collection="foreign-ground"] .cx-card:first-child .cx-media { flex: none; width: 58%; }
    [data-collection="foreign-ground"] .cx-card:first-child .cx-title { font-size: 3rem; }
}
[data-collection="foreign-ground"] .cx-start-card { border: 0; border-radius: 16px; background: rgba(255, 255, 255, 0.04); }
[data-collection="foreign-ground"] .cx-group { padding-top: 6px; }

/* =========================================================
   The Standing Record: a case file. Austere, ruled records with the rung beside each; hero centred like the others.
   ========================================================= */
[data-collection="the-standing-record"] .cx-hero-art { -webkit-mask-image: linear-gradient(90deg, transparent 5%, #000 35%, #000 65%, transparent 95%); mask-image: linear-gradient(90deg, transparent 5%, #000 35%, #000 65%, transparent 95%); opacity: 0.4; }
[data-collection="the-standing-record"] .en-col-title { text-transform: uppercase; letter-spacing: -0.01em; }
[data-collection="the-standing-record"] .en-col-label, [data-collection="the-standing-record"] .cx-group-name, [data-collection="the-standing-record"] .cx-row-n, [data-collection="the-standing-record"] .cx-mark span, [data-collection="the-standing-record"] .cx-meta, [data-collection="the-standing-record"] .cx-badge { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
[data-collection="the-standing-record"] .cx-feed { gap: 0; border-top: 2px solid var(--en-accent); }
[data-collection="the-standing-record"] .cx-card { border-bottom: 1px solid var(--cx-line); }
[data-collection="the-standing-record"] .cx-card-link { display: grid; grid-template-columns: 64px minmax(0, 1fr) 72px; grid-template-areas: "mark body media"; gap: 16px; align-items: start; padding: 18px 0; }
[data-collection="the-standing-record"] .cx-card .cx-media { grid-area: media; width: 72px; border-radius: 4px; border: 1px solid var(--cx-line); }
[data-collection="the-standing-record"] .cx-card .cx-media img, [data-collection="the-standing-record"] .cx-card .cx-art { aspect-ratio: 1 / 1; }
[data-collection="the-standing-record"] .cx-card-body { grid-area: body; }
[data-collection="the-standing-record"] .cx-card .cx-excerpt { display: none; }
[data-collection="the-standing-record"] .cx-card .cx-mark { grid-area: mark; flex-direction: column; align-items: flex-start; gap: 6px; }
[data-collection="the-standing-record"] .cx-card .cx-mark b { width: 36px; height: 36px; font-size: 1.8rem; border-radius: 2px; }
[data-collection="the-standing-record"] .cx-card .cx-mark span { font-size: 1.05rem; line-height: 1.25; text-transform: uppercase; letter-spacing: 0.04em; }
@media (min-width: 700px) {
    [data-collection="the-standing-record"] .cx-card-link { grid-template-columns: 112px minmax(0, 1fr) 120px; gap: 24px; }
    [data-collection="the-standing-record"] .cx-card .cx-media { width: 120px; }
    [data-collection="the-standing-record"] .cx-card .cx-excerpt { display: block; }
}
[data-collection="the-standing-record"] .cx-start-card { border-radius: 2px; border: 1px solid var(--en-accent); }
[data-collection="the-standing-record"] .cx-start-card .cx-mark { position: absolute; top: 12px; left: 12px; z-index: 1; padding: 4px 10px 4px 4px; background: var(--cx-bg); }
[data-collection="the-standing-record"] .cx-start-card .cx-mark b { width: 28px; height: 28px; }
[data-collection="the-standing-record"] .cx-start-card .cx-mark span { color: #fff; }
[data-collection="the-standing-record"] .cx-row-head { font-size: 1.7rem; }

/* =========================================================
   Britain Reimagined: blueprints. Proposal cards, with the grade as the lead mark.
   ========================================================= */
[data-collection="britain-reimagined"] .cx-hero-art { opacity: 0.45; }
[data-collection="britain-reimagined"] .cx-feed { gap: 20px; }
@media (min-width: 700px) { [data-collection="britain-reimagined"] .cx-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
[data-collection="britain-reimagined"] .cx-card-link { height: 100%; border: 1px solid var(--cx-line); border-radius: 12px; overflow: hidden; background: rgba(255, 255, 255, 0.03); }
[data-collection="britain-reimagined"] .cx-card-link:hover { border-color: var(--en-accent); }
[data-collection="britain-reimagined"] .cx-card .cx-media img, [data-collection="britain-reimagined"] .cx-card .cx-art { aspect-ratio: 16 / 9; }
[data-collection="britain-reimagined"] .cx-card-body { padding: 18px 18px 20px; flex: 1; }
[data-collection="britain-reimagined"] .cx-card .cx-mark { position: absolute; top: 12px; left: 12px; padding: 4px 12px 4px 4px; background: var(--cx-bg); border-radius: 999px; }
[data-collection="britain-reimagined"] .cx-card .cx-mark b { width: 34px; height: 34px; font-size: 1.8rem; border-radius: 50%; }
[data-collection="britain-reimagined"] .cx-card .cx-mark span, [data-collection="britain-reimagined"] .cx-start-card .cx-mark span { color: #fff; }
[data-collection="britain-reimagined"] .cx-start-card { border-radius: 14px; background: rgba(255, 255, 255, 0.03); }
[data-collection="britain-reimagined"] .cx-start-card .cx-mark { position: absolute; top: 12px; left: 12px; z-index: 1; padding: 4px 12px 4px 4px; background: var(--cx-bg); border-radius: 999px; }
[data-collection="britain-reimagined"] .cx-start-card .cx-mark b { width: 34px; height: 34px; font-size: 1.8rem; border-radius: 50%; }

/* ---------- Round two: short intro, compact top, paged articles ---------- */
.cx-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.en-col-inner { gap: clamp(28px, 5vmin, 48px); }
.cx-hero { padding: clamp(20px, 4vw, 48px) 0 clamp(8px, 2vw, 16px); }
[data-collection="foreign-ground"] .cx-hero { padding-top: clamp(28px, 6vw, 64px); padding-bottom: clamp(12px, 3vw, 24px); }
[data-collection="foreign-ground"] .en-col-inner { gap: clamp(28px, 5vmin, 52px); }

.cx-about { width: 100%; max-width: 760px; margin: calc(-1 * clamp(8px, 2vmin, 20px)) auto 0; }
.cx-about { text-align: center; }
.cx-about-body { position: relative; }
.cx-about-body ul, .cx-about-body ol { text-align: left; }
.cx-about-body.is-clamped:not(.is-open) { max-height: 6.6em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 62%, transparent); mask-image: linear-gradient(#000 62%, transparent); }
.cx-about-body > :first-child { margin-top: 0; }
.cx-about-more { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 4px; padding: 0 2px; font: inherit; font-size: 1.5rem; font-weight: 600; color: var(--en-accent); background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.cx-about-more:hover, .cx-about-more:focus-visible { color: #fff; }

.cx-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.cx-tab { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; font: inherit; font-size: 1.4rem; font-weight: 600; color: inherit; background: transparent; border: 1px solid rgba(255, 255, 255, 0.34); border-radius: 999px; cursor: pointer; }
.cx-tab:hover, .cx-tab:focus-visible { border-color: var(--en-accent); }
.cx-tab[aria-selected="true"] { color: #000; background: var(--en-accent); border-color: var(--en-accent); }
.cx-tab-n { font-size: 1.2rem; font-weight: 500; opacity: 0.75; }
.cx-groups { display: block; }
.cx-group[hidden] { display: none; }

.cx-row-all { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; padding: 0; font: inherit; font-size: 1.4rem; font-weight: 600; color: #fff; background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.cx-row-all:hover, .cx-row-all:focus-visible { color: var(--en-accent); }
@media (min-width: 900px) {
    [data-collection="the-standing-record"] .cx-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; align-items: start; }
    [data-collection="the-standing-record"] .cx-rows .cx-row:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--cx-line); }
    [data-collection="foreign-ground"] .cx-group { column-count: 1; }
}

.cx-tools { margin: 0 0 16px; }
.cx-search input { width: 100%; max-width: 420px; min-height: 44px; padding: 0 16px; font: inherit; font-size: 1.5rem; color: inherit; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 999px; }
.cx-search input::placeholder { color: rgba(255, 255, 255, 0.55); }
.cx-search input:focus { outline: 0; border-color: var(--en-accent); }
[data-collection="the-standing-record"] .cx-search input { border-radius: 2px; }

.cx-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 28px 0 0; }
.cx-page { min-width: 44px; min-height: 44px; padding: 0 10px; font: inherit; font-size: 1.5rem; font-weight: 600; color: inherit; background: transparent; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 8px; cursor: pointer; }
.cx-page:hover:not(:disabled), .cx-page:focus-visible { border-color: var(--en-accent); }
.cx-page.is-current { color: #000; background: var(--en-accent); border-color: var(--en-accent); }
.cx-page:disabled { opacity: 0.3; cursor: default; }
.cx-page-gap { min-width: 24px; text-align: center; opacity: 0.6; }
.en-col-support .en-col-btn { flex: none; white-space: nowrap; }
.cx-hero-copy { padding-bottom: 4px; }

/* Phone: The Standing Record rows give the title the full width (no thumbnail) and the rung label room to wrap */
@media (max-width: 699px) {
    [data-collection="the-standing-record"] .cx-card-link { grid-template-columns: 84px minmax(0, 1fr); grid-template-areas: "mark body"; gap: 14px; }
    [data-collection="the-standing-record"] .cx-card .cx-media { display: none; }
    [data-collection="the-standing-record"] .cx-card .cx-mark span { overflow-wrap: anywhere; hyphens: auto; }
}

/* Audit fixes (en.25): expanded intro text. Lead paragraphs stay centred; everything after the first heading reads left-aligned. */
.cx-about-body h2, .cx-about-body h3, .cx-about-body h2 ~ *, .cx-about-body h3 ~ * { text-align: left; }
.cx-about-body details, .cx-about-body blockquote { text-align: left; }
.cx-about-body blockquote { margin-left: 0; margin-right: 0; border-left-color: var(--en-accent); }
.cx-about-body a { color: var(--en-accent); }
.cx-about-body details { margin: 16px 0; }
.cx-about-body details > div > p { margin: 0 0 12px; }
.cx-about-body details > div > p:last-child { margin-bottom: 0; }
