/*
 * ultras.css — the Ultras hub and the four team pages.
 * One layout, four moods: every team re-skins the same parts through the
 * custom properties set in its .ul-theme-* block near the end of this file.
 */

/* Moving between the hub and a team page morphs the team's panel into its header (where supported). */
@view-transition { navigation: auto; }

@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
}

.ul {
    --bg: #0a0b0e;
    --bg-2: #111318;
    --card: #14161c;
    --ink: #f4f4f0;
    --muted: #8e919b;
    --line: rgba(255, 255, 255, .1);
    --accent: #f4f4f0;
    --accent-2: #f4f4f0;
    --on-accent: #0a0b0e;
    --win: #2fd27a;
    --draw: #9aa0ab;
    --loss: #ff5468;
    --c-ferrari: #ff2a3d;
    --c-juventus: #f4f4f4;
    --c-dk: #19e3c6;
    --c-ssg: #ffb229;
    --display: 'Barlow Condensed', 'Noto Sans KR', sans-serif;
    --display-style: italic;
    --display-weight: 800;
    --display-case: uppercase;
    --display-track: 0;
    --radius: 18px;

    min-height: calc(100vh - 51px);
    background: var(--bg);
    color: var(--ink);
    font-family: 'Barlow', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    overflow-x: clip;
}

.ul *, .ul *::before, .ul *::after { box-sizing: border-box; }
.ul a { color: inherit; text-decoration: none; }
.ul a.ul-panel, .ul a.ul-panel:hover, .ul a.ul-panel:focus { color: var(--p-ink); }
.ul a:hover, .ul a:focus { color: inherit; text-decoration: none; }
.ul h1, .ul h2, .ul h3, .ul p, .ul ul, .ul ol { margin: 0; padding: 0; }
.ul ul, .ul ol { list-style: none; }
.ul button { font: inherit; color: inherit; }
.ul table { border-collapse: collapse; width: 100%; }

.ul-wrap {
    width: min(1360px, 100% - 48px);
    margin: 0 auto;
}

.ul-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--muted);
}

.ul-kicker::before {
    content: "";
    width: 26px;
    height: 2px;
    background: var(--accent);
}

/* =====================================================================
   Hub
   ===================================================================== */

.ul-hero { padding: 44px 0 26px; }

.ul-hero__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 26px;
}

.ul-wordmark {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(72px, 12vw, 176px);
    font-style: italic;
    font-weight: 800;
    line-height: .8;
    letter-spacing: -.015em;
    text-transform: uppercase;
}

.ul-wordmark span {
    display: inline-block;
    opacity: 0;
    transform: translateY(.35em) skewX(-8deg);
    animation: ul-letter .8s cubic-bezier(.2, .8, .2, 1) forwards;
    animation-delay: calc(var(--i) * 55ms);
}

@keyframes ul-letter { to { opacity: 1; transform: none; } }

.ul-lede {
    max-width: 360px;
    padding-bottom: 6px;
    font-size: 17px;
    color: var(--muted);
    text-align: right;
}

.ul-lede b { color: var(--ink); font-weight: 600; }

/* the visitor's own date and time: everything on the page is measured against it */
.ul-nowline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 18px !important;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.ul-nowline i { width: 7px; height: 7px; border-radius: 50%; background: var(--win); box-shadow: 0 0 0 0 var(--win); animation: ul-beat 2.4s ease-out infinite; }
.ul-nowline span:last-child { color: var(--muted); }

@keyframes ul-beat { 0% { box-shadow: 0 0 0 0 rgba(47, 210, 122, .7); } 70%, 100% { box-shadow: 0 0 0 9px rgba(47, 210, 122, 0); } }

.ul-live {
    display: inline-block;
    padding: 1px 8px 0;
    border-radius: 999px;
    background: var(--loss);
    color: #fff;
    font-size: .8em;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    animation: ul-blink 1.4s ease-in-out infinite;
}

/* ---------- the four panels ---------- */

.ul-panels {
    display: flex;
    gap: 10px;
    height: clamp(400px, 60vh, 620px);
}

.ul-panel {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    border-radius: var(--radius);
    isolation: isolate;
    color: var(--p-ink);
    background: var(--p-bg);
    transition: flex-grow .75s cubic-bezier(.2, .8, .2, 1), filter .5s ease;
    animation: ul-panel-in 1s cubic-bezier(.2, .8, .2, 1) backwards;
    animation-delay: calc(var(--i) * 110ms + 150ms);
}

@keyframes ul-panel-in {
    from { clip-path: inset(100% 0 0 0 round 18px); transform: translateY(40px); }
    to { clip-path: inset(0 0 0 0 round 18px); transform: none; }
}

.ul-panel--ferrari { --p-bg: #c40024; --p-ink: #fff; --p-accent: #ffe100; view-transition-name: ul-ferrari; }
.ul-panel--juventus { --p-bg: #0c0c0c; --p-ink: #fff; --p-accent: #fff; view-transition-name: ul-juventus; }
.ul-panel--dk { --p-bg: #04121a; --p-ink: #eafffb; --p-accent: #19e3c6; view-transition-name: ul-dk; }
.ul-panel--ssg { --p-bg: #f1e8d6; --p-ink: #231815; --p-accent: #ce0e2d; view-transition-name: ul-ssg; }

.ul-panel__art {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    z-index: -2;
    width: 880px;
    margin-left: -440px;
}

.ul-panel__shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to top, var(--p-shade, rgba(0, 0, 0, .78)) 0%, transparent 62%);
}

.ul-panel--ssg { --p-shade: rgba(241, 232, 214, .96); }
.ul-panel--ferrari { --p-shade: rgba(110, 0, 20, .9); }

.ul-panel__top {
    position: absolute;
    top: 18px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.ul-panel__tag {
    padding: 5px 10px 4px;
    border-radius: 999px;
    background: var(--p-ink);
    color: var(--p-bg);
}

.ul-panel--juventus .ul-panel__tag { color: #0c0c0c; }

.ul-panel__body {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 20px;
}

.ul-panel__small {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
    opacity: .82;
}

.ul-panel__big {
    margin-top: 2px !important;
    font-size: clamp(38px, 4.3vw, 70px);
    line-height: .92;
    white-space: nowrap;
}

.ul-panel--ferrari .ul-panel__big { font: 700 clamp(34px, 3.5vw, 58px)/.95 'Goldman', sans-serif; letter-spacing: 0; text-transform: uppercase; }
.ul-panel--juventus .ul-panel__big { font: 900 clamp(34px, 3.7vw, 60px)/.95 'Bodoni Moda', serif; letter-spacing: -.02em; }
.ul-panel--dk .ul-panel__big { font: 700 clamp(48px, 5.2vw, 84px)/.9 'Chakra Petch', sans-serif; letter-spacing: .02em; color: var(--p-accent); }
.ul-panel--ssg .ul-panel__big { font: 400 clamp(34px, 3.6vw, 58px)/1 'Alfa Slab One', serif; color: var(--p-accent); }

.ul-panel__mini { display: none; }

.ul-panel__more {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows .6s cubic-bezier(.2, .8, .2, 1), opacity .45s ease;
}

.ul-panel__more > div { overflow: hidden; min-height: 0; }

.ul-panel__rows {
    margin-top: 14px !important;
    padding-top: 12px !important;
    border-top: 1px solid currentColor;
    border-top-color: color-mix(in srgb, currentColor 28%, transparent);
    font-size: 14.5px;
}

.ul-panel__rows li {
    display: flex;
    gap: 12px;
    padding: 3px 0;
    white-space: nowrap;
}

.ul-panel__rows li > span:first-child {
    flex: none;
    width: 42px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .16em;
    line-height: 22px;
    text-transform: uppercase;
    opacity: .65;
}

.ul-panel__rows b { overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.ul-panel__rows em { margin-left: auto; padding-left: 8px; font-style: normal; font-weight: 700; color: var(--p-accent); }
.ul-panel--ssg .ul-panel__rows em, .ul-panel--ferrari .ul-panel__rows em { color: inherit; }

.ul-panel__go {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.ul-panel__go::after { content: "→"; font-size: 16px; transition: transform .3s; }
.ul-panel:hover .ul-panel__go::after { transform: translateX(6px); }

@media (hover: hover) and (min-width: 1001px) {
    .ul-panels:hover .ul-panel:not(:hover) { filter: saturate(.5) brightness(.62); }
    .ul-panel:hover, .ul-panel:focus-visible { flex-grow: 2.15; }
    .ul-panel:hover .ul-panel__more, .ul-panel:focus-visible .ul-panel__more { grid-template-rows: 1fr; opacity: 1; }
}

@media (hover: none), (max-width: 1000px) {
    .ul-panel__more { grid-template-rows: 1fr; opacity: 1; }
}

.ul-panel:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* ---------- artwork ---------- */

.ul-art { display: block; width: 100%; height: 100%; overflow: visible; }

/* Ferrari: the Circuit de Monaco; two streaks of light lap it */
.ul-art--ferrari path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ul-art--ferrari .ul-art__echo { stroke: rgba(255, 255, 255, .055); stroke-width: 16; }
.ul-art--ferrari .ul-art__echo--far { stroke: rgba(255, 255, 255, .035); stroke-width: 36; }
.ul-art--ferrari .ul-art__kerb { stroke: #fff; stroke-width: 3.6; }
.ul-art--ferrari .ul-art__tarmac { stroke: #7a0015; stroke-width: 2.2; }
.ul-art--ferrari .ul-art__line { stroke: #fff; stroke-width: 1.1; stroke-linecap: butt; }
.ul-art--ferrari .ul-art__car { --lap: 9s; stroke-width: 1.8; stroke-dasharray: 64 936; animation: ul-lap var(--lap) linear infinite; animation-play-state: paused; }
.ul-art--ferrari .ul-art__car--a { stroke: #ffe100; stroke-dashoffset: 940; opacity: .5; animation-delay: calc(var(--lap) * -.06); }
.ul-art--ferrari .ul-art__car--b { stroke: #fff; stroke-dashoffset: 510; opacity: .38; animation-delay: calc(var(--lap) * -.49); }
.ul-art--ferrari .ul-art__car--head { stroke-dasharray: 9 991; opacity: 1; }
.ul-art--ferrari .ul-art__car--a.ul-art__car--head { stroke: #fff27a; stroke-dashoffset: 885; animation-delay: calc(var(--lap) * -.115); filter: drop-shadow(0 0 3px #ffe100); }
.ul-art--ferrari .ul-art__car--b.ul-art__car--head { stroke-dashoffset: 455; animation-delay: calc(var(--lap) * -.545); }

@keyframes ul-lap { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }

/* Juventus */
.ul-art--juventus { background: #0c0c0c; }
.ul-art--juventus .ul-art__stripes path { fill: #f5f5f5; }
.ul-art--juventus .ul-art__stripes { transition: transform 1.1s cubic-bezier(.2, .8, .2, 1); transform-origin: 50% 50%; }
.ul-art--juventus .ul-art__pitch { fill: none; stroke: #8b8b8b; stroke-width: 1.4; mix-blend-mode: difference; opacity: .9; }
.ul-art--juventus .ul-art__pass { fill: none; stroke: #c8a45a; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1s cubic-bezier(.5, 0, .2, 1); }
.ul-art--juventus .ul-art__ball { fill: #c8a45a; opacity: 0; transition: opacity .3s .8s; }

/* DK */
.ul-art--dk .ul-art__hex { opacity: .5; }
.ul-art--dk pattern path { stroke: rgba(25, 227, 198, .2); stroke-width: 1; }
.ul-art--dk .ul-art__frame { fill: rgba(25, 227, 198, .05); stroke: rgba(25, 227, 198, .35); stroke-width: 1; }
.ul-art--dk .ul-art__lanes path { fill: none; stroke: #19e3c6; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; opacity: .9; }
.ul-art--dk .ul-art__river { fill: none; stroke: #5d7cff; stroke-width: 1.6; stroke-dasharray: 3 5; opacity: .8; }
.ul-art--dk .ul-art__bases rect { fill: #04121a; stroke: #19e3c6; stroke-width: 2; }
.ul-art--dk .ul-art__pings circle { fill: none; stroke: #eafffb; stroke-width: 1.6; transform-box: fill-box; transform-origin: center; animation: ul-ping 2.2s ease-out infinite; animation-play-state: paused; opacity: 0; }
.ul-art--dk .ul-art__pings circle:nth-child(2) { animation-delay: .5s; }
.ul-art--dk .ul-art__pings circle:nth-child(3) { animation-delay: 1s; }
.ul-art--dk .ul-art__pings circle:nth-child(4) { animation-delay: 1.5s; }

@keyframes ul-ping { 0% { opacity: 1; transform: scale(.4); } 100% { opacity: 0; transform: scale(3.6); } }
@keyframes ul-draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }

/* SSG */
.ul-art--ssg { background: #f1e8d6; }
.ul-art--ssg .ul-art__fence { fill: none; stroke: #231815; stroke-width: 2; stroke-dasharray: 2 9; opacity: .5; }
.ul-art--ssg .ul-art__grass { fill: #dfe6c4; }
.ul-art--ssg .ul-art__infield { fill: #e3c79b; }
.ul-art--ssg .ul-art__lines { fill: #f1e8d6; stroke: #fffaf0; stroke-width: 2; }
.ul-art--ssg .ul-art__bases path { fill: #fffaf0; stroke: #231815; stroke-width: 1.2; }
.ul-art--ssg .ul-art__fly { fill: none; stroke: #ce0e2d; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 3 6; opacity: 0; transition: opacity .4s; }
.ul-art--ssg .ul-art__ball { opacity: 0; transition: opacity .3s; }
.ul-art--ssg .ul-art__ball circle { fill: #fffaf0; stroke: #231815; stroke-width: 1.5; }
.ul-art--ssg .ul-art__ball path { fill: none; stroke: #ce0e2d; stroke-width: 1.6; stroke-dasharray: 2 2; }

/* artwork comes alive under the pointer, on a touch screen while its tile is in view, and in a team page's header */
:is(.ul-panel:hover, .ul-panel.is-live, .ul-thero) .ul-art__car { animation-play-state: running; }
:is(.ul-panel:hover, .ul-panel.is-live, .ul-thero) .ul-art--juventus .ul-art__stripes { transform: skewX(-9deg) translateX(-18px); }
:is(.ul-panel:hover, .ul-panel.is-live, .ul-thero) .ul-art__pass { stroke-dashoffset: 0; }
:is(.ul-panel:hover, .ul-panel.is-live, .ul-thero) .ul-art--juventus .ul-art__ball { opacity: 1; }
:is(.ul-panel:hover, .ul-panel.is-live) .ul-art__lanes path { animation: ul-draw 1.1s cubic-bezier(.5, 0, .2, 1) both; }
:is(.ul-panel:hover, .ul-panel.is-live) .ul-art__lanes path:nth-child(2) { animation-delay: .12s; }
:is(.ul-panel:hover, .ul-panel.is-live) .ul-art__lanes path:nth-child(3) { animation-delay: .24s; }
:is(.ul-panel:hover, .ul-panel.is-live, .ul-thero) .ul-art__pings circle { animation-play-state: running; }
:is(.ul-panel:hover, .ul-panel.is-live, .ul-thero) .ul-art__fly { opacity: .9; }
:is(.ul-panel:hover, .ul-panel.is-live, .ul-thero) .ul-art--ssg .ul-art__ball { opacity: 1; animation: ul-homer 1.1s cubic-bezier(.3, .6, .4, 1) both; }

@keyframes ul-homer {
    0% { transform: translate(-86px, 154px) scale(.45); opacity: 0; }
    15% { opacity: 1; }
    100% { transform: none; opacity: 1; }
}

/* ---------- sections ---------- */

.ul-section { padding: 44px 0 10px; }

.ul-section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 24px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.ul-h2 {
    margin-top: 8px !important;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(34px, 4vw, 54px);
    font-style: italic;
    font-weight: 800;
    line-height: .95;
    text-transform: uppercase;
}

.ul-note { font-size: 13px; color: var(--muted); }

/* next up */
.ul-nexts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.ul-nextcard {
    position: relative;
    display: block;
    overflow: hidden;
    padding: 18px 18px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), border-color .35s;
}

.ul-nextcard::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--t);
}

.ul-nextcard:hover { transform: translateY(-4px); border-color: var(--t); }

.ul-nextcard__team {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--t);
}

.ul-nextcard__team span:last-child { color: var(--muted); }
.ul-nextcard__team .ul-nextcard__flag { margin: -3px 0; padding: 3px 9px 2px; border-radius: 999px; background: var(--t); color: #0a0b0e; letter-spacing: .12em; }
.ul-nextcard__team .ul-nextcard__flag.is-live { background: var(--loss); color: #fff; animation: ul-blink 1.4s ease-in-out infinite; }

.ul-nextcard__title {
    margin-top: 10px;
    overflow: hidden;
    font-family: 'Barlow Condensed', 'Noto Sans KR', sans-serif;
    font-size: 27px;
    font-weight: 700;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ul-nextcard__meta { margin-top: 4px; font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ul-nextcard__count {
    margin-top: 14px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.ul-nextcard__count small { margin-left: 8px; font-family: 'Barlow', sans-serif; font-size: 12px; font-weight: 500; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.ul-nextcard.is-off .ul-nextcard__count { font-size: 22px; color: var(--muted); }

/* ---------- calendar ---------- */

.ul-filters { display: flex; gap: 8px; flex-wrap: wrap; }

.ul-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 13px 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .25s, border-color .25s, background .25s;
}

.ul-filter i { width: 10px; height: 10px; border-radius: 50%; background: var(--t); }
.ul-filter[aria-pressed="false"] { opacity: .4; }
.ul-filter[aria-pressed="false"] i { background: transparent; box-shadow: 0 0 0 1.5px var(--t) inset; }
.ul-filter:hover { border-color: var(--t); }
.ul-filter:focus-visible { outline: 2px solid var(--t); outline-offset: 2px; }

.ul-cal {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 14px;
    align-items: start;
}

.ul-cal__main {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
}

.ul-cal__bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.ul-cal__month {
    flex: 1;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.ul-cal__nav {
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s, border-color .2s, transform .2s;
}

.ul-cal__nav.is-today { width: auto; padding: 0 14px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.ul-cal__nav:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .3); }
.ul-cal__nav:active { transform: scale(.94); }
.ul-cal__nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.ul-cal__dow, .ul-cal__grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.ul-cal__dow { margin-bottom: 6px; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.ul-cal__dow span { padding-left: 8px; }

.ul-cal__grid.is-next { animation: ul-slide-l .4s cubic-bezier(.2, .8, .2, 1); }
.ul-cal__grid.is-prev { animation: ul-slide-r .4s cubic-bezier(.2, .8, .2, 1); }

@keyframes ul-slide-l { from { opacity: 0; transform: translateX(22px); } }
@keyframes ul-slide-r { from { opacity: 0; transform: translateX(-22px); } }

.ul-day {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-height: 98px;
    padding: 7px 7px 6px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: rgba(255, 255, 255, .03);
    text-align: left;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}

.ul-day:hover { background: rgba(255, 255, 255, .07); }
.ul-day:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.ul-day.is-out { opacity: .32; }
.ul-day.is-past { background: rgba(255, 255, 255, .015); }
.ul-day.is-past .ul-day__n { opacity: .55; }
.ul-day.is-empty { cursor: default; }
.ul-day.is-selected { border-color: rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .08); }

.ul-day__n { font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--muted); font-variant-numeric: tabular-nums; }
.ul-day.is-today .ul-day__n { display: inline-flex; align-self: flex-start; padding: 0 7px; border-radius: 999px; background: #fff; color: #0a0b0e; }

.ul-chip {
    display: block;
    overflow: hidden;
    padding: 2px 6px 2px 7px;
    border-left: 3px solid var(--t);
    border-radius: 3px 6px 6px 3px;
    background: color-mix(in srgb, var(--t) 16%, transparent);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ul-chip__a { display: none; font-weight: 700; }
.ul-chip.is-minor { background: transparent; color: var(--muted); font-weight: 500; }
.ul-chip.is-done { opacity: .62; }
.ul-chip b { font-weight: 700; color: var(--t); }
.ul-day__more { font-size: 11px; color: var(--muted); padding-left: 7px; }
.ul-day__dots { display: none; gap: 3px; flex-wrap: wrap; margin-top: auto; }
.ul-day__dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--t); }

/* agenda */
.ul-agenda {
    position: sticky;
    top: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
}

.ul-agenda__title { font-family: 'Barlow Condensed', sans-serif; font-size: 24px; font-weight: 700; line-height: 1.1; text-transform: uppercase; }
.ul-agenda__sub { margin-top: 2px; font-size: 13px; color: var(--muted); }
.ul-agenda__list { margin-top: 14px !important; display: grid; gap: 8px; }

.ul-item {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 2px 12px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
    border-left: 3px solid var(--t);
    animation: ul-item-in .45s cubic-bezier(.2, .8, .2, 1) backwards;
    animation-delay: calc(var(--i, 0) * 45ms);
    transition: background .2s;
}

a.ul-item:hover { background: rgba(255, 255, 255, .09); }

@keyframes ul-item-in { from { opacity: 0; transform: translateY(10px); } }

.ul-item__when { font-size: 12px; line-height: 1.25; color: var(--muted); font-variant-numeric: tabular-nums; }
.ul-item__when b { display: block; font-size: 15px; font-weight: 700; color: var(--ink); }
.ul-item__what { min-width: 0; }
.ul-item__what b { display: block; overflow: hidden; font-size: 15px; font-weight: 600; line-height: 1.25; white-space: nowrap; text-overflow: ellipsis; }
.ul-item__what > span { display: block; overflow: hidden; font-size: 12.5px; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.ul-item__what > span i { font-style: normal; font-weight: 700; color: var(--t); }
.ul-item__res { font-size: 14px; font-weight: 700; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ul-item__rel { font-size: 12px; font-weight: 600; color: var(--muted); }
.ul-agenda__empty { margin-top: 14px !important; font-size: 14px; color: var(--muted); }

/* headlines: one column per team */
.ul-newstabs { display: none; }

.ul-newscols {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
}

.ul-newscol {
    padding: 16px 16px 6px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--t);
    border-radius: 4px 4px var(--radius) var(--radius);
    background: var(--card);
}

.ul-newscol__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.ul-newscol__head span { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--t); white-space: nowrap; }
.ul-newscol__head i, .ul-newstab i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--t); }
.ul-newscol__head a { flex: none; color: var(--muted); transition: color .2s; }
.ul-newscol__head a:hover { color: var(--ink); }

.ul-headline {
    display: block;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    transition: padding .3s cubic-bezier(.2, .8, .2, 1);
}

.ul-headline:hover { padding-left: 8px; }
.ul-headline:hover .ul-headline__title { color: var(--t); }
.ul-headline__title { display: block; font-size: 15px; font-weight: 600; line-height: 1.38; transition: color .2s; }
.ul-headline__meta { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }

.ul-newstab {
    display: inline-flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 0;
    padding: 9px 6px 8px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .04em;
    white-space: nowrap;
    color: var(--muted) !important;
    cursor: pointer;
    transition: background .25s, color .25s;
}

.ul-newstab[aria-selected="true"] { background: color-mix(in srgb, var(--t) 18%, transparent); color: var(--ink) !important; box-shadow: 0 0 0 1px var(--t) inset; }
.ul-newstab:focus-visible { outline: 2px solid var(--t); outline-offset: 2px; }

.ul-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px 24px;
    flex-wrap: wrap;
    margin-top: 56px;
    padding: 18px 0 40px;
    border-top: 1px solid var(--line);
    font-size: 12.5px;
    color: var(--muted);
}

/* =====================================================================
   Team pages
   ===================================================================== */

.ul-thero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    min-height: 360px;
    color: var(--h-ink, #fff);
    background: var(--h-bg, #111);
}

.ul-thero__art { position: absolute; inset: 0; z-index: -2; }
.ul-thero__art .ul-art {
    position: absolute;
    right: 3%;
    top: 50%;
    width: auto;
    height: 128%;
    aspect-ratio: 4 / 3;
    transform: translateY(-45%);
    -webkit-mask-image: radial-gradient(ellipse 64% 64% at 50% 50%, #000 58%, transparent 100%);
    mask-image: radial-gradient(ellipse 64% 64% at 50% 50%, #000 58%, transparent 100%);
}

.ul-theme-ferrari .ul-thero__art .ul-art { right: -2%; height: 172%; transform: translateY(-36%); }

/* Juventus: the stripes run edge to edge instead */
.ul-theme-juventus .ul-thero__art .ul-art {
    right: 0;
    top: 0;
    width: min(62%, 900px);
    height: 100%;
    aspect-ratio: auto;
    transform: none;
    -webkit-mask-image: none;
    mask-image: none;
}
.ul-thero__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--h-bg) 30%, transparent 78%); }

.ul-thero__in {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 360px;
    padding: 22px 0 28px;
}

.ul-thero__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ul-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    opacity: .85;
    transition: gap .25s, opacity .25s;
}

.ul-back:hover { gap: 13px; opacity: 1; }

.ul-switch {
    display: flex;
    gap: 6px;
    padding: 5px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--h-bg, #111) 72%, transparent);
    backdrop-filter: blur(8px);
}

.ul-switch a {
    padding: 5px 11px 4px;
    border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    transition: background .25s, color .25s, border-color .25s;
}

.ul-switch a:hover, .ul-switch a[aria-current="page"] { background: var(--h-ink, #fff); border-color: var(--h-ink, #fff); color: var(--h-bg, #111); }

.ul-thero__tag { font-size: 13px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; opacity: .85; }

.ul-thero__name {
    margin-top: 6px !important;
    font-family: var(--display);
    font-size: clamp(54px, 9vw, 132px);
    font-style: var(--display-style);
    font-weight: var(--display-weight);
    line-height: .88;
    letter-spacing: var(--display-track);
    text-transform: var(--display-case);
}

.ul-thero__name .ul-word { display: inline-block; white-space: nowrap; animation: none; }

.ul-thero__name span {
    display: inline-block;
    animation: ul-letter .8s cubic-bezier(.2, .8, .2, 1) backwards;
    animation-delay: calc(var(--i) * 40ms + 120ms);
}

.ul-thero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 38px;
    margin-top: 22px !important;
}

.ul-stat b {
    display: block;
    font-family: var(--display);
    font-size: 38px;
    font-style: var(--display-style);
    font-weight: var(--display-weight);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.ul-stat span { font-size: 11.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; opacity: .8; }

/* team and competition badges, country flags */
.ul-logo { flex: none; width: 28px; height: 28px; object-fit: contain; vertical-align: middle; }
.ul-logo--xs { width: 15px; height: 15px; vertical-align: -3px; }
.ul-logo--sm { width: 20px; height: 20px; margin-right: 8px; vertical-align: -5px; }
.ul-flag { flex: none; width: 28px; height: 21px; border-radius: 4px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, .22); vertical-align: middle; }

/* on the dark pages a badge sits on a light chip, so dark marks stay readable */
.ul-theme-dk .ul-logo, .ul-theme-ferrari .ul-logo { padding: 2px; border-radius: 6px; background: #eef2f5; }
.ul-theme-dk .ul-logo--xs, .ul-theme-ferrari .ul-logo--xs { padding: 1px; border-radius: 4px; }

.ul-thero__tag { display: flex; align-items: center; gap: 12px; }
.ul-logo.ul-thero__badge { width: 46px; height: 46px; padding: 6px; border-radius: 12px; background: #fff; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .6); }

/* next match: the two sides face to face */
.ul-match {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 6px 0 2px;
}

.ul-match__side { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; text-align: center; }
.ul-match__side .ul-logo { width: 68px; height: 68px; }
.ul-theme-dk .ul-match__side .ul-logo { padding: 6px; border-radius: 12px; }

.ul-match__side b {
    max-width: 100%;
    overflow: hidden;
    font-family: var(--display);
    font-size: clamp(19px, 2.2vw, 28px);
    font-style: var(--display-style);
    font-weight: var(--display-weight);
    line-height: 1.1;
    letter-spacing: var(--display-track);
    text-overflow: ellipsis;
}

.ul-match__side.is-us b { color: var(--accent); }
.ul-match__vs { font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.ul-next__meta--center { justify-content: center; text-align: center; }
.ul-next__title .ul-flag { width: .95em; height: .7em; margin-right: .32em; border-radius: .12em; vertical-align: -.02em; }
.ul-count--center { justify-content: center; }
.ul-count__label--center { text-align: center; }
.ul-last__meta .ul-flag { width: 20px; height: 15px; margin-right: 7px; border-radius: 3px; vertical-align: -2px; }
.ul-last__meta .ul-logo--xs { margin-right: 5px; }
.ul-score__side .ul-logo { display: block; width: 44px; height: 44px; margin: 0 auto 8px; }
.ul-theme-dk .ul-score__side .ul-logo { padding: 4px; border-radius: 9px; }
.ul-comp b .ul-logo--sm { margin-right: 8px; }

/* F1: the last five races, one line per driver */
.ul-form--drivers { flex-wrap: wrap; align-items: flex-start; row-gap: 8px; }
.ul-form--drivers .ul-form__label { margin-right: auto; padding-top: 6px; }
.ul-form--drivers > div { display: grid; gap: 6px; }
.ul-form__line { display: flex; align-items: center; gap: 6px; }
.ul-form__line b { width: 34px; font-size: 11px; font-weight: 700; letter-spacing: .14em; color: var(--muted); }

/* baseball: the season as one bar per series, in a card that spans the page */
.ul-season { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; }
.ul-season .ul-splits { grid-template-columns: minmax(0, 1fr); margin: 0; }

.ul-schart { display: grid; gap: 6px; }
.ul-schart__row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ul-schart__row:last-child { border-bottom: 0; }
.ul-schart__label b { display: block; font-family: var(--display); font-size: 18px; font-weight: var(--display-weight); line-height: 1.2; }
.ul-schart__label span { font-size: 12px; color: var(--muted); }
.ul-schart__bars { display: flex; flex-wrap: wrap; gap: 8px 4px; min-width: 0; }

/* every series takes the same room: a bar over a badge of one size */
.ul-sbar { --u: 12px; --w: 44px; display: flex; flex: 0 0 var(--w); flex-direction: column; align-items: center; gap: 6px; width: var(--w); }
.ul-sbar__plot { position: relative; width: 100%; height: calc(var(--u) * 6 + 30px); }
.ul-sbar__plot::before { content: ""; position: absolute; left: -2px; right: -2px; top: 50%; height: 1px; background: var(--line); }

.ul-sbar__badge {
    display: grid;
    place-items: center;
    width: calc(var(--w) - 8px);
    height: calc(var(--w) - 8px);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 1px var(--line);
}

.ul-sbar__badge .ul-logo { width: 86%; height: 86%; }

.ul-sbar i {
    position: absolute;
    left: 22%;
    right: 22%;
    height: calc(var(--u) * var(--n));
    border-radius: 3px;
    transform-origin: 50% 100%;
    animation: ul-grow .5s cubic-bezier(.2, .8, .2, 1) backwards;
    animation-delay: calc(var(--i, 0) * 22ms + 150ms);
}

.ul-sbar.is-up i { bottom: 50%; --c: var(--win); }
.ul-sbar.is-down i { top: calc(50% + 1px); --c: var(--loss); transform-origin: 50% 0; }
.ul-sbar.is-flat i { top: calc(50% - 2px); height: 5px; left: 38%; right: 38%; border-radius: 50%; --c: var(--draw); }
.ul-sbar.is-home i, .ul-schart__key i.is-home { background: var(--c, var(--win)); }
.ul-sbar.is-away i, .ul-schart__key i.is-away {
    background: repeating-linear-gradient(135deg, var(--c, var(--win)) 0 2px, transparent 2px 4.5px);
    box-shadow: 0 0 0 1.5px var(--c, var(--win)) inset;
}

.ul-sbar em {
    position: absolute;
    left: 0;
    right: 0;
    font-size: 10.5px;
    font-style: normal;
    font-weight: 700;
    line-height: 12px;
    text-align: center;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.ul-sbar.is-up em { bottom: calc(50% + var(--u) * var(--n) + 2px); }
.ul-sbar.is-down em { top: calc(50% + var(--u) * var(--n) + 3px); }
.ul-sbar.is-flat em { display: none; }

@keyframes ul-grow { from { transform: scaleY(0); } }

.ul-schart__key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.ul-schart__key i { display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 3px; vertical-align: -2px; }

/* LoL: a tournament's record — matches won and lost, and the sets inside them */
.ul-rec { padding: 13px 14px 12px; border-radius: 12px; background: var(--bg); box-shadow: 0 0 0 1px var(--line) inset; }
.ul-rec__name { display: flex; align-items: baseline; gap: 10px; min-width: 0; margin-bottom: 8px; font-size: 16px; font-weight: 700; white-space: nowrap; }
.ul-rec__name small { flex: 1; min-width: 0; overflow: hidden; font-size: 11.5px; font-weight: 500; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.ul-rec__line { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 3px 0; }
.ul-rec__line span { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.ul-rec__line b { grid-column: 3; grid-row: 1; font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ul-rec__line b i { font-style: normal; opacity: .4; }
.ul-rec__line .ul-bar { grid-column: 2; grid-row: 1; }
.ul-rec__line + .ul-rec__line .ul-bar { height: 4px; opacity: .8; }

/* a phone shows one group of cards at a time; this is its tab bar (hidden on wider screens) */
.ul-mtabs { display: none; }

/* ---------- cards ---------- */

.ul-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 14px;
    align-items: start;
    padding: 22px 0 0;
}

.ul-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.ul-wide { margin-top: 14px; }

.ul-card {
    position: relative;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
}


.ul-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 12px;
    margin-bottom: 16px;
}

.ul-card__head > div { min-width: 0; max-width: 100%; }
.ul-card__title { white-space: nowrap; }

.ul-card__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--muted);
}

.ul-card__title::before { content: ""; width: 8px; height: 8px; background: var(--accent); }

.ul-pill {
    padding: 3px 10px 2px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--on-accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    white-space: nowrap;
}

.ul-pill--ghost { background: transparent; color: var(--muted); box-shadow: 0 0 0 1px var(--line) inset; }
.ul-pill--live { background: var(--loss); color: #fff; animation: ul-blink 1.4s ease-in-out infinite; }

@keyframes ul-blink { 50% { opacity: .55; } }

/* next event */
.ul-next__title {
    font-family: var(--display);
    font-size: clamp(34px, 4.4vw, 58px);
    font-style: var(--display-style);
    font-weight: var(--display-weight);
    line-height: .98;
    letter-spacing: var(--display-track);
    text-transform: var(--display-case);
}

.ul-next__meta { margin-top: 10px !important; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14.5px; color: var(--muted); }
.ul-next__meta b { color: var(--ink); font-weight: 600; }

.ul-count {
    display: flex;
    gap: 8px;
    margin-top: 22px;
}

.ul-count span {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 76px;
    padding: 12px 8px 9px;
    border-radius: 12px;
    background: var(--bg);
    box-shadow: 0 0 0 1px var(--line) inset;
}

.ul-count b {
    font-family: var(--display);
    font-size: 42px;
    font-style: var(--display-style);
    font-weight: var(--display-weight);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.ul-count i { margin-top: 4px; font-size: 10.5px; font-style: normal; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.ul-count__label { margin-top: 10px; font-size: 13px; color: var(--muted); }
.ul-count__label b { color: var(--ink); font-weight: 600; }

.ul-off { font-size: 16px; color: var(--muted); }
.ul-off b { color: var(--ink); }

/* F1: session timetable */
.ul-sessions { margin-top: 20px !important; border-top: 1px solid var(--line); }

.ul-sessions li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 16px;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
}

.ul-sessions li.is-past { opacity: .42; }
.ul-sessions li.is-next b { color: var(--accent); }
.ul-sessions b { font-weight: 600; }
.ul-sessions span { color: var(--muted); font-variant-numeric: tabular-nums; }
.ul-sessions em { min-width: 48px; font-style: normal; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

/* latest result */
.ul-score {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    text-align: center;
}

.ul-score__side { min-width: 0; }
.ul-score__side b { display: block; overflow: hidden; font-size: 17px; font-weight: 700; line-height: 1.2; text-overflow: ellipsis; }
.ul-score__side span { font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.ul-score__side.is-us b { color: var(--accent); }

.ul-score__num {
    font-family: var(--display);
    font-size: clamp(54px, 6vw, 84px);
    font-style: var(--display-style);
    font-weight: var(--display-weight);
    line-height: .9;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ul-score__num i { margin: 0 .12em; font-style: normal; opacity: .35; }
.ul-last__meta { margin-top: 14px !important; font-size: 13.5px; color: var(--muted); text-align: center; }

.ul-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.ul-form__label { margin-right: auto; font-size: 11.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

.ul-res {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    background: var(--draw);
    animation: ul-pop .5s cubic-bezier(.3, 1.6, .5, 1) backwards;
    animation-delay: calc(var(--i, 0) * 70ms + 200ms);
}

.ul-res--W { background: var(--win); }
.ul-res--L { background: var(--loss); }
.ul-res--sm { width: 24px; height: 24px; border-radius: 6px; font-size: 11.5px; animation: none; }

@keyframes ul-pop { from { transform: scale(0); } }

/* F1: finishing positions — every chip the same size; gold, silver and bronze for the podium */
.ul-pos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    flex: none;
    width: 48px;
    height: 26px;
    border-radius: 7px;
    background: var(--bg);
    box-shadow: 0 0 0 1px var(--line) inset;
    font-family: var(--display);
    font-size: 18px;
    font-style: var(--display-style);
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ul-pos small { font-size: .62em; font-style: normal; font-weight: 700; opacity: .6; }
.ul-pos--points { box-shadow: 0 0 0 1.5px var(--accent) inset; }
.ul-pos--p1 { background: linear-gradient(135deg, #fff1a8 0%, #ffcc33 45%, #f5a800 100%); color: #2b1b00; box-shadow: 0 0 0 1px #ffd95e, 0 0 16px -2px rgba(255, 196, 0, .85); }
.ul-pos--p2 { background: linear-gradient(135deg, #f1f3f6, #b9c0ca); color: #1b1e24; box-shadow: none; }
.ul-pos--p3 { background: linear-gradient(135deg, #e3a877, #b06f3c); color: #241307; box-shadow: none; }
.ul-pos--p1 small, .ul-pos--p2 small, .ul-pos--p3 small { opacity: .7; }
.ul-pos--out, .ul-pos--none { color: var(--muted); font-family: inherit; font-size: 11px; font-style: normal; font-weight: 700; letter-spacing: .08em; box-shadow: 0 0 0 1px var(--line) inset; }
.ul-pos--out { background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(255, 255, 255, .05) 4px 8px), var(--bg); }

.ul-f1last { display: grid; gap: 10px; }

.ul-f1row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--bg);
}

.ul-f1row .ul-pos { width: 64px; height: 40px; font-size: 28px; border-radius: 9px; }
.ul-f1row .ul-pos--out { font-size: 14px; }
.ul-f1row b { display: block; font-size: 17px; font-weight: 700; line-height: 1.2; }
.ul-f1row span { font-size: 13px; color: var(--muted); }
.ul-f1row em { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* tabs */
.ul-tabs { display: inline-flex; padding: 3px; border-radius: 999px; box-shadow: 0 0 0 1px var(--line) inset; }

.ul-tab {
    padding: 5px 13px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted) !important;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .04em;
    white-space: nowrap;
    cursor: pointer;
    transition: background .25s, color .25s;
}

.ul-tab[aria-selected="true"] { background: var(--accent); color: var(--on-accent) !important; }
.ul-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ul-tabs--scroll { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.ul-tabs--scroll::-webkit-scrollbar { display: none; }

/* fixtures & results */
.ul-list { display: grid; }

.ul-group {
    margin: 16px 0 4px !important;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--muted);
}

.ul-group:first-child { margin-top: 0 !important; }

.ul-row {
    display: grid;
    grid-template-columns: 78px 30px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
}

.ul-row:last-child { border-bottom: 0; }
.ul-row.is-next { margin: 0 -10px; padding: 10px; border-radius: 10px; border-bottom-color: transparent; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.ul-row__when { font-size: 13px; line-height: 1.25; color: var(--muted); font-variant-numeric: tabular-nums; }
.ul-row__when b { display: block; font-size: 14.5px; font-weight: 700; color: var(--ink); }
.ul-row__what { min-width: 0; }
.ul-row__what b { display: block; overflow: hidden; font-weight: 600; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; }
.ul-row__what > span { display: block; overflow: hidden; font-size: 12.5px; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.ul-row__pic { display: grid; place-items: center; }
.ul-row__what > span .ul-logo--xs { margin-right: 5px; }
.ul-row__end { display: flex; align-items: center; gap: 8px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* the calendar's column headings: which chip is which driver */
.ul-row--head { padding: 0 0 6px; border-bottom: 0; }
.ul-row--head span { width: 48px; font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-align: center; color: var(--muted); }

/* older rows, folded away until asked for */
.ul-fold { animation: ul-item-in .4s cubic-bezier(.2, .8, .2, 1); }
.ul-fold .ul-row:last-child { border-bottom: 1px solid var(--line); }
.ul-more--top { margin: 0 0 6px; }
.ul-more[aria-expanded="true"] { border-style: solid; }

/* baseball: a series per row, its games as chips */
.ul-row--series { grid-template-columns: 78px 30px minmax(0, 1fr) auto 74px; }
.ul-row--series .ul-row__end { justify-content: flex-end; }
.ul-row__games { display: flex; gap: 4px; }

.ul-g {
    min-width: 40px;
    padding: 3px 6px 2px;
    border-radius: 6px;
    background: var(--draw);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.ul-g--W { background: var(--win); }
.ul-g--L { background: var(--loss); }
.ul-g--soon, .ul-g--off { background: transparent; color: var(--muted); box-shadow: 0 0 0 1px var(--line) inset; font-weight: 600; }

.ul-row__end small { font-size: 12px; font-weight: 500; color: var(--muted); }

.ul-ha {
    display: inline-block;
    width: 18px;
    margin-right: 7px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 1px var(--line) inset;
    color: var(--muted);
    vertical-align: 1px;
}

.ul-ha--H { background: var(--ink); color: var(--bg); box-shadow: none; }

.ul-more {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    border: 1px dashed var(--line);
    border-radius: 10px;
    background: transparent;
    color: var(--muted) !important;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: color .2s, border-color .2s;
}

.ul-more:hover { color: var(--ink) !important; border-color: var(--muted); }

/* LoL: games won in a series */
.ul-pips { display: inline-flex; gap: 3px; }
.ul-pips i { width: 9px; height: 9px; border-radius: 2px; background: var(--line); transform: rotate(45deg); }
.ul-pips i.is-on { background: var(--accent); }
.ul-pips--them i.is-on { background: var(--muted); }

/* standings */
.ul-table th {
    padding: 0 6px 8px;
    border-bottom: 1px solid var(--line);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-align: right;
    text-transform: uppercase;
    color: var(--muted);
}

.ul-table th:nth-child(2), .ul-table td:nth-child(2) { text-align: left; }
.ul-table th:first-child, .ul-table td:first-child { width: 30px; text-align: left; }

.ul-table td {
    padding: 7px 6px;
    border-bottom: 1px solid var(--line);
    font-size: 14.5px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ul-table td:first-child { color: var(--muted); font-weight: 600; }
.ul-table td:nth-child(2) { overflow: hidden; max-width: 0; width: 60%; font-weight: 600; text-overflow: ellipsis; }
.ul-table td:last-child { font-weight: 800; }
.ul-table tr:last-child td { border-bottom: 0; }
.ul-table tr.is-me td { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.ul-table tr.is-me td:first-child { box-shadow: 3px 0 0 var(--accent) inset; color: var(--ink); }
.ul-table tr.is-me td:nth-child(2) { color: var(--accent); }
.ul-table tr.is-gap td { border-bottom: 1px dashed var(--muted); }
.ul-table tbody tr { animation: ul-item-in .4s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 22ms); }

/* extras */
.ul-drivers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.ul-driver {
    position: relative;
    overflow: hidden;
    padding: 16px 16px 14px;
    border-radius: 14px;
    background: var(--bg);
    box-shadow: 0 0 0 1px var(--line) inset;
}

.ul-driver__no {
    position: absolute;
    right: 8px;
    top: -12px;
    font-family: var(--display);
    font-size: 96px;
    font-style: italic;
    font-weight: 800;
    line-height: 1;
    color: var(--accent);
    opacity: .9;
}

.ul-driver__code { font-size: 12px; font-weight: 700; letter-spacing: .22em; color: var(--muted); }
.ul-driver__name { margin-top: 2px; font-family: var(--display); font-size: 30px; font-style: italic; font-weight: 800; line-height: 1; text-transform: uppercase; }
.ul-driver__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 30px; }
.ul-driver__stats b { display: block; font-size: 21px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ul-driver__stats span { font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.ul-comps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }

.ul-comp {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--bg);
    box-shadow: 0 0 0 1px var(--line) inset;
}

.ul-comp b { font-size: 16px; font-weight: 700; }
.ul-comp em { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.ul-comp span { font-size: 12.5px; color: var(--muted); }

.ul-bar { grid-column: 1 / -1; display: flex; height: 6px; overflow: hidden; border-radius: 3px; background: var(--line); }
.ul-bar i { display: block; height: 100%; }
.ul-bar i:nth-child(1) { background: var(--win); }
.ul-bar i:nth-child(2) { background: var(--draw); }
.ul-bar i:nth-child(3) { background: var(--loss); }

/* LoL roster */
.ul-roster { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }

.ul-player {
    padding: 14px 8px 12px;
    border-radius: 12px;
    background: var(--bg);
    box-shadow: 0 0 0 1px var(--line) inset;
    text-align: center;
    transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s;
}

.ul-player:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--accent) inset, 0 0 22px -6px var(--accent); }
.ul-player svg { width: 26px; height: 26px; margin-bottom: 8px; stroke: var(--accent); fill: none; stroke-width: 1.8; }
.ul-player b { display: block; overflow: hidden; font-family: var(--display); font-size: 15px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; text-overflow: ellipsis; }
.ul-player span { font-size: 10.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

/* KBO: the season as one strip, a tick per game */
.ul-strip { display: flex; flex-wrap: wrap; gap: 3px; }

.ul-strip i {
    width: 9px;
    height: 22px;
    border-radius: 2px;
    background: var(--draw);
    animation: ul-pop .4s cubic-bezier(.3, 1.6, .5, 1) backwards;
    animation-delay: calc(var(--i, 0) * 6ms);
}

.ul-strip i.W { background: var(--win); }
.ul-strip i.L { background: var(--loss); height: 14px; align-self: flex-end; }
.ul-strip i.D { height: 18px; align-self: center; }
.ul-strip__key { display: flex; gap: 16px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.ul-strip__key i { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 2px; }

.ul-splits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.ul-split { container-type: inline-size; padding: 12px 14px; border-radius: 12px; background: var(--bg); box-shadow: 0 0 0 1px var(--line) inset; }
.ul-split b { display: block; font-family: var(--display); font-size: 22px; font-size: clamp(15px, 21cqw, 30px); font-weight: var(--display-weight); line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ul-split span { display: block; overflow: hidden; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }

/* news */
.ul-news { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; }

.ul-news a {
    display: block;
    padding: 13px 2px;
    border-top: 1px solid var(--line);
    transition: padding .3s cubic-bezier(.2, .8, .2, 1), background .2s;
}

.ul-news a:hover { padding-left: 10px; background: color-mix(in srgb, var(--accent) 7%, transparent); }
.ul-news b { display: block; font-size: 15.5px; font-weight: 600; line-height: 1.4; }
.ul-news span { font-size: 12.5px; color: var(--muted); }
.ul-news a:hover b { color: var(--accent); }

/* the display face may carry a width axis (Ferrari's does) */
.ul-thero__name, .ul-stat b, .ul-next__title, .ul-count b, .ul-score__num, .ul-pos, .ul-driver__no, .ul-driver__name, .ul-split b {
    font-stretch: var(--display-stretch, normal);
}

/* =====================================================================
   Themes
   ===================================================================== */

/*
 * Ferrari — carbon black, rosso corsa, Modena yellow. The type is Goldman, a free face in the
 * manner of Formula 1's own (which is a licensed font and so cannot be shipped here).
 */
.ul-theme-ferrari {
    --display: 'Goldman', 'Barlow Condensed', 'Noto Sans KR', sans-serif; --display-style: normal; --display-weight: 700; --display-track: 0;
    --bg: #0a0a0b; --bg-2: #121214; --card: #151517; --ink: #f6f5f1; --muted: #93939a; --line: rgba(255, 255, 255, .1);
    --accent: #ff1e36; --accent-2: #ffe100; --on-accent: #fff;
    --h-bg: #c40024; --h-ink: #fff;
    background:
        repeating-linear-gradient(135deg, rgba(255, 255, 255, .018) 0 2px, transparent 2px 6px),
        var(--bg);
}

.ul-theme-ferrari .ul-thero__name { font-size: clamp(40px, 5.3vw, 80px); line-height: 1; }
.ul-theme-ferrari .ul-stat b { font-size: 32px; }
.ul-theme-ferrari .ul-next__title { font-size: clamp(26px, 3.1vw, 44px); line-height: 1.08; }
.ul-theme-ferrari .ul-count b { font-size: 34px; }
.ul-theme-ferrari .ul-pos { font-size: 15px; font-weight: 700; }
.ul-theme-ferrari .ul-pos--out, .ul-theme-ferrari .ul-pos--none { font-size: 10.5px; font-weight: 700; }
.ul-theme-ferrari .ul-f1row .ul-pos { font-size: 23px; }
.ul-theme-ferrari .ul-f1row .ul-pos--out { font-size: 13px; }
.ul-theme-ferrari .ul-driver__no { top: 4px; right: 10px; font-size: 50px; font-weight: 700; font-style: normal; }
.ul-theme-ferrari .ul-driver__name { font-size: 21px; font-weight: 700; font-style: normal; }
.ul-theme-ferrari .ul-card { border-radius: 6px 18px 6px 18px; }
.ul-theme-ferrari .ul-card::after { content: ""; position: absolute; left: -1px; top: 18px; width: 4px; height: 34px; background: var(--accent); }
.ul-theme-ferrari .ul-card__title::before { transform: skewX(-18deg); width: 14px; }
.ul-theme-ferrari .ul-thero { background: linear-gradient(115deg, #c40024 0 58%, #a3001d 58% 100%); }
.ul-theme-ferrari .ul-thero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px; background: repeating-conic-gradient(#0a0a0b 0 25%, #f6f5f1 0 50%) 0 0 / 20px 20px; }

/* Juventus — black on white, nothing else; a high-contrast serif for the big moments. */
.ul-theme-juventus {
    --bg: #f3f2ee; --bg-2: #fff; --card: #fff; --ink: #0c0c0c; --muted: #6f6f6f; --line: rgba(0, 0, 0, .13);
    --accent: #0c0c0c; --accent-2: #c8a45a; --on-accent: #fff;
    --win: #1c9a57; --draw: #9a9a9a; --loss: #d23a4b;
    --display: 'Bodoni Moda', 'Noto Sans KR', serif; --display-style: normal; --display-weight: 800; --display-case: none; --display-track: -.02em;
    --h-bg: #0c0c0c; --h-ink: #fff;
}

.ul-theme-juventus .ul-card { border-radius: 2px; border-color: #0c0c0c; box-shadow: 6px 6px 0 #0c0c0c; }
.ul-theme-juventus .ul-card__title::before { width: 3px; height: 14px; box-shadow: 6px 0 0 var(--bg), 9px 0 0 var(--ink); margin-right: 9px; }
.ul-theme-juventus .ul-count span, .ul-theme-juventus .ul-comp, .ul-theme-juventus .ul-f1row { border-radius: 2px; }
.ul-theme-juventus .ul-score__num i { opacity: 1; color: var(--accent-2); }
.ul-theme-juventus .ul-thero__name { font-style: italic; }
.ul-theme-juventus .ul-table tr.is-me td { background: #0c0c0c; color: #fff; }
.ul-theme-juventus .ul-table tr.is-me td:nth-child(2), .ul-theme-juventus .ul-table tr.is-me td:first-child { color: #fff; box-shadow: none; }
.ul-theme-juventus .ul-row.is-next { background: #0c0c0c; color: #fff; border-radius: 2px; }
.ul-theme-juventus .ul-row.is-next b, .ul-theme-juventus .ul-row.is-next .ul-row__end { color: #fff; }
.ul-theme-juventus .ul-row.is-next .ul-logo { padding: 2px; border-radius: 6px; background: #fff; }
.ul-theme-juventus .ul-row.is-next .ul-row__what .ul-ha--A { box-shadow: 0 0 0 1px rgba(255, 255, 255, .5) inset; color: #fff; }
.ul-theme-juventus .ul-row.is-next .ul-row__what .ul-ha--H { background: #fff; color: #0c0c0c; }
.ul-theme-juventus .ul-table tr.is-me .ul-logo { padding: 2px; border-radius: 5px; background: #fff; }
.ul-theme-juventus .ul-row.is-next .ul-row__when, .ul-theme-juventus .ul-row.is-next .ul-row__when b,
.ul-theme-juventus .ul-row.is-next .ul-row__what span, .ul-theme-juventus .ul-row.is-next small { color: rgba(255, 255, 255, .78); }
.ul-theme-juventus .ul-row.is-next .ul-ha--H { background: #fff; color: #0c0c0c; }

/* DK — deep navy with a mint glow; squared-off type and HUD corners. */
.ul-theme-dk {
    --bg: #050a10; --bg-2: #0a121b; --card: #0a121b; --ink: #e8fffb; --muted: #7d9aa0; --line: rgba(25, 227, 198, .16);
    --accent: #19e3c6; --accent-2: #5d7cff; --on-accent: #03110f;
    --win: #19e3c6; --loss: #ff4d6d;
    --display: 'Chakra Petch', 'Noto Sans KR', sans-serif; --display-style: normal; --display-weight: 700; --display-track: .01em;
    --h-bg: #04121a; --h-ink: #eafffb; --radius: 4px;
    background:
        radial-gradient(900px 420px at 80% 0, rgba(25, 227, 198, .1), transparent 70%),
        linear-gradient(rgba(25, 227, 198, .035) 1px, transparent 1px) 0 0 / 100% 4px,
        var(--bg);
}

.ul-theme-dk .ul-card { clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px)); }
.ul-theme-dk .ul-card::before { content: ""; position: absolute; right: 0; top: 0; width: 26px; height: 2px; background: var(--accent); transform-origin: right; transform: rotate(45deg) translate(4px, 12px); }
.ul-theme-dk .ul-card__title::before { transform: rotate(45deg); }
.ul-theme-dk .ul-thero__name { color: var(--accent); text-shadow: 0 0 34px rgba(25, 227, 198, .45); }
.ul-theme-dk .ul-count span, .ul-theme-dk .ul-comp, .ul-theme-dk .ul-player, .ul-theme-dk .ul-split { border-radius: 2px; }
.ul-theme-dk .ul-res { border-radius: 2px; color: #03110f; }
.ul-theme-dk .ul-res--L { color: #fff; }

/* SSG — a ballpark programme: cream paper, red ink, slab numerals, stitched edges. */
.ul-theme-ssg {
    --bg: #f1e9d8; --bg-2: #f9f3e6; --card: #fbf6ea; --ink: #231815; --muted: #7c6a5b; --line: rgba(35, 24, 21, .17);
    --accent: #ce0e2d; --accent-2: #f2b233; --on-accent: #fff;
    --win: #ce0e2d; --draw: #b9aa94; --loss: #3b3431;
    --display: 'Alfa Slab One', 'Noto Sans KR', serif; --display-style: normal; --display-weight: 400; --display-case: none; --display-track: .005em;
    --h-bg: #f1e8d6; --h-ink: #231815;
    background:
        radial-gradient(rgba(35, 24, 21, .05) 1px, transparent 1.4px) 0 0 / 7px 7px,
        var(--bg);
}

.ul-theme-ssg .ul-card { border: 0; box-shadow: 0 0 0 1px var(--line), 0 12px 24px -18px rgba(35, 24, 21, .5); }
.ul-theme-ssg .ul-card::before { content: ""; position: absolute; left: 18px; right: 18px; top: 7px; border-top: 2px dashed rgba(206, 14, 45, .5); }
.ul-theme-ssg .ul-card__title::before { border-radius: 50%; width: 9px; height: 9px; }
.ul-theme-ssg .ul-thero__name { color: var(--accent); }
.ul-theme-ssg .ul-thero { border-bottom: 3px solid var(--ink); }
.ul-theme-ssg .ul-res--L { background: #3b3431; }
.ul-theme-ssg .ul-score__num { letter-spacing: .02em; }
.ul-theme-ssg .ul-count span { background: #231815; color: #f9f3e6; box-shadow: none; border-radius: 6px; }
.ul-theme-ssg .ul-count i { color: #c9b89f; }

/* =====================================================================
   Smaller screens — re-composed for the width, not just stacked
   ===================================================================== */

/* ---------- tablets ---------- */

@media (max-width: 1100px) {
    .ul-cal { grid-template-columns: minmax(0, 1fr); }
    .ul-agenda { position: static; }
    .ul-agenda__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ul-chip { text-overflow: clip; }
    .ul-chip__l { display: none; }
    .ul-chip__a { display: inline; }
    .ul-nexts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ul-newscols { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    /* team pages keep two columns of cards, evenly split */
    .ul-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ul-drivers, .ul-news { grid-template-columns: minmax(0, 1fr); }
    .ul-roster { gap: 5px; }
    .ul-player { padding: 10px 2px 9px; }
    .ul-player b { font-size: 13px; }
    .ul-player span { font-size: 8.5px; letter-spacing: .08em; }
    .ul-row { grid-template-columns: 62px 26px minmax(0, 1fr) auto; gap: 10px; }
    .ul-row--series { grid-template-columns: 62px 26px minmax(0, 1fr) 62px; }
    .ul-row--series .ul-row__games { grid-column: 3 / -1; grid-row: 2; }
    .ul-row--series .ul-row__end { grid-column: 4; grid-row: 1; }
    .ul-row .ul-logo { width: 24px; height: 24px; }
    .ul-row .ul-logo--xs { width: 14px; height: 14px; }
    .ul-row .ul-flag { width: 24px; height: 18px; }
    .ul-season { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .ul-season .ul-splits { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ul-schart__row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .ul-schart__label { display: flex; align-items: baseline; gap: 10px; }
    .ul-sbar { --w: 36px; --u: 10px; }
    .ul-pos { width: 42px; }
    .ul-row--head span { width: 42px; }
    .ul-count span { min-width: 0; flex: 1; }
}

@media (max-width: 1000px) {
    .ul-hero__head { flex-direction: column; align-items: flex-start; gap: 14px; }
    .ul-lede { max-width: none; text-align: left; }

    /* the four teams as a 2 × 2 board */
    .ul-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); height: auto; }
    .ul-panel { container-type: inline-size; aspect-ratio: 1 / 1.02; min-height: 300px; }
    .ul-panel__art { top: -36px; bottom: auto; width: 480px; height: 360px; margin-left: -240px; }
    .ul-panel__art { top: -11cqw; width: 126cqw; height: 94.5cqw; margin-left: -63cqw; }
    .ul-panel__shade { background: linear-gradient(to top, var(--p-shade, rgba(0, 0, 0, .82)) 0%, var(--p-shade, rgba(0, 0, 0, .82)) 30%, transparent 66%); }
    .ul-panel--ferrari .ul-panel__big { font-size: 44px; font-size: clamp(32px, 12.4cqw, 52px); }
    .ul-panel--juventus .ul-panel__big { font-size: 46px; font-size: clamp(34px, 13cqw, 54px); }
    .ul-panel--dk .ul-panel__big { font-size: 60px; font-size: clamp(44px, 17cqw, 70px); }
    .ul-panel--ssg .ul-panel__big { font-size: 44px; font-size: clamp(32px, 12.5cqw, 52px); }

    .ul-thero__art .ul-art { right: -14%; opacity: .5; }
    .ul-theme-juventus .ul-thero__art .ul-art { right: 0; width: 100%; }
    .ul-thero__shade { background: linear-gradient(90deg, var(--h-bg) 8%, transparent 120%); }
}

@media (max-width: 760px) {
    .ul-grid { display: flex; flex-direction: column; align-items: stretch; }
    .ul-col { display: contents; }
}

/* ---------- phones ---------- */

@media (max-width: 640px) {
    .ul-wrap { width: calc(100% - 28px); }
    .ul-hero { padding-top: 26px; }
    .ul-section { padding-top: 34px; }
    .ul-nowline { display: flex; margin: 8px 0 0 !important; }
    .ul-lede { font-size: 15.5px; }

    /* team tiles: everything at a glance, two by two */
    .ul-panels { gap: 8px; }
    .ul-panel { aspect-ratio: 1 / 1.16; min-height: 0; border-radius: 14px; animation-delay: calc(var(--i) * 70ms + 100ms); }
    .ul-panel__art { top: -18px; width: 344px; height: 258px; margin-left: -172px; }
    .ul-panel__art { top: -13cqw; width: 195cqw; height: 146.25cqw; margin-left: -97.5cqw; }
    .ul-panel__shade { background: linear-gradient(to top, var(--p-shade, rgba(0, 0, 0, .82)) 0%, transparent 70%); }
    .ul-panel__top { top: 11px; left: 11px; right: 11px; font-size: 10px; letter-spacing: .16em; }
    .ul-panel__tag { padding: 4px 8px 3px; }
    .ul-panel__body { left: 12px; right: 12px; bottom: 11px; }
    .ul-panel__small { font-size: 9.5px; letter-spacing: .18em; }
    .ul-panel--ferrari .ul-panel__big { font-size: 26px; font-size: 15cqw; }
    .ul-panel--juventus .ul-panel__big { font-size: 27px; font-size: 15.6cqw; }
    .ul-panel--dk .ul-panel__big { font-size: 38px; font-size: 22cqw; }
    .ul-panel--ssg .ul-panel__big { font-size: 26px; font-size: 15cqw; }
    .ul-panel__more { display: none; }
    .ul-panel__mini {
        display: flex;
        align-items: baseline;
        gap: 8px;
        margin-top: 7px;
        padding-top: 7px;
        border-top: 1px solid color-mix(in srgb, currentColor 26%, transparent);
        font-size: 11.5px;
        line-height: 1.3;
        white-space: nowrap;
    }
    .ul-panel__mini b { overflow: hidden; font-weight: 600; text-overflow: ellipsis; }
    .ul-panel__mini em { margin-left: auto; font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }

    /* what's next: a row to swipe through */
    .ul-nexts {
        display: flex;
        gap: 10px;
        margin: 0 -14px;
        padding: 4px 14px 10px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding: 0 14px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .ul-nexts::-webkit-scrollbar { display: none; }
    .ul-nextcard { flex: 0 0 76%; scroll-snap-align: start; }
    .ul-nextcard:hover { transform: none; }

    /* calendar: dots in the grid, details underneath */
    .ul-filters { flex-wrap: nowrap; margin: 0 -14px; padding: 0 14px; overflow-x: auto; scrollbar-width: none; }
    .ul-filters::-webkit-scrollbar { display: none; }
    .ul-filter { flex: none; }
    .ul-cal__main { padding: 12px; }
    .ul-cal__dow, .ul-cal__grid { gap: 4px; }
    .ul-cal__dow span { padding-left: 4px; font-size: 10px; letter-spacing: .08em; }
    .ul-day { min-height: 50px; padding: 5px; border-radius: 9px; }
    .ul-day .ul-chip, .ul-day__more { display: none; }
    .ul-day__dots { display: flex; }
    .ul-cal__month { font-size: 24px; }
    .ul-agenda { padding: 14px; }
    .ul-agenda__list { grid-template-columns: minmax(0, 1fr); }

    /* headlines: one team at a time */
    .ul-newstabs { display: flex; gap: 4px; margin-bottom: 10px; padding: 4px; border-radius: 999px; box-shadow: 0 0 0 1px var(--line) inset; }
    .ul-newscols { grid-template-columns: minmax(0, 1fr); }
    .ul-newscol { display: none; }
    .ul-newscol.is-on { display: block; animation: ul-item-in .4s cubic-bezier(.2, .8, .2, 1); }

    /* team pages: tabs instead of one long column */
    .ul-mtabs {
        position: sticky;
        top: var(--nav-h);
        z-index: 6;
        display: flex;
        gap: 2px;
        margin: 0 -14px;
        padding: 8px 12px;
        overflow-x: auto;
        scrollbar-width: none;
        background: color-mix(in srgb, var(--bg) 88%, transparent);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--line);
    }
    .ul-mtabs::-webkit-scrollbar { display: none; }
    .ul-mtab {
        flex: 1 0 auto;
        padding: 7px 12px 6px;
        border: 0;
        border-radius: 999px;
        background: transparent;
        color: var(--muted) !important;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: .03em;
        white-space: nowrap;
        cursor: pointer;
        transition: background .25s, color .25s;
    }
    .ul-mtab[aria-selected="true"] { background: var(--accent); color: var(--on-accent) !important; }
    .ul-grid { padding-top: 14px; }
    .ul[data-mtab="now"] .ul-card:not([data-pane="now"]),
    .ul[data-mtab="fixtures"] .ul-card:not([data-pane="fixtures"]),
    .ul[data-mtab="table"] .ul-card:not([data-pane="table"]),
    .ul[data-mtab="more"] .ul-card:not([data-pane="more"]),
    .ul[data-mtab="news"] .ul-card:not([data-pane="news"]) { display: none; }
    .ul-card { padding: 18px 16px; animation: ul-item-in .35s cubic-bezier(.2, .8, .2, 1); }
    .ul-thero, .ul-thero__in { min-height: 280px; }
    .ul-thero__nav { margin-bottom: 26px; }
    .ul-thero__tag { font-size: 11px; letter-spacing: .2em; }
    .ul-thero__stats { gap: 8px 22px; margin-top: 16px !important; }
    .ul-stat b { font-size: 28px; }
    .ul-theme-ferrari .ul-stat b { font-size: 23px; }
    .ul-stat span { font-size: 10px; letter-spacing: .14em; }
    .ul-switch a { padding: 4px 8px 3px; font-size: 10.5px; }
    .ul-count b { font-size: 34px; }
    .ul-theme-ferrari .ul-count b { font-size: 28px; }
    .ul-match__side .ul-logo { width: 54px; height: 54px; }
    .ul-sbar { --w: 32px; --u: 9px; }
    .ul-wide { margin-top: 0; }
    .ul-logo.ul-thero__badge { width: 38px; height: 38px; padding: 5px; border-radius: 10px; }
    .ul-table td, .ul-table th { padding-left: 4px; padding-right: 4px; font-size: 13px; }
    .ul-table .is-wide { display: none; }
    .ul-splits { gap: 6px; }
    .ul-split { padding: 10px; }
    .ul-strip i { width: 7px; }
}
