/* ==========================================================================
   Cheltenham Times — BBC News style mockup
   Layout: 1232px shell, 16px gutters, black service bar, red section rules.
   ========================================================================== */

:root {
    --ctb-red: #b80000;
    --ctb-red-dark: #8c0000;
    --ctb-black: #000000;
    --ctb-ink: #141414;
    --ctb-ink-soft: #3f3f42;
    --ctb-meta: #606060;
    --ctb-rule: #c8c8c8;
    --ctb-rule-light: #e4e4e4;
    --ctb-panel: #f6f6f6;
    --ctb-white: #ffffff;
    --ctb-shell: 1232px;
    --ctb-gutter: 16px;
    --ctb-font: "Helvetica Neue", Helvetica, Arial, "Segoe UI", Roboto, sans-serif;
    --ctb-serif: Georgia, "Times New Roman", serif;
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--ctb-white);
    color: var(--ctb-ink);
    font-family: var(--ctb-font);
    font-size: 16px;
    line-height: 1.4;
}

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

a {
    color: inherit;
    text-decoration: none;
}

a:hover,
a:focus-visible {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}

:focus-visible {
    outline: 3px solid var(--ctb-red);
    outline-offset: 2px;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

.ctb-skip {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--ctb-black);
    color: #fff;
    padding: 12px 16px;
    z-index: 100;
}

.ctb-skip:focus {
    left: 0;
}

.ctb-shell {
    width: 100%;
    max-width: var(--ctb-shell);
    margin: 0 auto;
    padding: 0 var(--ctb-gutter);
}

/* --------------------------------------------------------------------------
   Service bar
   -------------------------------------------------------------------------- */

.ctb-services {
    background: var(--ctb-black);
    color: #fff;
}

.ctb-services-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 44px;
}

.ctb-wordmark {
    display: flex;
    gap: 3px;
    flex: 0 0 auto;
    padding: 4px 0;
}

.ctb-wordmark:hover {
    text-decoration: none;
}

.ctb-wordmark-block {
    background: #fff;
    color: #000;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.02em;
    line-height: 1;
    padding: 6px 5px 5px;
}

.ctb-services-nav {
    flex: 1 1 auto;
    overflow: hidden;
}

.ctb-services-menu {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ctb-services-menu li {
    border-left: 1px solid #333;
}

.ctb-services-menu li:first-child {
    border-left: 0;
}

.ctb-services-menu a {
    display: block;
    padding: 12px 12px;
    font-size: 13px;
    color: #fff;
}

.ctb-services-menu a:hover {
    background: #1f1f1f;
    text-decoration: none;
}

.ctb-search-toggle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1f1f1f;
    color: #fff;
    border: 0;
    font: inherit;
    font-size: 13px;
    padding: 10px 14px;
    cursor: pointer;
}

.ctb-search-toggle:hover {
    background: var(--ctb-red);
}

.ctb-search-icon {
    width: 13px;
    height: 13px;
    border: 2px solid currentColor;
    border-radius: 50%;
    position: relative;
}

.ctb-search-icon::after {
    content: "";
    position: absolute;
    right: -5px;
    bottom: -4px;
    width: 7px;
    height: 2px;
    background: currentColor;
    transform: rotate(45deg);
}

.ctb-search-panel {
    background: var(--ctb-panel);
    border-bottom: 1px solid var(--ctb-rule);
    padding: 16px 0;
}

.ctb-searchform {
    display: flex;
    gap: 8px;
    max-width: 620px;
}

.ctb-searchform input[type="search"] {
    flex: 1 1 auto;
    font: inherit;
    padding: 10px 12px;
    border: 2px solid var(--ctb-ink);
    background: #fff;
}

.ctb-searchform button {
    font: inherit;
    font-weight: 700;
    padding: 10px 18px;
    border: 0;
    background: var(--ctb-ink);
    color: #fff;
    cursor: pointer;
}

.ctb-searchform button:hover {
    background: var(--ctb-red);
}

/* --------------------------------------------------------------------------
   Masthead and section nav
   -------------------------------------------------------------------------- */

.ctb-masthead-inner {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding-top: 18px;
    padding-bottom: 14px;
}

.ctb-masthead-title {
    margin: 0;
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
}

/* Custom logo sits in the masthead, at the size the text title would occupy. */
.ctb-masthead-logo,
.ctb-masthead-logo .custom-logo-link,
.ctb-masthead-logo img {
    display: block;
}

.ctb-masthead-logo img {
    max-height: 76px;
    width: auto;
}

.ctb-masthead-title a:hover {
    text-decoration: none;
    color: var(--ctb-red);
}

.ctb-masthead-date {
    margin: 0;
    font-size: 13px;
    color: var(--ctb-meta);
}

.ctb-nav {
    border-top: 1px solid var(--ctb-rule);
    border-bottom: 1px solid var(--ctb-rule);
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 40;
}

.ctb-nav-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ctb-nav-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    background: none;
    border: 0;
    font: inherit;
    font-weight: 700;
    padding: 12px 0;
    cursor: pointer;
}

.ctb-nav-burger,
.ctb-nav-burger::before,
.ctb-nav-burger::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--ctb-ink);
    position: relative;
}

.ctb-nav-burger::before,
.ctb-nav-burger::after {
    content: "";
    position: absolute;
    left: 0;
}

.ctb-nav-burger::before {
    top: -6px;
}

.ctb-nav-burger::after {
    top: 6px;
}

.ctb-menu {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
}

.ctb-menu li a {
    display: block;
    padding: 14px 14px;
    font-size: 15px;
    font-weight: 700;
    border-bottom: 4px solid transparent;
    margin-bottom: -1px;
}

.ctb-menu li:first-child a {
    padding-left: 0;
}

.ctb-menu li a:hover {
    text-decoration: none;
    border-bottom-color: var(--ctb-rule);
}

.ctb-menu .current-menu-item > a,
.ctb-menu li a.is-current {
    color: var(--ctb-red);
    border-bottom-color: var(--ctb-red);
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.ctb-main {
    display: block;
    padding-bottom: 40px;
}

.ctb-home {
    padding-top: 8px;
}

.ctb-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 32px;
    align-items: start;
    padding-top: 8px;
}

.ctb-col-main {
    min-width: 0;
}

.ctb-col-rail {
    min-width: 0;
}

/* Hero ------------------------------------------------------------------- */

.ctb-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    padding: 16px 0 24px;
    border-bottom: 1px solid var(--ctb-rule);
}

.ctb-lead-media {
    display: block;
    margin-bottom: 12px;
}

.ctb-lead-title {
    margin: 0 0 8px;
    font-size: 32px;
    line-height: 1.12;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.ctb-lead-title a:hover {
    color: var(--ctb-red);
}

.ctb-standfirst {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.45;
    color: var(--ctb-ink-soft);
}

.ctb-hero-side {
    display: flex;
    flex-direction: column;
}

.ctb-hero-side .ctb-card {
    padding: 14px 0;
    border-bottom: 1px solid var(--ctb-rule-light);
}

.ctb-hero-side .ctb-card:first-child {
    padding-top: 0;
}

.ctb-hero-side .ctb-card:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

/* Cards ------------------------------------------------------------------ */

.ctb-card--row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 116px;
    gap: 12px;
    align-items: start;
}

.ctb-card--row .ctb-card-media {
    order: 2;
}

.ctb-card--row .ctb-card-text {
    order: 1;
}

.ctb-card-title {
    margin: 0 0 6px;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
}

.ctb-card--row .ctb-card-title {
    font-size: 16px;
}

.ctb-card-title a:hover {
    color: var(--ctb-red);
}

.ctb-card-summary {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.4;
    color: var(--ctb-ink-soft);
}

.ctb-card--medium .ctb-card-media {
    margin-bottom: 10px;
}

.ctb-meta {
    margin: 0;
    font-size: 13px;
    color: var(--ctb-meta);
}

.ctb-meta-sep {
    margin: 0 6px;
    color: var(--ctb-rule);
}

.ctb-meta-kicker {
    color: var(--ctb-red);
    font-weight: 700;
}

.ctb-placeholder {
    display: flex;
    align-items: flex-end;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: repeating-linear-gradient(135deg, #ededed, #ededed 10px, #e3e3e3 10px, #e3e3e3 20px);
}

.ctb-placeholder--hero {
    aspect-ratio: 16 / 9;
}

/* Tints so a picture-less mockup still reads as a page of photographs. */
.ctb-placeholder--a { background: linear-gradient(135deg, #21323f, #4c6d7d); }
.ctb-placeholder--b { background: linear-gradient(135deg, #4a2f2f, #8a5a4a); }
.ctb-placeholder--c { background: linear-gradient(135deg, #2c3a26, #5f7a4d); }
.ctb-placeholder--d { background: linear-gradient(135deg, #33304a, #6b6690); }

.ctb-ph-label {
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    padding: 4px 8px;
    margin: 8px;
}

/* Section headings ------------------------------------------------------- */

.ctb-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    border-top: 4px solid var(--ctb-red);
    margin: 28px 0 16px;
    padding-top: 8px;
}

.ctb-section-heading {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.ctb-section-more {
    font-size: 14px;
    font-weight: 700;
    color: var(--ctb-red);
}

.ctb-col-rail .ctb-section-head {
    margin-top: 24px;
}

/* Grid of cards ---------------------------------------------------------- */

.ctb-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px 16px;
}

.ctb-grid > .ctb-ad {
    grid-column: 1 / -1;
}

/* Headline lists --------------------------------------------------------- */

.ctb-lines {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--ctb-rule-light);
}

.ctb-line {
    padding: 12px 0;
    border-bottom: 1px solid var(--ctb-rule-light);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: baseline;
}

.ctb-line a {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
}

.ctb-line a:hover {
    color: var(--ctb-red);
}

.ctb-line .ctb-meta {
    flex: 0 0 auto;
}

/* Most read -------------------------------------------------------------- */

.ctb-most-read {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: ctb-rank;
}

.ctb-most-read li {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 12px 0;
    border-bottom: 1px solid var(--ctb-rule-light);
}

.ctb-most-read-rank {
    font-size: 32px;
    font-weight: 700;
    line-height: 0.9;
    color: var(--ctb-rule);
}

.ctb-most-read a {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
}

.ctb-most-read a:hover {
    color: var(--ctb-red);
}

/* Panels, buttons -------------------------------------------------------- */

.ctb-panel {
    background: var(--ctb-panel);
    padding: 16px;
    margin: 24px 0;
}

.ctb-panel-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
}

.ctb-panel p {
    margin: 0 0 12px;
    font-size: 15px;
    color: var(--ctb-ink-soft);
}

.ctb-button {
    display: inline-block;
    background: var(--ctb-ink);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    padding: 10px 18px;
}

.ctb-button:hover {
    background: var(--ctb-red);
    text-decoration: none;
}

.ctb-empty {
    color: var(--ctb-meta);
    padding: 24px 0;
}

/* --------------------------------------------------------------------------
   Article
   -------------------------------------------------------------------------- */

.ctb-article {
    max-width: 680px;
    padding-top: 16px;
}

.ctb-article-kicker {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ctb-red);
}

.ctb-article-title {
    margin: 0 0 16px;
    font-size: 40px;
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.ctb-article-byline {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--ctb-rule-light);
    padding-top: 12px;
}

.ctb-byline-name {
    font-weight: 700;
    font-size: 15px;
}

.ctb-byline-role {
    font-size: 13px;
    color: var(--ctb-meta);
}

.ctb-article .ctb-meta {
    padding: 6px 0 16px;
    border-bottom: 1px solid var(--ctb-rule-light);
}

.ctb-article-media {
    margin: 20px 0;
}

.ctb-article-media figcaption {
    font-size: 13px;
    color: var(--ctb-meta);
    padding-top: 6px;
}

.ctb-article-body {
    font-size: 18px;
    line-height: 1.6;
}

.ctb-article-body p {
    margin: 0 0 20px;
}

.ctb-article-body h2 {
    font-size: 22px;
    margin: 28px 0 10px;
}

.ctb-article-body a {
    color: var(--ctb-red);
    text-decoration: underline;
}

.ctb-article-body blockquote {
    margin: 24px 0;
    padding-left: 16px;
    border-left: 4px solid var(--ctb-red);
    font-family: var(--ctb-serif);
    font-size: 20px;
}

.ctb-tags {
    margin: 24px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ctb-tags-label {
    font-weight: 700;
    font-size: 14px;
    width: 100%;
}

.ctb-tags a {
    border: 1px solid var(--ctb-rule);
    padding: 6px 12px;
    font-size: 14px;
}

.ctb-tags a:hover {
    background: var(--ctb-panel);
    text-decoration: none;
}

.ctb-pagination {
    padding: 24px 0;
}

.ctb-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid var(--ctb-rule);
    margin-right: 4px;
    font-weight: 700;
}

.ctb-pagination .current {
    background: var(--ctb-ink);
    color: #fff;
    border-color: var(--ctb-ink);
}

/* --------------------------------------------------------------------------
   Advert slots — every one of these is filled by ctb_ad() / your own code
   -------------------------------------------------------------------------- */

.ctb-ad {
    position: relative;
    background: var(--ctb-panel);
    border: 1px solid var(--ctb-rule-light);
    padding: 8px;
    text-align: center;
    margin: 24px 0;
}

.ctb-ad-label {
    display: block;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ctb-meta);
    padding-bottom: 6px;
}

.ctb-ad-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90px;
}

.ctb-ad-body img,
.ctb-ad-body iframe {
    max-width: 100%;
}

.ctb-ad--leaderboard .ctb-ad-body {
    min-height: 90px;
}

.ctb-ad--mpu {
    max-width: 300px;
}

.ctb-ad--mpu .ctb-ad-body {
    min-height: 250px;
}

.ctb-ad--sticky {
    position: sticky;
    top: 76px;
}

.ctb-ad--in-feed .ctb-ad-body {
    min-height: 90px;
}

.ctb-ad--inline {
    max-width: 100%;
}

.ctb-ad--anchor {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    margin: 0;
    border: 0;
    border-top: 1px solid var(--ctb-rule);
    background: #fff;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.12);
}

.ctb-ad--anchor .ctb-ad-body {
    min-height: 50px;
}

.ctb-ad-close {
    position: absolute;
    top: 2px;
    right: 4px;
    background: none;
    border: 0;
    font-size: 20px;
    line-height: 1;
    color: var(--ctb-meta);
    cursor: pointer;
    padding: 4px 6px;
}

.ctb-ad-house {
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
    padding: 16px;
    width: 100%;
}

.ctb-ad-house:hover {
    text-decoration: none;
}

.ctb-ad-house-title {
    font-weight: 700;
    font-size: 16px;
}

.ctb-ad-house-copy {
    font-size: 14px;
    color: var(--ctb-ink-soft);
}

.ctb-ad-house-size {
    font-size: 11px;
    color: var(--ctb-meta);
    letter-spacing: 0.04em;
}

.ctb-leaderboard-wrap,
.ctb-billboard-wrap {
    padding-top: 0;
}

/* --------------------------------------------------------------------------
   Widgets and footer
   -------------------------------------------------------------------------- */

.ctb-widget ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ctb-widget li {
    padding: 10px 0;
    border-bottom: 1px solid var(--ctb-rule-light);
    font-size: 15px;
}

.ctb-footer {
    background: var(--ctb-black);
    color: #fff;
    padding: 24px 0 60px;
    margin-top: 32px;
}

.ctb-footer-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.ctb-footer-menu a {
    font-size: 14px;
    font-weight: 700;
}

.ctb-footer-note {
    margin: 0;
    font-size: 12px;
    color: #b3b3b3;
}

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

@media (max-width: 1008px) {
    .ctb-columns {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .ctb-col-rail {
        border-top: 1px solid var(--ctb-rule);
        margin-top: 24px;
    }

    .ctb-ad--sticky {
        position: static;
    }

    .ctb-ad--mpu {
        max-width: none;
    }

    .ctb-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .ctb-services-nav {
        display: none;
    }

    .ctb-masthead-title {
        font-size: 28px;
    }

    .ctb-masthead-logo img {
        max-height: 48px;
    }

    .ctb-masthead-date {
        display: none;
    }

    .ctb-nav-toggle {
        display: inline-flex;
    }

    .ctb-nav-list {
        display: none;
        width: 100%;
    }

    .ctb-nav-list.is-open {
        display: block;
        padding-bottom: 8px;
    }

    .ctb-nav-inner {
        flex-wrap: wrap;
    }

    .ctb-menu {
        flex-direction: column;
    }

    .ctb-menu li a {
        padding: 10px 0;
        border-bottom: 1px solid var(--ctb-rule-light);
    }

    .ctb-hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .ctb-lead-title {
        font-size: 26px;
    }

    .ctb-article-title {
        font-size: 30px;
    }

    .ctb-article-body {
        font-size: 17px;
    }

    .ctb-ad--anchor {
        display: block;
    }

    body.has-ctb-anchor {
        padding-bottom: 96px;
    }
}

@media (max-width: 520px) {
    .ctb-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ctb-line {
        flex-direction: column;
        gap: 4px;
    }
}
