/* ============================================================================
   Cute Animal Planet — "Three pens" (cap-theme 1.0.0, 2026-10-06)
   Loads after theme-variables.css and main.css. All site styling lives here.
   A species-column broadsheet: warm paper, hairline column rules, a centred
   stacked masthead over a double rule, photos in thin 4px frames with the
   Garamond title under them, small-caps labels in Libre Franklin, brick
   #B23A2A as the one hue. No cards, no shadows, no text on photographs.
   ========================================================================= */

/* --- Base ------------------------------------------------------------------- */

html { overflow-x: clip; background: var(--tp-paper); }
body {
    background: var(--tp-paper);
    color: var(--tp-ink);
    font-family: var(--tp-text);
    font-size: var(--tp-size-body);
    line-height: var(--tp-lh-body);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--tp-display); color: var(--tp-ink); line-height: var(--tp-lh-head); font-weight: 600; letter-spacing: -0.005em; }
a { color: var(--tp-brick); }
a:hover { color: var(--tp-brick-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--tp-brick); outline-offset: 2px; }
button, input, select, textarea { font-family: var(--tp-text); }
::selection { background: var(--tp-brick); color: var(--tp-on-brick); }
img { background: var(--tp-tint); }

.site-container { max-width: var(--tp-page-max); margin: 0 auto; padding-left: var(--tp-gutter); padding-right: var(--tp-gutter); }
.site-main { padding-top: clamp(1.5rem, 3vw, 2.5rem); padding-bottom: 0.5rem; }

.cap-skip-link { position: absolute; left: -9999px; top: 0; background: var(--tp-brick); color: var(--tp-on-brick); padding: 0.75rem 1rem; z-index: 2000; font-weight: 700; }
.cap-skip-link:focus { left: 1rem; top: 1rem; }

/* Small caps labels: Libre Franklin, tracked. */
.cap-label, .cap-meta, .cap-kicker, .cap-breadcrumb, .cap-pen-count, .cap-pen-more, .cap-rulehead, .cap-archive-count,
.cap-newsletter-label, .cap-fhead, .cap-drawer-label, .cap-toc-count, .cap-contents-cat, .cap-count {
    font-family: var(--tp-text); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600;
}
.cap-label { margin: 0; font-size: 0.75rem; color: var(--tp-meta); }
.cap-meta { margin: 0; font-size: 0.75rem; line-height: 1.5; color: var(--tp-meta); }
.cap-meta a { color: inherit; text-decoration: none; }
.cap-dot { color: var(--tp-rule); padding: 0 0.15em; }
.cap-kicker { margin: 0; font-size: 0.75rem; line-height: 1.4; }
.cap-kicker a { color: var(--tp-brick); text-decoration: none; display: inline-flex; align-items: center; min-height: 28px; }
.cap-kicker a:hover { text-decoration: underline; text-underline-offset: 0.2em; }

/* Framed photo: 1px rule, 4px corners, a thin paper mat. */
.cap-frame { display: block; padding: 5px; background: var(--tp-paper); border: 1px solid var(--tp-rule); border-radius: var(--tp-radius); overflow: hidden; }
.cap-frame img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }
.cap-frame--wide img { aspect-ratio: 16 / 9; }
.cap-frame--photo img { aspect-ratio: 3 / 2; }
.cap-frame--square img { aspect-ratio: 1 / 1; }
.cap-frame--hero img { aspect-ratio: 16 / 9; height: auto; }
a.cap-frame:hover { border-color: var(--tp-brick); }

/* --- Masthead -------------------------------------------------------------------- */

.cap-masthead { background: var(--tp-paper); position: relative; z-index: 100; }
.cap-mast-top {
    max-width: var(--tp-page-max); margin: 0 auto; padding: clamp(1.25rem, 2.5vw, 1.9rem) var(--tp-gutter) 0.9rem;
    display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; gap: 0.5rem;
}
.cap-brand { grid-column: 2; text-align: center; min-width: 0; }
.cap-brand-name { margin: 0; font-size: inherit; line-height: 1; font-weight: inherit; letter-spacing: inherit; }
.cap-wordmark { display: inline-flex; text-decoration: none; color: var(--tp-ink); }
.cap-wordmark:hover { color: var(--tp-ink); }
.cap-logo { display: inline-flex; flex-direction: column; align-items: center; gap: 0.35rem; }
.cap-mark { display: block; width: 34px; height: 34px; color: var(--tp-brick); }
.cap-logo-word { font-family: var(--tp-display); font-weight: 500; font-size: clamp(2.5rem, 1.6rem + 3.4vw, 4.5rem); line-height: 1; letter-spacing: -0.015em; color: var(--tp-ink); white-space: nowrap; }
.cap-tagline { margin: 0.6rem 0 0; font-family: var(--tp-display); font-style: italic; font-size: clamp(1rem, 0.95rem + 0.3vw, 1.1875rem); color: var(--tp-meta); }
.cap-masthead--compact .cap-mast-top { padding-top: 1.1rem; padding-bottom: 0.7rem; }
.cap-masthead--compact .cap-logo { flex-direction: row; gap: 0.6rem; }
.cap-masthead--compact .cap-mark { width: 30px; height: 30px; }
.cap-masthead--compact .cap-logo-word { font-size: clamp(2rem, 1.5rem + 1.8vw, 2.875rem); }

/* Mobile-only controls in the top row. */
.cap-masthead .mobile-menu-toggle, .cap-search-toggle--top { display: none; }

/* Double rule, then the centred nav row. */
.cap-navrow { border-top: 3px double var(--tp-rule-ink); border-bottom: 1px solid var(--tp-rule); max-width: calc(var(--tp-page-max) - 2 * var(--tp-gutter)); margin: 0 auto; }
@media (max-width: 1280px) { .cap-navrow { margin: 0 var(--tp-gutter); } }
.cap-navrow-inner { position: relative; display: flex; align-items: stretch; justify-content: center; min-height: 52px; }
.cap-drawer-clip { display: contents; }
.cap-navrow .main-navigation { min-width: 0; display: flex; justify-content: center; }
.cap-navrow .primary-menu { display: flex; align-items: stretch; justify-content: center; flex-wrap: wrap; gap: 0 0.25rem; list-style: none; margin: 0; padding: 0; }
.cap-navrow .main-navigation li { margin: 0; }
.cap-navrow .main-navigation a {
    display: inline-flex; align-items: center; min-height: 52px; padding: 0 0.9rem; position: relative; white-space: nowrap;
    font-family: var(--tp-text); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tp-ink); text-decoration: none;
}
.cap-navrow .main-navigation a:hover { color: var(--tp-brick); }
.cap-navrow .main-navigation a::after { content: ""; position: absolute; left: 0.9rem; right: 0.9rem; bottom: 12px; height: 2px; background: var(--tp-brick); opacity: 0; }
.cap-navrow .main-navigation .current-cat > a { color: var(--tp-brick); }
.cap-navrow .main-navigation .current-cat > a::after { opacity: 1; }
.cap-navrow .main-navigation .cap-drawer-label, .cap-navrow .main-navigation .cap-drawer-sub { display: none; }
.cap-nav-tools { position: absolute; right: 0; top: 0; bottom: 0; display: flex; align-items: center; gap: 0.5rem; }
.cap-search-toggle, .cap-search-toggle--top {
    width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: 0; color: var(--tp-ink); cursor: pointer; border-radius: var(--tp-radius);
}
.cap-search-toggle:hover { color: var(--tp-brick); }
.cap-masthead .cap-search-toggle--top { display: none; }
.cap-subscribe-btn {
    display: inline-flex; align-items: center; min-height: 36px; padding: 0 0.85rem; border: 1px solid var(--tp-ink); border-radius: 2px;
    font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tp-ink); text-decoration: none;
}
.cap-subscribe-btn:hover { background: var(--tp-ink); color: var(--tp-paper); }
.cap-masthead .mobile-search-form { background: var(--tp-paper); border-bottom: 1px solid var(--tp-rule); }
.cap-masthead .search-field { font-size: 1.0625rem; min-height: 48px; border-radius: var(--tp-radius); border: 1px solid var(--tp-ink); background: var(--tp-paper); color: var(--tp-ink); }
.cap-masthead .mobile-search-form button[type="submit"] { min-height: 48px; border-radius: var(--tp-radius); font-weight: 600; background: var(--tp-brick); color: var(--tp-on-brick); border: 0; }
.cap-masthead .mobile-search-close { background: transparent !important; color: var(--tp-ink) !important; min-width: 44px; min-height: 44px; }

/* Section head: centred small caps between two hairlines. */
.cap-rulehead { display: flex; align-items: center; gap: 1.25rem; margin: 0 0 1.75rem; font-size: 0.8125rem; color: var(--tp-ink); letter-spacing: 0.18em; }
.cap-rulehead::before, .cap-rulehead::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--tp-rule); }

/* --- Breadcrumb ------------------------------------------------------------------- */

.cap-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.5rem; margin: 0 0 0.75rem; font-size: 0.75rem; color: var(--tp-meta); }
.cap-breadcrumb a { display: inline-flex; align-items: center; min-height: 32px; color: var(--tp-meta); text-decoration: none; }
.cap-breadcrumb a:hover { color: var(--tp-brick); }
.cap-breadcrumb [aria-current], .cap-breadcrumb a:last-of-type:not(:first-child) { color: var(--tp-brick); }
.cap-breadcrumb .sep { color: var(--tp-rule); }

/* --- Pens (front page + loop) ------------------------------------------------------- */

.cap-pens { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 clamp(2.25rem, 4vw, 3rem); }
.cap-pen { min-width: 0; padding: 0 clamp(1.25rem, 2.2vw, 2rem); border-left: 1px solid var(--tp-rule); display: flex; flex-direction: column; }
.cap-pen:first-child { padding-left: 0; border-left: 0; }
.cap-pen:last-child { padding-right: 0; }
.cap-pen-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.25rem 0.75rem; flex-wrap: wrap; min-height: calc(2.125rem * 1.05 + 0.6rem); margin: 0 0 1.1rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--tp-ink); }
.cap-pen-name { margin: 0; font-size: clamp(1.75rem, 1.4rem + 0.8vw, 2.125rem); font-weight: 500; line-height: 1.05; }
.cap-pen-name a { color: var(--tp-ink); text-decoration: none; }
.cap-pen-name a:hover { color: var(--tp-brick); }
.cap-pen-count { font-size: 0.75rem; color: var(--tp-meta); }
.cap-pen-count::before { content: "— "; }
.cap-pen-lines { margin-top: 0.4rem; }
.cap-pen-more { display: inline-flex; align-items: center; min-height: 44px; margin-top: auto; padding-top: 0.6rem; font-size: 0.8125rem; text-decoration: none; color: var(--tp-brick); }
.cap-pen-more:hover { text-decoration: underline; text-underline-offset: 0.25em; }

/* A story: framed photo, Garamond title under it. */
.cap-story { min-width: 0; display: flex; flex-direction: column; gap: 0.55rem; margin-bottom: 0.75rem; }
.cap-story .cap-frame { margin-bottom: 0.35rem; }
.cap-story-title { margin: 0; font-size: clamp(1.4rem, 1.25rem + 0.5vw, 1.6875rem); font-weight: 600; line-height: 1.15; text-wrap: balance; }
.cap-story-title a { color: var(--tp-ink); text-decoration: none; }
.cap-story-title a:hover { color: var(--tp-brick); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
.cap-story-dek { margin: 0; font-size: 1rem; line-height: 1.55; color: var(--tp-meta); }

/* A headline row. */
.cap-line { padding: 0.85rem 0; border-top: 1px solid var(--tp-rule); }
.cap-line-meta, .cap-line-kicker { margin-bottom: 0.2rem; }
.cap-line-title { margin: 0; font-size: 1.25rem; font-weight: 500; line-height: 1.25; text-wrap: balance; }
.cap-line-title a { color: var(--tp-ink); text-decoration: none; display: inline; }
.cap-line-title a:hover { color: var(--tp-brick); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
.cap-line-dek { margin: 0.3rem 0 0; font-size: 0.9375rem; line-height: 1.5; color: var(--tp-meta); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Hairline-divided column bands (Also new, From the archive, More from). */
.cap-band { margin: 0 0 clamp(2.25rem, 4vw, 3rem); }
.cap-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cap-cols > * { min-width: 0; padding: 0 clamp(1.25rem, 2.2vw, 2rem); border-left: 1px solid var(--tp-rule); }
.cap-cols > :nth-child(3n + 1) { padding-left: 0; border-left: 0; }
.cap-cols > :nth-child(3n) { padding-right: 0; }
.cap-cols--lines > .cap-line { border-top: 0; padding-top: 0; padding-bottom: 1.25rem; }
.cap-cols--lines > .cap-line:nth-child(n + 4) { border-top: 1px solid var(--tp-rule); padding-top: 1.1rem; }
.cap-cols--stories > .cap-story:nth-child(n + 4) { margin-top: 1.25rem; }
.cap-old-title { margin: 0 0 0.4rem; font-family: var(--tp-display); font-style: italic; font-weight: 400; font-size: clamp(1.3rem, 1.2rem + 0.4vw, 1.5rem); line-height: 1.25; }
.cap-old-title a { color: var(--tp-ink); text-decoration: none; }
.cap-old-title a::before { content: "\201C"; }
.cap-old-title a::after { content: "\201D"; }
.cap-old-title a:hover { color: var(--tp-brick); text-decoration: underline; text-decoration-thickness: 1px; }

/* --- Ad frames: labelled, reserved; collapse when unfilled ------------------------------ */

.cap-ad { text-align: center; border-top: 1px solid var(--tp-rule); border-bottom: 1px solid var(--tp-rule); padding: 0.75rem 0 1rem; min-height: 280px; }
.cap-ad::before { content: "Advertisement"; display: block; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--tp-meta); margin-bottom: 0.6rem; }
.cap-ad:has(ins[data-ad-status="unfill-optimized"]), .cap-ad:has(ins[data-ad-status="unfilled"]) { display: none; }
.cap-ad--wide { max-width: 970px; margin: 0 auto clamp(2.25rem, 4vw, 3rem); min-height: 130px; }
.cap-ad-placeholder { border: 1px dashed var(--tp-rule); padding: 2rem 1rem; color: var(--tp-meta); font-size: 0.875rem; margin: 0 1rem; }

/* --- Archive -------------------------------------------------------------------------- */

.cap-archive-head { text-align: center; margin: 0 auto clamp(2rem, 4vw, 2.75rem); padding-bottom: 1.5rem; border-bottom: 3px double var(--tp-rule); max-width: 820px; }
.cap-archive-head .cap-breadcrumb { justify-content: center; }
.cap-archive-title { margin: 0; font-size: clamp(2.75rem, 2rem + 3vw, 4.5rem); font-weight: 500; line-height: 1; text-wrap: balance; }
.cap-archive-line { margin: 0.75rem auto 0; max-width: 36em; font-family: var(--tp-display); font-style: italic; font-size: clamp(1.1875rem, 1.1rem + 0.4vw, 1.4375rem); line-height: 1.4; color: var(--tp-meta); }
.cap-archive-count { display: inline-block; margin: 0.9rem 0 0; padding: 0.35em 0.8em; font-size: 0.75rem; color: var(--tp-ink); background: var(--tp-tint); border-radius: 2px; }
.cap-archive-head--search .search-form { display: flex; gap: 0.5rem; max-width: 520px; margin: 1.1rem auto 0; }
.cap-archive-head--search .search-field, .cap-empty .search-field { flex: 1 1 auto; min-width: 0; min-height: 48px; padding: 0 0.9rem; border: 1px solid var(--tp-ink); border-radius: var(--tp-radius); background: var(--tp-paper); color: var(--tp-ink); font-size: 1rem; }
.cap-archive-head--search .search-submit, .cap-empty .search-submit { min-height: 48px; padding: 0 1.2rem; border: 0; border-radius: var(--tp-radius); background: var(--tp-brick); color: var(--tp-on-brick); font-weight: 600; cursor: pointer; }
.cap-pens--loop .cap-line-title { font-size: 1.25rem; }

/* Pager: square 48px boxes, centred. */
.cap-pager { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; margin: 0.5rem 0 1rem; }
.cap-pager .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; }
.cap-pager .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; height: 48px; padding: 0 0.6rem; border: 1px solid var(--tp-rule); border-radius: 2px; background: var(--tp-paper); color: var(--tp-ink); font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums; }
.cap-pager a.page-numbers:hover { border-color: var(--tp-brick); color: var(--tp-brick); }
.cap-pager .page-numbers.current { background: var(--tp-brick); border-color: var(--tp-brick); color: var(--tp-on-brick); }
.cap-pager .page-numbers.dots { border: 0; background: transparent; min-width: 24px; }
.cap-pager-count { margin: 0; font-size: 0.75rem; color: var(--tp-meta); text-transform: uppercase; letter-spacing: 0.1em; }

/* --- Single ------------------------------------------------------------------------------ */

.cap-article-head { max-width: 900px; margin: 0 0 1.75rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--tp-rule); }
.cap-title { margin: 0; font-size: var(--tp-title); font-weight: 500; line-height: 1.08; text-wrap: balance; }
.cap-standfirst { margin: 0.9rem 0 0; max-width: 42em; font-family: var(--tp-display); font-style: italic; font-size: clamp(1.1875rem, 1.1rem + 0.4vw, 1.4375rem); line-height: 1.45; color: var(--tp-meta); }
.cap-article-meta { margin: 0.9rem 0 0; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tp-meta); }
.cap-article-meta a { color: var(--tp-brick); text-decoration: none; display: inline-flex; min-height: 32px; align-items: center; }

.cap-layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--tp-sidebar); gap: 0; align-items: start; }
.cap-layout-main { min-width: 0; padding-right: var(--tp-side-gap); border-right: 1px solid var(--tp-rule); }
.cap-layout > .cap-sidebar { padding-left: var(--tp-side-gap); }
.cap-hero { margin: 0 0 1.75rem; }
.cap-caption { font-size: 0.9375rem; line-height: 1.5; color: var(--tp-meta); padding: 0.55rem 0.1rem 0; }

.cap-article { min-width: 0; }
.cap-article .entry-content { font-size: var(--tp-size-body); line-height: var(--tp-lh-body); color: var(--tp-ink); }
.cap-article .entry-content > * { max-width: 100%; }
.cap-article .entry-content p { text-wrap: pretty; }
.cap-article .entry-content h2 { position: relative; font-size: var(--tp-h2); font-weight: 600; margin: 3rem 0 1rem; padding: 1.1rem 0 0; border: 0; scroll-margin-top: 1.5rem; text-wrap: balance; }
.cap-article .entry-content h2::before { content: ""; position: absolute; top: 0; left: 0; width: 2.5rem; height: 2px; background: var(--tp-brick); }
.cap-h2-num { margin-right: 0.25em; color: var(--tp-brick); font-feature-settings: "lnum"; }
.cap-article .entry-content h3 { font-size: var(--tp-h3); margin: 2rem 0 0.75rem; scroll-margin-top: 1.5rem; }
.cap-article .entry-content h4 { font-family: var(--tp-text); font-weight: 700; font-size: 1.0625rem; }
.cap-article .entry-content a { color: var(--tp-brick); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
.cap-article .entry-content a:hover { color: var(--tp-brick-dark); text-decoration-thickness: 2px; }
.cap-article .entry-content strong { font-weight: 700; color: var(--tp-ink); }
.cap-article .entry-content figure { margin: 2.25rem 0; }
.cap-article .entry-content figure img, .cap-article .entry-content p > img { display: block; padding: 5px; background: var(--tp-paper); border: 1px solid var(--tp-rule); border-radius: var(--tp-radius); height: auto; box-shadow: none; }
.cap-article .entry-content figcaption { text-align: left; font-style: normal; font-size: 0.9375rem; line-height: 1.5; color: var(--tp-meta); padding-top: 0.55rem; }
.cap-article .entry-content ol, .cap-article .entry-content ul { padding-left: 1.5rem; }
.cap-article .entry-content li { margin-bottom: 0.5rem; }
.cap-article .entry-content li::marker { color: var(--tp-brick); font-weight: 700; }
.cap-article .entry-content blockquote { border: 0; border-left: 2px solid var(--tp-brick); background: transparent; margin: 2rem 0; padding: 0.25rem 0 0.25rem 1.25rem; font-family: var(--tp-display); font-style: italic; font-size: 1.3125rem; line-height: 1.5; color: var(--tp-ink); }
.cap-article .entry-content blockquote p { margin: 0; }
.cap-article .entry-content blockquote p + p { margin-top: 0.75rem; }
.cap-article .entry-content hr { border: 0; border-top: 1px solid var(--tp-rule); }
.table-scroll { overflow-x: auto; margin: 1.75rem 0; -webkit-overflow-scrolling: touch; border-top: 1px solid var(--tp-ink); border-bottom: 1px solid var(--tp-ink); }
.table-scroll table { min-width: 560px; margin: 0; }
.cap-article .entry-content table { border-collapse: collapse; width: 100%; font-size: 0.95em; background: transparent; }
.cap-article .entry-content th { background: var(--tp-tint); color: var(--tp-ink); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; text-align: left; border-bottom: 1px solid var(--tp-rule); }
.cap-article .entry-content td, .cap-article .entry-content th { border-bottom: 1px solid var(--tp-rule); padding: 0.75rem 0.9rem; vertical-align: top; min-width: 9rem; }
.cap-article .entry-content tr:last-child td { border-bottom: 0; }
.cap-article .entry-content td:first-child, .cap-article .entry-content th:first-child { position: sticky; left: 0; z-index: 1; }
.cap-article .entry-content td:first-child { background: var(--tp-paper); font-weight: 600; }

/* "In this story" (the article's own contents block, cap_toc_panel). */
.cap-toc { margin: 1.5rem 0 2rem; background: var(--tp-tint); border-radius: var(--tp-radius); }
.cap-toc summary { display: flex; align-items: center; gap: 1rem; min-height: 56px; padding: 0.5rem 1.25rem; cursor: pointer; list-style: none; }
.cap-toc summary::-webkit-details-marker { display: none; }
.cap-toc summary::after { content: "+"; font-size: 1.5rem; color: var(--tp-brick); margin-left: 0.25rem; }
.cap-toc[open] summary::after { content: "−"; }
.cap-toc-title { font-family: var(--tp-display); font-size: 1.3125rem; font-weight: 600; }
.cap-toc-count { margin-left: auto; font-size: 0.75rem; color: var(--tp-meta); }
.cap-article .entry-content .cap-toc-list { list-style: none; margin: 0; padding: 0.25rem 1.25rem 1rem; border-top: 1px solid var(--tp-rule); counter-reset: captoc; }
.cap-article .entry-content .cap-toc-list li { margin: 0; padding: 0; counter-increment: captoc; }
.cap-article .entry-content .cap-toc-list li::marker { content: none; }
.cap-article .entry-content .cap-toc-list a { display: flex; gap: 0.75rem; align-items: baseline; min-height: 44px; padding: 0.5rem 0; border-bottom: 1px solid var(--tp-rule); color: var(--tp-ink); text-decoration: none; font-size: 1.0625rem; line-height: 1.4; }
.cap-article .entry-content .cap-toc-list li:last-child a { border-bottom: 0; }
.cap-article .entry-content .cap-toc-list a::before { content: counter(captoc); flex: none; min-width: 1.4rem; font-family: var(--tp-display); color: var(--tp-brick); font-weight: 600; }
.cap-article .entry-content .cap-toc-list a:hover { color: var(--tp-brick); text-decoration: underline; }

/* Article pager (posts split with <!--nextpage-->): numbers only. */
.cap-page-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin: 2.25rem 0 0.5rem; }
.entry-content .cap-page-links .post-page-numbers {
    display: inline-flex; align-items: center; justify-content: center; min-width: 48px; height: 48px; padding: 0 0.75rem;
    border: 1px solid var(--tp-rule); border-radius: 2px; background: var(--tp-paper); color: var(--tp-ink);
    font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums;
}
.entry-content .cap-page-links a.post-page-numbers:hover { border-color: var(--tp-brick); color: var(--tp-brick); }
.entry-content .cap-page-links .post-page-numbers.current { background: var(--tp-brick); border-color: var(--tp-brick); color: var(--tp-on-brick); }

.cap-share { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.25rem; margin: 2.5rem 0 0; padding: 0.3rem 0; border-top: 1px solid var(--tp-rule); border-bottom: 1px solid var(--tp-rule); }
.cap-share a { text-decoration: none; font-weight: 600; font-size: 0.9375rem; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }
.cap-share a:hover { text-decoration: underline; }

/* More from <section>. */
.cap-related { margin: clamp(2.5rem, 5vw, 3.5rem) 0 1rem; padding-top: 1.25rem; border-top: 3px double var(--tp-rule); }
.cap-related-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0 0 1.5rem; }
.cap-related-head h2 { margin: 0; font-size: var(--tp-h2); font-weight: 500; }
.cap-related-head a { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; }
.cap-related-head a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
.cap-related .cap-story-title { font-size: clamp(1.25rem, 1.15rem + 0.35vw, 1.4375rem); }

.comments-area { margin-top: 2rem; padding-top: 0; border-top: 0; }
.comments-area .comments-title, .comments-area .comment-reply-title { font-size: var(--tp-h3); }
.comments-area .comment-list { list-style: none; padding: 0; }
.comments-area .comment-respond { margin: 0; background: var(--tp-tint); border: 0; border-radius: var(--tp-radius); }
.comments-area label, .comments-area .comment-notes, .comments-area .logged-in-as { color: var(--tp-meta); }
.comments-area input:not([type="checkbox"]):not([type="submit"]), .comments-area textarea { border-radius: var(--tp-radius); border: 1px solid var(--tp-ink); background: var(--tp-paper); color: var(--tp-ink); }
.comments-area input:focus, .comments-area textarea:focus { border-color: var(--tp-brick); outline: none; }
.comments-area .submit, .comments-area #submit { background: var(--tp-brick) !important; border: none; border-radius: var(--tp-radius) !important; color: var(--tp-on-brick) !important; font-weight: 600; min-height: 48px; padding: 0 1.5rem; cursor: pointer; }
.comments-area .submit:hover, .comments-area #submit:hover { background: var(--tp-brick-dark) !important; }
.comments-area .comment-body { background: transparent; border: 0; border-bottom: 1px solid var(--tp-rule); border-radius: 0; }
.comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 0.5rem; }
.comment-form-cookies-consent input { flex: 0 0 auto; margin: 0.3rem 0 0; }
.comment-form-cookies-consent label { margin: 0; }

/* --- Sidebar -------------------------------------------------------------------------- */

.cap-sidebar { display: flex; flex-direction: column; gap: 2rem; min-width: 0; }
.cap-widget { background: transparent; border: 0; padding: 0; }
.cap-widget-title { margin: 0 0 0.6rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--tp-ink); font-size: 1.5rem; font-weight: 500; }
.cap-contents { list-style: none; margin: 0; padding: 0; }
.cap-contents li { display: flex; gap: 0.85rem; align-items: flex-start; margin: 0; padding: 0.75rem 0; border-bottom: 1px solid var(--tp-rule); }
.cap-contents li:last-child { border-bottom: 0; }
.cap-contents-num { flex: none; min-width: 1.1rem; font-family: var(--tp-display); font-size: 1.75rem; line-height: 1; color: var(--tp-brick); font-feature-settings: "lnum"; }
.cap-contents-text { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.cap-contents-cat { font-size: 0.6875rem; color: var(--tp-meta); }
.cap-contents-title { font-family: var(--tp-display); font-size: 1.1875rem; line-height: 1.25; color: var(--tp-ink); text-decoration: none; }
.cap-contents-title:hover { color: var(--tp-brick); text-decoration: underline; text-decoration-thickness: 1px; }
.cap-deptlist { list-style: none; margin: 0; padding: 0; }
.cap-deptlist li { margin: 0; border-bottom: 1px solid var(--tp-rule); }
.cap-deptlist li:last-child { border-bottom: 0; }
.cap-deptlist a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 46px; color: var(--tp-ink); text-decoration: none; font-size: 1rem; }
.cap-deptlist a:hover span:first-child, .cap-deptlist a.is-current span:first-child { color: var(--tp-brick); text-decoration: underline; text-underline-offset: 0.18em; }
.cap-deptlist .cap-count { font-size: 0.75rem; color: var(--tp-meta); font-variant-numeric: tabular-nums; }
.cap-widget-news { background: var(--tp-tint); padding: 1.25rem; border-radius: var(--tp-radius); }
.cap-widget-news .cap-widget-title { font-size: 1.375rem; border-bottom: 0; padding-bottom: 0; margin-bottom: 0.9rem; }
.cap-widget-news .newsletter-form { display: flex; flex-direction: column; gap: 0.6rem; }
.cap-widget-news input[type="email"] { min-height: 48px; padding: 0 0.85rem; border: 1px solid var(--tp-ink); border-radius: var(--tp-radius); background: var(--tp-paper); color: var(--tp-ink); font-size: 1rem; }
.cap-widget-news button, .cap-newsletter button { min-height: 48px; padding: 0 1.25rem; border: 0; border-radius: var(--tp-radius); background: var(--tp-ink); color: var(--tp-paper); font-weight: 600; font-size: 0.875rem; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; }
.cap-widget-news button:hover, .cap-newsletter button:hover { background: var(--tp-brick); }
.cap-newsletter-note { margin: 0.6rem 0 0 !important; font-size: 0.8125rem !important; color: var(--tp-meta); }
.cap-sidebar .cap-ad { min-height: 280px; }

/* --- Newsletter box ------------------------------------------------------------------- */

.cap-newsletter { max-width: var(--tp-page-max); margin: clamp(1.5rem, 3vw, 2.5rem) auto clamp(2.5rem, 5vw, 3.5rem); padding: 0 var(--tp-gutter); }
.cap-newsletter-inner { position: relative; max-width: 760px; margin: 0 auto; padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.25rem, 4vw, 3rem); border: 1px solid var(--tp-ink); text-align: center; }
.cap-newsletter-label { margin: 0; font-size: 0.75rem; color: var(--tp-brick); }
.cap-newsletter-inner > .cap-newsletter-label { position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%); padding: 0 0.9rem; background: var(--tp-paper); white-space: nowrap; }
.cap-widget-news .cap-newsletter-label { margin-bottom: 0.35rem; }
.cap-newsletter h2 { margin: 0 0 0.5rem; font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem); font-weight: 500; }
.cap-newsletter-dek { margin: 0 auto 1.25rem; max-width: 34rem; font-family: var(--tp-display); font-style: italic; font-size: 1.1875rem; line-height: 1.45; color: var(--tp-meta); }
.cap-newsletter .newsletter-form { display: flex; gap: 0.6rem; max-width: 520px; margin: 0 auto; }
.cap-newsletter input[type="email"] { flex: 1 1 auto; min-width: 0; min-height: 50px; padding: 0 1rem; border: 1px solid var(--tp-rule); border-radius: var(--tp-radius); background: #FFFFFF; color: var(--tp-ink); font-size: 1.0625rem; }
.cap-newsletter button { min-height: 50px; white-space: nowrap; flex: none; }
.newsletter-message { margin-top: 0.75rem; font-weight: 600; }

/* --- Footer ------------------------------------------------------------------------------ */

.cap-footer { background: var(--tp-paper); }
.cap-footer-inner { max-width: calc(var(--tp-page-max) - 2 * var(--tp-gutter)); margin: 0 auto; padding: clamp(2rem, 4vw, 2.75rem) 0 clamp(1.75rem, 3vw, 2.25rem); border-top: 3px double var(--tp-rule-ink); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.25rem; }
@media (max-width: 1280px) { .cap-footer-inner { margin: 0 var(--tp-gutter); } }
.cap-footer-word { display: inline-flex; text-decoration: none; color: var(--tp-ink); }
.cap-logo--footer { flex-direction: row; gap: 0.55rem; }
.cap-logo--footer .cap-mark { width: 28px; height: 28px; }
.cap-logo--footer .cap-logo-word { font-size: 2rem; }
.cap-footer-about { margin: 0.4rem 0 1.25rem; font-family: var(--tp-display); font-style: italic; font-size: 1.125rem; color: var(--tp-meta); }
.cap-frow { width: 100%; }
.cap-frow + .cap-frow { border-top: 1px solid var(--tp-rule); }
.cap-frow--topics { padding-bottom: 0.5rem; }
.cap-fhead { margin: 0 0 0.25rem; font-size: 0.75rem; color: var(--tp-brick); }
.cap-flist { list-style: none; margin: 0; padding: 0.35rem 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 1.5rem; }
.cap-flist li { margin: 0; }
.cap-flist a { display: inline-flex; align-items: center; min-height: 44px; color: var(--tp-ink); text-decoration: none; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.cap-flist a:hover { color: var(--tp-brick); text-decoration: underline; text-underline-offset: 0.25em; }
.cap-frow--topics .cap-flist a { font-family: var(--tp-display); font-size: 1.0625rem; letter-spacing: 0; text-transform: none; font-weight: 500; }
.cap-footer-owner { margin: 1.25rem 0 0; font-size: 0.9375rem; color: var(--tp-meta); }
.cap-footer-owner a { display: inline-flex; align-items: center; min-height: 40px; font-weight: 600; }
.cap-colophon { margin: 0.25rem 0 0; max-width: 46rem; font-size: 0.8125rem; line-height: 1.6; color: var(--tp-meta); }

/* --- Static pages, empty states ------------------------------------------------------------ */

.cap-page { max-width: 820px; margin: 0 auto 0.5rem; }
.cap-empty { max-width: 680px; margin: 0 auto 2rem; padding: 2.5rem 1.5rem; text-align: center; border-top: 1px solid var(--tp-ink); border-bottom: 1px solid var(--tp-ink); }
.cap-empty h1, .cap-empty h2 { font-size: var(--tp-title); font-weight: 500; margin: 0.5rem 0 0.75rem; }
.cap-empty .search-form { display: flex; gap: 0.5rem; justify-content: center; margin-top: 1.25rem; }
.cap-deptlist--chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 1.25rem; }
.cap-deptlist--chips li { border: 0; }
.cap-deptlist--chips a { padding: 0 1rem; border: 1px solid var(--tp-rule); border-radius: 2px; }

.cap-page-head { text-align: center; margin: 0 0 2rem; padding: 0 0 1.5rem; border-bottom: 3px double var(--tp-rule); }
.cap-page-kicker { margin: 0 0 .5rem; font-size: 0.75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--tp-brick); }
.cap-page-head .cap-page-title { margin: 0; font-family: var(--tp-display); font-size: var(--tp-title); font-weight: 500; line-height: var(--tp-lh-head); color: var(--tp-ink); text-wrap: balance; }
.cap-page-standfirst { margin: .75rem auto 0; font-family: var(--tp-display); font-style: italic; font-size: 1.3125rem; line-height: 1.45; color: var(--tp-meta); max-width: 36rem; }
.cap-page-updated { margin: .9rem 0 0; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tp-meta); }
.cap-page .entry-content { font-size: var(--tp-size-body); line-height: var(--tp-lh-body); }
.cap-page .entry-content h2 { font-family: var(--tp-display); font-size: clamp(1.5rem, 1.3rem + .6vw, 1.875rem); font-weight: 600; line-height: 1.2; margin: 2.25rem 0 .75rem; padding-bottom: 0; border-bottom: 0; scroll-margin-top: 1.25rem; }
.cap-page .entry-content h2:first-child { margin-top: 0; }
.cap-page .entry-content a { color: var(--tp-brick); }
.cap-onpage { margin: 0 0 2rem; padding: 1rem 1.25rem; background: var(--tp-tint); border-radius: var(--tp-radius); }
.cap-onpage-title { margin: 0 0 .5rem; padding-bottom: .5rem; border-bottom: 1px solid var(--tp-rule); font-family: var(--tp-display); font-size: 1.25rem; font-weight: 600; color: var(--tp-ink); }
.cap-page .entry-content .cap-onpage ol { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 2rem; }
.cap-page .entry-content .cap-onpage li { margin: 0; padding: 0; break-inside: avoid; }
.cap-page .entry-content .cap-onpage li::marker { content: none; }
.cap-page .entry-content .cap-onpage a { display: flex; gap: .6rem; align-items: baseline; min-height: 44px; padding: .45rem 0; color: var(--tp-ink); text-decoration: none; font-weight: 600; line-height: 1.35; }
.cap-page .entry-content .cap-onpage a:hover span:last-child { color: var(--tp-brick); text-decoration: underline; }
.cap-onpage-num { flex: none; color: var(--tp-brick); font-family: var(--tp-display); }
.cap-page-ask { margin: 2rem 0 0; padding: 1rem 0; border-top: 1px solid var(--tp-rule); }
.cap-page-ask-title { margin: 0 0 .25rem; font-family: var(--tp-display); font-weight: 600; font-size: 1.25rem; }
.cap-page-ask p { margin: 0; }
.cap-page-ask a, .cap-contact-email a { display: inline-flex; align-items: center; min-height: 44px; color: var(--tp-brick); font-weight: 600; }
.cap-contact-intro { margin: 0 0 1.5rem; padding: 0 0 1.25rem; border-bottom: 1px solid var(--tp-rule); }
.cap-contact-intro p { margin: 0 0 .5rem; }
.cap-contact-email { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.cap-page .inedit-form-group { margin: 0 0 1rem; display: flex; flex-direction: column; gap: .35rem; }
.cap-page .inedit-form-group label { font-weight: 600; }
.cap-page .inedit-form-group input, .cap-page .inedit-form-group textarea { font: inherit; min-height: 48px; padding: .6rem .8rem; border: 1px solid var(--tp-ink); border-radius: var(--tp-radius); background: #FFFFFF; color: var(--tp-ink); }
.cap-page .inedit-form-group textarea { min-height: 160px; }
.cap-page .inedit-contact-submit { min-height: 48px; padding: 0 1.5rem; border: 0; border-radius: var(--tp-radius); background: var(--tp-brick); color: var(--tp-on-brick); font-weight: 600; cursor: pointer; }

/* --- Responsive ------------------------------------------------------------------------------ */

@media (max-width: 1024px) {
    /* Masthead: menu button left, wordmark centred, search right; the
       sections move into the drawer, the nav row keeps only the double rule. */
    .cap-mast-top { padding-top: 0.75rem; padding-bottom: 0.75rem; }
    .cap-masthead .mobile-menu-toggle { display: inline-flex !important; grid-column: 1; grid-row: 1; width: 44px; height: 44px; align-items: center; justify-content: center; }
    .cap-masthead .mobile-menu-toggle:not(.active) { position: relative; }
    .cap-search-toggle--top { display: inline-flex !important; grid-column: 3; grid-row: 1; justify-self: end; }
    .cap-masthead .hamburger-line { background: var(--tp-ink); }
    .cap-brand { grid-row: 1; }
    .cap-logo { flex-direction: row; gap: 0.5rem; }
    .cap-mark { width: 26px; height: 26px; }
    .cap-logo-word, .cap-masthead--compact .cap-logo-word { font-size: clamp(1.375rem, 0.9rem + 2.6vw, 2.25rem); }
    .cap-masthead--compact .cap-mark { width: 24px; height: 24px; }
    .cap-brand { min-width: 0; overflow: hidden; }
    .cap-tagline { display: none; }
    .cap-navrow-inner { min-height: 0; }
    .cap-nav-tools { display: none; }
    .cap-drawer-clip { display: block; position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 1000; }
    .cap-drawer-clip .main-navigation { position: absolute; pointer-events: auto; background: var(--tp-paper); overflow-y: auto; padding: 0; max-width: none; display: block; }
    .cap-navrow .primary-menu, .cap-navrow .main-navigation ul.primary-menu { display: block; text-align: left; margin: 0; }
    .cap-navrow .main-navigation .primary-menu li { border-bottom: 1px solid var(--tp-rule); }
    .cap-navrow .main-navigation a { min-height: 56px; width: 100%; padding: 0 1.5rem; font-family: var(--tp-display); font-size: 1.375rem; letter-spacing: 0; text-transform: none; font-weight: 500; }
    .cap-navrow .main-navigation a::after { display: none; }
    .cap-navrow .main-navigation .current-cat > a { background: var(--tp-tint); }
    .cap-navrow .main-navigation .cap-drawer-label { display: block; margin: 1.25rem 1.5rem 0.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--tp-ink); font-size: 0.75rem; color: var(--tp-brick); }
    .cap-navrow .main-navigation .cap-drawer-sub { display: flex; align-items: center; justify-content: center; width: auto; margin: 1.5rem; min-height: 52px; padding: 0 1rem; font-family: var(--tp-text); font-size: 0.875rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; background: var(--tp-ink); color: var(--tp-paper); border-radius: var(--tp-radius); text-decoration: none; }
    .cap-masthead .mobile-menu-toggle.active { position: fixed; top: 0.75rem; left: auto; right: 0.75rem; z-index: 1002; }

    .cap-layout { grid-template-columns: minmax(0, 1fr); }
    .cap-layout-main { padding-right: 0; border-right: 0; }
    .cap-layout > .cap-sidebar { padding-left: 0; margin-top: 2.5rem; padding-top: 2rem; border-top: 3px double var(--tp-rule); }
    /* Stacked under the article, the sidebar's signup sits right above the
       newsletter box and its topic list repeats the footer's. */
    .cap-sidebar .cap-widget-news, .cap-sidebar .cap-widget-dept { display: none; }
}

@media (max-width: 900px) {
    .cap-pens { grid-template-columns: minmax(0, 1fr); }
    .cap-pen, .cap-pen:first-child, .cap-pen:last-child { padding: 0; border-left: 0; }
    .cap-pen + .cap-pen { margin-top: 2.5rem; }
    .cap-pens--loop .cap-pen + .cap-pen { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--tp-rule); }
    .cap-cols { grid-template-columns: minmax(0, 1fr); }
    .cap-cols > *, .cap-cols > :nth-child(3n + 1), .cap-cols > :nth-child(3n) { padding: 0; border-left: 0; }
    .cap-cols > * + * { margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--tp-rule); }
    .cap-cols--lines > .cap-line:nth-child(n + 4) { padding-top: 1.1rem; }
    .cap-cols--lines > .cap-line { padding-bottom: 0; }
    .cap-cols--stories { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1.25rem; }
    .cap-cols--stories > *, .cap-cols--stories > * + * { margin: 0; padding: 0; border: 0; }
    .cap-cols--stories > .cap-story:nth-child(n + 4) { margin-top: 0; }
}

@media (max-width: 720px) {
    .cap-newsletter .newsletter-form { flex-direction: column; }
    .cap-page .entry-content .cap-onpage ol { columns: 1; }
    .cap-flist { gap: 0 1.1rem; }
    .cap-cols--stories { grid-template-columns: minmax(0, 1fr); }
    .cap-related .cap-story { display: grid; grid-template-columns: 38% minmax(0, 1fr); gap: 0 1rem; align-items: start; }
    .cap-related .cap-story .cap-frame { grid-row: span 2; margin: 0; }
    .cap-related .cap-story-title { font-size: 1.1875rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
