/* ExpeedConnect Sponsor Portal. One stylesheet, no framework, no inline styles (the content security policy forbids
   them). The look is the staff site's "Calm" theme (ExpeedConnect.Admin/wwwroot/css/bootstrap-overrides.css): a misty
   canvas with white islands, soft shadows, pill buttons, Lexend for headings and Public Sans for text, and the same
   status labels. The accent and the header take the club's own colours where it has chosen them (a small block of
   variables in the page head); otherwise the accent is the staff site's teal. */

@font-face { font-family: "Lexend"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/lexend.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/public-sans.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/public-sans-italic.woff2") format("woff2"); }

:root {
    --brand: #136f8a;
    --brand-dark: #0c5469;
    --brand-contrast: #ffffff;
    --ink: #14212e;
    --ink-soft: #4d5b6a;
    --ink-muted: #606d7b;
    --line: #d3dae2;
    --line-strong: #c3cdd6;
    --surface: #ffffff;
    --surface-2: #ebeff4;
    --surface-3: #e2e8ee;
    --page: #d8dfe7;
    --ok: #1b7a52;
    --ok-bg: #dcf1e6;
    --warn: #9a5f0c;
    --warn-bg: #faeed8;
    --error: #b8352f;
    --error-bg: #fae3e1;
    --info: #335e9f;
    --info-bg: #e1e9f6;
    --info-line: #c5d3ea;
    --error-line: #f0c4c1;
    --shadow: 0 0 0 1px rgb(20 33 46 / .06), 0 1px 3px rgb(20 33 46 / .08), 0 6px 22px rgb(20 33 46 / .09);
    --radius: 16px;
    --radius-ctl: 12px;
    --font: "Public Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Lexend", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--page);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 0.75rem; }
h2 { font-size: 1.1rem; line-height: 1.3; margin: 0; }
p { margin: 0 0 1rem; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* A page that opens a live connection (Files) moves focus to its heading, so a screen reader announces the new page.
   That is not something the person chose to focus, so it gets no ring. */
h1:focus, h1:focus-visible { outline: none; }
::selection { background-color: #dceff4; }

/* Icons are decoration beside words: nothing depends on them loading. */
i[class*="fa-"] { margin-right: 0.4em; }
.icon-only i[class*="fa-"] { margin-right: 0; }

.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 0.75rem; }
.muted { color: var(--ink-muted); }
.small { font-size: 0.85rem; }
.lead { font-size: 1.05rem; color: var(--ink-soft); }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 0.5rem 1rem; z-index: 10; border-radius: var(--radius-ctl); }
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* ---- Signed-in layout ---- */
/* The header takes the club's own colour when it has chosen one; its text colour is worked out to suit it. */
.site-header { background: var(--header-bg, var(--surface)); box-shadow: 0 1px 0 var(--header-line, var(--line)), 0 2px 10px rgb(20 33 46 / .06); }
.site-header-inner {
    max-width: 1100px; margin: 0 auto; padding: 0.75rem 1rem;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--header-ink, var(--ink)); }
.brand:hover { color: var(--header-ink, var(--ink)); }
.brand-logo { height: 44px; width: auto; max-width: 160px; object-fit: contain; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.2; }
.brand-sub { display: block; font-family: var(--font); font-weight: 400; font-size: 0.85rem; color: var(--header-soft, var(--ink-muted)); }
.site-nav { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.site-nav a, .site-nav .link-button { color: var(--header-link, var(--brand)); }
.site-nav a:hover, .site-nav .link-button:hover { color: var(--header-link, var(--brand-dark)); }
.site-nav a { text-decoration: none; font-weight: 700; font-size: 0.92rem; }
.site-nav .link-button { font-weight: 700; font-size: 0.92rem; text-decoration: none; }
.site-nav a:hover, .site-nav .link-button:hover { text-decoration: underline; }
.site-header :focus-visible { outline-color: var(--header-ink, var(--brand)); }
.inline-form { display: inline; margin: 0; }

.site-main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 1.75rem 1rem 2.5rem; }
.site-footer {
    max-width: 1100px; width: 100%; margin: 0 auto; padding: 1rem;
    display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
    color: var(--ink-muted); font-size: 0.85rem;
}
/* Links to the Expeed Connect site, in a new tab */
.powered-by { display: inline-flex; align-items: center; gap: 0.4rem; color: inherit; text-decoration: none; }
.powered-by:hover span, .powered-by:focus-visible span { text-decoration: underline; }
/* The logo file has a white background: multiply lets the page colour show through it. */
.powered-by img { height: 24px; width: auto; mix-blend-mode: multiply; }

.breadcrumb { color: var(--ink-muted); font-size: 0.9rem; margin-bottom: 0.5rem; }
.breadcrumb a { text-decoration: none; font-weight: 700; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---- Before signing in: a club-branded card on the Connect navy, as the staff sign-in is ---- */
.account-page {
    flex: 1; display: flex; align-items: center; justify-content: center;
    background-color: #0d2436;
    background-image:
        radial-gradient(ellipse at 50% -20%, rgba(27, 110, 194, 0.45), transparent 60%),
        linear-gradient(135deg, #0d2436 0%, #1a3a57 50%, #0d2436 100%);
}
.account-shell { width: 100%; max-width: 460px; padding: 2rem 1rem; }
.account-card { background: var(--surface); border-radius: 12px; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); }
.account-body { padding: 2.25rem 2rem 1.75rem; }
.account-brand { text-align: center; margin-bottom: 1.5rem; }
.account-logo { display: block; max-height: 96px; max-width: 100%; width: auto; object-fit: contain; margin: 0 auto 1rem; }
.account-club { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; }
.account-sub { color: var(--ink-muted); font-size: 0.95rem; }
.account-body h1 { text-align: center; color: var(--brand); font-size: 1.5rem; margin-bottom: 1.25rem; }
.account-body .input { border-width: 2px; border-color: #e2e8f0; border-radius: 8px; padding: 0.8rem 0.85rem; }
.account-body .btn-primary { border-radius: 8px; padding: 0.875rem 1.5rem; font-size: 1.05rem; letter-spacing: 0.025em; }
.account-body .btn-primary:hover { box-shadow: 0 6px 20px rgba(15, 23, 42, 0.25); }
.account-body a { font-weight: 700; text-decoration: none; }
.account-body a:hover { text-decoration: underline; }
.account-links { margin: 1rem 0 0; text-align: center; font-size: 0.95rem; }
.account-card-footer {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.875rem 1rem;
    border-top: 1px solid #edf0f3; color: var(--ink-muted); font-size: 0.75rem;
}
.account-card-footer img { height: 26px; width: auto; }
/* The whole "Powered by" line links to the Expeed Connect site, in a new tab */
.account-card-footer a { display: inline-flex; align-items: center; gap: 0.5rem; color: inherit; text-decoration: none; }
.account-card-footer a:hover span, .account-card-footer a:focus-visible span { text-decoration: underline; }

/* ---- Forms ---- */
.field { margin-bottom: 1rem; }
.field label, .field-label { display: block; font-weight: 700; font-size: 0.92rem; margin-bottom: 0.3rem; }
.field-check { display: flex; align-items: flex-start; gap: 0.6rem; }
.field-check input { width: 1.15rem; height: 1.15rem; margin-top: 0.2rem; flex: none; accent-color: var(--brand); }
.field-check label { font-weight: 400; font-size: 1rem; margin: 0; }
.input {
    display: block; width: 100%; padding: 0.6rem 0.8rem; font: inherit; color: var(--ink);
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-ctl);
}
.input:focus { border-color: var(--brand); outline: 3px solid rgb(19 111 138 / .22); outline-offset: 0; }
.input-code { font-size: 1.5rem; letter-spacing: 0.35em; text-align: center; font-family: var(--font-display); }
.input-inline { display: inline-block; width: auto; padding: 0.35rem 0.6rem; border-radius: 10px; }
.hint { color: var(--ink-muted); font-size: 0.85rem; margin-top: 0.3rem; }
.form-narrow { max-width: 420px; }

.btn {
    display: inline-block; padding: 0.5rem 1.1rem; font: inherit; font-weight: 700; font-size: 0.92rem; text-align: center;
    text-decoration: none; border: 1px solid transparent; border-radius: 999px; cursor: pointer;
}
.btn-primary { background: var(--brand); color: var(--brand-contrast); border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: var(--brand-contrast); }
.btn-secondary { background: var(--surface); color: var(--brand); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-2); color: var(--brand-dark); border-color: var(--brand); }
.btn-small { padding: 0.3rem 0.85rem; font-size: 0.85rem; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-block { display: block; width: 100%; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; text-decoration: underline; }
.link-button:hover { color: var(--brand-dark); }

.alert { padding: 0.8rem 1rem; border-radius: 14px; margin-bottom: 1rem; border: 0; }
.alert-info { background: var(--info-bg); color: var(--ink); }
.alert-error { background: var(--error-bg); color: var(--error); }
.alert-warn { background: var(--warn-bg); color: #6b4208; }

.terms-details { margin: 0 0 1rem; font-size: 0.92rem; }
.terms-details summary { cursor: pointer; color: var(--brand); font-weight: 700; }
.terms-box { max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-ctl); padding: 0.75rem 1rem; margin-bottom: 1rem; }
.terms-text { font-size: 0.92rem; }
.terms-text h2 { font-size: 1rem; margin: 0.75rem 0 0.4rem; }
.terms-text ul { padding-left: 1.2rem; margin: 0 0 0.75rem; }
.terms-text li { margin-bottom: 0.35rem; }
.terms-version { color: var(--ink-muted); font-size: 0.8rem; margin: 0; }

/* ---- Content: white islands on the canvas ---- */
.panel { background: var(--surface); border-radius: var(--radius); padding: 1.25rem 1.4rem; margin-bottom: 1.25rem; box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.panel-head h2 i, .section-heading i, .asset-title i { color: var(--brand); }

.card-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.card { background: var(--surface); border-radius: var(--radius); padding: 1.25rem 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; box-shadow: var(--shadow); }
.card-link { text-decoration: none; color: var(--ink); }
.card-link:hover { color: var(--ink); box-shadow: 0 0 0 2px var(--brand), 0 6px 22px rgb(20 33 46 / .12); }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
.card-title { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.card-action { color: var(--brand); font-weight: 700; font-size: 0.92rem; margin-top: 0.25rem; }

/* Status labels: the staff site's own (a dot and a tint), so a status reads the same on both sides. */
.pill {
    --pill-rgb: 110, 123, 137;
    display: inline-flex; align-items: center; gap: 6px; padding: 0 9px 0 8px; border-radius: 999px;
    background-color: rgba(var(--pill-rgb), 0.14); color: var(--ink); font-size: 0.78rem; line-height: 1.55rem; font-weight: 400; white-space: nowrap; vertical-align: middle;
}
/* A pill usually follows a figure or a name, often with no space in the markup, so it carries its own gap. The one
   place it leads the text instead (the attention list) has the gap on the other side. */
.pill { margin-inline-start: 0.4rem; }
.attention-list .pill { margin-inline: 0 0.4rem; }
.pill::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background-color: rgb(var(--pill-rgb)); }
.pill-success { --pill-rgb: 27, 122, 82; }
.pill-warn { --pill-rgb: 229, 169, 78; }
.pill-danger { --pill-rgb: 184, 53, 47; }

.progress-row { display: flex; align-items: center; gap: 0.75rem; }
.progress-row-wide { min-width: 260px; }
.progress { flex: 1; height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--brand); border-radius: 999px; }
.progress-text { color: var(--ink-muted); font-size: 0.85rem; white-space: nowrap; }
/* Widths as classes, in steps of five: inline styles are not allowed. */
.progress-0 { width: 0; } .progress-5 { width: 5%; } .progress-10 { width: 10%; } .progress-15 { width: 15%; }
.progress-20 { width: 20%; } .progress-25 { width: 25%; } .progress-30 { width: 30%; } .progress-35 { width: 35%; }
.progress-40 { width: 40%; } .progress-45 { width: 45%; } .progress-50 { width: 50%; } .progress-55 { width: 55%; }
.progress-60 { width: 60%; } .progress-65 { width: 65%; } .progress-70 { width: 70%; } .progress-75 { width: 75%; }
.progress-80 { width: 80%; } .progress-85 { width: 85%; } .progress-90 { width: 90%; } .progress-95 { width: 95%; }
.progress-100 { width: 100%; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table thead th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-muted); font-weight: 700; white-space: nowrap; background: var(--surface-2); border-bottom: 0; }
.table thead th:first-child { border-radius: 10px 0 0 10px; }
.table thead th:last-child { border-radius: 0 10px 10px 0; }
.table thead th.num, .table td.num { text-align: right; }
.table tbody th { font-weight: 700; }
.table tbody tr:last-child th, .table tbody tr:last-child td { border-bottom: 0; }
.table-compact th, .table-compact td { padding: 0.45rem 0.6rem; }
.delivery { margin-bottom: 0.2rem; }

.doc-list { list-style: none; padding: 0; margin: 0; }
.doc-list li { padding: 0.6rem 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.1rem; }
.doc-list li:last-child { border-bottom: 0; }
.doc-list a { font-weight: 700; }

.details { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.25rem; margin: 0 0 1rem; }
.details dt { color: var(--ink-muted); font-size: 0.92rem; }
.details dd { margin: 0; font-weight: 700; }
.details dd.plain { font-weight: 400; white-space: pre-line; }

/* ---- Club wording and banner ---- */
.banner { display: block; width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--radius); margin-bottom: 1.25rem; box-shadow: var(--shadow); }
.banner-card { max-height: 140px; margin-bottom: 1.25rem; box-shadow: none; border-radius: 8px; }
.welcome { white-space: pre-line; }
.contact a { font-weight: 700; }

/* ---- Needs your attention ---- */
.attention { box-shadow: var(--shadow), inset 4px 0 0 var(--brand); }
.attention-list { list-style: none; padding: 0; margin: 0; }
.attention-list li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.attention-list li:last-child { border-bottom: 0; }

/* ---- An agreement's areas ---- */
.tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 1.25rem; }
.tab { padding: 0.4rem 0.95rem; text-decoration: none; font-weight: 700; font-size: 0.92rem; color: var(--ink-soft); border-radius: 999px; background: rgb(255 255 255 / .55); }
.tab:hover { color: var(--brand-dark); background: var(--surface); }
.tab-active, .tab-active:hover { color: var(--brand-contrast); background: var(--brand); }

/* ---- Invitations, people, requests ---- */
.guest { border: 1px solid var(--line); border-radius: var(--radius-ctl); padding: 0.75rem 1rem 0; margin: 0 0 1rem; }
.guest legend { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; padding: 0 0.4rem; }
.guest-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 1rem; }
.radio-row { display: flex; gap: 1.25rem; padding: 0.55rem 0; }
.radio-row label { display: flex; align-items: center; gap: 0.4rem; font-weight: 400; font-size: 1rem; margin: 0; }
.radio-row input { width: 1.1rem; height: 1.1rem; accent-color: var(--brand); }
.inline-row { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0 0.75rem 0.25rem 0; }
.thread { list-style: none; padding: 0; margin: 0; }
.thread li { padding: 0.6rem 0.9rem; border-radius: 14px; margin-bottom: 0.6rem; }
.thread-mine { background: var(--surface-2); }
.thread-club { background: var(--info-bg); }
.thread-text { white-space: pre-line; }

/* ---- Files ---- */
.section-heading { margin: 1.75rem 0 0.75rem; font-size: 1.25rem; }
.asset { scroll-margin-top: 1rem; }
.asset:target { box-shadow: 0 0 0 2px var(--brand), 0 6px 22px rgb(20 33 46 / .12); }
.asset-title { font-size: 1.1rem; margin: 0; }
.instructions { white-space: pre-line; background: var(--surface-2); border-radius: var(--radius-ctl); padding: 0.75rem 1rem; }
.warn-text { color: var(--warn); }
.upload-form { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1rem; }
.upload-form textarea.input { resize: vertical; }
.upload-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.upload-progress { flex: 1; min-width: 160px; height: 0.9rem; accent-color: var(--brand); }
.upload-message { margin-bottom: 1rem; }
.library-form { display: grid; grid-template-columns: 2fr 1fr auto; gap: 0.75rem; align-items: end; }
.library-form .field { margin-bottom: 0; }

@media (max-width: 600px) {
    h1 { font-size: 1.35rem; }
    .site-nav { gap: 0.9rem; }
    .account-body { padding: 1.5rem 1.25rem 1.25rem; }
    .panel, .card { padding: 1rem 1.05rem; }
    .details { grid-template-columns: 1fr; gap: 0.1rem; }
    .details dd { margin-bottom: 0.5rem; }
    .library-form { grid-template-columns: 1fr; }
    .attention-list li { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
}

@media (prefers-reduced-motion: no-preference) {
    .card-link, .btn, .tab { transition: box-shadow 0.15s, background-color 0.15s, border-color 0.15s; }
}
