/* The Cover Drive Story Homepage 3.3.0
   Front-page-only styles. No fixed page heights and no nested page scrollers. */
html { overflow-y: auto !important; }
body.home {
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
}
body.home #page,
body.home .site,
body.home #content,
body.home .site-content,
body.home #primary,
body.home .content-area,
body.home #main,
body.home .site-main {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}
body.home #content,
body.home .site-content,
body.home .content-area.tcd-front-page-v32,
body.home .tcd-front-page-v32__main {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
.tcd-front-page-v32 { width: 100%; max-width: 100%; height: auto !important; overflow: visible !important; }
.tcd-front-page-v32__main { width: 100%; max-width: 100%; height: auto !important; overflow: visible !important; }

.tcd-homepage-v32 {
    --tcd-red: #b51f2a;
    --tcd-red-dark: #8f1721;
    --tcd-navy: #17233b;
    --tcd-copy: #263247;
    --tcd-muted: #68758a;
    --tcd-line: #e4e9f0;
    --tcd-soft: #f5f7fa;
    width: 100%;
    max-width: 1500px;
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    margin: 0 auto;
    padding: 28px clamp(14px, 2.5vw, 36px) 64px;
    color: var(--tcd-copy);
    background: transparent;
    box-sizing: border-box;
    font-family: inherit;
}
.tcd-homepage-v32 *,
.tcd-homepage-v32 *::before,
.tcd-homepage-v32 *::after { box-sizing: border-box; }
.tcd-homepage-v32 a { color: inherit; text-decoration: none; }
.tcd-homepage-v32 a:hover { color: var(--tcd-red); }

/* Above-the-fold newsroom: Latest News | Featured Story | Predictions */
.tcd-homepage-v32__top-layout {
    display: grid;
    grid-template-columns: minmax(245px, .92fr) minmax(0, 1.85fr) minmax(245px, .92fr);
    gap: clamp(16px, 1.8vw, 28px);
    align-items: start;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
}
.tcd-homepage-v32__latest,
.tcd-homepage-v32__featured,
.tcd-homepage-v32__sidebar { min-width: 0; height: auto !important; max-height: none !important; overflow: visible !important; }

.tcd-section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 16px;
    padding: 0 0 11px;
    border-bottom: 2px solid var(--tcd-red);
}
.tcd-section-heading h2 {
    margin: 0;
    color: var(--tcd-navy);
    font-size: 23px;
    line-height: 1.2;
    font-weight: 850;
    letter-spacing: -.025em;
}
.tcd-section-heading > span {
    color: var(--tcd-muted);
    font-size: 12px;
    line-height: 1.35;
    white-space: nowrap;
}
.tcd-section-heading > a {
    flex: 0 0 auto;
    color: var(--tcd-red);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.tcd-section-heading > a:hover { color: var(--tcd-red-dark); text-decoration: underline; }

/* Image-led Latest News feed */
.tcd-latest-feed { display: flex; flex-direction: column; gap: 0; }
.tcd-latest-item {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 12px 0;
    border-bottom: 1px solid var(--tcd-line);
}
.tcd-latest-item:first-child { padding-top: 0; }
.tcd-latest-item__media {
    display: block;
    width: 104px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 6px;
    background: #e9edf3;
}
.tcd-latest-item__image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    transition: transform .25s ease;
}
.tcd-latest-item__media:hover .tcd-latest-item__image { transform: scale(1.035); }
.tcd-latest-item__body { min-width: 0; }
.tcd-latest-item__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 7px;
    margin: 0 0 5px;
    color: var(--tcd-muted);
    font-size: 10px;
    line-height: 1.3;
}
.tcd-latest-item__category {
    color: var(--tcd-red);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .035em;
    text-transform: uppercase;
}
.tcd-latest-item__category::after { content: "•"; margin-left: 7px; color: #b9c0cc; }
.tcd-latest-item h3 {
    margin: 0;
    color: var(--tcd-navy);
    font-size: 14px;
    line-height: 1.38;
    font-weight: 760;
}
.tcd-latest-item h3 a:hover { color: var(--tcd-red); }
.tcd-more-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    color: var(--tcd-red) !important;
    font-size: 13px;
    font-weight: 850;
}
.tcd-more-link:hover { color: var(--tcd-red-dark) !important; }

/* Main featured story */
.tcd-featured-story { min-width: 0; }
.tcd-featured-story__media {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 9px;
    background: #e9edf3;
    box-shadow: 0 6px 22px rgba(23, 35, 59, .10);
}
.tcd-featured-story__image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
}
.tcd-featured-story__body { padding: 15px 1px 0; }
.tcd-featured-story__category {
    display: inline-flex;
    align-items: center;
    margin: 0 0 8px;
    padding: 4px 8px;
    border-radius: 3px;
    background: #fff0f0;
    color: var(--tcd-red);
    font-size: 10px;
    line-height: 1.25;
    font-weight: 850;
    letter-spacing: .045em;
    text-transform: uppercase;
}
.tcd-featured-story h1 {
    margin: 0 0 10px;
    color: var(--tcd-navy);
    font-size: clamp(25px, 2.25vw, 36px);
    line-height: 1.16;
    font-weight: 900;
    letter-spacing: -.035em;
}
.tcd-featured-story h1 a:hover { color: var(--tcd-red); }
.tcd-featured-story__body p {
    margin: 0 0 10px;
    color: #526075;
    font-size: 14px;
    line-height: 1.58;
}
.tcd-featured-story__body time { color: var(--tcd-muted); font-size: 11px; }

/* Right rail: Predictions only. Other categories move below the top row. */
.tcd-sidebar-panel {
    padding: 15px;
    border: 1px solid var(--tcd-line);
    border-top: 3px solid var(--tcd-red);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(23, 35, 59, .045);
}
.tcd-section-heading--compact { margin-bottom: 11px; padding-bottom: 9px; }
.tcd-section-heading--compact h2 { font-size: 19px; }
.tcd-mini-list { display: flex; flex-direction: column; }
.tcd-mini-story {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 10px 0;
    border-bottom: 1px solid var(--tcd-line);
}
.tcd-mini-story:first-child { padding-top: 0; }
.tcd-mini-story:last-child { border-bottom: 0; padding-bottom: 0; }
.tcd-mini-story__media {
    display: block;
    width: 88px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 5px;
    background: #e9edf3;
}
.tcd-mini-story__image { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.tcd-mini-story h4 {
    margin: 0;
    color: var(--tcd-navy);
    font-size: 12px;
    line-height: 1.4;
    font-weight: 760;
}
.tcd-mini-story h4 a:hover { color: var(--tcd-red); }
.tcd-predictions-empty,
.tcd-empty-state {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 15px;
    border-radius: 6px;
    background: var(--tcd-soft);
    color: var(--tcd-muted);
    font-size: 12px;
    line-height: 1.5;
}
.tcd-predictions-empty strong,
.tcd-empty-state strong { color: var(--tcd-navy); font-size: 13px; }
.tcd-empty-featured {
    padding: 28px;
    border: 1px dashed #cbd3df;
    border-radius: 8px;
    background: var(--tcd-soft);
    color: var(--tcd-navy);
}
.tcd-empty-featured p { margin: 7px 0 0; color: var(--tcd-muted); font-size: 13px; }

/* Category sections below the top newsroom row. */
.tcd-homepage-v32__category-sections {
    display: flex;
    flex-direction: column;
    gap: 38px;
    margin-top: 42px;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}
.tcd-category-section {
    width: 100%;
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--tcd-line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(23, 35, 59, .035);
}
.tcd-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.tcd-category-card { min-width: 0; overflow: hidden; border: 1px solid #edf0f4; border-radius: 7px; background: #fff; }
.tcd-category-card__media {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e9edf3;
}
.tcd-category-card__image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    transition: transform .25s ease;
}
.tcd-category-card__media:hover .tcd-category-card__image { transform: scale(1.035); }
.tcd-category-card__body { padding: 12px 13px 14px; }
.tcd-category-card__date {
    display: block;
    margin: 0 0 6px;
    color: var(--tcd-muted);
    font-size: 10px;
    line-height: 1.3;
}
.tcd-category-card h3 {
    margin: 0 0 7px;
    color: var(--tcd-navy);
    font-size: 17px;
    line-height: 1.32;
    font-weight: 800;
}
.tcd-category-card h3 a:hover { color: var(--tcd-red); }
.tcd-category-card p {
    margin: 0;
    color: #647086;
    font-size: 12px;
    line-height: 1.5;
}
.tcd-image-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    min-height: 54px;
    place-items: center;
    background: linear-gradient(135deg, #e7edf6, #f9e9e9);
    color: var(--tcd-red);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .12em;
}
.tcd-image-placeholder span { display: block; }

/* Tablet */
@media (max-width: 1100px) {
    .tcd-homepage-v32 { padding-left: 22px; padding-right: 22px; }
    .tcd-homepage-v32__top-layout {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 24px;
    }
    .tcd-homepage-v32__featured { grid-column: 1 / -1; grid-row: 1; }
    .tcd-homepage-v32__latest { grid-column: 1; grid-row: 2; }
    .tcd-homepage-v32__sidebar { grid-column: 2; grid-row: 2; }
    .tcd-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Mobile: no fixed-height panels, no nested scroll areas, and no horizontal overflow. */
@media (max-width: 700px) {
    html { overflow-y: auto !important; }
    body.home { overflow-x: hidden !important; overflow-y: visible !important; height: auto !important; max-height: none !important; }
    body.home #page,
    body.home .site,
    body.home #content,
    body.home .site-content,
    body.home #primary,
    body.home .content-area,
    body.home #main,
    body.home .site-main { height: auto !important; max-height: none !important; overflow: visible !important; }
    .tcd-homepage-v32 { padding: 16px 14px 42px; }
    .tcd-homepage-v32__top-layout { display: flex; flex-direction: column; gap: 24px; }
    .tcd-homepage-v32__featured { order: 1; width: 100%; }
    .tcd-homepage-v32__latest { order: 2; width: 100%; }
    .tcd-homepage-v32__sidebar { order: 3; width: 100%; }
    .tcd-section-heading { margin-bottom: 12px; padding-bottom: 9px; }
    .tcd-section-heading h2 { font-size: 20px; }
    .tcd-featured-story__body { padding-top: 11px; }
    .tcd-featured-story h1 { font-size: clamp(22px, 6vw, 28px); line-height: 1.22; }
    .tcd-featured-story__body p { font-size: 13px; line-height: 1.5; }
    .tcd-latest-item { grid-template-columns: 104px minmax(0, 1fr); gap: 11px; padding: 11px 0; }
    .tcd-latest-item__media { width: 104px; }
    .tcd-latest-item h3 { font-size: 14px; line-height: 1.35; }
    .tcd-sidebar-panel { padding: 14px; }
    .tcd-mini-story { grid-template-columns: 104px minmax(0, 1fr); gap: 12px; }
    .tcd-mini-story__media { width: 104px; }
    .tcd-mini-story h4 { font-size: 14px; line-height: 1.38; }
    .tcd-homepage-v32__category-sections { gap: 22px; margin-top: 28px; }
    .tcd-category-section { padding: 14px; border-radius: 8px; }
    .tcd-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .tcd-category-card__body { padding: 9px 10px 11px; }
    .tcd-category-card h3 { font-size: 14px; line-height: 1.3; }
    .tcd-category-card p { font-size: 11px; line-height: 1.4; }
    .tcd-category-card__date { font-size: 9px; }
}
@media (max-width: 390px) {
    .tcd-homepage-v32 { padding-left: 11px; padding-right: 11px; }
    .tcd-latest-item { grid-template-columns: 92px minmax(0, 1fr); }
    .tcd-latest-item__media { width: 92px; }
    .tcd-mini-story { grid-template-columns: 92px minmax(0, 1fr); }
    .tcd-mini-story__media { width: 92px; }
    .tcd-category-grid { grid-template-columns: 1fr; }
}


/* Front-end Featured Story control. Visible only to authorized editors. */
.tcd-feature-control { margin-top: 7px; }
.tcd-feature-control form { margin: 0; }
.tcd-feature-control__button {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 9px; border: 1px solid #b51f2a; border-radius: 4px;
    background: #fff; color: #9c1722; font: inherit; font-size: 10px;
    font-weight: 800; line-height: 1.25; cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.tcd-feature-control__button:hover,
.tcd-feature-control__button:focus { background: #b51f2a; border-color: #b51f2a; color: #fff; }
.tcd-feature-control__active {
    display: inline-flex; align-items: center; padding: 5px 9px;
    border-radius: 4px; background: #edf8ef; color: #176b32;
    font-size: 10px; font-weight: 800; line-height: 1.25;
}
.tcd-feature-control--single { margin: 24px 0; padding: 12px 14px; border: 1px solid #e4e9f0; border-left: 3px solid #b51f2a; border-radius: 5px; background: #f8fafc; }
.tcd-feature-control--single .tcd-feature-control__button { font-size: 12px; padding: 8px 12px; }
