:root {
    --wudi-navy: #0a1c2b;
    --wudi-red: #a4161a;
    --wudi-red-dark: #7d1013;
    --wudi-white: #ffffff;
    --wudi-black: #111111;
    --wudi-footer-text: #c9c9c9;
    --wudi-body-text: #1a1a1a;
    --wudi-muted: #555555;
    --wudi-card-bg: #f5f6f8;
    --wudi-card-border: #e2e4e8;
    --wudi-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body.wudi {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    margin: 0;
    font-family: var(--wudi-font);
    color: var(--wudi-body-text);
    background: var(--wudi-white);
}

a {
    color: inherit;
}

/* Baseline heading scale so h1/h2/h3 read as distinct levels wherever
   they show up without a more specific rule of their own (e.g. legacy
   component pages like registration's .componentheading, which only
   sets margin/weight, not size). .wudi-page-header h1 and
   .wudi-section-heading below still win where they're more specific. */
h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--wudi-navy);
    margin: 0 0 16px;
}

h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--wudi-navy);
    margin: 0 0 12px;
}

h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--wudi-body-text);
    margin: 0 0 8px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.wudi-utility {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--wudi-navy);
    color: var(--wudi-white);
    padding: 6px 24px 16px;
}

.wudi-logo {
    display: flex;
    align-items: center;
}

.wudi-logo img {
    display: block;
    height: 64px;
    width: auto;
}

.wudi-body {
    flex: 1 0 auto;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 24px 40px;
}

.wudi-footer {
    flex-shrink: 0;
    background: var(--wudi-black);
    color: var(--wudi-footer-text);
    padding: 40px 24px;
    font-size: 13px;
}

.wudi-footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    max-width: 1100px;
    margin: 0 auto;
}

.wudi-footer-social {
    display: flex;
    gap: 20px;
}

.wudi-footer a {
    color: var(--wudi-footer-text);
    text-decoration: none;
}

.wudi-footer a:hover {
    color: var(--wudi-white);
}

.wudi-utility-right a {
    color: var(--wudi-white);
    text-decoration: none;
    font-size: 14px;
}

.wudi-user-menu {
    position: relative;
}

.wudi-user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--wudi-white);
    font-family: var(--wudi-font);
    font-size: 14px;
    cursor: pointer;
    padding: 4px 0;
}

.wudi-user-menu-list {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--wudi-white);
    border: 1px solid var(--wudi-card-border);
    border-radius: 6px;
    list-style: none;
    margin: 6px 0 0;
    padding: 4px;
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 20;
}

.wudi-user-menu-list.is-open {
    display: block;
}

.wudi-user-menu-list a {
    display: block;
    padding: 8px 12px;
    border-radius: 4px;
    color: var(--wudi-body-text);
    text-decoration: none;
    font-size: 13px;
}

.wudi-user-menu-list a:hover {
    background: var(--wudi-card-bg);
}

.wudi-nav {
    background: var(--wudi-red);
}

.wudi-nav-list {
    list-style: none;
    display: flex;
    gap: 24px;
    margin: 0;
    padding: 10px 24px;
}

.wudi-nav-list a {
    color: var(--wudi-white);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.wudi-nav-list a.active {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.wudi-nav-dropdown {
    position: relative;
}

.wudi-nav-dropdown-toggle {
    background: none;
    border: none;
    padding: 0;
    color: var(--wudi-white);
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.wudi-nav-dropdown-toggle::after {
    content: '';
    display: inline-block;
    margin-left: 6px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    vertical-align: middle;
}

.wudi-nav-dropdown.active-context .wudi-nav-dropdown-toggle {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.wudi-nav-dropdown-list {
    display: none;
    list-style: none;
    margin: 0;
    padding: 6px 0;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--wudi-red-dark);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
    z-index: 20;
}

.wudi-nav-dropdown-list.is-open {
    display: block;
}

.wudi-nav-dropdown-list a {
    display: block;
    padding: 9px 16px;
    color: var(--wudi-white);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.wudi-nav-dropdown-list a:hover {
    background: rgba(255, 255, 255, 0.12);
}

.wudi-nav-dropdown-list a.current {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.wudi-subnav {
    background: var(--wudi-red-dark);
}

.wudi-subnav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 0;
    padding: 8px 24px;
}

.wudi-subnav a {
    color: var(--wudi-white);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

.wudi-subnav a.active {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.wudi-nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
}

.wudi-nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--wudi-white);
    margin: 4px 0;
}

@media (max-width: 700px) {
    .wudi-nav {
        display: flex;
        justify-content: flex-end;
        position: relative;
    }

    .wudi-nav-toggle {
        display: block;
    }

    .wudi-nav-list {
        display: none;
        flex-direction: column;
        gap: 0;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--wudi-red);
        padding: 8px 0;
        z-index: 10;
    }

    .wudi-nav-list.is-open {
        display: flex;
    }

    .wudi-nav-list li {
        padding: 10px 24px;
    }

    /* Inside the already-collapsed mobile menu, the dropdown is a nested
       disclosure rather than a floating popover - it opens in place
       (indented, no box/shadow of its own) instead of overlapping the
       rest of the page. */
    .wudi-nav-dropdown-toggle {
        display: block;
        width: 100%;
        text-align: left;
    }

    .wudi-nav-dropdown-list {
        position: static;
        box-shadow: none;
        background: transparent;
        padding: 0;
        margin: 8px 0 0;
    }

    .wudi-nav-dropdown-list a {
        padding: 9px 0 9px 16px;
    }

    .wudi-subnav ul {
        gap: 4px 20px;
    }
}

.wudi-eyebrow {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--wudi-red);
    margin-bottom: 4px;
}

.wudi-page-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--wudi-navy);
    margin: 0 0 16px;
}

.wudi-home-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    align-items: start;
}

.wudi-card {
    background: var(--wudi-card-bg);
    border: 1px solid var(--wudi-card-border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.wudi-section-heading {
    font-size: 19px;
    font-weight: 700;
    color: var(--wudi-navy);
    margin: 0 0 14px;
}

@media (max-width: 700px) {
    .wudi-home-grid {
        grid-template-columns: 1fr;
    }
}

/* Homepage news cards: image as full-bleed background, date + title
   overlaid, whole card clickable through to the article. Joomla's
   Featured Articles view splits into two groups — "Leading" (one
   full-width hero) and "Intro" (a grid below it) — which is exactly
   the big-card-then-row layout this is built for. */
.blog-featured {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.blog-items:not(.items-leading) {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.blog-item {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 220px;
    border-radius: 8px;
    overflow: hidden;
    isolation: isolate;
}

.items-leading .blog-item {
    min-height: 320px;
}

.blog-item .item-image {
    position: absolute;
    inset: 0;
    margin: 0;
    z-index: -2;
}

.blog-item .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
    border-radius: 0;
}

.blog-item .item-image a {
    pointer-events: none;
}

.blog-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 28, 43, 0.1) 0%, rgba(10, 28, 43, 0.9) 100%);
    z-index: -1;
}

.blog-item .item-content {
    position: relative;
    padding: 20px;
    color: var(--wudi-white);
}

/* Hide everything in the card body except the date/title overlay - not
   just <p>, since an article with no Read More break (e.g. one authored
   elsewhere and pasted in whole) can put figures/images/headings/lists
   directly in the introtext too, and those would otherwise render
   full-size and unstyled inside the card. */
.blog-item .item-content > *:not(.article-info):not(.item-title),
.blog-item .items-more,
.blog-item .tags {
    display: none;
}

.blog-item .article-info {
    display: flex;
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--wudi-white);
}

.blog-item .article-info dt,
.blog-item .article-info .icon-calendar,
.blog-item .article-info .createdby,
.blog-item .article-info .category-name,
.blog-item .article-info .parent-category-name,
.blog-item .article-info .hits {
    display: none;
}

.blog-item .item-title {
    color: var(--wudi-white);
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.items-leading .blog-item .item-title {
    font-size: 28px;
}

.blog-item .item-title a {
    color: var(--wudi-white);
    text-decoration: none;
}

.blog-item .item-title a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Full single-article page (com_content's default article view) is a
   completely separate template from the homepage's .blog-item cards
   above — images here should behave like normal responsive content,
   not the cropped-cover card backgrounds. */
.com-content-article img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.com-content-article .item-image {
    margin: 0 0 16px;
}

.com-content-article .item-image figcaption {
    font-size: 12px;
    color: var(--wudi-muted);
    margin-top: 6px;
}

/* Joomla's own article view renders its own title heading and a
   Details/Written-by/Category/Published/Hits block — both redundant
   with this template's own eyebrow+H1 pattern, which already names
   every page consistently. */
.com-content-article .page-header,
.com-content-article .article-info {
    display: none;
}

@media (max-width: 700px) {
    .blog-items:not(.items-leading) {
        grid-template-columns: 1fr;
    }
}

.wudi-card h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--wudi-navy);
    margin: 0 0 8px;
}

.wudi-card ul {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
}

/* Joomla's front-end module editing (shown to logged-in editors on the
   Quick Links / Fall League at a Glance modules) adds an edit link plus a
   tooltip meant to only appear on hover — that requires Bootstrap's
   tooltip JS, which this template doesn't load, so the tooltip renders as
   permanently-visible text instead. Keep the edit link, drop the tooltip
   text, and make the link legible without Joomla's (also unloaded) icon
   font. */
[role="tooltip"] {
    display: none;
}

.jmodedit {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: var(--wudi-card-bg);
    border: 1px solid var(--wudi-card-border);
    border-radius: 4px;
    color: var(--wudi-navy);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}

.jmodedit:hover {
    background: var(--wudi-white);
    border-color: var(--wudi-navy);
}

.jmodedit .visually-hidden {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Joomla core views (login, registration, reset/remind, edit profile) use
   Joomla's own Bootstrap-style class names, but this template loads no
   Bootstrap — style the real markup directly instead of pulling in a whole
   framework for a handful of pages. */
.com-users-login,
.com-users-profile,
div.com-users-profile__edit,
.com-users-registration,
.com-users-remind,
.com-users-reset {
    max-width: 480px;
    margin: 0 auto;
}

.com-users-login .page-header,
.com-users-profile .page-header,
div.com-users-profile__edit .page-header,
.com-users-registration .page-header,
.com-users-remind .page-header,
.com-users-reset .page-header {
    display: none;
}

/* Joomla reuses the "com-users-profile__edit" class name for the Edit
   Profile button toolbar on the read-only Profile page too (a totally
   different element than the edit-form container above) — style that
   specific case as a plain right-aligned button, not a bulleted list. */
ul.com-users-profile__edit {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    margin: 0 0 16px;
    padding: 0;
    max-width: none;
}

.com-users-profile img {
    max-width: 150px;
    height: auto;
    border-radius: 6px;
    display: block;
}

.com-users-profile__multifactor {
    display: none;
}

fieldset {
    border: none;
    margin: 0 0 24px;
    padding: 0;
}

legend {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--wudi-navy);
    width: 100%;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--wudi-card-border);
}

.control-group,
.form-group {
    margin-bottom: 16px;
}

.control-label,
.com-users-login label,
.com-users-profile__edit label,
.com-users-registration label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--wudi-body-text);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="number"],
input[type="tel"],
select,
textarea {
    box-sizing: border-box;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--wudi-card-border);
    border-radius: 6px;
    font-family: var(--wudi-font);
    font-size: 14px;
}

/* Full-width fields are correct for Joomla's own login/profile/registration
   forms (one field per row, card layout) but wrong for the com_ultileague
   league-signup pages, which are legacy table layouts of many short fields
   (state, jersey size, etc.) that size themselves via size="" / inline
   styles. Scoping width:100% to just these three contexts keeps the
   league-signup forms at their intended compact widths. */
:is(.com-users-login, .com-users-profile__edit, .com-users-registration)
    :is(input[type="text"], input[type="password"], input[type="email"], input[type="url"], input[type="number"], input[type="tel"], select, textarea) {
    width: 100%;
}

input[type="checkbox"],
input[type="radio"] {
    margin-right: 6px;
}

/* Joomla core's HTMLHelper::_('select.radiolist', ...) helper (used for
   the 1-10 skill-rating fields) emits Bootstrap's .form-check-inline
   markup to lay radio options out in a row - but this template doesn't
   load Bootstrap, so without this the divs default to block and each
   option stacks on its own line instead. */
.form-check-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 16px;
    margin-bottom: 4px;
}

.form-check-input {
    margin: 0;
}

.form-check-label {
    margin: 0;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: var(--wudi-navy);
    color: var(--wudi-white);
}

.btn-secondary {
    background: var(--wudi-card-bg);
    color: var(--wudi-body-text);
    border: 1px solid var(--wudi-card-border);
}

.btn-danger {
    background: var(--wudi-red);
    color: var(--wudi-white);
}

.btn:hover {
    opacity: 0.9;
}

.com-users-login__options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    padding: 0;
    list-style: none;
}

.list-group-item {
    display: block;
    padding: 10px 12px;
    background: var(--wudi-card-bg);
    border: 1px solid var(--wudi-card-border);
    border-radius: 6px;
    color: var(--wudi-body-text);
    text-decoration: none;
    font-size: 13px;
}

.list-group-item:hover {
    background: var(--wudi-white);
    border-color: var(--wudi-navy);
}

.com-users-profile__edit-submit .controls {
    display: flex;
    gap: 12px;
}

.field-media-preview img {
    max-width: 120px;
    height: auto;
    border-radius: 6px;
    display: block;
    margin-bottom: 8px;
}

/* Teams / Team pages: previously rendered via SP Page Builder's bundled
   CSS (sp_template.css and friends, ~280KB combined) with floated divs
   and inline <style> blocks. Same underlying data, new presentation. */
.wudi-link-list,
.wudi-team-list,
.wudi-schedule-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wudi-roster-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding-left: 20px;
}

.wudi-muted-note {
    color: var(--wudi-muted);
}

.wudi-captain-note {
    display: inline-block;
    background: var(--wudi-card-bg);
    border: 1px solid var(--wudi-card-border);
    border-radius: 6px;
    padding: 8px 12px;
    margin: 0 0 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--wudi-navy);
}

.wudi-team-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--wudi-card-bg);
    border: 1px solid var(--wudi-card-border);
    border-left: 4px solid var(--wudi-card-border);
    border-radius: 6px;
    padding: 10px 14px;
}

.wudi-team-list-item a {
    font-weight: 600;
    text-decoration: none;
}

.wudi-team-list-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}

.wudi-color-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-right: 8px;
    border: 1px solid var(--wudi-card-border);
    vertical-align: middle;
}

.wudi-team-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.wudi-stat-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--wudi-card-bg);
    border: 1px solid var(--wudi-card-border);
    border-radius: 8px;
    padding: 12px 20px;
    text-decoration: none;
    min-width: 120px;
}

.wudi-stat-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--wudi-muted);
}

.wudi-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--wudi-navy);
}

.wudi-team-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

@media (max-width: 700px) {
    .wudi-team-grid {
        grid-template-columns: 1fr;
    }
}

.wudi-roster-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    background: var(--wudi-navy);
    color: var(--wudi-white);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.wudi-roster-rank {
    display: inline-block;
    margin-left: 6px;
    font-size: 12px;
    color: var(--wudi-muted);
}

.wudi-schedule-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    padding: 8px 12px;
    background: var(--wudi-card-bg);
    border: 1px solid var(--wudi-card-border);
    border-radius: 6px;
    font-size: 13px;
}

.wudi-schedule-date {
    font-weight: 700;
    color: var(--wudi-navy);
    min-width: 48px;
}

.wudi-schedule-nogame {
    color: var(--wudi-muted);
    font-weight: 600;
}

.wudi-schedule-opponent {
    flex: 1 1 auto;
}

.wudi-schedule-outcome b {
    color: var(--wudi-navy);
}

/* Full season Schedule page (view=schedules): one card per game day,
   each listing that day's matchups across every field. Distinct from
   the single-team .wudi-schedule-list above (Team page's own schedule
   widget only ever shows one game per date). */
.wudi-schedule-days {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wudi-schedule-day {
    background: var(--wudi-card-bg);
    border: 1px solid var(--wudi-card-border);
    border-radius: 8px;
    padding: 14px 16px;
}

.wudi-schedule-day-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
}

.wudi-schedule-day-date {
    font-size: 16px;
    font-weight: 700;
    color: var(--wudi-navy);
}

.wudi-schedule-day-timecap {
    font-size: 12px;
    color: var(--wudi-muted);
}

/* One or more rounds within a day card -- a single-round night (Summer
   League) has exactly one with no visible label; a two-round night
   (every indoor league) has two, each labeled "Game 1"/"Game 2". */
.wudi-schedule-round + .wudi-schedule-round {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--wudi-card-border);
}

.wudi-schedule-round-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
}

.wudi-schedule-round-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--wudi-muted);
}

.wudi-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.wudi-badge-cancelled {
    background: var(--wudi-red);
    color: var(--wudi-white);
}

.wudi-matchup-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wudi-matchup-row {
    display: grid;
    grid-template-columns: 72px 1fr 1fr 56px;
    align-items: center;
    gap: 12px;
    background: var(--wudi-white);
    border: 1px solid var(--wudi-card-border);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
}

/* The one-off label row printed above the list of day cards -- same grid
   as .wudi-matchup-row so its four labels line up with the columns below
   even though it isn't part of the same <ul>. */
.wudi-matchup-header {
    background: none;
    border: none;
    /* The header row sits outside any .wudi-schedule-day card, but each
       real matchup row is nested inside one -- match its card padding
       (16px) plus its own row padding (12px) so the two sets of columns
       actually line up instead of the header sitting 16px further left. */
    padding: 0 28px;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--wudi-muted);
}

.wudi-matchup-field {
    font-weight: 700;
    color: var(--wudi-muted);
}

.wudi-matchup-team {
    display: flex;
    align-items: center;
    color: var(--wudi-body-text);
    text-decoration: none;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wudi-matchup-team:hover {
    text-decoration: underline;
}

.wudi-matchup-winner {
    font-weight: 700;
    color: var(--wudi-navy);
}

.wudi-matchup-score {
    font-weight: 700;
    color: var(--wudi-navy);
    font-variant-numeric: tabular-nums;
    text-align: right;
}

@media (max-width: 560px) {
    .wudi-matchup-row,
    .wudi-matchup-header {
        grid-template-columns: 56px 1fr 1fr 44px;
        font-size: 12px;
    }
}

/* Standings page (view=standings): one table per division, ranked by
   winning percentage. */
.wudi-table-scroll {
    overflow-x: auto;
    margin-bottom: 24px;
}

.wudi-standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.wudi-standings-table th,
.wudi-standings-table td {
    padding: 8px 12px;
    text-align: right;
}

.wudi-standings-table th:nth-child(2),
.wudi-standings-table td:nth-child(2) {
    text-align: left;
    padding-left: 4px;
}

.wudi-standings-table th.wudi-standings-rank,
.wudi-standings-table td.wudi-standings-rank {
    width: 7%;
    text-align: left;
    white-space: nowrap;
    padding-right: 0;
}

.wudi-standings-rank-number {
    display: inline-block;
    width: 1em;
    text-align: right;
    color: var(--wudi-muted);
    font-weight: 700;
}

.wudi-standings-table thead th {
    background: var(--wudi-navy);
    color: var(--wudi-white);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.wudi-standings-table tbody td {
    border-bottom: 1px solid var(--wudi-card-border);
    font-variant-numeric: tabular-nums;
}

.wudi-standings-table tbody tr:nth-child(even) {
    background: var(--wudi-card-bg);
}

.wudi-tiebreak-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--wudi-muted);
    font-size: 14px;
    vertical-align: middle;
    margin-left: 4px;
    padding: 0;
    line-height: 1;
}

.wudi-tiebreak-icon:hover {
    color: var(--wudi-navy);
}

.wudi-tiebreak-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 28, 43, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.wudi-tiebreak-modal-content {
    background: var(--wudi-white);
    border-radius: 8px;
    padding: 24px 28px;
    max-width: 420px;
    width: 90%;
    position: relative;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.wudi-tiebreak-modal-content h4 {
    color: var(--wudi-navy);
    margin: 0 0 10px;
}

.wudi-tiebreak-modal-content ul {
    margin: 10px 0 0;
    padding-left: 20px;
}

.wudi-tiebreak-modal-content li {
    font-variant-numeric: tabular-nums;
    margin-bottom: 6px;
}

.wudi-tiebreak-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: var(--wudi-muted);
}

.wudi-tiebreak-modal-close:hover {
    color: var(--wudi-navy);
}

.wudi-rank-select {
    margin-left: 8px;
    padding: 2px 6px;
    font-size: 12px;
}

.wudi-rank-status {
    display: inline-block;
    margin-left: 10px;
    font-size: 13px;
    color: var(--wudi-muted);
}

#updaterankform .btn {
    margin-top: 12px;
}

/* Draft Center (Task 10) -- copied from the approved mockups
   (.superpowers/brainstorm/79599-1790037898/content/draft-room-layout-v3
   through -v8.html), .wudi-* classes renamed to the .dc-* names used in
   views/draftcenter/tmpl/default.php. Scoped under .draftcenter so this
   can't leak into the rest of the site. The scouting popup
   (#dc-modal / .dc-modal*) is rendered as a sibling of .draftcenter, not
   a descendant (it's a page-level overlay), so those selectors are
   deliberately left unscoped -- the dc- prefix is unique to this page and
   won't collide with anything else on the site. */

.draftcenter {
    font-family: var(--wudi-font);
}

.draftcenter .dc-order-strip {
    display: flex;
    gap: 3px;
    background: var(--wudi-navy);
    padding: 8px;
    border-radius: 6px 6px 0 0;
    overflow-x: auto;
}

.draftcenter .dc-order-cell {
    flex: 0 0 auto;
    min-width: 64px;
    background: #16324a;
    color: #cfe0ee;
    text-align: center;
    padding: 5px 6px;
    border-radius: 4px;
    font-size: 10px;
    line-height: 1.4;
}

.draftcenter .dc-order-cell .picknum {
    font-weight: 700;
    color: #fff;
    font-size: 10px;
}

.draftcenter .dc-order-cell.onclock {
    background: var(--wudi-red);
    color: #fff;
}

.draftcenter .dc-order-cell.roundtag {
    background: transparent;
    color: #8fa6b8;
    font-weight: 700;
    align-self: center;
    min-width: 40px;
}

.draftcenter .dc-tabstrip {
    display: flex;
    gap: 2px;
    background: #eee;
    border-radius: 0 0 6px 6px;
    padding: 0 8px;
}

.draftcenter .dc-tab {
    padding: 9px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
}

.draftcenter .dc-tab.active {
    color: var(--wudi-navy);
    border-bottom: 3px solid var(--wudi-red);
}

.draftcenter .dc-columns {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-top: 12px;
    flex-wrap: wrap;
}

.draftcenter .dc-main {
    flex: 2.8 1 480px;
}

.draftcenter .dc-rail {
    flex: 1 1 220px;
}

.draftcenter .dc-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #888;
    margin-bottom: 6px;
    font-weight: 600;
}

.draftcenter .dc-panel {
    border: 1px solid #d8d8d8;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 12px;
}

.draftcenter .dc-gender-summary {
    font-size: 11px;
    font-weight: 700;
    color: var(--wudi-navy);
    margin-bottom: 6px;
}

.draftcenter .dc-panel-scroll {
    max-height: 600px;
    overflow-y: auto;
}

.draftcenter .dc-panel-scroll-rail {
    max-height: 260px;
    overflow-y: auto;
}

.draftcenter .dc-roster-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    font-size: 12px;
    padding: 4px 0;
    border-bottom: 1px solid #f2f2f2;
}

.draftcenter .dc-roster-row.onclock {
    background: #fdece9;
    margin: 0 -10px;
    padding: 4px 10px;
    border-bottom: none;
}

.draftcenter .dc-roster-round {
    font-size: 9px;
    text-transform: uppercase;
    color: #999;
    font-weight: 700;
    white-space: nowrap;
}

.draftcenter .dc-roster-name {
    text-align: right;
}

.draftcenter .dc-roster-name.dc-roster-empty {
    color: #bbb;
    font-style: italic;
}

.draftcenter .dc-roster-tag {
    font-size: 9px;
    color: #999;
    margin-left: 4px;
}

.draftcenter .dc-pick-row {
    font-size: 11px;
    color: #555;
    padding: 4px 0;
    border-bottom: 1px solid #f2f2f2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

.draftcenter .dc-pick-row.latest {
    background: #fdece9;
    margin: 0 -10px;
    padding: 6px 10px;
    border-radius: 4px;
    border-bottom: none;
}

.draftcenter .dc-undo-link {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--wudi-red);
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid var(--wudi-red);
    border-radius: 3px;
    padding: 2px 6px;
}

.draftcenter .dc-undo-link:hover {
    background: var(--wudi-red);
    color: #fff;
}

.draftcenter .dc-railtabstrip {
    display: flex;
    gap: 2px;
    margin-bottom: 8px;
}

.draftcenter .dc-railtab {
    padding: 5px 10px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.draftcenter .dc-railtab.active {
    color: var(--wudi-navy);
    border-bottom: 2px solid var(--wudi-red);
}

.draftcenter .dc-baggage-row {
    font-size: 11px;
    color: #555;
    padding: 6px 0;
    border-bottom: 1px solid #f2f2f2;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.draftcenter .dc-baggage-row.settled {
    color: #999;
}

.draftcenter .dc-baggage-status {
    font-size: 10px;
    color: #b5720a;
}

.draftcenter .dc-baggage-row.settled .dc-baggage-status {
    color: #999;
}

.draftcenter .dc-pick-row.dc-empty,
.draftcenter .dc-baggage-row.dc-empty {
    color: #999;
    font-style: italic;
    border-bottom: none;
}

/* Available Players table */

.draftcenter .dc-ptable {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.draftcenter .dc-ptable th {
    text-align: center;
    font-size: 9px;
    text-transform: uppercase;
    color: #888;
    padding: 6px 4px;
    border-bottom: 2px solid #ddd;
}

.draftcenter .dc-ptable th.namecol {
    text-align: left;
}

.draftcenter .dc-ptable th.sortable {
    cursor: pointer;
    user-select: none;
}

.draftcenter .dc-ptable th.sortable:hover {
    color: var(--wudi-red);
}

.draftcenter .dc-ptable td {
    padding: 7px 4px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.draftcenter .dc-ptable td.namecol {
    text-align: left;
}

.draftcenter .dc-baggage-tag {
    font-size: 9px;
    color: #b5720a;
}

.draftcenter .dc-filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #666;
    margin-bottom: 8px;
}

.draftcenter .dc-filter-row select {
    font-size: 11px;
    padding: 3px 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.draftcenter .dc-gender-tag {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    color: #666;
    background: #eee;
    border-radius: 3px;
    padding: 1px 4px;
    margin-left: 2px;
}

.draftcenter .dc-playoffs-tag {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    border-radius: 3px;
    padding: 1px 4px;
}

.draftcenter .dc-playoffs-yes {
    color: #1a7a2e;
    background: #e3f5e7;
}

.draftcenter .dc-playoffs-no {
    color: #a4161a;
    background: #fbe5e6;
    cursor: help;
}

.draftcenter .dc-playoffs-unknown {
    color: #999;
    background: #eee;
}

.draftcenter .dc-ptable .handle {
    color: #999;
    font-size: 16px;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.draftcenter .dc-ptable tr.dc-dragging {
    background: #fdece9;
    opacity: 0.7;
    cursor: grabbing;
}

.draftcenter .dc-pname {
    color: var(--wudi-navy);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: #ccc;
    cursor: pointer;
}

.draftcenter .dc-pname:hover {
    color: var(--wudi-red);
}

.draftcenter .dc-total {
    font-weight: 700;
    color: var(--wudi-navy);
    background: #f2f2f2;
    border-radius: 4px;
    padding: 2px 6px;
}

.draftcenter .dc-draft-btn {
    background: var(--wudi-red);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.draftcenter #dc-save-order-btn {
    background: var(--wudi-navy);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
}

.draftcenter #dc-save-order-status {
    margin-left: 10px;
    font-size: 12px;
    color: #888;
}

/* Draft Board tab */

.draftcenter .dc-board {
    border-collapse: collapse;
    width: 100%;
    font-size: 12px;
}

.draftcenter .dc-board th {
    background: var(--wudi-navy);
    color: #fff;
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    white-space: nowrap;
}

.draftcenter .dc-board td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    border-right: 1px solid #eee;
    white-space: nowrap;
    vertical-align: top;
}

.draftcenter .dc-board td.roundcell {
    background: #f7f7f7;
    font-weight: 700;
    color: #888;
    text-align: center;
}

.draftcenter .dc-board td.filled .pname {
    font-weight: 600;
    color: var(--wudi-navy);
}

.draftcenter .dc-board td.filled .pick-meta {
    font-size: 9px;
    color: #999;
}

.draftcenter .dc-board td.filled.captain_preslot .pname::after {
    content: " (C)";
    font-weight: 400;
    color: #999;
}

.draftcenter .dc-board td.filled.baggage_auto {
    background: #fdf3e8;
}

.draftcenter .dc-board td.filled.baggage_auto .pick-meta {
    color: #b5720a;
}

.draftcenter .dc-board td.onclock {
    background: #fdece9;
    border: 2px solid var(--wudi-red);
}

.draftcenter .dc-board td.onclock .waiting {
    color: var(--wudi-red);
    font-weight: 700;
    font-size: 11px;
}

.draftcenter .dc-board td.empty {
    color: #ccc;
    text-align: center;
}

.draftcenter .dc-board-wrap {
    overflow-x: auto;
    border: 1px solid #d8d8d8;
    border-radius: 6px;
}

/* Scouting popup -- rendered outside .draftcenter (see comment above),
   so these are deliberately not ancestor-scoped. */

.dc-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 28, 43, 0.55);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.dc-modal-overlay.open {
    display: flex;
}

.dc-modal {
    background: #fff;
    border-radius: 8px;
    width: 460px;
    max-width: 92vw;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
    font-family: var(--wudi-font);
}

.dc-modal-head {
    background: var(--wudi-navy);
    color: #fff;
    padding: 18px;
    display: flex;
    gap: 16px;
    align-items: center;
    position: relative;
}

.dc-modal-photo {
    width: 96px;
    height: 96px;
    border-radius: 8px;
    background: #16324a;
    flex: 0 0 auto;
    object-fit: cover;
}

.dc-modal-head h3 {
    margin: 0;
    font-size: 18px;
    color: #fff;
}

.dc-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    cursor: pointer;
    color: #cfe0ee;
    font-size: 20px;
    line-height: 1;
}

.dc-modal-body {
    padding: 16px 18px;
}

.dc-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.dc-stat-box {
    background: #f7f7f7;
    border-radius: 6px;
    padding: 8px;
    text-align: center;
}

.dc-stat-box .val {
    font-size: 18px;
    font-weight: 700;
    color: var(--wudi-navy);
}

.dc-stat-box .lbl {
    font-size: 9px;
    text-transform: uppercase;
    color: #888;
    margin-top: 2px;
}

.dc-stat-box.total {
    background: var(--wudi-red);
}

.dc-stat-box.total .val,
.dc-stat-box.total .lbl {
    color: #fff;
}

.dc-field-row {
    font-size: 12px;
    padding: 5px 0;
    border-bottom: 1px solid #f2f2f2;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.dc-field-row span:first-child {
    color: #888;
    flex: 0 0 auto;
}

.dc-field-row span:last-child {
    text-align: right;
}

.dc-attendance-row {
    display: flex;
    gap: 8px;
}

.dc-attendance-day {
    flex: 1;
    background: #f7f7f7;
    border-radius: 6px;
    padding: 6px;
    text-align: center;
}

.dc-attendance-day .d {
    font-size: 9px;
    text-transform: uppercase;
    color: #888;
}

.dc-attendance-day .v {
    font-size: 15px;
    font-weight: 700;
    color: var(--wudi-navy);
}

.dc-comment-box {
    font-size: 12px;
    color: #333;
    background: #f7f7f7;
    border-radius: 6px;
    padding: 10px;
    margin-top: 4px;
    line-height: 1.5;
}

@media (max-width: 700px) {
    .draftcenter .dc-columns {
        flex-direction: column;
    }

    .draftcenter .dc-main,
    .draftcenter .dc-rail {
        flex: 1 1 auto;
        width: 100%;
    }
}

/* Homepage score tracker (mod_wudi_scoretracker) -- full-width strip
   above the homepage's news/sidebar grid. */
.wudi-tracker {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.wudi-tracker-section {
    background: #16324a;
    border-radius: 8px;
    padding: 14px 16px;
}

.wudi-tracker-section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
}

.wudi-tracker-section-title {
    color: var(--wudi-white);
    font-size: 15px;
    font-weight: 700;
}

.wudi-tracker-section-date {
    color: rgba(255, 255, 255, 0.65);
    font-size: 12px;
}

.wudi-tracker-section-link {
    margin-left: auto;
    color: var(--wudi-white);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.wudi-tracker-section-link:hover {
    text-decoration: underline;
}

.wudi-tracker-games {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
}

.wudi-tracker-game {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 10px 14px;
    min-width: 220px;
    max-width: 280px;
    flex: 1 1 220px;
    flex-shrink: 0;
    scroll-snap-align: start;
}

.wudi-tracker-game-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 0;
}

.wudi-tracker-game-field {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.wudi-tracker-vs {
    color: rgba(255, 255, 255, 0.45);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding-left: 2px;
}

/* .wudi-matchup-team already sets color: var(--wudi-body-text) for the
   Schedule page's white card background -- override it here since the
   tracker's cards sit on the dark strip instead. */
.wudi-tracker-game .wudi-matchup-team {
    color: var(--wudi-white);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wudi-tracker-game .wudi-matchup-winner {
    color: var(--wudi-white);
}

.wudi-tracker-score {
    margin-left: auto;
    color: var(--wudi-white);
    font-weight: 800;
    font-size: 18px;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}
