/* ==========================================================================
   Homepage (front-page.php, inc/homepage.php)
   Loaded on the homepage only, after theme.css
   ========================================================================== */

.wu-home {
    --wu-home-navy: var(--wu-navy, #1d3f70);
    --wu-home-navy-text: #dbe5f3;
    --wu-home-sky: #eef4fb;
    --wu-home-sky-text: #123d6e;
    --wu-home-card-border: #ececec;
    --wu-home-gap: 20px;
}

/* theme.css shows every img as a block: keep hidden things hidden */
.wu-home [hidden] {
    display: none !important;
}

body.home .wu-main {
    padding-top: 0;
    overflow-x: clip; /* the full-width bands */
}

/* ---------- Shared pieces ---------- */

.wu-home-h2 {
    font-family: var(--wu-font-heading);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0;
}

.wu-home-h2--big {
    font-size: 28px;
}

.wu-home-h2 a:hover {
    text-decoration: underline;
}

.wu-home-h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--wu-font-heading);
    font-size: 19px;
    font-weight: 800;
    line-height: 1.25;
    margin: 0;
}

.wu-home-cat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--sec, var(--wu-red));
}

.wu-home-section {
    margin-top: 52px;
}

.wu-home-section-head,
.wu-home-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 16px;
}

.wu-home-section-head--rule {
    padding-bottom: 8px;
    border-bottom: 3px solid var(--sec, var(--wu-red));
}

.wu-home-section-note,
.wu-home-panel-note {
    margin: 0;
    font-size: 14px;
    color: var(--wu-text-secondary);
}

.wu-home-section-link,
.wu-home-panel-link,
.wu-home-more {
    font-size: 14px;
    font-weight: 600;
    color: var(--sec, var(--wu-red));
}

.wu-home-section-link:hover,
.wu-home-panel-link:hover,
.wu-home-more:hover {
    text-decoration: underline;
}

.wu-home-panel {
    background: var(--wu-bg-card);
    border: 1px solid var(--wu-home-card-border);
    border-radius: 10px;
    padding: 22px 24px;
}

/* Only shown until home.js turns the panels into tabs */
.wu-home-panel-label {
    font-family: var(--wu-font-heading);
    font-size: 17px;
    font-weight: 700;
    margin: 18px 0 10px;
}

[data-wu-home-tabs].is-tabs .wu-home-panel-label {
    display: none;
}

[data-wu-home-tabs].is-tabs [data-wu-panel][hidden] {
    display: none;
}

.wu-home-grid {
    display: grid;
    gap: var(--wu-home-gap);
    margin: 0;
    padding: 0;
    list-style: none;
}

.wu-home-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wu-home-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.wu-home-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 16px 0 0;
    font-size: 14px;
}

.wu-home-links-lead {
    font-weight: 700;
    margin-right: 4px;
}

.wu-home-links-lead:hover {
    text-decoration: underline;
}

.wu-home-pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 4px 12px;
    border: 1px solid #d6d6d6;
    border-radius: 999px;
    background: var(--wu-bg-card);
    font-weight: 500;
    transition: border-color var(--wu-transition);
}

.wu-home-pill:hover {
    border-color: var(--wu-text);
}

/* Steps of a case: Charged 14 Mar → Admitted 2 Aug → Jailed 3 Nov */
.wu-home-steps {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.wu-home-step {
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
}

.wu-home-step.is-current {
    background: #fff;
    color: var(--sec, var(--band, var(--wu-red)));
    font-weight: 700;
}

/* ---------- A story (template-parts/home-story.php) ---------- */

.wu-home-story {
    min-width: 0;
}

.wu-home-story-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--wu-bg-card);
    border: 1px solid var(--wu-home-card-border);
    border-radius: 8px;
    overflow: hidden;
    color: var(--wu-text);
    transition: box-shadow var(--wu-transition);
}

.wu-home-story-link:hover {
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.08);
}

.wu-home-story-link:hover .wu-home-story-title {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.wu-home-thumb {
    display: block;
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #e3e5e8;
}

.wu-home-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wu-home-thumb--tall {
    background: #111;
}

.wu-home-thumb--tall::before {
    content: "";
    position: absolute;
    inset: -4%;
    background: var(--wu-thumb-bg) center / cover no-repeat;
    filter: blur(5px) brightness(0.45);
}

.wu-home-thumb--tall img {
    position: relative;
    object-fit: contain;
}

.wu-home-story-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px 16px;
    flex: 1 1 auto;
}

.wu-home-story-title {
    font-family: var(--wu-font-heading);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.wu-home-story-dek {
    font-size: 14px;
    line-height: 1.5;
    color: var(--wu-text-secondary);
}

.wu-home-story-time {
    margin-top: auto;
    font-size: 12px;
    color: var(--wu-text-secondary);
}

/* At the side: the picture beside the words */
.wu-home-story--row .wu-home-story-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    background: none;
    border: 0;
    border-radius: 0;
    overflow: visible;
}

.wu-home-story--row .wu-home-story-link:hover {
    box-shadow: none;
}

.wu-home-story--row .wu-home-thumb {
    border-radius: 8px;
}

.wu-home-story--row .wu-home-story-body {
    padding: 0;
}

.wu-home-story--row .wu-home-story-title {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.25;
}

.wu-home-story--row.wu-home-story--nophoto .wu-home-story-link {
    grid-template-columns: minmax(0, 1fr);
}

/* ==========================================================================
   The top: navy band, hills at its foot
   ========================================================================== */

.wu-home-top {
    --sec: var(--wu-red);
    position: relative;
    padding: 20px 0 120px;
    color: #fff;
    background: url("../images/hills-dusk.svg") center bottom / 100% 160px no-repeat, var(--wu-home-navy);
    background: url("../images/hills-dusk.svg") center bottom / 100% 160px no-repeat, linear-gradient(160deg, color-mix(in srgb, var(--wu-home-navy) 86%, #fff), var(--wu-home-navy) 45%, color-mix(in srgb, var(--wu-home-navy) 82%, #000));
    margin-bottom: -60px; /* Today in Wales sits over the hills */
}

/* Under the navy header (inc/header.php) the band starts in the header's
   navy, so the two run together, and darkens towards the hills */
.wu-navy-header .wu-home-top {
    padding-top: 14px;
    background: url("../images/hills-dusk.svg") center bottom / 100% 160px no-repeat, linear-gradient(180deg, var(--wu-home-navy) 0, var(--wu-home-navy) 30%, color-mix(in srgb, var(--wu-home-navy) 80%, #000));
}

/* Phones: a search box to tap at the top of the page, which opens the
   header's search over the screen */
.wu-home-search {
    display: none;
}

/* What people are searching for (inc/header.php), as chips */
.wu-home-trending {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: -2px 0 16px;
    font-size: 13px;
    color: var(--wu-navy-soft, #c9d8ee);
}

.wu-home-trending-label {
    margin-right: 2px;
}

.wu-home-trending a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    color: #fff;
    font-weight: 500;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.wu-home-trending a:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.55);
}

/* Welcome back */
.wu-home-back {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 16px;
    padding: 8px 8px 8px 18px;
    border-radius: 10px;
    background: #fff;
    color: var(--wu-text);
    font-size: 15px;
}

.wu-home-back[hidden] {
    display: none;
}

.wu-home-back-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--wu-red);
    flex: 0 0 auto;
}

.wu-home-back-text {
    margin: 0;
    flex: 1 1 260px;
}

.wu-home-back-go {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--wu-home-navy);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.wu-home-back-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--wu-text-secondary);
    cursor: pointer;
}

.wu-home-back-close:hover {
    background: var(--wu-bg-alt);
}

.wu-home-top-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.9fr) 320px;
    gap: var(--wu-home-gap);
    align-items: stretch;
}

/* The lead: its picture with the headline over its foot */
.wu-home-lead {
    min-width: 0;
}

.wu-home-lead-link {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    min-height: 500px;
    border-radius: 10px;
    overflow: hidden;
    background: #2b3138;
    color: #fff;
}

.wu-home-lead-media {
    position: absolute;
    inset: 0;
}

.wu-home-lead-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.wu-home-lead-media.wu-home-thumb--tall {
    background: #111;
}

.wu-home-lead-media.wu-home-thumb--tall::before {
    content: "";
    position: absolute;
    inset: -4%;
    background: var(--wu-thumb-bg) center / cover no-repeat;
    filter: blur(6px) brightness(0.45);
}

.wu-home-lead-media.wu-home-thumb--tall img {
    position: relative;
    object-fit: contain;
    object-position: center top;
}

.wu-home-lead-link:hover .wu-home-lead-media img {
    transform: scale(1.02);
}

.wu-home-lead-body {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 26px 28px;
    background: linear-gradient(to top, rgba(8, 12, 18, 0.92), rgba(8, 12, 18, 0.78) 70%, rgba(8, 12, 18, 0));
    padding-top: 60px;
}

.wu-home-lead--nophoto .wu-home-lead-link {
    min-height: 0;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
}

.wu-home-lead--nophoto .wu-home-lead-body {
    background: none;
    padding-top: 28px;
}

.wu-home-lead-cat {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 4px;
    background: var(--sec);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.wu-home-lead-title {
    font-family: var(--wu-font-heading);
    font-size: 36px;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin: 0;
}

.wu-home-lead-link:hover .wu-home-lead-title {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.wu-home-lead-dek {
    font-size: 16px;
    line-height: 1.5;
    color: #e3e7ed;
}

.wu-home-lead-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    color: #d6dbe2;
}

.wu-home-side {
    display: flex;
    flex-direction: column;
    gap: var(--wu-home-gap);
    min-width: 0;
}

.wu-home-side .wu-home-story {
    flex: 1 1 0;
}

.wu-home-side .wu-home-story-link {
    border: 0;
    border-radius: 10px;
}

.wu-home-side .wu-home-thumb {
    aspect-ratio: auto;
    flex: 1 1 120px;
    min-height: 120px;
}

.wu-home-side .wu-home-story-title {
    font-size: 19px;
}

/* The Latest timeline */
.wu-home-river {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 16px 16px 6px;
    border-radius: 10px;
    background: #fff;
    color: var(--wu-text);
}

.wu-home-river-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.wu-home-river-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--wu-font-heading);
    font-size: 18px;
    font-weight: 800;
    margin: 0;
}

.wu-home-live-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--wu-red);
    box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.5);
    animation: wu-home-pulse 2.4s ease-out infinite;
}

@keyframes wu-home-pulse {
    0% { box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.45); }
    70% { box-shadow: 0 0 0 8px rgba(200, 16, 46, 0); }
    100% { box-shadow: 0 0 0 0 rgba(200, 16, 46, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .wu-home-live-dot {
        animation: none;
    }
}

html.wu-a11y-motion .wu-home-live-dot {
    animation: none;
}

.wu-home-river-count {
    font-size: 12px;
    color: var(--wu-text-secondary);
}

.wu-home-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.wu-home-filters[hidden] {
    display: none;
}

.wu-home-chip {
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid #d6d6d6;
    border-radius: 999px;
    background: #fff;
    color: var(--wu-text);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.wu-home-chip:hover {
    border-color: var(--wu-text);
}

.wu-home-chip[aria-pressed="true"] {
    background: var(--wu-text);
    border-color: var(--wu-text);
    color: #fff;
}

.wu-home-river-list {
    flex: 1 1 auto;
    list-style: none;
    margin: 0;
    padding: 0 0 0 2px;
    border-left: 2px solid var(--wu-border-light);
}

/* Without the filters (no JavaScript), the first 8 */
.wu-home-river-list:not(.is-filtered) > li:nth-child(n+9),
.wu-home-river-list > li[hidden] {
    display: none;
}

.wu-home-river-item {
    position: relative;
    padding: 0 0 14px 16px;
}

.wu-home-river-item::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 6px;
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--sec);
}

.wu-home-river-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 8px;
    font-size: 12px;
    font-weight: 700;
}

.wu-home-river-section {
    color: var(--sec);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.wu-home-new {
    padding: 0 6px;
    border-radius: 3px;
    background: var(--wu-red);
    color: #fff;
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 18px;
}

.wu-home-new[hidden] {
    display: none;
}

.wu-home-river-item > a {
    display: block;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.35;
}

.wu-home-river-item > a:hover {
    text-decoration: underline;
}

.wu-home-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 44px;
    color: var(--wu-red);
}

/* ==========================================================================
   Today in Wales and Most read
   ========================================================================== */

.wu-home-brief-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 24px;
}

.wu-home-brief-row--single {
    grid-template-columns: minmax(0, 1fr);
}

.wu-home-brief-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.wu-home-brief-list li {
    position: relative;
    padding-left: 20px;
    font-size: 16px;
    line-height: 1.5;
}

.wu-home-brief-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 9px;
    height: 9px;
    border-radius: 2px;
    background: var(--sec);
}

.wu-home-brief-list a {
    font-weight: 700;
    color: var(--wu-text);
    text-decoration: underline;
    text-decoration-color: var(--sec);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.wu-home-brief-list a:hover {
    color: var(--sec);
}

.wu-home-brief-list a::after {
    content: ".";
    display: inline;
    color: var(--wu-text);
    text-decoration: none;
}

.wu-home-brief-list span {
    color: #444;
}

.wu-home-brief-foot {
    margin: 18px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--wu-border-light);
    font-size: 14px;
    color: var(--wu-text-secondary);
}

.wu-home-brief-foot a {
    font-weight: 700;
    color: var(--wu-red);
}

.wu-home-toggle {
    display: flex;
    padding: 3px;
    border-radius: 999px;
    background: var(--wu-search-bg);
}

.wu-home-toggle[hidden] {
    display: none;
}

.wu-home-toggle button {
    min-height: 34px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--wu-text);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.wu-home-toggle button[aria-selected="true"] {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.wu-home-most-list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: wu-home-most;
}

.wu-home-most-list li {
    counter-increment: wu-home-most;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
    padding: 12px 0;
    border-bottom: 1px solid var(--wu-border-light);
}

.wu-home-most-list li:last-child {
    border-bottom: 0;
}

.wu-home-most-list li::before {
    content: counter(wu-home-most);
    font-family: var(--wu-font-heading);
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
    color: var(--wu-red);
}

.wu-home-most-list a {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wu-home-most-title {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.35;
}

.wu-home-most-list a:hover .wu-home-most-title {
    text-decoration: underline;
}

/* ==========================================================================
   News near you
   ========================================================================== */

.wu-home-areas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.wu-home-areas[hidden] {
    display: none;
}

.wu-home-area-tab {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-height: 60px;
    padding: 10px 14px;
    border: 1.5px solid #d6d6d6;
    border-radius: 8px;
    background: #fff;
    color: var(--wu-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.wu-home-area-tab:hover {
    border-color: var(--wu-home-navy);
}

.wu-home-area-tab[aria-selected="true"] {
    background: var(--wu-home-navy);
    border-color: var(--wu-home-navy);
    color: #fff;
}

.wu-home-area-name {
    font-weight: 700;
    font-size: 15px;
}

.wu-home-area-towns {
    font-size: 12px;
    opacity: 0.85;
}

.wu-home-near.is-tabs .wu-home-area .wu-home-links {
    margin-top: 14px;
}

/* ==========================================================================
   The weather across Wales
   ========================================================================== */

.wu-home-weather {
    margin-top: 44px;
}

.wu-home-weather-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.wu-home-weather .wu-home-panel-link {
    color: #1f5fa8;
}

.wu-home-warning {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 2px 10px;
    border-radius: 999px;
    background: #ffd84d;
    color: #3d2e00;
    font-size: 12px;
    font-weight: 700;
}

.wu-home-warning--amber {
    background: #ff9a3c;
    color: #2e1600;
}

.wu-home-warning--red {
    background: #d01f2f;
    color: #fff;
}

.wu-home-warning[hidden] {
    display: none;
}

.wu-home-weather-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.wu-home-weather-grid:not(:has(.wu-home-tides:not([hidden]))) {
    grid-template-columns: minmax(0, 1fr);
}

.wu-home-towns {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.wu-home-towns a {
    display: flex;
    flex-direction: column;
    gap: 2px;
    height: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--wu-home-sky);
    color: var(--wu-home-sky-text);
}

.wu-home-towns a:hover {
    box-shadow: inset 0 0 0 1.5px var(--wu-home-sky-text);
}

.wu-home-town-name {
    font-size: 13px;
    font-weight: 600;
    color: #2c4a6b;
}

.wu-home-town-now {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wu-home-town-now img {
    width: 32px;
    height: 32px;
}

.wu-home-town-now strong {
    font-family: var(--wu-font-heading);
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
}

.wu-home-town-text {
    font-size: 12px;
    line-height: 1.3;
    color: #2c4a6b;
}

.wu-home-tides {
    padding: 14px 16px;
    border-radius: 8px;
    background: #f1f7f4;
}

.wu-home-tides .wu-home-h3 {
    font-size: 16px;
    color: #1f4d3a;
}

.wu-home-tides table {
    width: 100%;
    margin-top: 6px;
    border-collapse: collapse;
    font-size: 14px;
}

.wu-home-tides th,
.wu-home-tides td {
    padding: 7px 0;
    text-align: left;
}

.wu-home-tides thead th {
    font-size: 12px;
    font-weight: 600;
    color: #3d5c4e;
}

.wu-home-tides tbody tr {
    border-top: 1px solid #d8e6de;
}

.wu-home-tides tbody th {
    font-weight: 600;
}

/* ==========================================================================
   Full-width bands: Crime & Court, Sport
   ========================================================================== */

.wu-home-band {
    margin-top: 56px;
    padding: 40px 0 48px;
    background: var(--band);
    color: #fff;
}

.wu-home-band + .wu-home-band {
    margin-top: 0;
}

.wu-home-band .wu-home-story {
    --sec: var(--band);
}

.wu-home-band-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    margin-bottom: 22px;
}

.wu-home-band-line {
    margin: 2px 0 0;
    color: rgba(255, 255, 255, 0.82);
}

.wu-home-band-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border: 1.5px solid #fff;
    border-radius: 999px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.wu-home-band-button:hover {
    background: #fff;
    color: var(--band);
}

.wu-home-band-link {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.wu-home-band-link:hover {
    text-decoration: underline;
}

.wu-home-band-h3 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
}

.wu-home-band-h3:not(:first-child) {
    margin-top: 20px;
}

.wu-home-band-kicker {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.82);
}

.wu-home-crime-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 0.85fr);
    gap: 28px;
}

.wu-home-crime-lead .wu-home-story-link {
    border: 0;
}

.wu-home-crime-lead .wu-home-thumb {
    aspect-ratio: 16 / 9;
}

.wu-home-crime-lead .wu-home-story-title {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.25;
}

.wu-home-cases {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wu-home-cases li {
    border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.wu-home-cases a {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 0;
}

.wu-home-cases-title {
    font-family: var(--wu-font-heading);
    font-weight: 700;
    font-size: 17px;
    line-height: 1.3;
}

.wu-home-cases a:hover .wu-home-cases-title {
    text-decoration: underline;
}

.wu-home-appeals {
    display: flex;
    flex-direction: column;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.wu-home-appeals a {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.18);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

.wu-home-appeals a:hover {
    background: rgba(0, 0, 0, 0.28);
}

.wu-home-appeal-face {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
}

.wu-home-appeal-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wu-home-appeal-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wu-home-appeal-tag {
    align-self: flex-start;
    padding: 1px 6px;
    border-radius: 3px;
    background: #ffd84d;
    color: #3d2e00;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.wu-home-links--band {
    margin-top: 0;
}

.wu-home-links--band .wu-home-pill {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.45);
    color: #fff;
    font-size: 13px;
    min-height: 30px;
}

.wu-home-links--band .wu-home-pill:hover {
    border-color: #fff;
}

/* Scores */
.wu-home-scores {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}

.wu-home-scores a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.wu-home-scores a:hover {
    background: rgba(0, 0, 0, 0.3);
}

.wu-home-score-status {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
}

.wu-home-score-team {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-weight: 500;
}

.wu-home-score-team.is-winner {
    font-weight: 700;
}

.wu-home-score-team strong {
    font-family: var(--wu-font-heading);
    font-size: 18px;
}

.wu-home-band .wu-home-grid .wu-home-story-link {
    border: 0;
}

.wu-home-band .wu-home-grid .wu-home-thumb {
    aspect-ratio: 16 / 9;
}

/* ==========================================================================
   Politics and Community, What's On
   ========================================================================== */

.wu-home-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
}

.wu-home-pair--single {
    grid-template-columns: minmax(0, 1fr);
}

.wu-home-lines {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
}

.wu-home-lines li {
    border-top: 1px solid var(--wu-border);
}

.wu-home-lines a {
    display: block;
    padding: 12px 0;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.4;
}

.wu-home-lines a:hover {
    text-decoration: underline;
}

.wu-home-events a {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 14px;
    height: 100%;
    padding: 14px;
    border: 1px solid var(--wu-home-card-border);
    border-radius: 8px;
    background: var(--wu-bg-card);
}

.wu-home-events a:hover {
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.08);
}

.wu-home-event-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    border-radius: 6px;
    background: color-mix(in srgb, var(--sec) 12%, #fff);
    color: color-mix(in srgb, var(--sec) 75%, #000);
    line-height: 1.1;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
}

.wu-home-event-tile strong {
    font-family: var(--wu-font-heading);
    font-size: 24px;
    font-weight: 800;
    text-transform: none;
}

.wu-home-event-tile.is-now {
    background: var(--sec);
    color: #fff;
}

.wu-home-event-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.wu-home-event-title {
    font-family: var(--wu-font-heading);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.3;
}

.wu-home-events a:hover .wu-home-event-title {
    text-decoration: underline;
}

.wu-home-event-when {
    font-size: 13px;
    font-weight: 600;
    color: color-mix(in srgb, var(--sec) 75%, #000);
}

.wu-home-event-venue {
    font-size: 13px;
    color: var(--wu-text-secondary);
}

/* ==========================================================================
   Stay in touch
   ========================================================================== */

.wu-home-join-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    align-items: stretch;
}

.wu-home-join-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px;
    border: 1px solid var(--wu-home-card-border);
    border-radius: 10px;
    background: var(--wu-bg-card);
    color: var(--wu-text);
}

.wu-home-join-card p {
    margin: 0;
    font-size: 14px;
    color: var(--wu-text-secondary);
}

.wu-home-join-card--email {
    border: 0;
    background: var(--wu-home-navy);
    color: #fff;
}

.wu-home-join-card--email p {
    color: var(--wu-home-navy-text);
}

.wu-home-join-card--follow .wu-home-h3 svg {
    color: var(--wu-red);
}

.wu-home-join-card--follow .wu-follow {
    margin-top: 6px;
}

.wu-home-join-card--link > span:last-child,
.wu-home-join-card--trees > span:last-child {
    font-size: 14px;
    color: var(--wu-text-secondary);
}

.wu-home-join-card--link:hover,
.wu-home-join-card--trees:hover {
    border-color: var(--wu-text);
}

.wu-home-join-card--trees {
    border-color: transparent;
    background: #eaf4ec;
}

.wu-home-join-card--trees > span:last-child {
    color: #1f4d3a;
}

.wu-home-join-button {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    margin-top: 6px;
    padding: 0 22px;
    border-radius: 999px;
    background: var(--wu-red);
    color: #fff;
    font-weight: 700;
}

.wu-home-join-button:hover {
    background: var(--wu-red-dark);
}

/* ==========================================================================
   Explore
   ========================================================================== */

.wu-home-explore {
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid #dcdcdc;
}

.wu-home-explore .wu-home-h2 {
    margin-bottom: 20px;
}

.wu-home-explore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 28px;
}

.wu-home-explore-head {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--wu-text-secondary);
}

.wu-home-explore ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wu-home-explore li a {
    display: inline-block;
    padding: 5px 0;
    font-size: 15px;
}

.wu-home-explore li a:hover {
    color: var(--wu-red);
    text-decoration: underline;
}

/* ==========================================================================
   Narrower screens
   ========================================================================== */

@media (max-width: 1150px) {
    .wu-home-top-grid {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    }

    .wu-home-river {
        grid-column: 1 / -1;
    }

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

    .wu-home-crime-lead {
        grid-column: 1 / -1;
    }

    .wu-home-towns {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 900px) {
    .wu-home-grid--4,
    .wu-home-scores {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wu-home-brief-row,
    .wu-home-weather-grid,
    .wu-home-pair {
        grid-template-columns: minmax(0, 1fr);
    }

    .wu-home-pair {
        gap: 0;
    }
}

@media (max-width: 700px) {
    .wu-home-top {
        padding: 0 0 90px;
        margin-bottom: -40px;
    }

    .wu-home-top > .wu-container {
        padding: 0;
    }

    .wu-navy-header .wu-home-top {
        padding-top: 6px;
    }

    .wu-home-search {
        display: flex;
        align-items: center;
        gap: 10px;
        width: calc(100% - 32px);
        min-height: 46px;
        margin: 0 16px 14px;
        padding: 0 16px;
        border: 0;
        border-radius: 999px;
        background: #fff;
        color: #555;
        font-family: var(--wu-font);
        font-size: 15px;
        text-align: left;
        cursor: pointer;
    }

    .wu-home-search svg {
        flex-shrink: 0;
    }

    .wu-home-search span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .wu-home-trending {
        display: none;
    }

    .wu-home-back {
        margin: 0;
        border-radius: 0;
        border-bottom: 1px solid var(--wu-border);
    }

    .wu-home-top-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .wu-home-lead-link {
        min-height: 380px;
        border-radius: 0;
    }

    .wu-home-lead-body {
        padding: 50px 16px 18px;
    }

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

    .wu-home-lead-dek {
        font-size: 15px;
    }

    /* Side stories as rows under the lead */
    .wu-home-side {
        gap: 0;
        background: #fff;
        padding: 0 16px;
    }

    .wu-home-side .wu-home-story-link {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 104px;
        gap: 12px;
        padding: 14px 0;
        border-radius: 0;
        border-bottom: 1px solid var(--wu-border-light);
    }

    .wu-home-side .wu-home-story-link:hover {
        box-shadow: none;
    }

    .wu-home-side .wu-home-thumb {
        grid-column: 2;
        grid-row: 1;
        aspect-ratio: 4 / 3;
        min-height: 0;
        border-radius: 4px;
    }

    .wu-home-side .wu-home-story-body {
        grid-column: 1;
        grid-row: 1;
        padding: 0;
    }

    .wu-home-side .wu-home-story-title {
        font-size: 16px;
    }

    .wu-home-river {
        border-radius: 0;
        padding: 16px 16px 6px;
    }

    .wu-home-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin-right: -16px;
        padding-right: 16px;
        scrollbar-width: none;
    }

    .wu-home-chip {
        flex: 0 0 auto;
        min-height: 36px;
        font-size: 13px;
    }

    .wu-home-river-item > a {
        font-size: 15px;
    }

    /* Today in Wales: two lines of each story on a phone */
    .wu-home-brief-list span {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    .wu-home-panel {
        padding: 18px;
    }

    .wu-home-h2--big {
        font-size: 23px;
    }

    .wu-home-grid--3 {
        grid-template-columns: minmax(0, 1fr);
    }

    .wu-home-crime-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .wu-home-band {
        padding: 28px 0 32px;
    }

    /* Areas: a row to swipe */
    .wu-home-areas {
        display: flex;
        overflow-x: auto;
        margin: 0 -20px 16px;
        padding: 0 20px 4px;
        scrollbar-width: none;
    }

    .wu-home-area-tab {
        flex: 0 0 auto;
        min-height: 44px;
        border-radius: 999px;
        padding: 0 16px;
        justify-content: center;
    }

    .wu-home-area-towns {
        display: none;
    }

    .wu-home-story--row .wu-home-story-link {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 480px) {
    .wu-home-grid--4 {
        grid-template-columns: minmax(0, 1fr);
    }

    /* One column of cards is long: pictures at the side instead */
    .wu-home-grid--4 .wu-home-story-link {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 104px;
        gap: 12px;
        padding: 12px;
    }

    .wu-home-grid--4 .wu-home-thumb {
        grid-column: 2;
        grid-row: 1;
        aspect-ratio: 4 / 3;
        border-radius: 4px;
    }

    .wu-home-grid--4 .wu-home-story-body {
        grid-column: 1;
        grid-row: 1;
        padding: 0;
    }

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