body {
    margin: 0;
    padding: 0;
    background: transparent;
    text-rendering: geometricPrecision;
    font-family: Helvetica, Arial, sans-serif;
}

/* MatchGuide: no data (yet) or not to be shown */
.widget-main.empty,
.widget-main.hidden {
    visibility: hidden;
}

.cmp-matches-announcement {
    text-align: center;
}

.cmp-matches-announcement .nail,
.cmp-matches-announcement .event-logo,
.cmp-matches-announcement .league,
.cmp-matches-announcement .location,
.cmp-matches-announcement .watch,
.cmp-matches-announcement .logo {
    display: none;
}

/* ─── brush: the video titles of MatchVideo ──────────────────────────────── */

/* the strokes are a mask, painted in the color of the variant: white by default ('bright', 'preset'),
   dark with 'dark', the light color of the match widget with a color; text always in contrast */
.brush { --brush: #FFFFFF; --brush-text: #202020; --brush-muted: #444444; }
.brush.dark { --brush: #262626; --brush-text: #F2F2F2; --brush-muted: #B0B0B0; }
.brush:is(.gold, .copper, .sky, .ocean, .silver, .sunset, .sun, .jungle) {
    --brush: var(--accent-light); --brush-text: #202020; --brush-muted: #404040;
}
.brush.dark:is(.gold, .copper, .sky, .ocean, .silver, .sunset, .sun, .jungle) {
    --brush: #262626; --brush-text: var(--accent-light); --brush-muted: var(--accent);
}

.brush .cmp-matches-announcement > .content {
    position: relative;
    display: inline-block;
    width: 50rem;
    height: 20rem;
    font-size: 1.75rem;
    font-weight: bold;
    color: var(--brush-text);
}

.brush .cmp-matches-announcement > .content::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-color: var(--brush);
    -webkit-mask: url(brushstrokes.svg) no-repeat center / contain;
    mask: url(brushstrokes.svg) no-repeat center / contain;
}

.brush .pairing {
    margin: 5.5rem 7.5rem 1.5rem 7.5rem;
}

/* the logo of the event ('logo'), on the right of the first two strokes like the logo of the
   titles; the pairing moves aside for it */
.brush.logo .event-logo:not([hidden]) {
    display: block;
    position: absolute;
    top: 4.25rem;
    right: 4rem;
    width: 8rem;
    height: 8rem;
    object-fit: contain;
}

.brush.logo.has-logo .pairing {
    margin-right: 13rem;
}

.brush .date {
    display: inline-block;
    font-style: italic;
    color: var(--brush-muted);
}

.brush .date span {
    margin: 0 0.75rem;
}

.brush .team {
    font-size: larger;
}

.brush .team.home {
    margin-top: 1rem;
}

.brush .team.guest {
    margin-bottom: 1rem;
}

.brush .vs {
    display: inline-block;
    width: 5rem;
    height: 0;
    margin: 1.25rem 0 .75rem;
    border-top: 2px solid var(--brush-muted);
}

/* ─── board: the colors of the match widget ──────────────────────────────── */

.board .cmp-matches-announcement {
    text-align: left;
}

.board .cmp-matches-announcement > .content {
    display: inline-block;
    margin: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
}

.board .league {
    display: inline-block;
    margin: 0 0 0.2rem 0.3rem;
    padding: 0.15rem 0.5rem;
    border-radius: 0.3rem 0.3rem 0 0;
    background-color: var(--accent-light);
    color: var(--on-accent);
    font-size: 0.6rem;
}

.board .league:empty {
    display: none;
}

.board .pairing {
    display: flex;
    align-items: stretch;
}

.board .date,
.board .team,
.board .vs {
    display: flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
}

.board .date {
    gap: 0.5rem;
    border-radius: 0.3rem 0 0 0.3rem;
    background-color: var(--neutral);
    color: var(--on-neutral);
    font-size: 0.85rem;
}

.board .team {
    gap: 0.45rem;
    background-color: var(--accent);
    color: var(--on-accent);
}

.board .team.guest {
    border-radius: 0 0.3rem 0.3rem 0;
}

.board .vs {
    padding: 0.35rem 0.45rem;
    background-color: var(--accent-light);
    color: var(--on-accent);
}

.board .vs::before {
    content: ':';
}

.board.logos .logo:not([hidden]) {
    display: block;
    height: 1.3rem;
    max-width: 2.5rem;
    object-fit: contain;
}

/* ─── sign: a board ─────────────────────────────────────────────────────── */

.sign .cmp-matches-announcement > .content {
    position: relative;
    display: inline-block;
    min-width: 17rem;
    max-width: 18rem;
    margin: 0.5rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 1.5rem;
    text-align: center;
}

.sign .nail {
    display: block;
    position: absolute;
    width: 17px;
    height: 17px;
    top: 11px;
}

.sign .nail.left {
    left: 10px;
}

.sign .nail.right {
    right: 11px;
}

.sign .league {
    display: block;
    pointer-events: none;
    position: absolute;
    top: 2.5rem;
    left: 0;
    width: 100%;
    font-size: 6.5rem;
    font-weight: bold;
    opacity: .15;
    overflow: hidden;
    white-space: nowrap;
}

.sign .date,
.sign .location {
    padding: 0.2rem 0.3rem;
    font-size: 1.1rem;
}

.sign .date {
    display: inline-block;
    margin-bottom: 1.25rem;
    font-weight: bold;
}

.sign .date span {
    margin: 0 0.25rem;
}

.sign .team {
    font-size: 1.25rem;
    font-weight: bold;
}

.sign .vs {
    display: inline-block;
    width: 1rem;
    height: 0;
    margin: 0 0 0.45rem;
}

.sign .location {
    display: block;
    margin-top: 1.25rem;
    text-decoration: none;
}

/* the links to watch the game (only the sign, the other variants are overlays of videos): round buttons with an icon -
   a play symbol for the stream, a turning arrow for the replay - in the colors of the sign */
.sign.watchable_X .watch {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.sign .watch a {
    position: relative;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background-color: var(--sign-muted);
}

/* the icon in the color of the board, cut out of the button */
.sign .watch a::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--sign);
    -webkit-mask: var(--icon) center / 50% no-repeat;
    mask: var(--icon) center / 50% no-repeat;
}

.sign .watch a[hidden] {
    display: none;
}

.sign .watch .stream {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
}

.sign .watch .replay {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5V1L7 6l5 5V7a6 6 0 1 1-6 6H4a8 8 0 1 0 8-8z'/%3E%3C/svg%3E");
}

/* ─── sign: the colors ───
   'preset' (the default) is the dark board; 'bright', 'dark' and the colors of the match widget,
   alone or with 'dark', like the brush */

.sign {
    --sign: #73311B; --sign-text: #E9CE76; --sign-muted: #C48E44;
}
.sign.bright { --sign: #F4F1EA; --sign-text: #202020; --sign-muted: #7A5A2E; }
.sign.dark { --sign: #262626; --sign-text: #F2F2F2; --sign-muted: #A0A0A0; }
.sign:is(.gold, .copper, .sky, .ocean, .silver, .sunset, .sun, .jungle) {
    --sign: var(--accent-light); --sign-text: #202020; --sign-muted: #404040;
}
.sign.dark:is(.gold, .copper, .sky, .ocean, .silver, .sunset, .sun, .jungle) {
    --sign: #262626; --sign-text: var(--accent-light); --sign-muted: var(--accent);
}

.sign .cmp-matches-announcement > .content {
    background-color: var(--sign);
    box-shadow: 0 0.15rem 0.5rem rgba(0, 0, 0, 0.25);
}

.sign .date,
.sign .league,
.sign .location {
    color: var(--sign-muted);
}

.sign .vs {
    border-top: 1px solid var(--sign-muted);
}

.sign .team {
    color: var(--sign-text);
}

/* ─── sign: a gust of wind now and then ('wobble'), see widget.js ───
   nailed at both upper corners, the sign can't turn: the wind only pushes its lower edge a little back
   and forth, a tilt around the line of the nails, seen in perspective; the shadow follows */

.sign.wobble .cmp-matches-announcement > .content {
    transform-origin: 50% 0.9rem;
}

.sign.wobble.gust .cmp-matches-announcement > .content {
    animation: gust 2.4s ease-out;
}

@keyframes gust {
    0% { transform: perspective(40rem) rotateX(0); }
    14% { transform: perspective(40rem) rotateX(-9deg); box-shadow: 0 0.5rem 0.9rem rgba(0, 0, 0, 0.3); }
    32% { transform: perspective(40rem) rotateX(5deg); box-shadow: 0 0.05rem 0.3rem rgba(0, 0, 0, 0.2); }
    50% { transform: perspective(40rem) rotateX(-3deg); }
    68% { transform: perspective(40rem) rotateX(1.5deg); }
    84% { transform: perspective(40rem) rotateX(-0.5deg); }
    100% { transform: perspective(40rem) rotateX(0); }
}

@media (prefers-reduced-motion: reduce) {
    .sign.wobble.gust .cmp-matches-announcement > .content {
        animation: none;
    }
}
