:root {
    --navy: #073f78;
    --blue: #0b67b2;
    --red: #ed1c24;
    --ink: #122236;
    --muted: #5d6f82;
    --line: #dbe5ef;
    --soft: #f4f8fc;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--white);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: var(--navy);
    text-decoration: none;
}

a:hover {
    color: var(--red);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px clamp(18px, 5vw, 72px);
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
}

.brand img {
    display: block;
    width: min(260px, 42vw);
    height: auto;
}

nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    flex-wrap: wrap;
    font-size: .94rem;
    font-weight: 700;
}

nav form {
    margin: 0;
}

nav button {
    border: 0;
    background: transparent;
    color: var(--navy);
    font-weight: 700;
    padding: 0;
}

main {
    min-height: 72vh;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 540px);
    gap: clamp(28px, 5vw, 72px);
    align-items: center;
    padding: clamp(52px, 7vw, 94px) clamp(18px, 5vw, 72px) 42px;
    background:
        linear-gradient(135deg, rgba(7, 63, 120, .08), rgba(237, 28, 36, .04)),
        var(--white);
}

.hero-copy {
    max-width: 780px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--red);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1, h2, h3, p {
    margin-top: 0;
}

h1 {
    margin-bottom: 18px;
    color: var(--navy);
    font-size: clamp(2.4rem, 5vw, 5rem);
    line-height: .96;
    font-weight: 900;
}

h2 {
    margin-bottom: 14px;
    color: var(--navy);
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.05;
    font-weight: 900;
}

h3 {
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 1.25rem;
}

p {
    color: var(--muted);
    line-height: 1.6;
}

.hero-copy > p:not(.eyebrow) {
    max-width: 650px;
    font-size: 1.12rem;
}

.hero-actions,
.admin-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid var(--navy);
    border-radius: 6px;
    padding: 10px 18px;
    font-weight: 800;
    cursor: pointer;
}

.button.primary,
button {
    background: var(--red);
    border-color: var(--red);
    color: var(--white);
}

.button.secondary {
    background: var(--white);
    color: var(--navy);
}

.hero-photo-card,
.timing-photo {
    margin: 0;
}

.hero-photo-card img,
.timing-photo img {
    display: block;
    width: 100%;
    border: 1px solid rgba(7, 63, 120, .25);
    box-shadow: 0 24px 70px rgba(7, 63, 120, .2);
}

.hero-photo-card img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

figcaption {
    margin-top: 10px;
    color: var(--muted);
    font-size: .9rem;
}

.section {
    padding: clamp(42px, 7vw, 86px) clamp(18px, 5vw, 72px);
}

.page-band {
    min-height: 72vh;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 26px;
}

.meet-list,
.timing-gallery {
    display: grid;
    gap: 16px;
}

.meet-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 180px;
    gap: 22px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--line);
    border-left: 5px solid var(--blue);
    border-radius: 8px;
    background: var(--white);
    color: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.meet-card:hover,
.meet-card:focus-visible {
    color: inherit;
    border-color: var(--blue);
    border-left-color: var(--red);
    box-shadow: 0 6px 18px rgba(7, 63, 120, .12);
}

.meet-card h3 {
    color: var(--navy);
}

.meet-card:hover h3 {
    color: var(--red);
}

.meet-date {
    display: grid;
    gap: 6px;
}

.meet-date strong {
    color: var(--navy);
    font-size: 1.08rem;
}

.meet-date span,
.meet-status,
.entry-window span,
.meet-actions span {
    color: var(--muted);
    font-size: .92rem;
    font-weight: 700;
}

.meet-status,
.cancelled-status {
    color: var(--navy) !important;
    font-size: 1.03rem !important;
    font-weight: 900 !important;
}

.cancelled-status {
    color: var(--red) !important;
}

.meet-actions {
    display: grid;
    justify-items: end;
    gap: 4px;
}

.meet-actions strong {
    color: var(--navy);
}

.timing-section,
.form-band {
    background: var(--soft);
}

.timing-gallery {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
    align-items: start;
}

.scoreboard-photo img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.timer-photo img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.entry-copy {
    max-width: 760px;
    margin-bottom: 26px;
}

.process-strip {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.process-strip span {
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--white);
    color: var(--navy);
    font-size: .88rem;
    font-weight: 800;
}

.entry-form {
    display: grid;
    gap: 16px;
    max-width: 860px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

.builder-layout {
    display: grid;
    grid-template-columns: minmax(320px, 560px) minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}

.builder-layout .section-heading {
    grid-column: 1 / -1;
    margin-bottom: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--navy);
    font-weight: 800;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #b8c7d6;
    border-radius: 6px;
    padding: 11px 12px;
    color: var(--ink);
    background: var(--white);
    font: inherit;
    font-weight: 400;
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(11, 103, 178, .2);
    border-color: var(--blue);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-label input {
    width: auto;
}

.form-message {
    margin: 0;
    padding: 12px;
    border-radius: 6px;
    background: rgba(11, 103, 178, .1);
    color: var(--navy);
    font-weight: 800;
}

.form-message.error {
    background: rgba(237, 28, 36, .1);
    color: var(--red);
}

.admin-layout {
    min-height: 72vh;
}

.admin-table {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

.admin-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.1fr;
    gap: 14px;
    align-items: center;
    min-width: 760px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.admin-row:last-child {
    border-bottom: 0;
}

.admin-head {
    background: var(--navy);
    color: var(--white);
    font-weight: 900;
}

.event-row {
    grid-template-columns: 44px 2fr 1.3fr 1fr 1.1fr 110px;
}

.event-row input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.tab-strip {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.tab-strip button {
    min-height: 0;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: transparent;
    color: var(--muted);
    font-weight: 800;
}

.tab-strip button.is-active {
    border-color: var(--line);
    background: var(--white);
    color: var(--navy);
    box-shadow: 0 2px 0 0 var(--white);
}

.tab-intro {
    margin-bottom: 14px;
}

.inline-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.inline-label select {
    width: auto;
    padding: 7px 10px;
}

.row-link {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--navy);
    font: inherit;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.row-link:hover {
    color: var(--red);
    text-decoration: underline;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(7, 63, 120, .45);
}

.modal-panel {
    position: fixed;
    z-index: 41;
    top: 4vh;
    left: 50%;
    transform: translateX(-50%);
    width: min(920px, 94vw);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    background: var(--soft);
    box-shadow: 0 30px 80px rgba(7, 63, 120, .35);
    overflow: hidden;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 22px;
    background: var(--navy);
    color: var(--white);
}

.modal-head h2 {
    margin: 0;
    color: var(--white);
    font-size: 1.3rem;
}

.modal-head .link-button {
    border-color: rgba(255, 255, 255, .5);
    background: transparent;
    color: var(--white);
}

.modal-body {
    display: grid;
    gap: 18px;
    padding: 22px;
    overflow-y: auto;
}

.modal-body .entry-form,
.modal-body .document-panel {
    max-width: none;
}

.meet-list-panel {
    display: grid;
    gap: 12px;
    align-content: start;
}

.draft-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-left: 5px solid var(--blue);
    border-radius: 8px;
    background: var(--soft);
    color: var(--navy);
    font-weight: 700;
}

.link-button.is-danger {
    border-color: rgba(237, 28, 36, .45);
    color: var(--red);
}

.draft-bar.is-danger {
    border-left-color: var(--red);
    background: rgba(237, 28, 36, .07);
    color: var(--red);
}

.draft-bar.is-danger .field-hint {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-weight: 400;
}

.link-button.is-draft {
    border-color: var(--blue);
    color: var(--blue);
}

.edit-note {
    color: var(--navy);
    font-weight: 800;
}

.document-row {
    grid-template-columns: 1.1fr 1.2fr 1.8fr 1fr 90px;
}

.backup-row {
    grid-template-columns: 2fr 1.2fr .8fr 1.2fr;
}

.digest-status {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin: -6px 0 4px 26px;
}

.digest-status .field-hint.error {
    color: var(--danger, #b3261e);
}

.meet-search {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin: 28px 0 10px;
}

.meet-search input[type="search"] {
    min-width: 260px;
}

.meet-search .field-hint {
    flex-basis: 100%;
}

.form-message.warning {
    background: #fdf0d5;
    border-left: 4px solid #d98324;
    color: #6b4200;
}

.entry-row {
    grid-template-columns: 1.3fr 1.2fr 1.3fr 1.1fr 1fr .7fr;
}

/* Answers hang under their submission rather than squeezing into a column of their own. */
.entry-answers {
    grid-template-columns: 1.3fr 1fr;
    padding-top: 0;
    border-top: 0;
}

/* A meet with nothing submitted yet. Native select options accept little styling, so the label
   also says "no entries" — the colour is a hint, not the only signal. */
.entry-toolbar option.is-empty {
    color: var(--muted);
}

.receipt {
    max-width: 620px;
}

.receipt h3 {
    margin: 22px 0 8px;
    font-size: 1rem;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
}

.receipt-table td {
    padding: 7px 0;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.receipt-table td:first-child {
    width: 42%;
    color: var(--muted);
    font-weight: 700;
    padding-right: 14px;
}

/* The numbers are the reason a coach opens this, so they carry weight. */
.receipt-table.is-counts td:last-child {
    font-weight: 900;
    font-size: 1.05rem;
}

.count-warning {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    background: #fdf0d5;
    color: #6b4200;
    font-size: .74rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .03em;
    cursor: help;
}

.answer-list {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: .86rem;
}

.entry-row.is-superseded {
    background: var(--soft);
    color: var(--muted);
}

.entry-row a {
    margin-right: 12px;
}

.entry-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    color: var(--muted);
    font-weight: 700;
}

.entry-toggle {
    display: inline-flex;
    gap: 8px;
}

.entry-toggle a {
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: .88rem;
    font-weight: 800;
}

.entry-toggle a.is-active {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}

.badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}

.badge-latest {
    background: rgba(11, 103, 178, .14);
    color: var(--navy);
}

.badge-superseded {
    background: rgba(93, 111, 130, .16);
    color: var(--muted);
}

/* Per-meet entry questions on the submission form. */
.meet-question {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
}

.acknowledgement {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
}

.acknowledgement p {
    margin: 0;
    font-weight: 700;
}

.batch-panel {
    margin-bottom: 18px;
}

.revision-count {
    display: block;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

.document-panel {
    grid-column: 1 / -1;
    display: grid;
    gap: 16px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

.document-panel h2 {
    margin: 0;
    color: var(--navy);
}

.document-panel > p {
    margin: 0;
}

.document-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr) auto;
    gap: 14px;
    align-items: end;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
}

.document-form label {
    margin: 0;
}

.field-hint {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 700;
    text-transform: none;
}

.link-button {
    min-height: 0;
    padding: 6px 10px;
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--red);
    font-size: .85rem;
}

.user-row {
    grid-template-columns: 1.6fr .9fr .9fr 1fr 1.1fr;
}

.user-row .field-hint {
    display: block;
}

.invite-link {
    display: block;
    margin-top: 6px;
    padding: 8px 10px;
    border-radius: 6px;
    background: var(--white);
    font-size: .82rem;
    overflow-wrap: anywhere;
}

.subscription-row {
    grid-template-columns: 1fr 1.4fr 1.4fr 200px;
}

.subscription-url {
    overflow-wrap: anywhere;
    font-size: .88rem;
}

.subscription-error {
    display: block;
    color: var(--red);
    font-size: .84rem;
    font-weight: 700;
}

.subscription-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.import-row {
    grid-template-columns: 140px minmax(0, 1fr);
    min-width: 0;
}

.calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.calendar-title {
    margin: 0;
    font-size: clamp(1.4rem, 2.4vw, 2rem);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    margin-bottom: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--line);
    overflow: hidden;
}

.calendar-heading {
    padding: 10px 8px;
    background: var(--navy);
    color: var(--white);
    font-size: .8rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
    text-align: center;
}

.calendar-day {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 104px;
    padding: 6px;
    background: var(--white);
}

.calendar-day.is-outside {
    background: var(--soft);
}

.calendar-day.is-outside .calendar-date {
    color: #a9b8c7;
}

.calendar-day.is-today {
    box-shadow: inset 0 0 0 2px var(--blue);
}

.calendar-date {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 800;
}

.calendar-meet {
    display: block;
    padding: 4px 6px;
    border-left: 3px solid var(--blue);
    border-radius: 4px;
    background: rgba(11, 103, 178, .1);
    color: var(--navy);
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.calendar-meet:hover {
    background: rgba(11, 103, 178, .2);
    color: var(--navy);
}

.calendar-meet.is-cancelled {
    border-left-color: var(--red);
    background: rgba(237, 28, 36, .1);
    text-decoration: line-through;
}

.calendar-list-heading {
    font-size: 1.4rem;
}

.status-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.status-strip .badge {
    margin-left: 0;
}

.form-section-heading {
    margin: 10px 0 0;
    color: var(--navy);
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.meet-contacts {
    margin-bottom: 32px;
}

.meet-contacts h2 {
    color: var(--navy);
    margin-bottom: 12px;
}

.meet-host {
    margin: 0 0 16px;
    color: var(--muted);
}

.meet-host strong {
    color: var(--navy);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.contact-card {
    display: grid;
    gap: 4px;
    align-content: start;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

.contact-card span {
    color: var(--red);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.contact-card strong {
    color: var(--navy);
    font-size: 1.05rem;
}

.contact-card a {
    font-weight: 700;
    word-break: break-word;
}

.download-group {
    margin: 18px 0 10px;
    color: var(--navy);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.download-group:first-of-type {
    margin-top: 0;
}

footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding: 28px clamp(18px, 5vw, 72px);
    border-top: 1px solid var(--line);
    background: var(--navy);
}

footer img {
    width: 220px;
    max-width: 52vw;
    filter: brightness(0) invert(1);
}

footer p {
    margin: 0;
    color: var(--white);
}

#blazor-error-ui {
    display: none;
}

.validation-message {
    color: var(--red);
    font-weight: 700;
}

.meet-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.meet-fact {
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

.meet-fact span {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.meet-fact strong {
    color: var(--navy);
    font-size: 1.08rem;
}

.meet-downloads h2 {
    color: var(--navy);
    margin-bottom: 14px;
}

.download-list {
    display: grid;
    gap: 12px;
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}

.download-list a {
    display: grid;
    gap: 4px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-left: 5px solid var(--blue);
    border-radius: 8px;
    background: var(--white);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.download-list a:hover,
.download-list a:focus-visible {
    border-color: var(--blue);
    border-left-color: var(--red);
    box-shadow: 0 6px 18px rgba(7, 63, 120, .12);
}

.download-list strong {
    font-size: 1.08rem;
}

.download-list span {
    color: var(--muted);
    font-size: .9rem;
    font-weight: 700;
    word-break: break-all;
}

@media (max-width: 900px) {
    .site-header,
    .hero,
    .meet-card,
    .timing-gallery,
    .builder-layout {
        grid-template-columns: 1fr;
    }

    .site-header {
        display: grid;
        justify-items: start;
    }

    nav {
        justify-content: flex-start;
    }

    .meet-actions {
        justify-items: start;
    }

    .form-grid,
    .document-form {
        grid-template-columns: 1fr;
    }

    .calendar-day {
        min-height: 74px;
    }

    .modal-panel {
        top: 0;
        width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }

    .calendar-meet {
        font-size: .68rem;
    }
}
