:root {
    --brand-blue: #006298;
    --brand-red: #da291c;
    --brand-dark-red: #af272f;
    --brand-gray: #888b8d;
    --brand-light-gray: #c8c9c7;
    --ink: #17344a;
    --muted: #66747e;
    --navy: var(--brand-blue);
    --navy-2: #004d78;
    --teal: var(--brand-blue);
    --teal-soft: #e6f3f8;
    --coral: var(--brand-red);
    --gold: #d59a27;
    --paper: #f5f7f8;
    --white: #ffffff;
    --line: #d8dddf;
    --border: var(--line);
    --surface-muted: #eef2f4;
    --shadow: 0 18px 48px rgba(0, 71, 109, 0.12);
    --radius: 18px;
    --radius-sm: 10px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.5;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body { margin: 0; min-height: 100vh; background: var(--paper); }
a { color: inherit; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(218, 41, 28, 0.42); outline-offset: 3px; }

.skip-link { position: fixed; left: 1rem; top: -4rem; z-index: 100; padding: .75rem 1rem; border-radius: .5rem; background: var(--white); color: var(--navy); box-shadow: var(--shadow); }
.skip-link:focus { top: 1rem; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.selection-cell { width: 2.5rem; text-align: center; }
.positive-text { color: #1f7a4d; }
.bulk-action-bar { display: grid; grid-template-columns: minmax(16rem, 1.4fr) minmax(14rem, 1fr) auto auto; gap: .75rem; align-items: end; margin-top: 1rem; padding: 1rem; border: 1px solid var(--border); border-radius: .75rem; background: var(--surface-muted); }
.bulk-action-bar label { margin: 0; }
@media (max-width: 900px) { .bulk-action-bar { grid-template-columns: 1fr; } }

.topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    min-height: 76px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
    padding: .55rem clamp(1rem, 2.6vw, 2rem);
    color: var(--ink);
    background: rgba(255,255,255,.98);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 4px 18px rgba(0, 71, 109, .09);
}
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; min-width: max-content; }
.brand-logo { display: block; object-fit: contain; object-position: left center; }
.brand-logo-full { width: 6.2rem; height: 3rem; }
.brand-logo-compact { display: none; width: 2.7rem; height: 2.7rem; }
.brand-product { display: flex; flex-direction: column; padding-left: .8rem; border-left: 1px solid var(--brand-light-gray); line-height: 1.15; }
.brand strong { color: var(--brand-blue); font-size: 1rem; letter-spacing: .01em; }
.brand small { color: var(--brand-gray); margin-top: .2rem; font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; }

.app-frame { min-height: calc(100vh - 76px); display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.app-sidebar {
    position: sticky;
    top: 76px;
    align-self: start;
    height: calc(100vh - 76px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1rem .8rem 2rem;
    border-right: 1px solid var(--line);
    background: #f6f9fa;
    scrollbar-width: thin;
}
.app-canvas { min-width: 0; display: flex; flex-direction: column; }
.sidebar-header { display: none; }
.sidebar-season { position: sticky; top: -1rem; z-index: 2; margin: 0 0 1rem; padding: .8rem; border: 1px solid #bfd5e0; border-radius: .75rem; background: #eaf5fa; box-shadow: 0 8px 12px rgba(0, 71, 109, .07); }
.sidebar-section-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.sidebar-section-heading span { color: var(--brand-blue); font-size: .66rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.sidebar-section-heading strong { padding: .18rem .38rem; border-radius: 999px; color: #22586e; background: rgba(255,255,255,.75); font-size: .61rem; text-transform: uppercase; }
.sidebar-season form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem; margin-top: .55rem; }
.sidebar-season select { width: 100%; min-width: 0; min-height: 34px; padding: .35rem .45rem; border-color: #aac7d7; background: var(--white); font-size: .72rem; font-weight: 700; }
.sidebar-season button { min-height: 34px; padding: .35rem .55rem; border: 1px solid #8eb3c4; border-radius: .45rem; background: var(--white); color: var(--brand-blue); cursor: pointer; font-size: .7rem; font-weight: 800; }
.sidebar-season button:hover { border-color: var(--brand-blue); background: var(--teal-soft); }
.sidebar-season p { margin: .45rem 0 0; color: #496878; font-size: .65rem; line-height: 1.4; }
.primary-nav { display: flex; flex-direction: column; gap: .85rem; }
.nav-section h2 { margin: 0 0 .28rem; padding: 0 .65rem; color: #71838d; font-size: .62rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.nav-section ul { margin: 0; padding: 0; list-style: none; }
.nav-primary-link { position: relative; display: flex; align-items: center; justify-content: space-between; gap: .6rem; min-height: 38px; padding: .55rem .65rem; border-radius: .55rem; color: #365465; text-decoration: none; font-size: .82rem; font-weight: 720; }
.nav-primary-link:hover { color: var(--brand-blue); background: #e5f2f7; }
.nav-entry.is-active > .nav-primary-link { color: var(--brand-blue); background: #dceff7; font-weight: 850; }
.nav-entry.is-active > .nav-primary-link::before { content: ""; position: absolute; inset: .48rem auto .48rem -.8rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand-red); }
.nav-current-marker { width: .4rem; height: .4rem; flex: 0 0 auto; border-radius: 50%; background: var(--brand-blue); }
.nav-submenu { margin: .28rem 0 .25rem .65rem !important; padding: .15rem 0 .15rem .65rem !important; border-left: 1px solid #c4d6de; }
.nav-submenu a { display: block; padding: .42rem .55rem; border-radius: .45rem; color: #617681; text-decoration: none; font-size: .74rem; line-height: 1.3; }
.nav-submenu a:hover { color: var(--brand-blue); background: #eaf4f8; }
.nav-submenu a[aria-current="page"] { color: var(--brand-blue); background: var(--white); box-shadow: inset 0 0 0 1px #bfd8e3; font-weight: 820; }
.nav-toggle { display: none; align-items: center; gap: .5rem; justify-self: start; min-height: 40px; padding: .5rem .65rem; border: 1px solid var(--brand-light-gray); border-radius: .6rem; background: var(--white); color: var(--brand-blue); cursor: pointer; font-weight: 800; }
.nav-toggle-icon { position: relative; width: 16px; height: 12px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; }
.nav-toggle-icon::after { content: ""; position: absolute; top: 4px; left: 0; width: 16px; border-top: 2px solid currentColor; }
.nav-backdrop { display: none; }
.topbar-actions { display: flex; justify-content: flex-end; }
.account-menu { position: relative; }
.account-menu > summary { display: flex; align-items: center; gap: .6rem; min-width: 0; padding: .32rem .45rem .32rem .32rem; border: 1px solid transparent; border-radius: .7rem; cursor: pointer; list-style: none; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu > summary:hover, .account-menu[open] > summary { border-color: var(--line); background: var(--teal-soft); }
.account-avatar { width: 36px; height: 36px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--white); background: var(--brand-blue); font-size: .7rem; font-weight: 900; letter-spacing: .03em; }
.account-summary { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.account-summary strong { max-width: 170px; overflow: hidden; color: var(--ink); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.account-summary small { margin-top: .15rem; color: var(--muted); font-size: .65rem; }
.account-chevron { width: .42rem; height: .42rem; margin: -.18rem .15rem 0 .25rem; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); }
.account-menu[open] .account-chevron { margin-top: .18rem; transform: rotate(225deg); }
.account-menu-panel { position: absolute; top: calc(100% + .5rem); right: 0; z-index: 70; width: min(310px, calc(100vw - 2rem)); padding: .5rem; border: 1px solid var(--line); border-radius: .85rem; background: var(--white); box-shadow: var(--shadow); }
.account-menu-identity { display: flex; flex-direction: column; gap: .16rem; margin: -.5rem -.5rem .4rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line); background: var(--surface-muted); }
.account-menu-identity strong { color: var(--ink); font-size: .82rem; }
.account-menu-identity small { color: var(--muted); font-size: .7rem; overflow-wrap: anywhere; }
.account-menu-panel > a, .account-menu-panel > form button { width: 100%; display: block; padding: .62rem .65rem; border: 0; border-radius: .5rem; background: transparent; color: var(--ink); cursor: pointer; font: inherit; font-size: .76rem; font-weight: 720; text-align: left; text-decoration: none; }
.account-menu-panel > a:hover, .account-menu-panel > a[aria-current="page"], .account-menu-panel > form button:hover { color: var(--brand-blue); background: var(--teal-soft); }
.account-menu-panel > form { margin: .35rem 0 0; padding-top: .35rem; border-top: 1px solid var(--line); }
.account-appearance { margin-top: .35rem; padding: .65rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.account-appearance > div:first-child { display: flex; justify-content: space-between; gap: .5rem; margin-bottom: .45rem; }
.account-appearance strong { color: var(--ink); font-size: .7rem; }
.account-appearance small { color: var(--muted); font-size: .66rem; }
.account-theme-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: .25rem; }
.account-theme-options button { min-height: 32px; padding: .35rem; border: 1px solid var(--line); border-radius: .45rem; background: var(--white); color: var(--muted); cursor: pointer; font-size: .67rem; font-weight: 750; }
.account-theme-options button:hover { color: var(--brand-blue); background: var(--teal-soft); }
.account-theme-options button[aria-checked="true"] { border-color: var(--brand-blue); color: var(--brand-blue); background: var(--teal-soft); }
.theme-picker { position: relative; flex: 0 0 auto; }
.theme-picker > summary { display: grid; width: 38px; height: 38px; padding: 0; place-items: center; border: 1px solid var(--brand-light-gray); border-radius: 50%; background: var(--white); color: var(--brand-blue); cursor: pointer; list-style: none; }
.theme-picker > summary::-webkit-details-marker { display: none; }
.theme-picker > summary:hover, .theme-picker[open] > summary { border-color: var(--brand-blue); background: var(--teal-soft); }
.theme-icon { position: relative; display: block; width: 17px; height: 17px; overflow: hidden; border: 2px solid currentColor; border-radius: 50%; }
.theme-icon::after { content: ""; position: absolute; inset: -2px -2px -2px 50%; border-left: 2px solid currentColor; background: currentColor; }
html[data-color-mode="light"] .theme-icon { background: currentColor; box-shadow: inset 0 0 0 4px var(--white); }
html[data-color-mode="light"] .theme-icon::after { display: none; }
html[data-color-mode="dark"] .theme-icon::after { inset: -5px -5px 2px 5px; border: 0; border-radius: 50%; background: var(--white); }
.theme-menu { position: absolute; top: calc(100% + .55rem); right: 0; z-index: 40; width: 250px; padding: .55rem; border: 1px solid var(--line); border-radius: .85rem; background: var(--white); box-shadow: var(--shadow); }
.theme-menu > p { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0; padding: .45rem .55rem .6rem; border-bottom: 1px solid var(--line); }
.theme-menu > p strong { color: var(--ink); font-size: .78rem; }
.theme-menu > p small { margin: 0; color: var(--muted); font-size: .67rem; font-weight: 750; }
.theme-menu > button { position: relative; width: 100%; display: flex; flex-direction: column; gap: .08rem; margin-top: .15rem; padding: .58rem 2rem .58rem .65rem; border: 0; border-radius: .58rem; background: transparent; color: var(--ink); cursor: pointer; text-align: left; }
.theme-menu > button:hover { background: var(--teal-soft); }
.theme-menu > button strong { font-size: .78rem; }
.theme-menu > button small { margin: 0; color: var(--muted); font-size: .67rem; }
.theme-menu > button[aria-checked="true"]::after { content: ""; position: absolute; top: 50%; right: .72rem; width: .48rem; height: .28rem; border-bottom: 2px solid var(--brand-blue); border-left: 2px solid var(--brand-blue); transform: translateY(-65%) rotate(-45deg); }
.auth-theme-control { position: fixed; top: 1rem; right: 1rem; z-index: 30; }

.main-content { width: min(1440px, 100%); flex: 1 0 auto; margin: 0 auto; padding: clamp(1.5rem, 3.2vw, 3rem); }
.context-help { display: flex; justify-content: flex-end; min-height: 0; margin: -.75rem 0 .6rem; }
.context-help a { display: inline-flex; align-items: center; gap: .42rem; color: var(--brand-blue); text-decoration: none; font-size: .76rem; }
.context-help a > span { display: inline-grid; width: 1.8rem; height: 1.8rem; place-items: center; border: 1px solid #9ebccc; border-radius: 50%; background: var(--white); font-size: 1rem; font-weight: 900; box-shadow: 0 2px 7px rgba(0, 71, 109, .08); }
.context-help a:hover > span, .context-help a:focus-visible > span { border-color: var(--brand-blue); background: var(--teal-soft); }
.footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.5rem clamp(1rem, 4vw, 3.5rem) 2.5rem; color: var(--muted); font-size: .78rem; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.page-heading h1 { margin: .15rem 0 .4rem; color: var(--navy); font-size: clamp(2rem, 3.6vw, 3.25rem); line-height: 1.05; letter-spacing: -.04em; }
.page-heading p:not(.eyebrow) { max-width: 720px; margin: 0; color: var(--muted); font-size: 1rem; }
.page-heading-person { align-items: center; }

/* Management workspaces deliberately use a flatter, task-oriented visual language.
   Dashboards keep metric cards; record maintenance uses toolbars, rails, and editors. */
.management-surface { display: flex; flex-direction: column; gap: 1rem; }
.management-surface > * { margin-bottom: 0; }
.management-surface .panel { box-shadow: none; }
.management-surface .notice-card { box-shadow: none; }
.management-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.management-heading h1 { margin: .15rem 0 .35rem; color: var(--navy); font-size: clamp(1.7rem, 3vw, 2.45rem); letter-spacing: -.035em; }
.management-heading p:not(.eyebrow) { max-width: 720px; margin: 0; color: var(--muted); }
.management-heading-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .55rem; }
.management-context { display: flex; align-items: flex-start; gap: .65rem; padding: .7rem 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.management-context strong { flex: 0 0 auto; color: var(--navy); }
.management-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
.management-split h3 { margin: 0 0 .55rem; color: var(--navy); font-size: .95rem; }
.management-split ul { margin: 0; padding-left: 1.2rem; color: var(--muted); }
.management-split li + li { margin-top: .35rem; }
.management-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.management-toolbar form { flex: 1 1 520px; margin: 0; }
.management-toolbar-summary { margin-left: auto; color: var(--muted); font-size: .78rem; white-space: nowrap; }
.management-count-strip { display: flex; flex-wrap: wrap; gap: .45rem 1.4rem; padding: .7rem 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .75rem; }
.management-count-strip span { display: inline-flex; align-items: baseline; gap: .35rem; }
.management-count-strip strong { color: var(--navy); font-size: 1rem; }
.management-workspace { display: grid; grid-template-columns: minmax(245px, 320px) minmax(0, 1fr); min-height: 480px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); overflow: hidden; }
.management-rail { padding: 1rem; border-right: 1px solid var(--line); background: #f7f8fb; }
.management-rail-heading { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin-bottom: .8rem; }
.management-rail-heading h2 { margin: 0; color: var(--navy); font-size: .92rem; }
.management-rail .definition-list { grid-template-columns: 1fr; gap: .8rem; }
.management-record-list { display: flex; flex-direction: column; gap: .35rem; }
.management-record { display: flex; align-items: flex-start; justify-content: space-between; gap: .65rem; padding: .7rem .75rem; border: 1px solid transparent; border-radius: .65rem; color: var(--ink); text-decoration: none; }
.management-record:hover { border-color: #c6d2df; background: var(--white); }
.management-record[aria-current="true"] { border-color: #8bb9d1; background: var(--white); box-shadow: inset 3px 0 0 var(--brand-blue); }
.management-record > span:first-child { min-width: 0; display: flex; flex-direction: column; gap: .12rem; }
.management-record strong { color: var(--navy); font-size: .82rem; }
.management-record small { color: var(--muted); font-size: .7rem; overflow-wrap: anywhere; }
.management-editor { min-width: 0; padding: clamp(1rem, 2.5vw, 1.7rem); }
.management-editor-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; padding-bottom: .85rem; border-bottom: 1px solid var(--line); }
.management-editor-heading h2 { margin: .1rem 0 .2rem; color: var(--navy); font-size: 1.2rem; }
.management-editor-heading p { margin: 0; color: var(--muted); font-size: .78rem; }
.management-section { padding: 1rem 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; box-shadow: none; }
.management-section:last-child { border-bottom: 0; }
.management-section > .panel-heading { margin-bottom: .8rem; }
.management-section > .panel-heading h2 { font-size: 1rem; }
.management-form { max-width: 920px; }
.management-form .form-actions { position: sticky; bottom: 0; z-index: 2; margin: .4rem -1rem -1rem; padding: .85rem 1rem; border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(6px); }
.complaint-identity-correction { display: grid; gap: .4rem; margin-top: .55rem; }
.complaint-identity-correction input { min-height: 34px; padding: .42rem .55rem; }
.complaint-identity-correction .button { min-height: 32px; justify-self: start; padding: .35rem .6rem; border-radius: .5rem; font-size: .75rem; }
.management-table-card { overflow: hidden; border: 1px solid var(--line); border-radius: .7rem; background: var(--white); box-shadow: none; }
.management-table-card th { background: #f4f6f9; }
.management-table-card tbody tr:hover { background: #f8fbfd; }
.management-table-card td { padding-top: .72rem; padding-bottom: .72rem; }
.module-tabs { display: flex; flex-wrap: wrap; gap: .55rem; margin: 0 0 1rem; padding-bottom: .85rem; border-bottom: 1px solid var(--line); }
.module-tabs .button { min-height: 36px; padding: .48rem .78rem; font-size: .8rem; }
.module-tabs .button[aria-current="page"] { border-color: var(--brand-blue); background: var(--brand-blue); color: var(--white); }
.module-tabs .is-restricted { cursor: not-allowed; opacity: .62; }
.module-tabs-restricted { border-bottom-color: #e6c4bd; }
.module-tabs-restricted .button[aria-current="page"] { border-color: var(--brand-dark-red); background: var(--brand-dark-red); }
.help-heading { align-items: flex-end; }
.help-search { flex: 0 1 390px; min-width: min(390px, 100%); }
.help-search label { display: block; margin-bottom: .35rem; color: var(--navy); font-size: .75rem; font-weight: 800; }
.help-search > span { display: flex; gap: .5rem; }
.help-search input { min-width: 0; width: 100%; }
.help-layout { display: grid; grid-template-columns: minmax(230px, 285px) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.help-directory { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: #f7f8fb; }
.help-directory section + section { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.help-directory h2 { margin: 0 0 .45rem; color: var(--muted); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.help-directory nav { display: flex; flex-direction: column; gap: .2rem; }
.help-directory a { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem .6rem; border-radius: .55rem; color: #3f5c6e; text-decoration: none; font-size: .79rem; font-weight: 700; }
.help-directory a:hover { background: var(--white); color: var(--brand-blue); }
.help-directory a[aria-current="page"] { background: var(--brand-blue); color: var(--white); }
.help-directory a small { color: inherit; font-size: .57rem; text-align: right; text-transform: uppercase; opacity: .74; }
.help-article { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }
.help-article > header { padding: clamp(1.2rem, 3vw, 2rem); border-bottom: 1px solid var(--line); background: linear-gradient(135deg, #f7fbfd, #fff); }
.help-article > header h2 { margin: .15rem 0 .45rem; color: var(--navy); font-size: clamp(1.65rem, 3vw, 2.35rem); }
.help-article > header > p:not(.eyebrow) { max-width: 760px; margin: 0; color: var(--muted); line-height: 1.65; }
.help-article-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; margin-top: 1rem; }
.help-article-actions small { color: var(--muted); }
.help-section { padding: 1.3rem clamp(1.2rem, 3vw, 2rem); }
.help-section + .help-section { border-top: 1px solid var(--line); }
.help-section h3 { margin: 0 0 .65rem; color: var(--navy); font-size: 1.05rem; }
.help-section p { max-width: 880px; margin: 0; color: var(--muted); line-height: 1.7; }
.help-section ol, .help-section ul { max-width: 900px; margin: .4rem 0 0; padding-left: 1.35rem; color: #334d5e; line-height: 1.65; }
.help-section li + li { margin-top: .45rem; }
.help-search-results { padding: 1rem 0; }
.help-result-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.help-result-card { position: relative; display: flex; flex-direction: column; gap: .35rem; min-height: 165px; padding: 1rem; border: 1px solid var(--line); border-radius: .8rem; background: var(--white); color: var(--ink); text-decoration: none; }
.help-result-card:hover { border-color: #8bb9d1; box-shadow: var(--shadow); }
.help-result-card > span { color: var(--brand-blue); font-size: .64rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.help-result-card strong { color: var(--navy); font-size: 1rem; }
.help-result-card small { color: var(--muted); line-height: 1.5; }
.help-result-card b { margin-top: auto; color: var(--brand-dark-red); font-size: .63rem; text-transform: uppercase; }
[data-management-panel],
.event-sanction-review-anchor { scroll-margin-top: 7.5rem; }
.officials-eligibility-explainer { padding: .85rem 1rem; border: 1px solid #b7d6e4; border-radius: .75rem; background: #f3f9fc; }
.officials-eligibility-explainer span b { color: var(--navy); }
.officials-directory-table { min-width: 1180px; }
.officials-directory-table td { vertical-align: top; }
.officials-directory-table td:last-child form { margin: 0; }
.official-identity-cell { min-width: 185px; }
.official-eligibility-cell { min-width: 215px; }
.official-eligibility-cell > small { max-width: 205px; }
.official-requirement-stack { min-width: 190px; display: grid; gap: .38rem; margin-top: .6rem; padding-top: .55rem; border-top: 1px solid var(--line); }
.official-requirement-stack > span { display: flex; align-items: center; justify-content: space-between; gap: .45rem; }
.official-requirement-stack b { color: var(--muted); font-size: .7rem; }
.official-requirement-stack i { font-style: normal; white-space: nowrap; }
.official-quick-rating-cell { min-width: 112px; }
.official-quick-rating { margin: 0; }
.official-quick-rating select { min-width: 105px; padding: .42rem 1.8rem .42rem .55rem; border-color: #9db9c7; background-color: var(--white); color: var(--navy); font-size: .75rem; font-weight: 800; }
.official-quick-rating select:hover,
.official-quick-rating select:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 2px rgba(0,98,152,.13); }
.official-quick-rating.is-saving { opacity: .58; }
.official-eligibility-summary { padding: 1rem; border: 1px solid #b7d6e4; border-radius: .8rem; background: #f7fbfd; }
.official-eligibility-summary > .panel-heading { margin-bottom: .85rem; }
.official-eligibility-summary > .panel-heading h2 { margin: .1rem 0 .18rem; color: var(--navy); font-size: 1.15rem; }
.official-eligibility-summary > .panel-heading p:last-child { margin: 0; color: var(--muted); font-size: .78rem; }
.official-eligibility-summary > .panel-heading > small { color: var(--muted); white-space: nowrap; }
.official-eligibility-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
.official-eligibility-grid article { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; padding: .8rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--white); }
.official-eligibility-grid article > span { color: var(--navy); font-size: .74rem; font-weight: 800; }
.official-eligibility-grid article > strong { font-size: .72rem; }
.official-eligibility-grid article > small { color: var(--muted); font-size: .68rem; }
.official-eligibility-note { margin: .8rem 0 0; color: var(--muted); font-size: .75rem; line-height: 1.5; }
.official-eligibility-note strong { color: var(--navy); }
.officials-bulk-surface { max-width: none; }
.official-bulk-filters { align-items: end; }
.official-bulk-filters label { min-width: 150px; }
.official-bulk-defaults { max-width: 1050px; }
.officials-bulk-table { min-width: 1650px; }
.officials-bulk-table th:first-child,
.officials-bulk-table td:first-child { position: sticky; left: 0; z-index: 2; width: 56px; background: inherit; }
.officials-bulk-table th:nth-child(2),
.officials-bulk-table td:nth-child(2) { position: sticky; left: 56px; z-index: 2; min-width: 210px; background: inherit; box-shadow: 8px 0 12px -12px rgba(28,40,73,.6); }
.officials-bulk-table thead th:first-child,
.officials-bulk-table thead th:nth-child(2) { z-index: 3; background: #f4f6f9; }
.officials-bulk-table select { min-width: 138px; }
.officials-bulk-table td { vertical-align: top; }
.bulk-select-label { display: inline-flex; align-items: center; gap: .35rem; }
.bulk-select-label input,
.official-bulk-select { min-height: 0; }
.officials-bulk-savebar { position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .8rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: .7rem; background: rgba(255,255,255,.96); box-shadow: 0 -8px 24px rgba(28,40,73,.08); backdrop-filter: blur(6px); color: var(--muted); font-size: .8rem; }
.coi-upload-form { max-width: 980px; }
.coi-upload-progress { margin-top: .8rem; padding: .8rem; border: 1px solid var(--line); border-radius: .7rem; background: #f7fbfd; }
.coi-upload-progress progress { width: min(620px, 100%); height: 1rem; accent-color: var(--brand-blue); }
.coi-upload-progress p { margin: .45rem 0 0; color: var(--muted); font-size: .8rem; }
.coi-upload-progress ul { margin: .55rem 0 0; padding-left: 1.2rem; color: var(--brand-dark-red); font-size: .76rem; }
.coi-bulk-controls { display: grid; gap: .8rem; margin-bottom: .9rem; padding: .9rem; border: 1px solid var(--line); border-radius: .7rem; background: #f7f9fa; }
.coi-scope-choice { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; margin: 0; padding: 0; border: 0; }
.coi-scope-choice legend { margin-bottom: .4rem; color: var(--navy); font-size: .76rem; font-weight: 850; }
.coi-scope-choice label { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .78rem; }
.coi-bulk-controls > label { display: grid; gap: .35rem; color: var(--muted); font-size: .78rem; font-weight: 750; }
.coi-bulk-controls .bulk-action-bar { grid-template-columns: repeat(3, minmax(12rem, 1fr)) auto; margin: 0; border-color: #c6dbe5; background: var(--teal-soft); }
.coi-file-table { min-width: 1180px; }
.coi-file-table th:first-child,
.coi-file-table td:first-child { position: sticky; left: 0; z-index: 2; width: 72px; background: inherit; }
.coi-file-table th:nth-child(2),
.coi-file-table td:nth-child(2) { position: sticky; left: 72px; z-index: 2; min-width: 280px; max-width: 360px; background: inherit; box-shadow: 8px 0 12px -12px rgba(28,40,73,.6); }
.coi-file-table thead th:first-child,
.coi-file-table thead th:nth-child(2) { z-index: 3; background: #f4f6f9; }
.coi-file-table td { min-width: 190px; vertical-align: top; }
.coi-file-table td:nth-child(3) { min-width: 320px; }
.coi-file-table td:nth-child(4),
.coi-file-table td:nth-child(5) { min-width: 260px; }
.coi-file-table strong,
.coi-file-table small,
.coi-file-table .status-pill { display: block; }
.coi-file-table small { margin-top: .25rem; color: var(--muted); line-height: 1.35; }
.coi-file-table .status-pill { width: fit-content; margin: 0 0 .35rem; }
.coi-file-table .text-link { display: inline-block; margin-top: .4rem; }
.coi-row-assignment-controls { display: grid; gap: .45rem; margin-top: .75rem; padding-top: .65rem; border-top: 1px solid var(--line); }
.coi-row-assignment-controls > span { color: var(--navy); font-size: .72rem; font-weight: 850; }
.coi-row-assignment-controls label { display: grid; min-width: 0; gap: .25rem; color: var(--muted); font-size: .72rem; font-weight: 750; }
.coi-row-assignment-controls select { width: 100%; min-width: 0; }
.coi-savebar { z-index: 5; }
@media (max-width: 1000px) {
    .coi-bulk-controls .bulk-action-bar { grid-template-columns: 1fr; }
}
.officials-mass-apply { align-items: end; display: grid; grid-template-columns: minmax(10rem, 1fr) minmax(10rem, 1fr) auto minmax(14rem, 2fr); gap: .75rem; margin-bottom: .85rem; padding: .85rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--teal-soft); }
.officials-mass-apply label { display: grid; gap: .3rem; }
.management-drawer { border-bottom: 1px solid var(--line); background: var(--white); }
.management-drawer > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 0; color: var(--navy); cursor: pointer; font-size: .88rem; font-weight: 800; list-style: none; }
.management-drawer > summary::-webkit-details-marker { display: none; }
.management-drawer > summary::after { content: "+"; color: var(--brand-blue); font-size: 1.2rem; }
.management-drawer[open] > summary::after { content: "−"; }
.management-drawer-body { padding: 0 0 1rem; }
.management-empty { padding: 2.5rem 1rem; color: var(--muted); text-align: center; }
.record-layout { display: grid; grid-template-columns: minmax(220px, 290px) minmax(0, 1fr); gap: 1rem; align-items: start; }
.record-rail { position: sticky; top: 7.5rem; }
.record-main { min-width: 0; }
.detail-list { margin: 0; display: grid; gap: .75rem; }
.detail-list div { display: grid; gap: .2rem; padding-bottom: .65rem; border-bottom: 1px solid var(--line); }
.detail-list div:last-child { padding-bottom: 0; border-bottom: 0; }
.detail-list dt { color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.detail-list dd { margin: 0; color: var(--navy); font-weight: 700; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem 1rem; align-items: end; }
.form-grid > label, .management-form > label { display: flex; flex-direction: column; gap: .35rem; color: var(--muted); font-size: .78rem; font-weight: 750; }
.form-grid .field-span { grid-column: 1 / -1; }
.sticky-actions { position: sticky; bottom: 0; z-index: 2; margin: 1rem -1rem -1rem; padding: .85rem 1rem; border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(6px); }
.management-disclosure { border-top: 1px solid var(--line); }
.management-disclosure > summary { padding: .85rem 0; color: var(--navy); cursor: pointer; font-weight: 800; }
.management-disclosure[open] > summary { margin-bottom: .7rem; }
.rankings-public-heading { border-bottom: 3px solid var(--brand-blue); }
.rankings-public-filters { align-items: end; }
.rankings-group-tabs { margin: 1rem 0; }
.rankings-group-tabs small { display: block; font-size: .58rem; }
.rankings-empty { padding: 3rem 1.5rem; text-align: center; }
.rankings-table .ranking-position { color: var(--navy); font-size: 1.15rem; font-weight: 900; text-align: center; }
.ranking-contributions { min-width: 240px; margin: .6rem 0 0; padding: 0; list-style: none; }
.ranking-contributions li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem .7rem; padding: .45rem 0; border-top: 1px solid var(--line); }
.ranking-contributions li small { grid-column: 1 / -1; color: var(--muted); }
.inline-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.heading-actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.restricted-heading { padding-left: 1.15rem; border-left: 5px solid var(--coral); }
.eyebrow { margin: 0; color: var(--teal); font-size: .72rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.back-link { display: inline-block; margin-bottom: 1rem; color: var(--teal); text-decoration: none; font-size: .86rem; font-weight: 700; }

.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: .7rem 1rem; border: 1px solid transparent; border-radius: .72rem; cursor: pointer; text-decoration: none; font-weight: 750; font-size: .88rem; transition: transform .14s ease, background-color .14s ease, border-color .14s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--brand-blue); color: var(--white); box-shadow: 0 8px 20px rgba(0, 98, 152, .2); }
.button-primary:hover { background: #004f7b; }
.button-secondary { border-color: #b9c3d5; background: var(--white); color: var(--navy); }
.button-secondary:hover { border-color: var(--teal); }
.button-danger { border-color: #bd4935; background: #a93d2b; color: var(--white); }
.button-danger:hover { background: #8f3021; }

.detail-stack,
.split-grid {
    display: grid;
    gap: 1rem;
}

.detail-stack section,
.management-section-subtle {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    padding: 1rem;
}

.detail-stack h3,
.management-section-subtle h3 {
    margin-top: 0;
}

.split-grid {
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}

.split-grid > form {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    padding: 1rem;
}

.management-section-subtle {
    margin-top: 1rem;
}
.button:disabled { cursor: not-allowed; opacity: .5; transform: none; }
.button-quiet { min-height: 34px; padding: .45rem .7rem; border-color: rgba(255,255,255,.22); background: transparent; color: var(--white); }
.button-full { width: 100%; margin-top: .35rem; }
.button-google { gap: .65rem; border-color: #c6cedd; background: var(--white); color: #263238; }
.button-google:hover { border-color: #4285f4; background: #f8fbff; }
.google-mark { display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; color: #4285f4; font-weight: 900; }
.text-link, .person-link { color: var(--teal); font-weight: 750; text-decoration: none; }
.text-link:hover, .person-link:hover { text-decoration: underline; }
.person-link { display: flex; flex-direction: column; }
.row-actions { display: flex; align-items: center; gap: .7rem; white-space: nowrap; }
.row-muted { opacity: .68; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.governance-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.metric-card { position: relative; min-height: 154px; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 1.3rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 8px 24px rgba(28,40,73,.05); }
.metric-card::after { content: ""; position: absolute; width: 90px; height: 90px; right: -30px; top: -36px; border-radius: 50%; background: var(--teal-soft); }
.metric-card span { color: var(--muted); font-size: .82rem; font-weight: 700; }
.metric-card strong { color: var(--navy); font-size: 2.5rem; letter-spacing: -.06em; line-height: 1; }
.metric-card small { color: var(--muted); font-size: .75rem; }
.dashboard-grid, .detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.workspace-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1.25rem 0; }
.workspace-card { min-height: 155px; display: flex; flex-direction: column; gap: .4rem; padding: 1.2rem; border: 1px solid var(--line); border-top: 4px solid var(--brand-blue); border-radius: var(--radius); background: var(--white); color: var(--ink); text-decoration: none; box-shadow: 0 8px 24px rgba(28,40,73,.045); }
.workspace-card:hover { border-color: var(--brand-blue); transform: translateY(-1px); }
.workspace-card span { color: var(--brand-blue); font-size: .72rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.workspace-card strong { color: var(--navy); font-size: 1.05rem; }
.workspace-card small { color: var(--muted); line-height: 1.45; }
.workspace-restricted { border-top-color: var(--brand-red); }
.workspace-restricted span { color: var(--brand-dark-red); }
.workspace-locked { border-top-color: #9ba5ab; background: #fbfcfc; }
.workspace-locked:hover { border-color: #768791; }
.workspace-locked > span { color: #66747e; }
.workspace-access-state { align-self: flex-start; padding: .2rem .5rem; border: 1px solid #c9d1d6; border-radius: 999px; color: #596873; background: #f1f3f4; font-size: .64rem; font-weight: 800; letter-spacing: .04em; line-height: 1.2; text-transform: uppercase; }
.panel { padding: 1.35rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 8px 24px rgba(28,40,73,.045); margin-bottom: 1rem; }
.panel-accent { border-top: 4px solid var(--teal); }
.panel-restricted { border-color: rgba(218,41,28,.35); background: #fffaf8; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.panel-heading h2 { margin: .1rem 0 0; color: var(--navy); font-size: 1.15rem; }
.health-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.definition-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.1rem 0; }
.definition-grid div, .definition-list div { display: flex; flex-direction: column; }
.definition-grid dt, .definition-list dt { color: var(--muted); font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.definition-grid dd { margin: .2rem 0 0; color: var(--navy); font-size: 1.35rem; font-weight: 800; }
.definition-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1.1rem; margin: 0; }
.definition-list dd { margin: .25rem 0 0; }

.notice-card { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; margin: 1rem 0; border-radius: var(--radius-sm); border: 1px solid #bfded8; background: var(--teal-soft); color: #265e5c; }
.notice-card strong { color: var(--teal); min-width: max-content; }
.notice-critical { border-color: #efc0b8; background: #fff3f0; color: #7d392d; }
.notice-critical strong { color: #9a3424; }
.alert { padding: .9rem 1rem; margin-bottom: 1rem; border-radius: var(--radius-sm); font-size: .9rem; }
.alert-error { border: 1px solid #f0c2b9; background: #fff0ed; color: #8b3022; }
.alert-warning { border: 1px solid #ead09c; background: #fff9e9; color: #78520e; }
.muted { color: var(--muted); }
.empty-state { color: var(--muted); }
.empty-state h2 { color: var(--navy); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .84em; }
.pre-wrap { white-space: pre-wrap; }
.section-spacer { margin-top: 1.25rem; }

.status-pill { display: inline-flex; align-items: center; min-height: 26px; padding: .25rem .58rem; border-radius: 999px; font-size: .7rem; font-weight: 800; line-height: 1; text-transform: uppercase; letter-spacing: .045em; white-space: nowrap; }
.status-good { background: #dff3e8; color: #17663e; }
.status-warn { background: #fff0cf; color: #815a0b; }
.status-bad { background: #ffe1dc; color: #8c2d20; }
.status-neutral { background: #e9edf4; color: #4a5871; }

.search-bar, .filter-bar { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; padding: .8rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.search-bar input { flex: 1; }
.search-bar-embedded { padding: 0; border: 0; box-shadow: none; }
.filter-bar label { color: var(--muted); font-size: .78rem; font-weight: 750; }
.filter-bar select { min-width: 240px; }
input, select { min-height: 44px; padding: .7rem .85rem; border: 1px solid #c6cedd; border-radius: .7rem; background: var(--white); color: var(--ink); }
textarea { width: 100%; padding: .7rem .85rem; border: 1px solid #c6cedd; border-radius: .7rem; background: var(--white); color: var(--ink); font: inherit; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(0,98,152,.12); outline: none; }
.record-form, .inline-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: end; }
.record-form label, .inline-form label { display: flex; flex-direction: column; gap: .35rem; color: var(--muted); font-size: .78rem; font-weight: 750; }
.record-form .form-span, .inline-form .form-span { grid-column: 1 / -1; }
.subsidy-draft-form { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.subsidy-draft-form > .management-section {
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: .75rem;
}
.subsidy-draft-form > .management-section:last-child { border: 1px solid var(--line); }
.subsidy-draft-form .panel-heading { align-items: flex-start; }
.subsidy-submit-step .form-actions { align-items: stretch; flex-direction: column; }
.subsidy-submit-step .form-actions .button { width: 100%; }
.form-actions { display: flex; justify-content: flex-end; gap: .7rem; }
.checkbox-label { min-height: 44px; flex-direction: row !important; align-items: center; }
.checkbox-label input { min-height: 0; }
.checkbox-row { min-height: 44px; flex-direction: row !important; align-items: flex-start; gap: .7rem !important; }
.checkbox-row input { min-height: 0; margin-top: .2rem; }
.field-label { display: flex; justify-content: space-between; gap: 1rem; margin: 0 0 .55rem; color: var(--muted); font-size: .78rem; font-weight: 750; }
.field-label span { font-weight: 500; }
.access-role-groups { display: grid; gap: 1rem; }
.access-role-instructions { margin: 0; color: var(--muted); font-size: .82rem; }
.access-role-group { min-width: 0; margin: 0; padding: .9rem; border: 1px solid var(--line); border-radius: .9rem; background: var(--white); }
.access-role-group legend { display: flex; align-items: baseline; gap: .6rem; padding: 0 .4rem; color: var(--navy); }
.access-role-group legend span { font-size: .95rem; font-weight: 850; }
.access-role-group legend small { color: var(--muted); font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.role-option { min-height: 92px; display: flex !important; flex-direction: row !important; align-items: flex-start; gap: .75rem !important; padding: .85rem; border: 1px solid var(--line); border-radius: .8rem; background: #f9fafc; cursor: pointer; }
.role-option:hover { border-color: var(--teal); background: var(--teal-soft); }
.role-option input { min-height: 0; margin-top: .25rem; }
.role-option span { display: flex; flex-direction: column; gap: .2rem; }
.role-option strong { color: var(--navy); font-size: .86rem; }
.role-option small { color: var(--muted); font-weight: 500; line-height: 1.4; }
.role-risk-critical { border-left: 4px solid var(--coral); }
.role-risk-restricted { border-left: 4px solid var(--gold); }
.role-locked { cursor: not-allowed; opacity: .78; }
.access-role-option { min-height: 84px; }
.access-role-option input[type="checkbox"] { flex: 0 0 auto; width: 1.25rem; height: 1.25rem; padding: 0; border-radius: .25rem; accent-color: var(--brand-blue); }
.access-role-option:has(input[type="checkbox"]:checked) { border-color: var(--brand-blue); background: var(--teal-soft); box-shadow: inset 0 0 0 1px var(--brand-blue); }
.access-role-option:has(input[type="checkbox"]:focus-visible) { outline: 3px solid rgba(218, 41, 28, .42); outline-offset: 2px; }
.single-action-form { grid-template-columns: 1fr auto; }
.invitation-result label { display: flex; flex-direction: column; gap: .35rem; color: var(--muted); font-size: .78rem; font-weight: 750; }
.invitation-summary { display: flex; flex-direction: column; padding: .85rem; border-radius: .75rem; background: #f8f9fc; text-align: center; }
.invitation-summary strong { color: var(--navy); }
.invitation-summary span, .invitation-summary small { color: var(--muted); }
.invitation-roles { justify-content: center; margin: .8rem 0 1.1rem; }
.choice-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
.person-choice { display: flex; flex-direction: column; align-items: flex-start; padding: .85rem; border: 1px solid var(--line); border-radius: .75rem; background: #f8f9fc; color: var(--ink); text-decoration: none; cursor: pointer; text-align: left; }
.person-choice:hover { border-color: var(--teal); background: var(--teal-soft); }
.person-choice small { color: var(--muted); }

.table-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 8px 24px rgba(28,40,73,.045); }
.table-scroll { overflow-x: auto; }
.table-scroll[tabindex]:focus-visible {
    outline: 3px solid rgba(0, 98, 152, .28);
    outline-offset: -3px;
}
.table-tools {
    display: grid;
    grid-template-columns: minmax(180px, 1.35fr) minmax(155px, .8fr) minmax(170px, 1fr) auto;
    align-items: end;
    gap: .65rem;
    padding: .72rem .8rem;
    border-bottom: 1px solid var(--line);
    background: #f7fafb;
}
.table-tools + .table-scroll { border-top: 0; }
.table-tool-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: .25rem;
    color: var(--muted);
    font-size: .67rem;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
}
.table-tool-field input,
.table-tool-field select {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: .48rem .62rem;
    border-radius: .52rem;
    background: var(--white);
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
}
.table-tools-clear { min-height: 40px; padding: .48rem .72rem; }
.table-tools-status {
    grid-column: 1 / -1;
    margin: -.05rem 0 0;
    color: var(--muted);
    font-size: .67rem;
    line-height: 1.45;
}
.table-tools-status-warning { color: var(--brand-dark-red); font-weight: 750; }
.table-row-protected > td {
    background: #fff8e5;
    box-shadow: inset 0 2px 0 #e0a800, inset 0 -2px 0 #e0a800;
}
.table-sort-button {
    width: 100%;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: .45rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    letter-spacing: inherit;
    text-align: left;
    text-transform: inherit;
}
.table-sort-button::after {
    content: "\2195";
    flex: 0 0 auto;
    color: #8a9da8;
    font-size: .88rem;
    line-height: 1;
}
th[aria-sort="ascending"] .table-sort-button,
th[aria-sort="descending"] .table-sort-button { color: var(--brand-blue); }
th[aria-sort="ascending"] .table-sort-button::after { content: "\2191"; color: var(--brand-blue); }
th[aria-sort="descending"] .table-sort-button::after { content: "\2193"; color: var(--brand-blue); }
.table-sort-button:hover { color: var(--brand-blue); }
.table-sort-button:focus-visible {
    border-radius: .3rem;
    outline: 3px solid rgba(0, 98, 152, .3);
    outline-offset: 3px;
}
.table-client-empty[hidden] { display: none; }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th { padding: .8rem 1rem; color: var(--muted); background: #f8f9fc; border-bottom: 1px solid var(--line); text-align: left; font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; }
td { padding: .9rem 1rem; border-bottom: 1px solid #eceef4; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfe; }
td small { display: block; margin-top: .18rem; color: var(--muted); }
.row-highlight { background: #fffbef; }
.row-highlight:hover { background: #fff8df; }
.error-detail td { color: #8c2d20; background: #fff6f4; font-size: .78rem; }
.review-link { display: flex; align-items: center; gap: .5rem; text-decoration: none; }
.review-link small { color: var(--teal); font-weight: 750; }

@media (max-width: 760px) {
    .table-tools { grid-template-columns: 1fr; }
    .table-tools-status { grid-column: 1; }
    .table-tools-clear { width: 100%; }
}

.stack-list { display: flex; flex-direction: column; gap: .65rem; }
.stack-list > div { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem; border-radius: .75rem; background: #f8f9fc; }
.stack-list span:first-child { display: flex; flex-direction: column; }
.stack-list small { margin-top: .18rem; color: var(--muted); }
.recon-summary { display: grid; grid-template-columns: 1.25fr repeat(3, 1fr); gap: 1rem; margin-bottom: 1rem; }
.recon-summary > div { min-height: 92px; display: flex; flex-direction: column; justify-content: center; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); }
.recon-summary strong { color: var(--navy); font-size: 1.6rem; }
.recon-summary span:not(.status-pill), .recon-summary small { color: var(--muted); font-size: .75rem; }
.recon-summary .status-pill { align-self: flex-start; margin-bottom: .45rem; }
.club-chip { display: inline-block; padding: .35rem .55rem; border-radius: .45rem; font-weight: 750; }
.club-rest { background: #e9edf8; color: #334876; }
.club-graphql { background: var(--teal-soft); color: #17635f; }
.comparison-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 1rem; margin-bottom: 1rem; }
.comparison-card { min-height: 170px; display: flex; flex-direction: column; justify-content: center; padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.comparison-card strong { margin: .45rem 0; color: var(--navy); font-size: clamp(1.4rem, 3vw, 2.2rem); letter-spacing: -.04em; }
.comparison-card span { color: var(--muted); font-size: .78rem; }
.comparison-rest { border-top: 4px solid #536a9f; }
.comparison-graphql { border-top: 4px solid var(--teal); }
.comparison-divider { display: grid; place-items: center; color: var(--coral); font-size: 1.8rem; font-weight: 900; }
.classification-title { color: var(--navy); font-size: 1.25rem; font-weight: 800; }
.review-form { display: grid; grid-template-columns: 180px 1fr; gap: .75rem 1rem; align-items: start; }
.review-form label { padding-top: .65rem; color: var(--muted); font-size: .78rem; font-weight: 750; }
.review-form .button { grid-column: 2; justify-self: start; }
.alert-success { border: 1px solid #b8dfc8; background: #e9f8ef; color: #17663e; }

.snapshot-note { display: flex; flex-wrap: wrap; gap: .45rem 1.1rem; margin: 0 0 1rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #f9fafc; color: var(--muted); font-size: .78rem; }
.snapshot-note span { display: inline-flex; align-items: center; }
.snapshot-note span + span::before { content: "·"; margin-right: 1.1rem; color: #a1aabc; }
.member-directory-filters { flex-wrap: wrap; }
.member-directory-filters label:first-of-type { flex: 1 1 290px; }
.member-directory-filters input { width: 100%; }
.member-directory-filters select { min-width: 165px; }
.table-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: .25rem 0 .75rem; color: var(--muted); font-size: .8rem; }
.table-heading p { margin: 0; }
.table-heading strong { color: var(--navy); font-size: 1rem; }
.member-directory-table th:first-child { width: 19%; }
.member-directory-table th:nth-child(2) { width: 14%; }
.member-directory-table th:nth-child(4) { width: 25%; }
.status-stack { display: flex; flex-wrap: wrap; gap: .35rem; }
.metric-alert { border-top: 4px solid var(--coral); }
.metric-alert::after { background: #ffe4dd; }
.eligibility-alert-filters { flex-wrap: wrap; }
.eligibility-alert-filters label:first-of-type { flex: 1 1 290px; }
.eligibility-alert-filters input { width: 100%; }
.eligibility-alert-filters select { min-width: 165px; }
.eligibility-alert-table th:first-child { width: 24%; }
.eligibility-alert-table th:nth-child(2) { width: 37%; }
.eligibility-alert-table .role-stack { margin-top: .45rem; }
.crawl-progress { margin: 1rem 0; }
.crawl-progress p { margin: .8rem 0 .2rem; color: var(--navy); font-weight: 750; }
.crawl-progress > small { color: var(--muted); }
.progress-track { width: 100%; height: .72rem; overflow: hidden; border: 0; border-radius: 999px; background: #e5e9f1; }
.progress-track::-webkit-progress-bar { border-radius: 999px; background: #e5e9f1; }
.progress-track::-webkit-progress-value { border-radius: 999px; background: linear-gradient(90deg, var(--teal), #2c9d94); }
.progress-track::-moz-progress-bar { border-radius: 999px; background: linear-gradient(90deg, var(--teal), #2c9d94); }
.role-stack { display: flex; flex-wrap: wrap; gap: .35rem; }
.role-pill { display: inline-flex; padding: .3rem .52rem; border-radius: 999px; font-size: .68rem; font-weight: 800; line-height: 1; }
.role-official { background: #e4e8f8; color: #344b86; }
.role-coach { background: #e4f4f1; color: #17635f; }
.role-player { background: #fff0cf; color: #78520e; }
.role-administrator { background: #f1e8f8; color: #6b3f87; }
.role-other { background: #e9edf4; color: #4a5871; }
.membership-list { display: flex; flex-direction: column; gap: .28rem; }
.membership-list span { line-height: 1.35; }
.governance-table th:first-child { width: 18%; }
.governance-table th:nth-child(2) { width: 27%; }
.critical-text { color: #8c2d20 !important; font-weight: 750; }
.compact-form { display: inline; margin-left: .45rem; }
.candidate-list { display: grid; gap: .65rem; }
.candidate-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem; border: 1px solid var(--line); border-radius: .75rem; background: #f9fafc; }
.candidate-row > span { min-width: 0; display: flex; flex-direction: column; gap: .16rem; }
.candidate-row small { color: var(--muted); overflow-wrap: anywhere; }
.club-admin-grid { align-items: start; }
.club-contact-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.club-management-heading .club-heading-identity { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.club-profile-logo { flex: 0 0 76px; width: 76px; height: 76px; object-fit: contain; border: 1px solid var(--line); border-radius: 1rem; background: var(--white); }
.club-profile-logo-placeholder { display: grid; place-items: center; background: var(--navy); color: var(--white); font-size: 1.7rem; font-weight: 900; }
.club-management-tabs { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1rem; padding-bottom: .85rem; border-bottom: 1px solid var(--line); }
.club-management-tabs .button { min-height: 36px; padding: .48rem .8rem; }
.club-profile-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(310px, .8fr); gap: 1rem; align-items: start; }
.club-profile-grid > section { min-width: 0; }
.club-profile-grid > section:only-child { grid-column: 1 / -1; }
.club-profile-preview { display: grid; grid-template-columns: minmax(130px, .35fr) minmax(0, 1fr); gap: 1rem; align-items: center; margin-bottom: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: .8rem; background: #fafbfc; }
.club-profile-preview-logo { width: 100%; max-width: 180px; max-height: 140px; object-fit: contain; }
.club-profile-preview-empty { display: grid; min-height: 110px; place-items: center; padding: 1rem; border: 1px dashed #bac5d3; border-radius: .7rem; color: var(--muted); text-align: center; }
.club-profile-preview p { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: .65rem; margin: .35rem 0; overflow-wrap: anywhere; }
.club-profile-preview a { color: var(--brand-blue); }
.club-profile-form, .club-event-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.club-logo-actions { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.club-logo-actions > form:first-child { flex: 1 1 auto; }
.club-logo-actions .record-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .75rem; }
.club-calendar-feed-panel { border-top: 4px solid var(--teal); }
.club-calendar-feed-list { margin: .75rem 0; }
.club-calendar-feed-list > div { align-items: center; }
.club-calendar-feed-list > div > span:last-child { display: flex; align-items: center; gap: .55rem; }
.club-calendar-feed-form { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.club-calendar-feed-secret label { display: flex; flex-direction: column; gap: .35rem; margin-top: .65rem; }
.club-calendar-feed-secret input { width: 100%; }
.club-event-management { margin-top: 1rem; border-top: 4px solid var(--gold); }
.club-event-table td { vertical-align: top; }
.club-event-table td:first-child { min-width: 190px; }
.club-event-table td:nth-child(2) { min-width: 150px; }
.club-event-editor { margin-top: 1rem; }
.club-event-editor > summary { font-weight: 800; }
.club-map-management-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.club-map-management-grid > section:only-child { grid-column: 1 / -1; }
.club-map-embed-panel { margin-bottom: 1rem; }
.club-map-embed-panel label { display: grid; gap: .4rem; font-weight: 750; }
.club-map-embed-panel textarea { width: 100%; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.club-map-location-management { margin-top: 1rem; border-top: 4px solid var(--brand-blue); }
.club-map-location-management td { vertical-align: top; }
.club-map-location-management td:first-child { min-width: 260px; }
.club-map-location-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.checkbox-fieldset { display: flex; flex-wrap: wrap; gap: .65rem 1rem; padding: .8rem; border: 1px solid var(--line); border-radius: .7rem; }
.checkbox-fieldset legend { padding: 0 .35rem; font-weight: 800; }
.club-program-age-fieldset .checkbox-label { min-width: 54px; }
.club-invitation-secret { display: grid; gap: .45rem; }
.club-invitation-secret label { display: grid; gap: .3rem; }
.club-invitation-secret input { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.waiver-player-search label:has(input) { flex: 1 1 320px; }
.waiver-player-search input { width: 100%; }
.waiver-player-results { margin-top: 1rem; }
.selected-player-card { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1rem; margin-bottom: 1rem; padding: 1rem; border: 1px solid #bfdfcf; border-radius: .8rem; background: #f3fbf7; }
.selected-player-card strong { color: var(--navy); font-size: 1.05rem; }
.selected-player-card small { flex-basis: 100%; color: var(--muted); }
.text-button { padding: 0; border: 0; background: transparent; color: var(--teal); cursor: pointer; font: inherit; font-size: .75rem; font-weight: 750; }
.text-button:hover { text-decoration: underline; }
.subheading { margin: 1.2rem 0 .65rem; color: var(--navy); font-size: .94rem; }
.governance-compact-form { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 1rem; }
.confidentiality-note { margin-bottom: 0; font-size: .76rem; }
.confidential-block { margin-top: 1rem; padding: 1rem; border: 1px solid #e7c8c0; border-radius: .75rem; background: #fff; }
.confidential-block p { margin-bottom: 0; }
.snapshot-position { display: block; }
.panel-divider { margin: 1.4rem 0; border: 0; border-top: 1px solid var(--line); }
.disclosure-form { display: flex; flex-direction: column; gap: 1rem; }
.disclosure-form > label { display: flex; flex-direction: column; gap: .35rem; color: var(--muted); font-size: .78rem; font-weight: 750; }
.disclosure-form fieldset { display: flex; flex-direction: column; gap: .65rem; padding: 1rem; border: 1px solid var(--line); border-radius: .8rem; }
.disclosure-form legend { padding: 0 .4rem; color: var(--navy); font-weight: 750; }
.radio-option { display: flex; align-items: flex-start; gap: .7rem; padding: .75rem; border-radius: .7rem; background: #f8f9fc; cursor: pointer; }
.radio-option input, .certification-list input { min-height: 0; margin-top: .2rem; }
.radio-option span { display: flex; flex-direction: column; gap: .15rem; }
.radio-option small { color: var(--muted); }
.certification-list label { display: flex; align-items: flex-start; gap: .6rem; color: var(--ink); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1rem; color: var(--muted); font-size: .82rem; }
.pagination .button-quiet { border-color: #c6cedd; color: var(--navy); }

.admin-log-tabs { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1rem 0; }
.admin-log-tabs .button[aria-current="page"] { border-color: var(--brand-blue); background: var(--brand-blue); color: var(--white); }
.admin-log-filters { flex-wrap: wrap; }
.admin-log-filters label:first-of-type { flex: 1 1 270px; }
.admin-log-filters input { width: 100%; }
.admin-log-filters select { min-width: 175px; }
.admin-log-table td { vertical-align: top; }
.admin-log-table td small { display: block; margin-top: .2rem; color: var(--muted); }
.log-details { margin-top: .45rem; }
.log-details summary { cursor: pointer; color: var(--teal); font-size: .72rem; font-weight: 800; }
.log-details pre { max-width: 520px; max-height: 220px; overflow: auto; margin: .45rem 0 0; padding: .65rem; border-radius: .55rem; background: #eef1f5; color: #30445a; font-size: .7rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.log-error summary { color: var(--brand-dark-red); }
.log-error pre { background: #fff3f1; color: #81261f; }

/* Finance dashboards summarize performance; finance management views remain flat and task oriented. */
.finance-page-heading { margin-bottom: 1.1rem; }
.finance-metrics .metric-card strong { font-size: clamp(1.55rem, 2.6vw, 2.35rem); }
.finance-plan-name-metric { max-width: 90%; font-size: clamp(1.05rem, 2vw, 1.55rem) !important; letter-spacing: -.025em !important; line-height: 1.15 !important; }
.finance-dashboard-grid .panel { margin-bottom: 0; }
.finance-attention-panel { margin-top: 0; }
.finance-attention-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; }
.finance-attention-grid > div { min-height: 88px; display: flex; flex-direction: column; justify-content: center; gap: .2rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: .75rem; background: #f8fafb; }
.finance-attention-grid strong { color: var(--navy); font-size: 1.45rem; line-height: 1; }
.finance-attention-grid span { color: var(--muted); font-size: .75rem; line-height: 1.35; }
.finance-performance-panel { margin-top: 1rem; }
.finance-performance-panel > .muted { margin: -.35rem 0 1rem; font-size: .78rem; }
.finance-performance-table td:not(:first-child) { font-variant-numeric: tabular-nums; white-space: nowrap; }
.finance-net-row td { border-top: 2px solid #b9c6cd; background: #f4f8fa; font-weight: 800; }

.finance-line-filters, .finance-assignment-filters, .finance-import-filters, .finance-my-lines-filters, .finance-comparison-filters { flex-wrap: wrap; }
.finance-line-filters label:first-of-type, .finance-assignment-filters label:first-of-type, .finance-import-filters label:first-of-type, .finance-my-lines-filters label:first-of-type { flex: 1 1 250px; }
.finance-line-filters input, .finance-assignment-filters input, .finance-import-filters input, .finance-my-lines-filters input { width: 100%; }
.finance-line-filters select, .finance-assignment-filters select, .finance-import-filters select, .finance-my-lines-filters select, .finance-comparison-filters select { min-width: 155px; }
.finance-line-label, .finance-source-label { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: .22rem .5rem; min-width: 180px; }
.finance-line-label strong, .finance-source-label strong { color: var(--navy); }
.finance-line-label .mono, .finance-source-label .mono { color: var(--muted); font-size: .72rem; }
.finance-depth-1 { padding-left: 1rem; }
.finance-depth-2 { padding-left: 2rem; }
.finance-depth-3 { padding-left: 3rem; }
.finance-depth-4 { padding-left: 4rem; }
.finance-depth-5 { padding-left: 5rem; }
.finance-depth-1::before, .finance-depth-2::before, .finance-depth-3::before, .finance-depth-4::before, .finance-depth-5::before { content: "↳"; position: absolute; left: max(0px, calc(100% - 100%)); color: #8ca1ad; font-weight: 700; }
.finance-depth-2::before { left: 1rem; }
.finance-depth-3::before { left: 2rem; }
.finance-depth-4::before { left: 3rem; }
.finance-depth-5::before { left: 4rem; }
.finance-lines-table td:nth-child(n+3):nth-child(-n+6), .finance-my-lines-table td:nth-child(n+3), .finance-comparison-table td:nth-child(n+3) { font-variant-numeric: tabular-nums; }
.finance-amount-form { grid-template-columns: minmax(220px, 360px) auto; max-width: 560px; }
.finance-account-directory-panel { margin-top: 1rem; }
.finance-account-directory-table td, .finance-assignment-table td { vertical-align: top; }
.finance-account-directory-table td:first-child, .finance-assignment-table td:first-child { white-space: nowrap; }
.finance-directory-more { margin: .8rem 0 0; color: var(--muted); font-size: .78rem; }
.finance-dashboard-assignees, .finance-assignee-list { display: flex; flex-direction: column; gap: .5rem; }
.finance-dashboard-assignees > span { display: flex; flex-direction: column; }
.finance-assignee-card { display: grid; grid-template-columns: minmax(190px, 1fr) auto auto; align-items: center; gap: .45rem .7rem; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: .6rem; background: #f8fafb; }
.finance-assignee-card > span:first-child { display: flex; flex-direction: column; }
.finance-assignee-card small, .finance-dashboard-assignees small { color: var(--muted); }
.finance-assignee-status { display: flex; flex-wrap: wrap; gap: .3rem; }
.finance-inline-assignment-form { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(120px, auto) auto; align-items: center; gap: .45rem; min-width: 470px; }
.finance-inline-assignment-form select { width: 100%; min-width: 0; }
.finance-inline-assignment-form .button { white-space: nowrap; }
.finance-position-responsibility-form, .finance-dimension-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.finance-position-responsibility-table td { vertical-align: top; }
.finance-position-responsibility-table small { color: var(--muted); }
.finance-dimension-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.finance-dimension-grid .management-form { margin: 0; }

.finance-upload-form { max-width: 760px; }
.finance-upload-form input[type="file"] { width: 100%; height: auto; padding: .85rem; background: #f8fafb; }
.finance-upload-form label small { color: var(--muted); font-weight: 500; }
.finance-error-list { margin: .55rem 0 0; padding-left: 1.2rem; }
.finance-error-list li + li { margin-top: .25rem; }
.finance-import-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .65rem; margin: 0 0 1rem; }
.finance-import-summary > div { min-height: 84px; display: flex; flex-direction: column; justify-content: center; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--white); }
.finance-import-summary dt { color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.finance-import-summary dd { margin: .2rem 0 0; color: var(--navy); font-size: .96rem; font-weight: 800; overflow-wrap: anywhere; }
.finance-import-table select { min-width: 310px; width: 100%; }
.finance-import-table td:nth-child(4), .finance-reconciliation-table td:nth-child(3) { font-variant-numeric: tabular-nums; white-space: nowrap; }
.finance-import-table td small { margin-top: .4rem; }
.finance-import-acknowledgement { max-width: 850px; margin: 1rem 0; padding: .9rem 1rem; border: 1px solid #bfded8; border-radius: .75rem; background: var(--teal-soft); color: #265e5c; font-size: .8rem; }
.finance-form-note { margin: .65rem 0 0; font-size: .76rem; text-align: right; }
.finance-reconcile-actions { display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; }
.finance-reconcile-actions form:first-child { display: flex; align-items: center; gap: .45rem; }
.finance-reconcile-actions select { min-width: 260px; }
.finance-reconcile-actions .button { min-height: 38px; padding: .5rem .7rem; }

.finance-plan-headline .comparison-card small { color: var(--muted); font-size: .75rem; }
.finance-comparison-metrics { margin-top: 1rem; }
.finance-comparison-panel > .muted { margin: -.35rem 0 1rem; font-size: .78rem; }
.finance-comparison-table td:nth-child(n+3) { white-space: nowrap; }

.timeline { position: relative; padding-left: 1.4rem; }
.timeline::before { content: ""; position: absolute; left: .3rem; top: .25rem; bottom: .25rem; width: 2px; background: var(--line); }
.timeline article { position: relative; padding: 0 0 1.25rem 1rem; }
.timeline article::before { content: ""; position: absolute; left: -1.42rem; top: .3rem; width: .62rem; height: .62rem; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px #ffece7; }
.timeline time { color: var(--muted); font-size: .72rem; }
.timeline h3 { margin: .2rem 0; font-size: 1rem; }
.timeline p { margin: .25rem 0; }

.auth-shell { display: grid; place-items: center; min-height: 100vh; padding: 1.25rem; background: radial-gradient(circle at 12% 10%, rgba(200,201,199,.3), transparent 30%), radial-gradient(circle at 88% 85%, rgba(218,41,28,.28), transparent 32%), linear-gradient(145deg, #003b5c, var(--brand-blue) 62%, #00517d); }
.auth-card { width: min(470px, 100%); padding: clamp(1.6rem, 5vw, 2.6rem); border-radius: 24px; background: rgba(255,255,255,.98); box-shadow: 0 28px 80px rgba(4,12,30,.34); }
.auth-card-wide { width: min(560px, 100%); }
.auth-brand { margin-bottom: 1.4rem; text-align: center; }
.auth-logo { display: block; width: min(320px, 88%); max-height: 168px; margin: 0 auto 1.15rem; object-fit: contain; }
.auth-brand h1 { margin: .25rem 0 .5rem; color: var(--navy); font-size: 2.25rem; letter-spacing: -.04em; }
.auth-brand p:last-child { margin: 0 auto; max-width: 330px; color: var(--muted); }
.auth-form { display: flex; flex-direction: column; gap: .55rem; }
.auth-divider { display: flex; align-items: center; gap: .75rem; margin: 1rem 0 .4rem; color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-form label { margin-top: .3rem; color: var(--navy); font-size: .78rem; font-weight: 750; }
.auth-note { margin: 1.2rem 0 0; color: var(--muted); font-size: .74rem; text-align: center; }
.membership-check-card { width: min(780px, 100%); }
.membership-check-brand p:last-child { max-width: 520px; }
.membership-check-form { display: flex; flex-direction: column; gap: .7rem; }
.membership-check-form label { display: flex; flex-direction: column; gap: .35rem; color: var(--navy); font-size: .78rem; font-weight: 750; }
.membership-check-form input { width: 100%; font-size: 1rem; }
.membership-name-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.lookup-divider { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.lookup-divider::before, .lookup-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.membership-results { margin-top: 1.35rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.membership-results-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.membership-results-heading h2 { margin: .12rem 0 0; color: var(--navy); font-size: 1.25rem; }
.membership-result-list { display: flex; flex-direction: column; gap: .65rem; }
.membership-result { display: grid; grid-template-columns: auto 1fr; gap: .85rem; padding: 1rem; border: 1px solid #bfdfcf; border-radius: .85rem; background: #f3fbf7; }
.membership-result h3 { margin: 0; color: var(--navy); font-size: 1.05rem; }
.membership-result p { margin: .18rem 0 0; font-size: .82rem; }
.membership-result p strong { color: #17663e; }
.membership-valid-mark { width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; background: #d6f0e1; color: #17663e; font-weight: 900; }
.membership-number-hint { color: #4b5a73; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.membership-scope-note { margin-top: 1.15rem; padding: .9rem 1rem; border-radius: .75rem; background: #f1f3f7; }
.membership-scope-note strong { color: var(--navy); font-size: .82rem; }
.membership-scope-note p { margin: .25rem 0 0; color: var(--muted); font-size: .75rem; }
.membership-refresh { margin: .85rem 0 0; color: var(--muted); font-size: .72rem; text-align: center; }
.membership-public-links { display: flex; justify-content: center; gap: 1.2rem; margin-top: .8rem; font-size: .78rem; }
.setup-steps { color: var(--muted); }
.setup-steps code { display: block; overflow-x: auto; padding: 1rem; border-radius: .75rem; background: #eef1f7; color: var(--navy); white-space: nowrap; }
.error-page { max-width: 640px; margin: 8vh auto; text-align: center; }
.error-page > span { color: var(--coral); font-size: 5rem; font-weight: 900; letter-spacing: -.08em; }
.error-page h1 { margin: 0; color: var(--navy); font-size: 2.2rem; }
.error-page p { color: var(--muted); }

@media (max-width: 1100px) {
    .topbar { grid-template-columns: auto 1fr auto; }
    .nav-toggle { display: inline-flex; }
    .app-frame { grid-template-columns: 1fr; }
    .app-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 80;
        width: min(330px, calc(100vw - 3rem));
        height: 100vh;
        padding-top: .75rem;
        transform: translateX(-102%);
        visibility: hidden;
        box-shadow: 14px 0 40px rgba(0, 37, 56, .22);
        transition: transform .2s ease, visibility .2s linear;
    }
    .app-sidebar.is-open { transform: translateX(0); visibility: visible; }
    .sidebar-header { position: sticky; top: -.75rem; z-index: 4; display: flex; align-items: center; justify-content: space-between; margin: -.2rem 0 .75rem; padding: .75rem .2rem .65rem .65rem; border-bottom: 1px solid var(--line); background: inherit; }
    .sidebar-season { position: static; }
    .sidebar-header strong { color: var(--ink); font-size: .86rem; }
    .sidebar-close { width: 34px; height: 34px; display: grid; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--white); color: var(--brand-blue); cursor: pointer; font-size: 1.3rem; line-height: 1; }
    .nav-backdrop { position: fixed; inset: 0; z-index: 75; border: 0; background: rgba(7, 26, 36, .48); }
    .nav-backdrop.is-open { display: block; }
    html.nav-open, body.nav-open { overflow: hidden; }
    .metric-grid, .workspace-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .governance-metrics { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .recon-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .finance-attention-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .finance-import-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .help-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .topbar { padding: .7rem 1rem; gap: .7rem; }
    .brand-logo-full { display: none; }
    .brand-logo-compact { display: block; }
    .brand-product { padding-left: .65rem; }
    .brand small { display: none; }
    .nav-toggle > span:last-child { display: none; }
    .account-summary, .account-chevron { display: none; }
    .account-menu > summary { padding: .25rem; }
    .main-content { padding: 1.25rem 1rem 2rem; }
    .context-help { margin: -.35rem 0 .65rem; }
    .footer { flex-direction: column; padding: 1rem; }
    .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 1.4rem; }
    .page-heading h1 { font-size: 2.2rem; }
    .management-heading { flex-direction: column; }
    .help-heading { align-items: stretch; }
    .help-search { flex-basis: auto; min-width: 0; width: 100%; }
    .help-layout { grid-template-columns: 1fr; }
    .help-directory { position: static; max-height: none; }
    .help-directory nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .help-result-grid { grid-template-columns: 1fr; }
    .management-heading-actions { justify-content: flex-start; }
    .management-workspace { grid-template-columns: 1fr; }
    .management-rail { border-right: 0; border-bottom: 1px solid var(--line); }
    .management-toolbar-summary { width: 100%; margin-left: 0; }
    .metric-grid, .workspace-grid, .dashboard-grid, .detail-grid, .recon-summary { grid-template-columns: 1fr; }
    .governance-metrics { grid-template-columns: 1fr; }
    .governance-compact-form { grid-template-columns: 1fr; }
    .definition-grid { grid-template-columns: repeat(2, 1fr); }
    .definition-list { grid-template-columns: 1fr; }
    .comparison-grid { grid-template-columns: 1fr; }
    .comparison-divider { min-height: 24px; transform: rotate(90deg); }
    .review-form { grid-template-columns: 1fr; }
    .record-form, .inline-form, .choice-list, .role-grid { grid-template-columns: 1fr; }
    .subsidy-draft-form { grid-template-columns: 1fr; }
    .record-layout, .form-grid { grid-template-columns: 1fr; }
    .record-rail { position: static; }
    .form-grid .field-span { grid-column: 1; }
    .officials-bulk-savebar { position: static; align-items: stretch; flex-direction: column; }
    .officials-mass-apply { grid-template-columns: 1fr; }
    .officials-eligibility-explainer { flex-direction: column; }
    .official-eligibility-summary > .panel-heading { align-items: flex-start; flex-direction: column; }
    .official-eligibility-grid { grid-template-columns: 1fr; }
    .record-form .form-span, .inline-form .form-span { grid-column: 1; }
    .review-form label { padding-top: 0; }
    .review-form .button { grid-column: 1; }
    .notice-card { align-items: flex-start; flex-direction: column; }
    .search-bar, .filter-bar { align-items: stretch; flex-direction: column; }
    .candidate-row { align-items: stretch; flex-direction: column; }
    .club-contact-form { grid-template-columns: 1fr; }
    .club-profile-grid { grid-template-columns: 1fr; }
    .club-map-management-grid { grid-template-columns: 1fr; }
    .club-profile-form, .club-event-form { grid-template-columns: 1fr; }
    .club-map-location-form { grid-template-columns: 1fr; }
    .club-logo-actions { align-items: stretch; flex-direction: column; }
    .club-logo-actions .record-form { grid-template-columns: 1fr; }
    .club-profile-preview { grid-template-columns: 1fr; }
    .club-profile-preview-logo { justify-self: center; }
    .club-management-heading .club-heading-identity { align-items: flex-start; }
    .filter-bar select { min-width: 0; width: 100%; }
    .admin-log-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-log-tabs .button { justify-content: center; }
    .finance-attention-grid { grid-template-columns: 1fr; }
    .finance-import-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .finance-amount-form { grid-template-columns: 1fr; }
    .finance-assignee-card, .finance-inline-assignment-form { grid-template-columns: 1fr; min-width: 0; }
    .finance-position-responsibility-form, .finance-dimension-form, .finance-dimension-grid { grid-template-columns: 1fr; }
    .finance-assignee-card { align-items: flex-start; }
    .finance-reconcile-actions form:first-child { align-items: stretch; flex-direction: column; width: 100%; }
    .finance-reconcile-actions select { min-width: 0; width: 100%; }
    .finance-form-note { text-align: left; }
    .snapshot-note { flex-direction: column; }
    .snapshot-note span + span::before { display: none; }
    .table-heading { align-items: flex-start; flex-direction: column; }
    .table-card { overflow-x: auto; }
    table { min-width: 720px; }
    .auth-card { border-radius: 18px; }
    .membership-name-fields { grid-template-columns: 1fr; }
    .membership-results-heading { align-items: flex-start; flex-direction: column; }
    .membership-public-links { flex-direction: column; align-items: center; gap: .5rem; }
}

@media (max-width: 460px) {
    .brand-product { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Event Sanctions keeps overview metrics separate from task-oriented record management. */
.event-sanctions-tabs { display: flex; flex-wrap: wrap; gap: .55rem; margin: 0 0 1rem; padding-bottom: .85rem; border-bottom: 1px solid var(--line); }
.event-sanctions-tabs .button { min-height: 36px; padding: .48rem .75rem; font-size: .78rem; }
.event-sanctions-tabs .button[aria-current="page"] { border-color: var(--brand-blue); background: var(--brand-blue); color: var(--white); }
.event-sanctions-tabs .event-sanctions-tab-restricted { border-color: #dfaca3; color: var(--brand-dark-red); }
.event-sanction-filters, .event-sanction-site-filters, .event-sanction-certificate-filters, .event-incident-filters { flex-wrap: wrap; }
.event-sanction-filters label:first-of-type, .event-sanction-site-filters label:first-of-type, .event-sanction-certificate-filters label:first-of-type, .event-incident-filters label:first-of-type { flex: 1 1 270px; }
.event-sanction-filters input, .event-sanction-site-filters input, .event-sanction-certificate-filters input, .event-incident-filters input { width: 100%; }
.event-sanction-filters select, .event-sanction-site-filters select, .event-sanction-certificate-filters select, .event-incident-filters select { min-width: 150px; }
.event-sanction-clear { border-color: #c6cedd; color: var(--navy); }
.event-sanctions-table td, .event-sanction-venue-table td, .event-incident-table td { vertical-align: top; }
.event-sanctions-table .status-pill, .event-incident-table .status-pill { margin-top: .15rem; }
.event-sanction-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; margin: 0 0 1rem; }
.event-sanction-summary > div { min-height: 82px; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--white); }
.event-sanction-summary dt { color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.event-sanction-summary dd { margin: .3rem 0 0; color: var(--navy); font-weight: 800; }
.event-sanction-form { display: block; }
.event-sanction-form-grid { align-items: start; }
.event-sanction-choice-groups { display: grid; grid-template-columns: 1.15fr .8fr 1.25fr; gap: .8rem; }
.event-sanction-choice-groups fieldset, .event-sanction-status-actions { min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: .8rem; }
.event-sanction-choice-groups legend, .event-sanction-status-actions legend { padding: 0 .4rem; color: var(--navy); font-size: .82rem; font-weight: 800; }
.event-sanction-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem .7rem; }
.event-sanction-choice-grid .checkbox-label { min-height: 32px; color: var(--ink); font-size: .8rem; }
.event-sanction-agreements { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.event-sanction-save-bar { position: sticky; z-index: 3; bottom: .75rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1rem 0; padding: .85rem 1rem; border: 1px solid #a9cbdc; border-radius: .8rem; background: rgba(248, 252, 254, .97); box-shadow: 0 10px 28px rgba(28, 40, 73, .12); }
.event-sanction-save-bar span { color: var(--muted); font-size: .78rem; }
.event-sanction-site-list > div { align-items: center; }
.event-sanction-site-list > div > span:last-child { color: var(--muted); font-size: .78rem; text-align: right; }
.event-sanction-document-list .row-actions { align-self: center; }
.event-sanction-document-list form { display: inline; }
.event-sanction-status-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.event-sanction-status-actions .role-option { min-height: 76px; }
.event-sanction-status-panel { border-top: 4px solid var(--gold); }
.event-sanction-assignment-panel { border-top: 4px solid var(--teal); }
.event-sanction-facility-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.event-sanction-facility-grid > section { min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: .8rem; background: #fafbfc; }
.event-sanction-facility-grid .record-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.event-sanction-venue-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.facility-directory { display: grid; gap: .7rem; }
.facility-directory-site { overflow: hidden; border: 1px solid var(--line); border-radius: .8rem; background: var(--white); }
.facility-directory-site[open] { border-color: #9bb9c6; box-shadow: 0 5px 16px rgba(16, 49, 76, .07); }
.facility-directory-summary { display: grid; grid-template-columns: minmax(250px, 1fr) auto; gap: 1rem; align-items: center; padding: .9rem 1rem; cursor: pointer; list-style-position: inside; }
.facility-directory-summary:hover { background: #f5f9fa; }
.facility-directory-site-main { display: inline-flex; min-width: 0; flex-direction: column; gap: .15rem; vertical-align: middle; }
.facility-directory-site-main strong { color: var(--navy); font-size: 1rem; }
.facility-directory-site-main small { color: var(--muted); font-weight: 500; }
.facility-directory-metrics { display: flex; align-items: center; justify-content: flex-end; gap: .45rem; flex-wrap: wrap; color: var(--muted); font-size: .78rem; font-weight: 800; }
.facility-directory-metrics > span:not(.status-pill) { padding: .3rem .45rem; border-radius: .35rem; background: #edf3f6; }
.facility-directory-body { padding: 0 1rem 1rem 2.25rem; border-top: 1px solid #e4e9ee; }
.facility-directory-building-list { display: grid; gap: .55rem; margin-top: .8rem; }
.facility-directory-building { display: grid; grid-template-columns: minmax(220px, .85fr) auto minmax(280px, 1.4fr); gap: .8rem; align-items: center; padding: .75rem .8rem; border-left: 4px solid var(--teal); border-radius: .35rem; background: #f7f9fb; }
.facility-directory-building > div:first-child { display: flex; min-width: 0; flex-direction: column; }
.facility-directory-building small { color: var(--muted); }
.facility-directory-building-status { display: flex; gap: .35rem; flex-wrap: wrap; }
.facility-directory-courts { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; margin: 0; }
.facility-directory-courts > span { padding: .25rem .45rem; border: 1px solid #cbd8df; border-radius: 999px; background: var(--white); color: var(--navy); font-size: .75rem; font-weight: 750; }
.facility-directory-actions { display: flex; justify-content: flex-end; margin-top: .8rem; }
.facility-directory-actions { min-width: 0; flex-wrap: wrap; gap: .55rem; }
.facility-directory-actions form { display: flex; min-width: 0; max-width: 100%; align-items: end; flex-wrap: wrap; gap: .45rem; }
.facility-directory-actions label { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.facility-directory-actions input { width: 100%; min-width: 0; max-width: 100%; }
.facility-editor-hierarchy { padding: 1rem; border: 1px solid var(--line); border-radius: .8rem; background: #f7f9fb; }
.facility-editor-building-list { display: grid; gap: 1rem; }
.facility-editor-building { overflow: hidden; border: 1px solid #bdccd5; border-radius: .7rem; background: var(--white); }
.facility-editor-building-header { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; padding: .9rem 1rem; border-bottom: 1px solid #dbe3e8; background: #edf4f6; }
.facility-editor-building-header h3, .facility-editor-building-header p { margin: 0; }
.facility-editor-building-header h3 { color: var(--navy); }
.facility-editor-building-header > div:first-child p:last-child { margin-top: .25rem; color: var(--muted); }
.facility-editor-building-actions { display: flex; gap: .45rem; align-items: center; justify-content: flex-end; flex-wrap: wrap; color: var(--muted); font-size: .8rem; font-weight: 800; }
.facility-editor-court-list { display: grid; }
.facility-editor-court { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto; gap: .8rem; align-items: center; padding: .65rem 1rem; border-bottom: 1px solid #e5e9ed; }
.facility-editor-court > span:first-child { display: flex; flex-direction: column; }
.facility-editor-court small { color: var(--muted); }
.facility-editor-add { margin: .8rem 1rem 1rem; border: 1px solid #cad6dd; border-radius: .55rem; background: #fbfcfd; }
.facility-editor-add > summary { padding: .7rem .8rem; cursor: pointer; color: var(--navy); font-weight: 850; }
.facility-editor-add > form { margin: 0; padding: 0 .8rem .8rem; }
.facility-editor-building-form { margin: 1rem 0 0; background: var(--white); }
.facility-court-generator {
    display: grid;
    grid-template-columns: minmax(130px, 180px) auto minmax(220px, 1fr);
    gap: .65rem;
    align-items: end;
    padding: .8rem 1rem;
    border-top: 1px solid #dbe3e8;
    background: #f8fbfc;
}
.facility-court-generator label { display: grid; gap: .25rem; color: var(--navy); font-size: .76rem; font-weight: 800; }
.facility-court-generator select { width: 100%; }
.facility-court-generator small { align-self: center; color: var(--muted); line-height: 1.35; }
.facility-geocode-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
.facility-geocode-actions .button { flex: 0 0 auto; }
.facility-geocode-actions [data-facility-geocode-status] { font-size: .75rem; }
.facility-geocode-actions .facility-geocode-error { color: var(--brand-red); font-weight: 750; }
.event-sanction-workflow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.event-sanction-workflow li { display: flex; align-items: center; gap: .55rem; min-height: 50px; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--white); color: var(--muted); font-size: .8rem; font-weight: 800; }
.event-sanction-workflow li[aria-current="step"] { border-color: var(--brand-blue); background: #f1f8fb; color: var(--navy); }
.event-sanction-workflow li > span { display: inline-grid; flex: 0 0 24px; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: var(--navy); color: var(--white); font-size: .7rem; }
.event-sanction-workflow a { color: inherit; }
.event-sanction-workflow li.event-sanction-workflow-missing { border-color: #c7352b; background: #fff2f0; color: #9f211a; }
.event-sanction-coi-missing { color: #a51f17 !important; }
.event-sanctions-table tr.event-sanction-type-tournament > td:first-child { border-left: 5px solid var(--brand-blue); }
.event-sanctions-table tr.event-sanction-type-practice > td:first-child { border-left: 5px solid var(--teal); }
.event-sanctions-table tr.event-sanction-type-other > td:first-child { border-left: 5px solid var(--gold); }
.event-sanction-type-pill { display: inline-flex; margin-top: .25rem; padding: .18rem .45rem; border-radius: 999px; font-size: .68rem; font-weight: 900; letter-spacing: .025em; }
.event-sanction-type-pill-tournament { background: #e7f1f7; color: #07517a; }
.event-sanction-type-pill-practice { background: #e5f5f2; color: #116451; }
.event-sanction-type-pill-other { background: #fff1cf; color: #765300; }
.event-sanction-assignment-list { display: flex; flex-direction: column; gap: 1rem; }
.event-sanction-assignment-card { padding: 1rem; border: 1px solid var(--line); border-radius: .85rem; background: #fafbfc; }
.event-sanction-assignment-card h3, .event-sanction-calendar-grid h3 { margin: 0; color: var(--navy); }
.event-sanction-assignment-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: .75rem; border-radius: .7rem; background: var(--white); }
.event-sanction-site-programming { display: flex; flex-direction: column; gap: 1rem; }
.event-sanction-site-card { overflow: hidden; border: 1px solid #b8c8d9; border-radius: .85rem; background: #f7fafc; box-shadow: 0 7px 20px rgba(28, 40, 73, .06); }
.event-sanction-site-card, .event-sanction-site-card *,
.facility-directory-site, .facility-directory-site *,
.event-sanction-building-picker, .event-sanction-building-picker * { min-width: 0; max-width: 100%; }
.event-sanction-site-card h3, .event-sanction-site-card p,
.facility-directory-site strong, .facility-directory-site small,
.event-sanction-building-option, .event-sanction-building-option span,
.event-sanction-building-option em { overflow-wrap: anywhere; word-break: normal; }
.event-sanction-site-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; border-bottom: 1px solid #173c52; background: var(--navy); color: var(--white); }
.event-sanction-site-card > header .eyebrow { color: var(--gold); }
.event-sanction-site-card > header h3 { margin: 0; color: var(--white); }
.event-sanction-site-card > header p:last-child { margin: .2rem 0 0; color: #dce8ef; font-size: .76rem; }
.event-sanction-programming-totals { flex: 0 0 auto; padding: .35rem .55rem; border: 1px solid rgba(255,255,255,.28); border-radius: .45rem; color: var(--white); font-size: .72rem; font-weight: 800; text-align: right; }
.event-sanction-building-list { display: flex; flex-direction: column; gap: .75rem; padding: .8rem; }
.event-sanction-building-card { overflow: hidden; padding: 0; border: 1px solid #cbd6e2; border-radius: .7rem; background: var(--white); }
.event-sanction-building-card > .panel-heading { margin: 0; padding: .65rem .8rem; border-bottom: 1px solid #cbd6e2; background: #e8eff5; }
.event-sanction-building-card h4 { margin: 0; color: var(--navy); }
.event-sanction-building-card > .panel-heading p:last-child { margin: .18rem 0 0; color: var(--muted); font-size: .74rem; }
.event-sanction-building-card > .panel-heading > span { color: var(--muted); font-size: .74rem; font-weight: 700; text-align: right; }
.event-sanction-date-list { display: flex; flex-direction: column; gap: .65rem; padding: .7rem; }
.event-sanction-date-card { overflow: hidden; border: 1px solid #cfd9e4; border-radius: .6rem; background: var(--white); }
.event-sanction-date-undated { border-color: #dfb35d; background: #fffaf0; }
.event-sanction-date-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem .7rem; border-bottom: 1px solid #d5dee8; background: #f2f6f9; }
.event-sanction-date-undated > .event-sanction-date-heading { background: #fff3d9; }
.event-sanction-date-heading h5 { margin: 0; color: var(--navy); font-size: .95rem; }
.event-sanction-date-heading p { margin: .12rem 0 0; color: var(--muted); font-size: .7rem; }
.event-sanction-date-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .45rem; }
.event-sanction-date-actions form { margin: 0; }
.event-sanction-date-form { display: flex; align-items: center; gap: .4rem; }
.event-sanction-date-form select, .event-sanction-date-form input { min-width: 170px; min-height: 34px; padding: .35rem .5rem; font-size: .76rem; }
.event-sanction-date-form .button, .event-sanction-date-actions > form > .button { min-height: 34px; padding: .38rem .58rem; font-size: .72rem; }
.event-sanction-date-warning { margin: .6rem; }
.event-sanction-court-grid { overflow-x: auto; }
.event-sanction-court-grid-heading, .event-sanction-court-row { display: grid; grid-template-columns: 36px minmax(185px, .9fr) minmax(430px, 2.1fr) minmax(220px, 1fr) 72px; min-width: 980px; }
.event-sanction-court-grid-heading { min-height: 32px; border-bottom: 1px solid #dce3eb; background: #f8fafc; color: #536177; font-size: .67rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.event-sanction-court-grid-heading > span { display: flex; align-items: center; padding: .38rem .5rem; border-right: 1px solid #e3e8ee; }
.event-sanction-court-row { margin: 0; border-bottom: 1px solid #e2e7ed; background: var(--white); }
.event-sanction-court-row:last-child { border-bottom: 0; }
.event-sanction-court-row > div { min-width: 0; padding: .48rem .5rem; border-right: 1px solid #e3e8ee; }
.event-sanction-court-row > div:last-child { border-right: 0; }
.event-sanction-court-row label { margin: 0; color: var(--ink); font-size: .68rem; font-weight: 700; }
.event-sanction-court-row label > span:first-child { display: block; margin-bottom: .16rem; color: var(--muted); }
.event-sanction-court-row input[type="text"], .event-sanction-court-row input:not([type]), .event-sanction-court-row select { width: 100%; min-width: 0; min-height: 32px; padding: .32rem .42rem; font-size: .74rem; }
.event-sanction-court-action, .event-sanction-court-save { display: flex; align-items: center; justify-content: center; }
.event-sanction-court-action > span { color: var(--teal); font-size: 1.2rem; font-weight: 900; }
.event-sanction-court-delete { display: inline-grid; width: 25px; height: 25px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--brand-red); cursor: pointer; font-size: 1.25rem; font-weight: 900; }
.event-sanction-court-delete:hover, .event-sanction-court-delete:focus-visible { background: #fff0ed; outline: 2px solid rgba(218,41,28,.2); }
.event-sanction-court-identity { display: grid; gap: .35rem; }
.event-sanction-court-programming { display: grid; grid-template-columns: 95px minmax(0, 1fr); align-items: start; gap: .5rem; }
.event-sanction-program-select { min-width: 0; }
.event-sanction-court-choices { min-width: 0; margin: 0; padding: 0; border: 0; }
.event-sanction-court-choices legend { padding: 0; color: var(--muted); font-size: .68rem; font-weight: 800; }
.event-sanction-inline-choices { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .55rem; min-height: 32px; }
.event-sanction-inline-choices label { display: inline-flex; align-items: center; gap: .18rem; white-space: nowrap; }
.event-sanction-inline-choices label > span { display: inline; margin: 0; color: var(--ink); font-size: .7rem; }
.event-sanction-inline-choices input { flex: 0 0 auto; margin: 0; }
.event-sanction-court-save .button { min-height: 32px; padding: .35rem .48rem; font-size: .7rem; }
.event-sanction-court-row-readonly { background: #fafbfc; }
.event-sanction-no-courts { min-width: 0; margin: 0; padding: .65rem .75rem; }
.event-sanction-add-court, .event-sanction-add-facility { margin-top: 1rem; border-top: 1px solid var(--line); }
.event-sanction-add-court { margin: 0; padding: .55rem .7rem; background: #f8fbfc; }
.event-sanction-add-court > summary, .event-sanction-add-facility > summary { padding: 0; color: var(--brand-blue); cursor: pointer; font-size: .78rem; font-weight: 800; }
.event-sanction-add-court > summary span { display: inline-grid; width: 20px; height: 20px; margin-right: .25rem; place-items: center; border-radius: 50%; background: var(--teal); color: var(--white); }
.event-sanction-new-court-grid { margin-top: .55rem; border: 1px solid #cddbe5; border-radius: .45rem; background: var(--white); }
.event-sanction-building-picker { min-height: 90px; padding: 1rem; border: 1px solid var(--line); border-radius: .8rem; background: #fafbfc; }
.event-sanction-building-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.event-sanction-building-options .role-option { min-height: 74px; background: var(--white); }
.event-sanction-building-option span { display: flex; min-width: 0; flex-direction: column; gap: .12rem; }
.event-sanction-building-option em { overflow-wrap: anywhere; color: var(--muted); font-size: .77rem; font-style: normal; }
.event-sanction-building-option .event-sanction-building-courts { color: #3d6276; font-size: .72rem; }
.event-sanction-total-courts { display: block; padding: .35rem .5rem; border-radius: .35rem; background: #edf5f8; color: var(--navy); }
.event-sanction-report-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.event-sanction-assignor-filters { flex-wrap: wrap; }
.event-sanction-assignor-filters label { flex: 1 1 150px; }
.event-sanction-assignor-filters label:nth-of-type(2) { flex-basis: 250px; }
.event-sanction-assignor-filters input, .event-sanction-assignor-filters select { width: 100%; min-width: 0; }
.event-sanction-assignor-table td { vertical-align: top; }
.event-sanction-assignor-table td:nth-child(4) { min-width: 330px; }
.coi-file-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
}
.coi-file-filters label { display: grid; min-width: 0; gap: .35rem; }
.coi-file-filters input, .coi-file-filters select { width: 100%; min-width: 0; }
.coi-file-filters .coi-file-filter-search { grid-column: span 2; }
.coi-file-filters > .button { width: 100%; min-width: 0; justify-content: center; }
.event-sanction-report-logistics { display: flex; flex-direction: column; gap: .65rem; }
.event-sanction-report-logistics section { padding-bottom: .55rem; border-bottom: 1px solid var(--line); }
.event-sanction-report-logistics section:last-child { padding-bottom: 0; border-bottom: 0; }
.event-sanction-report-logistics section > strong, .event-sanction-report-logistics section > small { display: block; }
.event-sanction-report-logistics ul { margin: .4rem 0 0; padding-left: 1.1rem; }
.event-sanction-report-logistics li { margin-top: .25rem; }
.event-sanction-report-logistics li span { color: var(--muted); font-size: .74rem; }
.event-sanction-calendar-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 1rem; }
.event-sanction-calendar-grid > section { min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: .8rem; background: #fafbfc; }
.event-sanction-feed-list > div { align-items: center; }
.event-sanction-feed-list form { display: inline; }
.event-sanction-feed-secret label { display: flex; flex-direction: column; gap: .35rem; margin-top: .65rem; font-weight: 800; }
.event-sanction-feed-secret input { width: 100%; }
.event-sanction-coi-list > div { align-items: center; }
.event-incident-restricted-notice { align-items: flex-start; }
.event-incident-surface .panel-restricted { border-color: rgba(218, 41, 28, .36); }
.event-incident-sensitive-section { border-left: 5px solid var(--brand-red); }
.event-incident-filters label small { display: block; max-width: 420px; margin-top: .25rem; color: var(--muted); font-weight: 500; }
.event-incident-table td:nth-child(4) { min-width: 180px; background: #fffaf8; }
.event-incident-save-bar { border-color: #e0b0a8; background: rgba(255, 249, 247, .98); }

@media (max-width: 1000px) {
    .event-sanction-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .event-sanction-choice-groups { grid-template-columns: 1fr; }
    .event-sanction-facility-grid { grid-template-columns: 1fr; }
    .facility-directory-building { grid-template-columns: minmax(220px, 1fr) auto; }
    .facility-directory-building .facility-directory-courts { grid-column: 1 / -1; }
    .event-sanction-assignment-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .event-sanction-calendar-grid { grid-template-columns: 1fr; }
    .coi-file-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    html, body { max-width: 100%; overflow-x: hidden; }
    .management-surface, .management-section, .management-heading,
    .record-form, .management-form, .form-actions, .row-actions,
    .event-sanction-site-assignment-form { min-width: 0; max-width: 100%; }
    .management-heading-actions, .form-actions, .row-actions,
    .facility-directory-actions { width: 100%; justify-content: stretch; }
    .management-heading-actions .button, .form-actions .button,
    .facility-directory-actions .button { max-width: 100%; white-space: normal; text-align: center; }
    .event-sanction-site-assignment-form input,
    .event-sanction-site-assignment-form select,
    .event-sanction-site-assignment-form textarea { width: 100%; min-width: 0; max-width: 100%; }
    .event-sanctions-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .event-sanctions-tabs .button { text-align: center; }
    .event-sanction-summary, .event-sanction-agreements, .event-sanction-status-actions { grid-template-columns: 1fr; }
    .event-sanction-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .event-sanction-save-bar { position: static; align-items: stretch; flex-direction: column; }
    .event-sanction-save-bar .button { width: 100%; }
    .event-sanction-site-list > div { align-items: flex-start; flex-direction: column; }
    .event-sanction-site-list > div > span:last-child { text-align: left; }
    .event-sanction-facility-grid .record-form, .event-sanction-venue-form { grid-template-columns: 1fr; }
    .facility-directory-summary { grid-template-columns: 1fr; }
    .facility-directory-metrics { justify-content: flex-start; }
    .facility-directory-body { padding-left: 1rem; }
    .facility-directory-building { grid-template-columns: 1fr; }
    .facility-directory-building .facility-directory-courts { grid-column: auto; }
    .facility-editor-building-header { flex-direction: column; }
    .facility-editor-building-actions { justify-content: flex-start; }
    .facility-editor-court { grid-template-columns: minmax(0, 1fr) auto; }
    .facility-editor-court .text-link { grid-column: 1 / -1; }
    .facility-court-generator { grid-template-columns: 1fr; align-items: stretch; }
    .facility-court-generator .button { justify-self: start; }
    .event-sanction-workflow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .event-sanction-report-metrics, .event-sanction-assignment-summary { grid-template-columns: 1fr; }
    .coi-file-filters { grid-template-columns: 1fr; }
    .coi-file-filters .coi-file-filter-search { grid-column: auto; }
    .event-sanction-feed-list > div, .event-sanction-coi-list > div { align-items: flex-start; flex-direction: column; }
    .event-sanction-site-card > header, .event-sanction-date-heading, .event-sanction-building-card > .panel-heading { align-items: flex-start; flex-direction: column; }
    .event-sanction-programming-totals, .event-sanction-building-card > .panel-heading > span { text-align: left; }
    .event-sanction-date-actions, .event-sanction-date-form { align-items: stretch; width: 100%; flex-direction: column; }
    .event-sanction-date-actions form, .event-sanction-date-form label, .event-sanction-date-form select, .event-sanction-date-form input, .event-sanction-date-actions .button { width: 100%; }
    .event-sanction-building-options { grid-template-columns: 1fr; }
    .event-sanction-court-grid { overflow: visible; }
    .event-sanction-court-grid-heading { display: none; }
    .event-sanction-court-row { grid-template-columns: 34px minmax(0, 1fr) 64px; min-width: 0; padding: .45rem; border-bottom: 1px solid #d7dee8; }
    .event-sanction-court-row > div { padding: .4rem; border: 0; }
    .event-sanction-court-action { grid-column: 1; grid-row: 1; }
    .event-sanction-court-identity { grid-column: 2; grid-row: 1; }
    .event-sanction-court-save { grid-column: 3; grid-row: 1; }
    .event-sanction-court-programming { grid-column: 1 / -1; grid-row: 2; border-top: 1px solid #e3e8ee !important; }
    .event-sanction-court-gender { grid-column: 1 / -1; grid-row: 3; }
}
.event-sanctions-sites-readonly .event-sanction-venue-table th:last-child,
.event-sanctions-sites-readonly .event-sanction-venue-table td:last-child {
    display: none;
}

/* CRM & Partners keeps overview cards separate from flatter record-management screens. */
.crm-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 0 0 1.25rem;
    padding-bottom: .9rem;
    border-bottom: 1px solid var(--line);
}
.crm-tabs .button { min-height: 36px; padding: .48rem .78rem; font-size: .8rem; }
.crm-tabs .button[aria-current="page"] { border-color: var(--brand-blue); background: var(--brand-blue); color: var(--white); }
.crm-page-heading { margin-bottom: 1.1rem; }
.crm-metrics { margin-top: 1rem; }
.crm-dashboard-grid { grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); align-items: stretch; }
.crm-pipeline-list { display: flex; flex-direction: column; gap: .25rem; }
.crm-pipeline-list > div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid #e7ebed; }
.crm-pipeline-list > div:last-child { border-bottom: 0; }
.crm-pipeline-list span { display: flex; flex-direction: column; gap: .08rem; }
.crm-pipeline-list span:last-child { text-align: right; }
.crm-pipeline-list strong { color: var(--navy); }
.crm-pipeline-list small, .crm-dashboard-list small { color: var(--muted); }
.crm-expiring-panel { margin-top: 1rem; }

.crm-management-surface { --crm-rail: #eaf5fa; }
.crm-management-surface .crm-season-lock { padding: .75rem 1rem; border: 1px solid #dfc77c; border-radius: .65rem; background: #fff9e8; }
.crm-management-surface .crm-season-lock strong { color: #795710; }
.crm-directory-filters, .crm-contract-filters { align-items: end; margin-bottom: .75rem; }
.crm-directory-filters label:first-of-type, .crm-contract-filters label:first-of-type { min-width: min(300px, 100%); flex: 1 1 270px; }
.crm-directory-filters label, .crm-contract-filters label { flex: 1 1 145px; }
.crm-organization-table td:first-child, .crm-contact-table td:first-child, .crm-contract-table td:first-child { min-width: 190px; }
.crm-organization-table td, .crm-contact-table td, .crm-contract-table td { vertical-align: top; }
.crm-do-not-contact-row { box-shadow: inset 4px 0 0 var(--brand-red); background: #fff8f7; }
.crm-record-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; }
.crm-record-form { max-width: none; }
.crm-form-fieldset { min-width: 0; grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 0; padding: 0; border: 0; }
.crm-form-fieldset[disabled] { opacity: .72; }
.crm-form-fieldset > .form-span { grid-column: 1 / -1; }
.crm-form-fieldset > .form-actions { grid-column: 1 / -1; }
.crm-value-summary, .crm-contract-summary { margin-top: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.crm-contract-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.crm-method-list > div, .crm-relationship-list > div, .crm-task-list > div, .crm-contract-documents .stack-list > div { align-items: flex-start; }
.crm-relationship-list > div > span:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; }
.crm-timeline { position: relative; display: flex; flex-direction: column; gap: 0; margin-left: .35rem; padding-left: 1.2rem; border-left: 2px solid #c7dce7; }
.crm-timeline article { position: relative; padding: .15rem 0 1.15rem .35rem; }
.crm-timeline article:last-child { padding-bottom: .2rem; }
.crm-timeline-marker { position: absolute; top: .35rem; left: -1.72rem; width: .7rem; height: .7rem; border: 2px solid var(--white); border-radius: 50%; background: var(--brand-blue); box-shadow: 0 0 0 1px #8ab8cf; }
.crm-timeline article > div { display: flex; flex-direction: column; gap: .12rem; }
.crm-timeline strong { color: var(--navy); }
.crm-timeline small { color: var(--muted); font-size: .72rem; }
.crm-timeline p { margin: .4rem 0 0; font-size: .86rem; }
.crm-contract-surface { border-top: 4px solid var(--brand-dark-red); padding-top: 1rem; }
.crm-contract-documents { padding: 1rem; border: 1px solid #dfc9c9; border-radius: .75rem; background: #fffafa; }
.crm-import-surface { border-top: 4px solid var(--brand-blue); padding-top: 1rem; }
.crm-import-form { max-width: 780px; }
.crm-reconciliation-list { display: grid; gap: 1rem; }
.crm-reconciliation-record { display: block; padding: 1rem; border-color: var(--line); border-radius: .75rem; background: var(--white); }
.crm-reconciliation-record:hover { border-color: var(--line); }
.crm-reconciliation-record .panel-heading { margin-bottom: 1rem; }
.crm-import-safe-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 1rem; }
.crm-resolution-form { max-width: none; padding-top: .8rem; border-top: 1px solid var(--line); }

@media (max-width: 980px) {
    .crm-dashboard-grid, .crm-record-grid { grid-template-columns: 1fr; }
    .crm-contract-summary, .crm-import-safe-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    .crm-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .7rem; }
    .crm-tabs .button { flex: 0 0 auto; }
    .crm-metrics { grid-template-columns: 1fr; }
    .crm-form-fieldset, .crm-value-summary, .crm-contract-summary, .crm-import-safe-fields { grid-template-columns: 1fr; }
    .crm-pipeline-list > div, .crm-method-list > div, .crm-relationship-list > div, .crm-task-list > div, .crm-contract-documents .stack-list > div { align-items: flex-start; flex-direction: column; }
    .crm-pipeline-list span:last-child { text-align: left; }
    .crm-relationship-list > div > span:last-child { justify-content: flex-start; }
}

/* Authenticated sanctions facility map. Contact details stay within the RMS. */
.facility-map-surface { --facility-map-border: #cbd8df; }
.facility-map-workspace {
    display: grid;
    grid-template-columns: minmax(330px, .78fr) minmax(520px, 1.22fr);
    min-height: 670px;
    overflow: hidden;
    border: 1px solid var(--facility-map-border);
    border-radius: .9rem;
    background: var(--white);
}
.facility-map-directory {
    display: flex;
    min-width: 0;
    max-height: 780px;
    flex-direction: column;
    border-right: 1px solid var(--facility-map-border);
    background: #f8fafb;
}
.facility-map-filters {
    display: grid;
    gap: .75rem;
    padding: 1rem;
    border-bottom: 1px solid var(--facility-map-border);
    background: var(--white);
}
.facility-map-filters label { display: grid; gap: .3rem; color: var(--navy); font-size: .76rem; font-weight: 800; }
.facility-map-filters input[type="search"],
.facility-map-filters select { width: 100%; min-width: 0; }
.facility-map-filter-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.facility-map-type-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .55rem 1rem;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
.facility-map-type-filter legend { width: 100%; padding: 0; color: var(--navy); font-size: .76rem; font-weight: 800; }
.facility-map-type-filter label { display: inline-flex; align-items: center; grid-template-columns: auto 1fr; gap: .35rem; color: var(--ink); font-weight: 650; }
.facility-map-type-filter input { margin: 0; }
.facility-map-filters > .button { justify-self: start; min-height: 34px; padding: .38rem .65rem; font-size: .74rem; }
.facility-map-summary {
    padding: .7rem 1rem;
    border-bottom: 1px solid #dde5e9;
    background: #eaf4f8;
    color: #36596d;
    font-size: .76rem;
    font-weight: 800;
}
.facility-map-results { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.facility-map-site-group { border-bottom: 1px solid #dce4e8; }
.facility-map-site-group > h2 {
    position: sticky;
    top: 0;
    z-index: 1;
    margin: 0;
    padding: .55rem 1rem;
    border-bottom: 1px solid #dce4e8;
    background: rgba(237, 244, 247, .97);
    color: var(--navy);
    font-size: .82rem;
}
.facility-map-record { border-bottom: 1px solid #e5eaed; background: var(--white); }
.facility-map-record:last-child { border-bottom: 0; }
.facility-map-record-building { box-shadow: inset 4px 0 0 #72a9be; }
.facility-map-record-main {
    display: flex;
    width: 100%;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    padding: .75rem 1rem;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
}
button.facility-map-record-main { cursor: pointer; }
button.facility-map-record-main:hover { background: #f1f8fa; }
button.facility-map-record-main:focus-visible { position: relative; z-index: 2; }
.facility-map-record-identity { display: flex; min-width: 0; flex: 1 1 auto; flex-direction: column; gap: .12rem; }
.facility-map-record-identity strong { overflow-wrap: anywhere; color: var(--navy); font-size: .88rem; }
.facility-map-record-identity small { overflow-wrap: anywhere; color: var(--muted); font-size: .71rem; }
.facility-map-record-meta { display: flex; flex: 0 1 auto; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .3rem; }
.facility-map-badge {
    display: inline-flex;
    padding: .2rem .4rem;
    border: 1px solid #cbd8df;
    border-radius: 999px;
    background: #f1f5f7;
    color: #3e5c6c;
    font-size: .62rem;
    font-weight: 850;
    line-height: 1.15;
    white-space: nowrap;
}
.facility-map-badge-mapped { border-color: #afd5c2; background: #ebf7f1; color: #236441; }
.facility-map-badge-unmapped { border-color: #e3c47c; background: #fff8e8; color: #805f17; }
.facility-map-record-detail {
    display: grid;
    gap: .35rem;
    padding: 0 1rem .75rem;
    color: var(--muted);
    font-size: .7rem;
}
.facility-map-record-detail p,
.facility-map-contact p { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: .4rem; margin: 0; }
.facility-map-record-detail strong,
.facility-map-contact strong { color: #3d5969; }
.facility-map-record-detail span,
.facility-map-contact span { min-width: 0; overflow-wrap: anywhere; }
.facility-map-contact { display: grid; gap: .2rem; }
.facility-map-edit-link { justify-self: start; margin-top: .15rem; font-size: .72rem; font-weight: 800; }
.facility-map-empty { margin: 1rem; }
.facility-map-stage { position: relative; min-width: 0; min-height: 670px; background: #dce8ed; }
.facility-google-map { width: 100%; height: 100%; min-height: 670px; }
.facility-map-message {
    position: absolute;
    top: 1rem;
    left: 50%;
    z-index: 2;
    width: min(520px, calc(100% - 2rem));
    padding: .7rem .9rem;
    transform: translateX(-50%);
    border: 1px solid #aac0cb;
    border-radius: .55rem;
    background: rgba(255, 255, 255, .96);
    color: #345466;
    box-shadow: 0 5px 18px rgba(23, 52, 74, .14);
    font-size: .76rem;
    font-weight: 750;
    text-align: center;
}
.facility-map-message[hidden] { display: none; }
.facility-map-legend {
    position: absolute;
    right: .75rem;
    bottom: 1.5rem;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    padding: .45rem .6rem;
    border: 1px solid #b9c8cf;
    border-radius: .45rem;
    background: rgba(255, 255, 255, .94);
    color: #3f5867;
    box-shadow: 0 3px 12px rgba(23, 52, 74, .12);
    font-size: .66rem;
    font-weight: 800;
}
.facility-map-legend > span { display: inline-flex; align-items: center; gap: .28rem; }
.facility-map-legend-pin { display: inline-block; width: .72rem; height: .72rem; border: 2px solid var(--white); border-radius: 50%; box-shadow: 0 0 0 1px rgba(23, 52, 74, .25); }
.facility-map-legend-site { background: var(--brand-blue); }
.facility-map-legend-building { background: var(--teal); }
.facility-map-legend-group { background: var(--brand-red); }
.facility-map-pin {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 3px solid var(--white);
    border-radius: 50% 50% 50% 12%;
    transform: rotate(-45deg);
    background: var(--brand-blue);
    color: var(--white);
    box-shadow: 0 2px 9px rgba(23, 52, 74, .35);
}
.facility-map-pin span { transform: rotate(45deg); font-size: .69rem; font-weight: 900; }
.facility-map-pin-building { background: var(--teal); }
.facility-map-pin-group { width: 39px; height: 39px; background: var(--brand-red); }
.facility-map-info { max-width: 330px; color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.facility-map-info > h2 { margin: 0 0 .45rem; color: var(--navy); font-size: 1rem; }
.facility-map-info > section { padding: .45rem 0; border-top: 1px solid #dce4e8; }
.facility-map-info h3 { margin: 0; color: var(--navy); font-size: .86rem; }
.facility-map-info p { margin: .18rem 0; color: var(--muted); font-size: .7rem; }
.facility-map-info .facility-map-record-meta { justify-content: flex-start; margin: .3rem 0; }
.facility-map-info a { display: inline-block; margin-top: .25rem; color: var(--brand-blue); font-size: .72rem; font-weight: 800; }

@media (max-width: 1050px) {
    .facility-map-workspace { grid-template-columns: minmax(300px, .8fr) minmax(420px, 1.2fr); }
    .facility-map-filter-row { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
    .facility-map-workspace { display: flex; min-height: 0; flex-direction: column; overflow: visible; }
    .facility-map-directory { max-height: none; border-right: 0; border-bottom: 1px solid var(--facility-map-border); }
    .facility-map-results { max-height: 540px; }
    .facility-map-stage, .facility-google-map { min-height: 520px; }
}
@media (max-width: 560px) {
    .facility-map-filter-row { grid-template-columns: 1fr; }
    .facility-map-record-main { flex-direction: column; }
    .facility-map-record-meta { justify-content: flex-start; }
    .facility-map-legend { left: .5rem; right: .5rem; bottom: .75rem; justify-content: center; }
    .facility-map-stage, .facility-google-map { min-height: 440px; }
}

/* Private regional coverage map: member ZIP heat plus operational overlays. */
.member-heatmap-surface { --member-heatmap-border: #c8d7de; }
.member-heatmap-heading { align-items: center; }
.member-heatmap-privacy {
    margin: -.15rem 0 .65rem;
    color: var(--muted);
    font-size: .7rem;
}
.member-heatmap-privacy summary {
    width: max-content;
    cursor: pointer;
    color: #456271;
    font-weight: 750;
}
.member-heatmap-privacy p {
    max-width: 880px;
    margin: .4rem 0 0;
    padding: .55rem .7rem;
    border-left: 3px solid var(--brand-red);
    background: #fff7f5;
    line-height: 1.45;
}
.member-heatmap-filter-panel {
    overflow: hidden;
    margin-bottom: .7rem;
    border: 1px solid var(--member-heatmap-border);
    border-radius: .7rem;
    background: var(--white);
}
.member-heatmap-filter-panel > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-height: 2.7rem;
    padding: .55rem .75rem;
    cursor: pointer;
    list-style: none;
}
.member-heatmap-filter-panel > summary::-webkit-details-marker { display: none; }
.member-heatmap-filter-panel > summary > span:first-child {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .25rem .55rem;
    min-width: 0;
}
.member-heatmap-filter-panel > summary strong {
    color: var(--navy);
    font-size: .8rem;
}
.member-heatmap-filter-panel > summary small {
    overflow: hidden;
    color: var(--muted);
    font-size: .7rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.member-heatmap-filter-prompt {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: .35rem;
    color: #345466;
    font-size: .68rem;
    font-weight: 800;
}
.member-heatmap-filter-prompt::after {
    content: '\203A';
    font-size: 1rem;
    line-height: 1;
    transform: rotate(90deg);
    transition: transform .15s ease;
}
.member-heatmap-filter-panel[open] .member-heatmap-filter-prompt::after { transform: rotate(-90deg); }
.member-heatmap-filter-panel[open] > summary { border-bottom: 1px solid var(--member-heatmap-border); }
.member-heatmap-filter-panel > summary:hover { background: #f7fafb; }
.member-heatmap-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    align-items: end;
    gap: .75rem;
    margin: 0;
    padding: .75rem;
    background: #f7fafb;
}
.member-heatmap-filters label {
    display: grid;
    gap: .3rem;
    min-width: 0;
    color: var(--navy);
    font-size: .75rem;
    font-weight: 800;
}
.member-heatmap-filters select { width: 100%; min-width: 0; }
.member-heatmap-filter-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .45rem;
}
.member-heatmap-filter-actions { align-self: end; }
.member-heatmap-filters [hidden] { display: none; }
.member-heatmap-filter-help {
    margin: 0;
    padding: .48rem .75rem;
    border-top: 1px solid var(--member-heatmap-border);
    color: var(--muted);
    font-size: .68rem;
    line-height: 1.4;
}
.member-heatmap-filter-help strong { margin-right: .3rem; color: var(--navy); }
.member-heatmap-metrics {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    margin-bottom: .7rem;
    border: 1px solid var(--member-heatmap-border);
    border-radius: .7rem;
    background: var(--member-heatmap-border);
}
.member-heatmap-metrics article {
    display: grid;
    gap: .08rem;
    min-width: 0;
    padding: .5rem .65rem;
    background: var(--white);
}
.member-heatmap-metrics span {
    color: #456271;
    font-size: .59rem;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.member-heatmap-metrics strong {
    overflow-wrap: anywhere;
    color: var(--navy);
    font-size: .9rem;
}
.member-heatmap-workspace {
    display: block;
    min-height: 660px;
    overflow: hidden;
    border: 1px solid var(--member-heatmap-border);
    border-radius: .85rem;
    background: var(--white);
    box-shadow: 0 7px 22px rgba(23, 52, 74, .09);
}
.member-heatmap-stage {
    position: relative;
    min-width: 0;
    min-height: 660px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(0, 98, 152, .08), rgba(0, 154, 166, .08)),
        #dce8ed;
}
.member-heatmap-google-map { width: 100%; height: 100%; min-height: 660px; }
.member-heatmap-canvas {
    position: absolute;
    pointer-events: none;
}
.member-heatmap-message {
    position: absolute;
    top: 3.45rem;
    left: 50%;
    z-index: 2;
    width: min(520px, calc(100% - 2rem));
    padding: .7rem .9rem;
    transform: translateX(-50%);
    border: 1px solid #aac0cb;
    border-radius: .55rem;
    background: rgba(255, 255, 255, .96);
    color: #345466;
    box-shadow: 0 5px 18px rgba(23, 52, 74, .14);
    font-size: .76rem;
    font-weight: 750;
    text-align: center;
}
.member-heatmap-message[hidden] { display: none; }
.member-heatmap-message-error {
    border-color: #dfa29c;
    background: rgba(255, 246, 244, .97);
    color: #8d2921;
}
.member-heatmap-layer-panel {
    position: absolute;
    top: .7rem;
    left: .75rem;
    z-index: 2;
    width: max-content;
    max-width: calc(100% - 13rem);
    overflow: hidden;
    border: 1px solid #b7c8cf;
    border-radius: .65rem;
    background: rgba(255, 255, 255, .95);
    color: #385768;
    box-shadow: 0 3px 12px rgba(23, 52, 74, .12);
}
.member-heatmap-layer-panel > summary {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .48rem .62rem;
    cursor: pointer;
    list-style: none;
    font-size: .68rem;
    font-weight: 850;
}
.member-heatmap-layer-panel > summary::-webkit-details-marker { display: none; }
.member-heatmap-layer-panel > summary::after {
    content: '\203A';
    font-size: .95rem;
    line-height: 1;
    transform: rotate(90deg);
}
.member-heatmap-layer-panel[open] {
    width: min(535px, calc(100% - 13rem));
}
.member-heatmap-layer-panel[open] > summary {
    border-bottom: 1px solid #b7c8cf;
}
.member-heatmap-layer-panel[open] > summary::after { transform: rotate(-90deg); }
.member-heatmap-layer-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .15rem;
    margin: 0;
    padding: .3rem;
    border: 0;
    color: #385768;
    font-size: .66rem;
    font-weight: 800;
}
.member-heatmap-layer-controls legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
.member-heatmap-layer-controls label {
    display: flex;
    align-items: center;
    gap: .3rem;
    padding: .25rem .32rem;
    border-radius: .35rem;
    cursor: pointer;
    white-space: nowrap;
}
.member-heatmap-layer-controls label:hover { background: rgba(0, 98, 152, .08); }
.member-heatmap-layer-controls input { width: .78rem; height: .78rem; margin: 0; accent-color: var(--brand-blue); }
.member-heatmap-layer-controls input:disabled + * { opacity: .55; }
.member-heatmap-legend {
    position: absolute;
    left: .75rem;
    bottom: .75rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: .3rem .5rem;
    width: auto;
    max-width: calc(100% - 1.5rem);
    padding: .34rem .48rem;
    border: 1px solid #b7c8cf;
    border-radius: .48rem;
    background: rgba(255, 255, 255, .95);
    color: #385768;
    box-shadow: 0 3px 12px rgba(23, 52, 74, .12);
    font-size: .59rem;
    font-weight: 800;
}
.member-heatmap-legend i {
    display: inline-block;
    width: .72rem;
    height: .72rem;
    border: 1px solid rgba(23, 52, 74, .2);
    border-radius: 50%;
}
.member-heatmap-legend > span { display: inline-flex; align-items: center; gap: .28rem; }
.member-heatmap-legend-low { background: #009aa6; }
.member-heatmap-legend-high { background: #e20031; }
.member-heatmap-legend-club { background: #006298; }
.member-heatmap-legend-facility { background: #e20031; }
.member-heatmap-legend-link {
    width: 1rem !important;
    height: 0 !important;
    border: 0 !important;
    border-top: 2px solid #6f42a6 !important;
    border-radius: 0 !important;
}
.member-heatmap-info {
    display: grid;
    gap: .28rem;
    max-width: 330px;
    color: #17344a;
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}
.member-heatmap-info > small {
    color: #66747e;
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.member-heatmap-info h2 { margin: 0 0 .15rem; color: #17344a; font-size: 1rem; }
.member-heatmap-info p {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: .45rem;
    margin: 0;
    color: #536b78;
    font-size: .7rem;
    line-height: 1.4;
}
.member-heatmap-info p strong { color: #294b5e; }

@media (max-width: 1180px) {
    .member-heatmap-filters { grid-template-columns: repeat(3, minmax(170px, 1fr)); }
    .member-heatmap-filter-actions { align-self: end; }
}
@media (max-width: 880px) {
    .member-heatmap-filters { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
    .member-heatmap-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .member-heatmap-stage, .member-heatmap-google-map { min-height: 520px; }
    .member-heatmap-workspace { min-height: 520px; }
    .member-heatmap-layer-panel { max-width: calc(100% - 8rem); }
    .member-heatmap-layer-panel[open] { width: min(535px, calc(100% - 8rem)); }
}
@media (max-width: 560px) {
    .member-heatmap-filter-panel > summary { align-items: flex-start; }
    .member-heatmap-filter-panel > summary small { max-width: 190px; }
    .member-heatmap-filters { grid-template-columns: 1fr; }
    .member-heatmap-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .member-heatmap-filter-actions { width: 100%; }
    .member-heatmap-filter-actions .button { flex: 1 1 auto; }
    .member-heatmap-stage, .member-heatmap-google-map { min-height: 440px; }
    .member-heatmap-workspace { min-height: 440px; }
    .member-heatmap-legend {
        justify-content: flex-start;
        gap: .32rem .55rem;
    }
    .member-heatmap-layer-panel {
        top: .65rem;
        left: .5rem;
        max-width: calc(100% - 5rem);
    }
    .member-heatmap-layer-panel[open] {
        top: 3.35rem;
        right: .5rem;
        width: auto;
        max-width: none;
    }
    .member-heatmap-message { top: 7.2rem; }
}

/* Appearance preferences. JavaScript resolves System to light or dark before this stylesheet paints. */
html[data-theme="dark"] {
    color-scheme: dark;
    --brand-blue: #57b9ed;
    --brand-red: #ff776e;
    --brand-dark-red: #ff9a92;
    --brand-gray: #a4b4bd;
    --brand-light-gray: #536a76;
    --ink: #e6eef2;
    --muted: #a8b7c0;
    --navy: var(--brand-blue);
    --navy-2: #8bd2f4;
    --teal: var(--brand-blue);
    --teal-soft: #193b4b;
    --coral: var(--brand-red);
    --gold: #f1bf5d;
    --paper: #0c171e;
    --white: #152630;
    --line: #314650;
    --border: var(--line);
    --surface-muted: #1b303b;
    --shadow: 0 18px 48px rgba(0, 0, 0, .38);
}

html[data-theme="dark"] .topbar { background: rgba(16, 31, 40, .98); box-shadow: 0 8px 28px rgba(0, 0, 0, .28); }
html[data-theme="dark"] .app-sidebar { background: #101f28; }
html[data-theme="dark"] .sidebar-season { border-color: #2d5061; background: #132d3a; }
html[data-theme="dark"] .sidebar-section-heading strong { color: #acd9eb; background: #203d4b; }
html[data-theme="dark"] .sidebar-season p { color: #a8c1cd; }
html[data-theme="dark"] .sidebar-season select { border-color: #486775; }
html[data-theme="dark"] .nav-section h2 { color: #81949d; }
html[data-theme="dark"] .nav-primary-link { color: #c2d0d7; }
html[data-theme="dark"] .nav-primary-link:hover { color: var(--brand-blue); background: #183745; }
html[data-theme="dark"] .nav-entry.is-active > .nav-primary-link { color: var(--brand-blue); background: #193b4b; }
html[data-theme="dark"] .nav-submenu { border-color: #39525e; }
html[data-theme="dark"] .nav-submenu a { color: #9fb0b9; }
html[data-theme="dark"] .nav-submenu a:hover { color: var(--brand-blue); background: #183745; }
html[data-theme="dark"] .nav-submenu a[aria-current="page"] { color: var(--brand-blue); background: #152630; box-shadow: inset 0 0 0 1px #395767; }
html[data-theme="dark"] .account-menu-identity { background: var(--surface-muted); }
html[data-theme="dark"] .theme-menu { box-shadow: 0 18px 48px rgba(0, 0, 0, .55); }

html[data-theme="dark"] :is(input, select, textarea) { border-color: #4b616d; }
html[data-theme="dark"] :is(input, select, textarea)::placeholder { color: #80929c; }
html[data-theme="dark"] .button-secondary { border-color: #536a76; }
html[data-theme="dark"] .button-secondary:hover { background: var(--teal-soft); }
html[data-theme="dark"] .button-danger { color: #fff; }
html[data-theme="dark"] .button-google { border-color: #536a76; background: #f5f7fa; color: #263238; }
html[data-theme="dark"] .management-form .form-actions,
html[data-theme="dark"] .sticky-actions,
html[data-theme="dark"] .officials-bulk-savebar { background: rgba(21, 38, 48, .96); }
html[data-theme="dark"] .event-sanction-save-bar { border-color: #416274; background: rgba(21, 42, 52, .97); }
html[data-theme="dark"] .event-incident-save-bar { border-color: #754841; background: rgba(51, 29, 28, .98); }

html[data-theme="dark"] :is(
    .management-rail,
    .help-directory,
    .table-tools,
    th,
    .stack-list > div,
    .snapshot-note,
    .candidate-row,
    .role-option,
    .invitation-summary,
    .person-choice,
    .finance-attention-grid > div,
    .finance-assignee-card,
    .facility-directory-building,
    .facility-editor-hierarchy,
    .facility-editor-add,
    .event-sanction-facility-grid > section,
    .event-sanction-assignment-card,
    .event-sanction-calendar-grid > section,
    .event-sanction-building-picker,
    .event-sanction-court-grid-heading,
    .event-sanction-add-court,
    .facility-map-directory,
    .member-heatmap-filters,
    .coi-upload-progress,
    .coi-bulk-controls,
    .finance-upload-form input[type="file"]
) { background: var(--surface-muted); }

html[data-theme="dark"] :is(
    .management-table-card th,
    .officials-bulk-table thead th:first-child,
    .officials-bulk-table thead th:nth-child(2),
    .coi-file-table thead th:first-child,
    .coi-file-table thead th:nth-child(2),
    .facility-editor-building-header,
    .event-sanction-building-card > .panel-heading,
    .event-sanction-date-heading,
    .facility-map-summary,
    .facility-map-site-group > h2
) { background: #203743; color: var(--muted); }

html[data-theme="dark"] :is(
    .management-record:hover,
    .help-directory a:hover,
    .management-table-card tbody tr:hover,
    tbody tr:hover,
    .facility-directory-summary:hover,
    button.facility-map-record-main:hover
) { background: #1d3541; }

html[data-theme="dark"] td { border-bottom-color: var(--line); }
html[data-theme="dark"] .row-highlight { background: #332e1d; }
html[data-theme="dark"] .row-highlight:hover { background: #3d3620; }
html[data-theme="dark"] .table-row-protected > td { background: #342f1e; }
html[data-theme="dark"] .error-detail td { background: #3a2423; color: #ffaaa2; }
html[data-theme="dark"] .finance-net-row td { background: #1b3340; }
html[data-theme="dark"] .event-incident-table td:nth-child(4) { background: #2f2422; }
html[data-theme="dark"] .crm-do-not-contact-row { background: #332321; }

html[data-theme="dark"] .help-article > header { background: linear-gradient(135deg, #19323f, var(--white)); }
html[data-theme="dark"] :is(.workspace-locked, .panel-restricted, .confidential-block, .crm-contract-documents) { background: #2d2222; }
html[data-theme="dark"] .auth-card { background: rgba(21, 38, 48, .98); }
html[data-theme="dark"] .auth-shell { background: radial-gradient(circle at 12% 10%, rgba(87, 185, 237, .16), transparent 30%), radial-gradient(circle at 88% 85%, rgba(255, 119, 110, .18), transparent 32%), linear-gradient(145deg, #07131a, #102c3b 62%, #0c202b); }
html[data-theme="dark"] :is(.setup-steps code, .log-details pre) { background: #101f28; color: #c4dce8; }
html[data-theme="dark"] .log-error pre { background: #35201f; color: #ffaaa2; }

html[data-theme="dark"] .notice-card { border-color: #326170; background: #173642; color: #b9d7df; }
html[data-theme="dark"] :is(.notice-critical, .alert-error) { border-color: #77463f; background: #3a2422; color: #ffb1aa; }
html[data-theme="dark"] .alert-warning { border-color: #6f5c32; background: #332d1f; color: #f4d48b; }
html[data-theme="dark"] .alert-success { border-color: #37664d; background: #1d382b; color: #9cdbb8; }
html[data-theme="dark"] .status-good { background: #234a36; color: #a5dfbe; }
html[data-theme="dark"] .status-warn { background: #4a3d20; color: #f4d486; }
html[data-theme="dark"] .status-bad { background: #522c29; color: #ffb1aa; }
html[data-theme="dark"] .status-neutral { background: #2b3b48; color: #bdc9d0; }
html[data-theme="dark"] .positive-text { color: #79d3a4; }
html[data-theme="dark"] .critical-text { color: #ff9e96 !important; }

html[data-theme="dark"] .facility-map-surface { --facility-map-border: var(--line); }
html[data-theme="dark"] .member-heatmap-surface { --member-heatmap-border: var(--line); }
html[data-theme="dark"] .member-heatmap-filter-panel > summary:hover { background: #1d3541; }
html[data-theme="dark"] .member-heatmap-privacy p { background: #2d2222; }
html[data-theme="dark"] :is(.member-heatmap-privacy summary, .member-heatmap-filter-prompt, .member-heatmap-metrics span) { color: var(--muted); }
html[data-theme="dark"] :is(.facility-map-message, .facility-map-legend, .member-heatmap-message, .member-heatmap-layer-panel, .member-heatmap-layer-controls, .member-heatmap-legend) { border-color: #4d6570; background: rgba(21, 38, 48, .96); color: #c7d5dc; }
html[data-theme="dark"] .member-heatmap-message-error { border-color: #77463f; background: rgba(58, 36, 34, .97); color: #ffb1aa; }
html[data-theme="dark"] :is(.facility-map-stage, .member-heatmap-stage) { background-color: #152832; }
html[data-theme="dark"] :is(.facility-map-record-detail strong, .facility-map-contact strong) { color: #bdcbd2; }

/* Google Maps info windows retain a light canvas, so their content keeps light-theme ink. */
html[data-theme="dark"] .facility-map-info { color: #17344a; }
html[data-theme="dark"] .facility-map-info :is(h2, h3) { color: #006298; }
html[data-theme="dark"] .facility-map-info p { color: #66747e; }
html[data-theme="dark"] .member-heatmap-info { color: #17344a; }
html[data-theme="dark"] .member-heatmap-info h2 { color: #006298; }
html[data-theme="dark"] .member-heatmap-info p { color: #66747e; }

/* Governed Analytics & KPI system */
.kpi-page-heading { align-items: flex-end; }
.kpi-page-heading .button-row { flex-wrap: wrap; justify-content: flex-end; }
.kpi-page-heading .button-row form { margin: 0; }
.kpi-section-nav {
    display: flex;
    gap: .35rem;
    margin: -.35rem 0 1.25rem;
    padding: .45rem;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    box-shadow: 0 8px 24px rgba(0, 71, 109, .06);
}
.kpi-section-nav a {
    flex: 0 0 auto;
    padding: .55rem .7rem;
    border-radius: .55rem;
    color: var(--muted);
    font-size: .77rem;
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
}
.kpi-section-nav a:hover { color: var(--brand-blue); background: var(--teal-soft); }
.kpi-section-nav a[aria-current="page"] { color: var(--white); background: var(--brand-blue); }
.kpi-section-nav .kpi-nav-admin { margin-left: auto; border-left: 1px solid var(--line); }
.kpi-health-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(8rem, 1fr));
    gap: 1px;
    margin-bottom: 1.25rem;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--line);
}
.kpi-health-strip > div { min-height: 78px; display: flex; flex-direction: column; justify-content: center; gap: .2rem; padding: .85rem 1rem; background: var(--white); }
.kpi-health-strip span { color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.kpi-health-strip strong { color: var(--ink); font-size: 1.15rem; }
.kpi-health-strip .kpi-health-healthy { color: #1f7a4d; }
.kpi-health-strip .kpi-health-attention { color: #9b6610; }
.kpi-health-strip .kpi-health-error { color: var(--brand-red); }
.kpi-filter-panel, .kpi-admin-create { margin-bottom: 1.25rem; padding: 0; overflow: hidden; }
.kpi-filter-panel > summary, .kpi-admin-create > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    cursor: pointer;
    list-style: none;
}
.kpi-filter-panel > summary::-webkit-details-marker, .kpi-admin-create > summary::-webkit-details-marker { display: none; }
.kpi-filter-panel > summary::after, .kpi-admin-create > summary::after { content: "▾"; color: var(--brand-blue); }
.kpi-filter-panel > summary span, .kpi-admin-create > summary span { margin-left: auto; color: var(--muted); font-size: .78rem; }
.kpi-filter-panel[open] > summary, .kpi-admin-create[open] > summary { border-bottom: 1px solid var(--line); }
.kpi-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(10rem, 1fr));
    gap: .85rem;
    padding: 1rem 1.2rem;
}
.kpi-filter-grid label { margin: 0; }
.kpi-filter-actions { display: flex; align-items: flex-end; gap: .5rem; }
.kpi-filter-panel .notice-inline { margin: 0 1.2rem 1.2rem; }
.kpi-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1rem; }
.kpi-card {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    padding: 1.15rem;
    border: 1px solid var(--line);
    border-top: 4px solid var(--brand-blue);
    border-radius: 16px;
    background: var(--white);
    box-shadow: 0 10px 26px rgba(0, 71, 109, .07);
}
.kpi-card-unavailable { border-top-color: var(--brand-gray); }
.kpi-card-topline { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.kpi-classification { padding: .22rem .48rem; border-radius: 999px; color: #315668; background: #eaf1f4; font-size: .65rem; font-weight: 900; letter-spacing: .08em; }
.kpi-classification-core { color: #00577f; background: #d9f0fb; }
.kpi-classification-advanced { color: #6a4e13; background: #fbefca; }
.kpi-card h2 { min-height: 2.6em; margin: 0; color: var(--ink); font-size: 1rem; line-height: 1.3; }
.kpi-card-value, .kpi-detail-value { color: var(--brand-blue); font-size: clamp(2rem, 4vw, 3rem); font-variant-numeric: tabular-nums; line-height: 1; }
.kpi-card-value-text { color: var(--muted); font-size: 1.15rem; }
.kpi-unavailable-reason { min-height: 3em; margin: -.25rem 0 0; color: var(--muted); font-size: .78rem; }
.kpi-sparkline { width: 100%; height: 42px; border-bottom: 1px solid var(--line); }
.kpi-sparkline polyline { fill: none; stroke: var(--brand-blue); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.kpi-sparkline-empty { min-height: 42px; display: flex; align-items: center; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .7rem; }
.kpi-card-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin: 0; }
.kpi-card-comparison div { min-width: 0; }
.kpi-card-comparison dt { color: var(--muted); font-size: .65rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.kpi-card-comparison dd { margin: .12rem 0 0; font-size: .85rem; font-weight: 750; overflow-wrap: anywhere; }
.kpi-trend-favorable { color: #1f7a4d; }
.kpi-trend-unfavorable { color: var(--brand-red); }
.kpi-card-meta { display: grid; gap: .25rem; padding-top: .65rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .69rem; }
.kpi-card-meta b { color: var(--ink); }
.kpi-card-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: .2rem; }
.kpi-card-actions .text-link { font-size: .75rem; }
.kpi-detail-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1rem; margin-bottom: 1rem; }
.kpi-current-panel { border-top: 4px solid var(--brand-blue); }
.kpi-current-panel .health-row { margin-top: 1rem; }
.kpi-definition-panels { align-items: start; }
.kpi-history-list { display: grid; gap: .8rem; margin: 0; padding: 0; list-style: none; }
.kpi-history-list li { padding: .75rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--surface-muted); }
.kpi-history-list p { margin: .45rem 0; }
.kpi-history-list small { display: block; color: var(--muted); }
.kpi-admin-create form { margin: 0; padding: 1.2rem; }
.kpi-definition-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi-admin-grid { align-items: start; }
.kpi-admin-grid .panel { height: 100%; }
.kpi-status-form { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.kpi-status-form small { color: var(--muted); }
.kpi-status-form .button-danger { border-color: #a9231a; color: #a9231a; background: transparent; }
.kpi-status-form .button-danger:hover { color: var(--white); background: #a9231a; }

@media (max-width: 1100px) {
    .kpi-health-strip { grid-template-columns: repeat(3, 1fr); }
    .kpi-filter-grid, .kpi-definition-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .kpi-page-heading { align-items: stretch; }
    .kpi-page-heading .button-row { justify-content: stretch; }
    .kpi-page-heading .button-row > * { flex: 1 1 auto; }
    .kpi-health-strip { grid-template-columns: repeat(2, 1fr); }
    .kpi-filter-grid, .kpi-definition-form, .kpi-detail-hero { grid-template-columns: 1fr; }
    .kpi-filter-grid .field-wide, .kpi-definition-form .field-wide { grid-column: auto; }
    .kpi-card-grid { grid-template-columns: 1fr; }
    .kpi-filter-panel > summary span, .kpi-admin-create > summary span { display: none; }
}

html[data-theme="dark"] .kpi-section-nav,
html[data-theme="dark"] .kpi-health-strip > div,
html[data-theme="dark"] .kpi-card { background: var(--white); }
html[data-theme="dark"] .kpi-classification { color: #bdd4df; background: #2b4350; }
html[data-theme="dark"] .kpi-classification-core { color: #9bd7ef; background: #183f51; }
html[data-theme="dark"] .kpi-classification-advanced { color: #f0d28f; background: #44391f; }
html[data-theme="dark"] .kpi-history-list li { background: var(--surface-muted); }

/* Public community events and jobs board */
.community-shell { width: min(1180px, 100%); overflow: hidden; border: 1px solid rgba(216,221,223,.9); border-radius: 26px; background: var(--paper); box-shadow: 0 28px 80px rgba(4,12,30,.3); }
.community-public-header { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1rem clamp(1rem, 3vw, 2rem); border-bottom: 1px solid var(--line); background: var(--white); }
.community-brand { display: flex; align-items: center; gap: 1rem; color: var(--ink); text-decoration: none; }
.community-brand img { display: block; width: 8.5rem; max-height: 4rem; object-fit: contain; object-position: left center; }
.community-brand span { display: flex; flex-direction: column; padding-left: 1rem; border-left: 1px solid var(--line); line-height: 1.2; }
.community-brand strong { color: var(--brand-blue); font-size: 1rem; }
.community-brand small { margin-top: .18rem; color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
.community-header-actions { display: flex; align-items: center; gap: .55rem; }
.community-header-actions form { margin: 0; }
.community-shell .button-quiet { border-color: var(--line); color: var(--brand-blue); }
.community-shell .button-quiet:hover { border-color: var(--brand-blue); background: var(--teal-soft); }
.community-hero { padding: clamp(2.5rem, 7vw, 5.5rem) clamp(1.25rem, 6vw, 5rem); color: var(--white); background: radial-gradient(circle at 92% 10%, rgba(255,255,255,.17), transparent 26%), linear-gradient(125deg, #003d60, var(--brand-blue) 64%, #0080b5); }
.community-hero .eyebrow { color: #bfe8fa; }
.community-hero h1 { max-width: 830px; margin: .35rem 0 .8rem; font-size: clamp(2.35rem, 6vw, 4.6rem); line-height: .98; letter-spacing: -.055em; }
.community-hero > p:last-child { max-width: 760px; margin: 0; color: #e6f6fd; font-size: 1.05rem; }
.community-tabs { display: flex; gap: .25rem; overflow-x: auto; padding: .65rem clamp(1.25rem, 4vw, 3rem) 0; background: var(--white); scrollbar-width: thin; }
.community-tabs a { display: inline-flex; min-width: 112px; align-items: center; justify-content: center; gap: .45rem; padding: .8rem 1rem; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 800; text-align: center; text-decoration: none; white-space: nowrap; }
.community-tabs a:hover { color: var(--brand-blue); }
.community-tabs a[aria-current="page"] { border-color: var(--brand-red); color: var(--brand-blue); }
.community-tab-count { display: inline-grid; min-width: 1.45rem; height: 1.45rem; place-items: center; padding: 0 .35rem; border-radius: 999px; color: var(--white); background: var(--brand-blue); font-size: .7rem; line-height: 1; }
.community-filters { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(260px, 1.5fr) auto auto; gap: .75rem; align-items: end; padding: 1rem clamp(1.25rem, 4vw, 3rem) 1.4rem; border-bottom: 1px solid var(--line); background: var(--white); }
.community-filters-simple { grid-template-columns: minmax(260px, 1fr) auto auto; }
.community-filters label, .community-login-form label, .community-review-form label { display: flex; flex-direction: column; gap: .35rem; color: var(--muted); font-size: .78rem; font-weight: 750; }
.community-results-heading { display: flex; justify-content: space-between; gap: 1rem; padding: 1.25rem clamp(1.25rem, 4vw, 3rem) .5rem; color: var(--muted); font-size: .78rem; }
.community-results-heading p { margin: 0; }
.community-results-heading strong { color: var(--brand-blue); font-size: 1.05rem; }
.community-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding: 1rem clamp(1.25rem, 4vw, 3rem) 3rem; }
.community-card { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; padding: 1.35rem; border: 1px solid var(--line); border-top: 4px solid var(--brand-blue); border-radius: var(--radius); background: var(--white); box-shadow: 0 8px 24px rgba(28,40,73,.05); }
.community-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; color: var(--muted); font-size: .7rem; font-weight: 750; }
.community-audience-pill { padding: .22rem .5rem; border-radius: 999px; color: #0c5d43; background: #dff5eb; font-weight: 850; }
.community-sanction-mark { display: flex; width: 100%; align-items: center; gap: .8rem; margin-bottom: .9rem; padding: .7rem .8rem; border: 1px solid #8ecfe9; border-radius: 12px; background: #e8f7fd; }
.community-sanction-mark img { width: 104px; max-height: 48px; object-fit: contain; }
.community-sanction-mark span { display: grid; min-width: 0; gap: .1rem; color: var(--brand-blue); }
.community-sanction-mark strong { font-size: .78rem; line-height: 1.2; }
.community-sanction-mark small { color: var(--muted); font-size: .66rem; }
.community-sanction-mark-detail { max-width: 480px; margin-bottom: 1.1rem; }
.community-card h2 { margin: .8rem 0 .2rem; color: var(--navy); font-size: 1.3rem; line-height: 1.2; }
.community-card h2 a { text-decoration: none; }
.community-card h2 a:hover { color: var(--brand-blue); text-decoration: underline; }
.community-card > p { color: var(--muted); }
.community-card .community-organization, .community-organization { margin: .2rem 0 .6rem; color: var(--brand-blue); font-weight: 800; }
.community-card-actions { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 1rem; margin-top: auto; }
.community-card-actions .button-link { appearance: none; padding: 0; border: 0; color: var(--brand-blue); background: transparent; cursor: pointer; font: inherit; font-size: .82rem; font-weight: 800; text-decoration: underline; text-underline-offset: .2em; }
.community-card-actions .button-link:hover { color: var(--navy); }
.community-facts { width: 100%; display: grid; gap: .65rem; margin: .5rem 0 1rem; }
.community-facts div { display: grid; grid-template-columns: minmax(104px, .42fr) minmax(0, 1fr); align-items: start; gap: .7rem; padding-top: .6rem; border-top: 1px solid var(--line); }
.community-facts dt { color: var(--muted); font-size: .68rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.community-facts dd { min-width: 0; margin: 0; color: var(--ink); font-size: .82rem; overflow-wrap: anywhere; }
.community-empty { margin: 1rem clamp(1.25rem, 4vw, 3rem) 3rem; padding: 3rem 1.5rem; text-align: center; }
.community-disclaimer { padding: 1.25rem clamp(1.25rem, 4vw, 3rem); border-top: 1px solid var(--line); background: var(--surface-muted); color: var(--muted); font-size: .76rem; }
.community-disclaimer strong { color: var(--ink); }
.community-disclaimer p { max-width: 900px; margin: .3rem 0 .8rem; }
.community-disclaimer div { display: flex; gap: 1.25rem; }
.community-disclaimer a { color: var(--brand-blue); font-weight: 750; text-decoration: none; }
.community-disclaimer a:hover { text-decoration: underline; }
.community-detail-heading { padding: clamp(2rem, 5vw, 4.5rem) clamp(1.25rem, 6vw, 5rem) 2.2rem; background: var(--white); }
.community-detail-heading h1 { max-width: 900px; margin: .7rem 0 .3rem; color: var(--navy); font-size: clamp(2rem, 5vw, 4rem); line-height: 1.02; letter-spacing: -.05em; }
.community-detail-summary { max-width: 780px; color: var(--muted); font-size: 1.06rem; }
.community-detail-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 1rem; padding: 1.5rem clamp(1.25rem, 6vw, 5rem) 3rem; }
.community-detail-copy, .community-detail-facts { padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.community-detail-copy h2, .community-detail-facts h2 { margin-top: 0; color: var(--navy); }
.community-detail-copy p { color: var(--ink); line-height: 1.72; }
.community-detail-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.2rem clamp(1.25rem, 6vw, 5rem); border-top: 1px solid var(--line); background: var(--white); color: var(--muted); font-size: .76rem; }
.community-detail-footer p { margin: 0; }
.community-auth-card { width: min(580px, 100%); }
.community-login-form { display: grid; gap: .8rem; }
.community-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.community-workspace-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; padding: 2rem clamp(1.25rem, 4vw, 3rem); background: var(--white); }
.community-workspace-heading h1 { margin: .2rem 0; color: var(--navy); font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.04em; }
.community-workspace-heading p { margin: 0; color: var(--muted); }
.community-manage > .alert, .community-edit > .alert { margin: 1rem clamp(1.25rem, 4vw, 3rem); }
.community-manage-list { display: grid; gap: .8rem; padding: 1rem clamp(1.25rem, 4vw, 3rem) 3rem; }
.community-manage-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.community-manage-item h2 { margin: .55rem 0 .2rem; color: var(--navy); font-size: 1.15rem; }
.community-manage-item p { margin: .2rem 0; color: var(--muted); }
.community-manage-item small { display: block; margin-top: .5rem; color: var(--muted); }
.community-manage-item .alert { margin: .75rem 0 0; }
.community-manage-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: .45rem; }
.community-manage-actions form { margin: 0; }
.community-listing-form { display: grid; gap: 1rem; padding: 0 clamp(1.25rem, 4vw, 3rem) 3rem; }
.community-listing-form fieldset { min-width: 0; margin: 0; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.community-listing-form legend { padding: 0 .45rem; color: var(--navy); font-size: .95rem; font-weight: 850; }
.community-listing-form label small { color: var(--muted); font-size: .7rem; font-weight: 600; }
.community-listing-form .form-help { margin-top: 0; }
.community-form-actions { position: sticky; bottom: 0; z-index: 2; display: flex; justify-content: flex-end; gap: .65rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: .9rem; background: rgba(255,255,255,.96); box-shadow: 0 -8px 20px rgba(28,40,73,.06); backdrop-filter: blur(6px); }
.community-moderation-list { display: grid; gap: 1rem; }
.community-moderation-card { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr); gap: 1.25rem; margin: 0; }
.community-moderation-copy h2 { margin: .55rem 0 .3rem; color: var(--navy); }
.community-moderation-copy > p { color: var(--muted); }
.community-moderation-copy details { margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.community-moderation-copy summary { color: var(--brand-blue); cursor: pointer; font-weight: 800; }
.community-review-form { display: flex; flex-direction: column; justify-content: flex-end; gap: .7rem; padding: 1rem; border-left: 1px solid var(--line); background: var(--surface-muted); }
.community-review-classification { display: grid; gap: .65rem; margin: 0; padding: .8rem; border: 1px solid var(--line); border-radius: 10px; }
.community-review-classification legend { padding: 0 .3rem; color: var(--ink); font-size: .72rem; font-weight: 850; }
.community-review-classification small { color: var(--muted); font-size: .7rem; line-height: 1.45; }
.community-review-form > div { display: flex; justify-content: flex-end; gap: .5rem; }

@media (max-width: 800px) {
    .community-public-header, .community-workspace-heading, .community-detail-footer { align-items: flex-start; flex-direction: column; }
    .community-header-actions { width: 100%; flex-wrap: wrap; }
    .community-filters, .community-card-grid, .community-detail-layout, .community-moderation-card { grid-template-columns: 1fr; }
    .community-results-heading { flex-direction: column; }
    .community-manage-item { flex-direction: column; }
    .community-manage-actions { justify-content: flex-start; }
    .community-review-form { border-top: 1px solid var(--line); border-left: 0; }
}
@media (max-width: 520px) {
    .community-brand img { width: 6.5rem; }
    .community-brand span { padding-left: .7rem; }
    .community-brand small { display: none; }
    .community-card-grid { padding-inline: .8rem; }
    .community-tabs { padding-inline: .8rem; }
    .community-tabs a { min-width: 108px; flex: 0 0 auto; }
    .community-form-actions { align-items: stretch; flex-direction: column-reverse; }
}
html[data-theme="dark"] .community-shell { border-color: #3b505b; }
html[data-theme="dark"] .community-audience-pill { color: #bcebd9; background: #174c3b; }
html[data-theme="dark"] .community-sanction-mark { border-color: #397a96; background: #14394a; }

/* Year-over-year club player flow */
.player-flow-surface { overflow: hidden; }
.player-flow-heading { align-items: flex-start; }
.player-flow-boundary { border-left: 4px solid var(--brand-blue); }
.player-flow-filters { display: grid; grid-template-columns: repeat(5, minmax(145px, 1fr)) auto; align-items: end; gap: .75rem; }
.player-flow-filters label { min-width: 0; }
.player-flow-filters select { width: 100%; }
.player-flow-season-target { display: grid; align-self: stretch; align-content: center; gap: .12rem; min-width: 145px; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: .65rem; background: var(--surface-muted); }
.player-flow-season-target span { color: var(--muted); font-size: .66rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.player-flow-season-target strong { color: var(--navy); font-size: .9rem; }
.player-flow-season-target small { color: var(--muted); font-size: .66rem; }
.player-flow-filter-actions { display: flex; align-items: center; gap: .45rem; }
.player-flow-snapshot { justify-content: flex-start; }
.player-flow-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: var(--white); }
.player-flow-metrics article { min-width: 0; padding: 1.25rem clamp(.9rem, 2vw, 1.5rem); border-right: 1px solid var(--line); }
.player-flow-metrics article:last-child { border-right: 0; }
.player-flow-metrics span { display: block; color: var(--muted); font-size: .69rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.player-flow-metrics strong { display: block; margin: .28rem 0 .12rem; color: var(--navy); font-size: clamp(1.55rem, 3vw, 2.2rem); line-height: 1; }
.player-flow-metrics small { color: var(--muted); font-size: .7rem; }
.player-flow-metric-transfer { box-shadow: inset 0 4px 0 #477e9c; }
.player-flow-metric-gain { box-shadow: inset 0 4px 0 #1b8a5a; }
.player-flow-metric-loss { box-shadow: inset 0 4px 0 #b24a4a; }
.player-flow-club-counts { justify-content: center; }
.flow-positive { color: #14764b !important; }
.flow-negative { color: #a63d3d !important; }
.player-flow-club-focus, .player-flow-paths, .player-flow-club-table { padding: 1.5rem clamp(1.25rem, 4vw, 3rem); border-top: 1px solid var(--line); background: var(--surface-muted); }
.player-flow-club-focus > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.4rem; border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; background: var(--white); }
.player-flow-club-focus h2, .player-flow-paths h2, .player-flow-club-table h2 { margin: .15rem 0 .35rem; color: var(--navy); font-size: clamp(1.35rem, 2.5vw, 1.8rem); }
.player-flow-club-focus header p { margin: .15rem 0 0; color: var(--muted); }
.player-flow-club-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--white); }
.player-flow-club-metrics > span { display: flex; min-width: 0; flex-direction: column; gap: .15rem; padding: 1rem 1.15rem; border-right: 1px solid var(--line); color: var(--ink); font-size: .75rem; }
.player-flow-club-metrics > span:last-child { border-right: 0; }
.player-flow-club-metrics strong { color: inherit; font-size: 1.45rem; line-height: 1; }
.player-flow-club-metrics small { color: var(--muted); }
.player-flow-detail-sections { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); background: var(--white); }
.player-flow-detail { border-top: 1px solid var(--line); }
.player-flow-detail:first-child { border-top: 0; }
.player-flow-detail summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; color: var(--navy); cursor: pointer; font-weight: 850; }
.player-flow-detail summary:hover { background: var(--surface-muted); }
.player-flow-detail summary strong { min-width: 2rem; padding: .2rem .5rem; border-radius: 999px; background: var(--surface-muted); color: var(--brand-blue); text-align: center; }
.player-flow-detail > p { margin: 0; padding: 0 1.2rem .9rem; color: var(--muted); font-size: .76rem; }
.player-flow-detail-empty { padding: .9rem 1.2rem 1.2rem; color: var(--muted); font-size: .78rem; }
.player-flow-people-table { width: 100%; border-top: 1px solid var(--line); }
.player-flow-people-table th, .player-flow-people-table td { padding: .75rem 1.2rem; }
.player-flow-people-table td small { display: block; margin-top: .2rem; color: var(--muted); }
.player-flow-counterparts { display: flex; flex-wrap: wrap; gap: .3rem; }
.player-flow-counterparts span { padding: .22rem .45rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-muted); color: var(--ink); font-size: .69rem; }
.player-flow-paths .table-heading, .player-flow-club-table .table-heading { align-items: flex-end; padding: 0 0 1rem; }
.player-flow-paths .table-heading > p { max-width: 520px; text-align: right; }
.player-flow-path-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.player-flow-path-grid article { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--white); }
.player-flow-path-grid article div { display: flex; min-width: 0; align-items: center; gap: .45rem; }
.player-flow-path-grid article strong { min-width: 0; color: var(--navy); font-size: .77rem; overflow-wrap: anywhere; }
.player-flow-path-grid article div span { color: var(--brand-blue); font-size: 1.05rem; }
.player-flow-path-grid article > span { flex: 0 0 auto; padding: .25rem .5rem; border-radius: 999px; background: var(--brand-blue); color: #fff; font-size: .68rem; font-weight: 850; }
.player-flow-club-table { background: var(--white); }
.player-flow-table { min-width: 1050px; }
.player-flow-table td { vertical-align: middle; }
.player-flow-table td > small { display: block; margin-top: .2rem; color: var(--muted); white-space: nowrap; }
.player-flow-table td:first-child strong { color: var(--navy); }
.player-flow-net { font-size: 1rem; }
.player-flow-empty { margin: 1.5rem clamp(1.25rem, 4vw, 3rem) 3rem; }
.player-flow-empty h2 { margin-top: 0; color: var(--navy); }

html[data-theme="dark"] .flow-positive { color: #63d9a1 !important; }
html[data-theme="dark"] .flow-negative { color: #ff9393 !important; }

@media (max-width: 1180px) {
    .player-flow-filters { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
    .player-flow-filter-actions { align-self: end; }
    .player-flow-path-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
    .player-flow-filters { grid-template-columns: 1fr 1fr; }
    .player-flow-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .player-flow-metrics article { border-bottom: 1px solid var(--line); }
    .player-flow-metrics article:nth-child(2n) { border-right: 0; }
    .player-flow-club-focus > header { flex-direction: column; }
    .player-flow-club-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .player-flow-club-metrics > span { border-bottom: 1px solid var(--line); }
    .player-flow-club-metrics > span:nth-child(2n) { border-right: 0; }
    .player-flow-path-grid { grid-template-columns: 1fr; }
    .player-flow-paths .table-heading { align-items: flex-start; flex-direction: column; }
    .player-flow-paths .table-heading > p { text-align: left; }
}
@media (max-width: 520px) {
    .player-flow-filters { grid-template-columns: 1fr; }
    .player-flow-filter-actions { align-items: stretch; flex-direction: column; }
    .player-flow-metrics, .player-flow-club-metrics { grid-template-columns: 1fr; }
    .player-flow-metrics article, .player-flow-club-metrics > span { border-right: 0; }
    .player-flow-path-grid article { align-items: flex-start; flex-direction: column; }
}
