.news-ticker {
    --ticker-accent: var(--club-accent, var(--primary-color, #70891d));
    display: flex;
    align-items: stretch;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    width: min(1160px, calc(100% - 2rem));
    max-width: 100%;
    margin: 1.5rem auto 0;
    padding: 0;
    color: #222b3b;
    background: #fffdf8;
    border-bottom: 1px solid #e8e2d6;
    border-radius: 8px;
    text-align: left;
    line-height: 1.5;
    font-size: .95rem;
}
.news-ticker .news-ticker-label {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-shrink: 0;
    padding: 1rem 1.6rem;
    background: var(--ticker-accent);
    color: var(--club-on-primary, #fff);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-radius: 8px 0 0 8px;
}
/* Tiya's content frames can be wider than its nominal flex container. */
.home-ordered-shell > .news-ticker.is-aligned {
    align-self: center;
    max-width: none;
    margin-inline: 0;
}
.news-ticker-window { min-width: 0; flex: 1; }
.news-ticker .news-ticker-items,
.news-ticker-sidebar .news-ticker-items { list-style: none; margin: 0; padding: 0; }
.news-ticker .news-ticker-items { display: flex; flex-wrap: wrap; align-items: center; }
.news-ticker .news-ticker-items li { display: flex; align-items: center; flex-wrap: wrap; gap: .8rem; padding: 1rem 1.5rem; }
.news-ticker time { color: #536419; font-weight: 600; white-space: nowrap; }
.news-ticker a { color: #222b3b; border: 0; text-decoration: underline; text-underline-offset: .2em; overflow-wrap: anywhere; }
.news-ticker a:hover { text-decoration-thickness: 2px; }
.news-ticker.is-slideshow { background: var(--club-accent-tint, #eef3e9); }
.news-ticker.is-slideshow .news-ticker-window { display: flex; align-items: center; overflow: hidden; }
.news-ticker.is-slideshow .news-ticker-items { display: block; width: 100%; min-width: 0; }
.news-ticker.is-slideshow li { flex-wrap: nowrap; min-width: 0; }
.news-ticker.is-slideshow a { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.news-ticker-controls { display: flex; align-items: center; gap: 0; flex-shrink: 0; padding-right: .4rem; }
.news-ticker-counter { font-size: .75rem; color: #45533f; padding: 0 .35rem; font-variant-numeric: tabular-nums; }
body .news-ticker .news-ticker-controls button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    min-width: 32px;
    height: 48px;
    min-height: 48px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 4px;
    box-shadow: none;
    background: transparent;
    color: #243b29;
    font: inherit;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}
body .news-ticker .news-ticker-controls button:hover { background: #dfe8d8; }
.news-ticker-status { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.news-ticker [hidden] { display: none !important; }
.news-ticker a:focus-visible, .news-ticker button:focus-visible { outline: 2px solid #222b3b; outline-offset: -2px; }
.news-ticker-sidebar { text-align: left; }
.news-ticker-sidebar li { padding: .85rem 0; border-top: 1px solid #e5e7e3; }
.news-ticker-sidebar time { display: block; margin-bottom: .25rem; font-size: .82rem; color: #626c66; }
.news-ticker-sidebar a { display: block; color: inherit; overflow-wrap: anywhere; }
/* The classic static hero normally overlaps the next section. The ticker must stay visible. */
body.landing .news-ticker + #main.home-ordered-shell { margin-top: 0; }
@media (max-width: 600px) {
    .news-ticker { flex-wrap: wrap; font-size: .88rem; }
    .news-ticker .news-ticker-label { width: 100%; padding: .55rem 1rem; border-radius: 8px 8px 0 0; }
    .news-ticker .news-ticker-items li { padding: .85rem 1rem; }
    .news-ticker.is-slideshow .news-ticker-window { flex-basis: 0; }
    .news-ticker.is-slideshow li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding: .25rem .75rem; }
    .news-ticker.is-slideshow time { font-size: .72rem; }
}
@media (pointer: coarse) {
    body .news-ticker .news-ticker-controls button { width: 44px; min-width: 44px; }
}

/* The same native dialog serves the home panel, ticker strip and article sidebar. */
body dialog.news-ticker-popup {
    box-sizing: border-box;
    width: min(860px, calc(100vw - 32px));
    max-width: none;
    max-height: calc(100dvh - 40px);
    margin: auto;
    padding: 24px;
    border: 1px solid #dce3de;
    border-radius: 18px;
    background: #fff;
    color: #24352c;
    box-shadow: 0 20px 70px #0005;
    overflow: auto;
    overscroll-behavior: contain;
    text-align: left;
}
body dialog.news-ticker-popup::backdrop { background: #15251dcc; }
body .news-ticker-popup-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid #e1e7e3; margin-bottom: 20px; padding-bottom: 16px; }
body .news-ticker-popup-head > div { min-width: 0; }
body .news-ticker-popup h2 { margin: 0; font-size: clamp(1.3rem, 3vw, 1.8rem); line-height: 1.3; color: #24352c; overflow-wrap: anywhere; }
body .news-ticker-popup-label { margin: 0 0 6px; color: #526258; font-size: .8rem; }
body .news-ticker-popup-date { margin: 8px 0 0; color: #526258; font-size: .85rem; }
body .news-ticker-popup-close { flex: 0 0 44px; display: grid; place-items: center; box-sizing: border-box; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 1px solid #cad4ce; border-radius: 50%; background: #fff; color: #24352c; font-size: 1.7rem; line-height: 1; cursor: pointer; }
body .news-ticker-popup :is(a,button):focus-visible { outline: 3px solid #244f38; outline-offset: 3px; }
body .news-ticker-popup-body { font-size: 1rem; line-height: 1.65; overflow-wrap: anywhere; }
body .news-ticker-popup-body img { max-width: 100%; height: auto; }
body .news-ticker-popup-cover { display: block; max-height: 320px; margin: 0 auto 20px; object-fit: contain; }
body .news-ticker-popup-body :is(iframe,video) { max-width: 100%; }
body .news-ticker-popup-body table { display: block; max-width: 100%; overflow-x: auto; }
@media (max-width: 736px) {
    body dialog.news-ticker-popup { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); padding: 16px; border-radius: 12px; }
}
