/* site.css - NYYC Performance Sailing Fund */

:root {
    --navy: #0b2545;
    --blue: #1d5fa8;
    --blue-dark: #134a87;
    --gold: #c9a227;
    --red: #c8102e;      /* NYYC burgee red, used for call-to-action buttons */
    --red-dark: #a00d25;
    --heading: #a00d25;  /* headings: serif in NYYC red, like nyyc.org (Suzy 2026-10-14) */
    --serif: 'Crimson Pro', Georgia, 'Times New Roman', serif; /* free stand-in for nyyc.org's Calluna */
    --ink: #1c2430;
    --muted: #5d6b7c;
    --line: #dde3ea;
    --bg: #f5f7fa;
    --panel: #ffffff;
    --ok: #1f7a4d;
    --error: #b42318;
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    /* Montserrat: free stand-in for nyyc.org's Gotham, light and a little spaced like theirs (Suzy 2026-10-14) */
    font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 300;
    letter-spacing: .01em;
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink);
    background: var(--bg);
}

h1, h2 { font-family: var(--serif); color: var(--heading); line-height: 1.2; font-weight: 400; }
h1 { font-size: 2.3rem; margin: 0 0 .4em; }
h2 { font-size: 1.5rem; margin: 1.4em 0 .4em; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
img { max-width: 100%; height: auto; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 32px; padding-bottom: 56px; min-height: 60vh; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* ---- header & footer ---- */

.site-header { background: var(--navy); color: #fff; border-bottom: 3px solid var(--red); }
/* the PSF logo fills the header's height on a white tile at the left; to its right the title (serif) with the menu under it (Suzy 2026-10-14) */
.header-row { display: flex; align-items: stretch; gap: 24px; }
.brand-logo { flex-shrink: 0; display: flex; align-items: center; background: #fff; padding: 6px 12px; }
.brand-logo img { display: block; height: 100px; width: auto; }
.header-main { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 12px 0; }
.site-title { font-family: var(--serif); font-size: 2.2rem; line-height: 1.1; color: #fff; text-decoration: none; }
.site-title:hover { color: #fff; }
.main-nav { display: flex; align-items: center; justify-content: flex-end; gap: 6px 20px; flex-wrap: wrap; }
.main-nav a { color: #dbe6f3; text-decoration: none; font-size: .95rem; }
.main-nav a:hover, .main-nav a.active { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.main-nav a.btn { color: #fff; text-decoration: none; }

.site-footer { background: #fff; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; padding: 20px 0; }
.site-footer p { margin: .2em 0; }

/* ---- buttons ---- */

.btn {
    display: inline-block; border: 0; cursor: pointer; text-decoration: none;
    background: var(--red); color: #fff; font: inherit; font-weight: 700;
    padding: .7em 1.4em; border-radius: 999px;
}
.btn:hover { background: var(--red-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.btn-ghost:hover { background: rgba(11, 37, 69, .08); color: var(--navy); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.btn-small { padding: .4em 1em; font-size: .9rem; }
.btn:disabled, .btn:disabled:hover { opacity: .6; cursor: wait; }

/* ---- home page ---- */

.hero { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--navy); }
.hero-img { display: block; width: 100%; height: 380px; object-fit: cover; opacity: .55; }
.hero-text { position: absolute; inset: auto 0 0 0; padding: 32px; color: #fff; }
.hero-text h1 { color: #fff; font-size: 2.6rem; margin: 0; }
.hero-text p { font-size: 1.15rem; max-width: 36em; margin: .4em 0; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px !important; }
.hero .btn-ghost { color: #fff; box-shadow: inset 0 0 0 2px #fff; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 28px; }
.card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-decoration: none; color: var(--ink); transition: box-shadow .15s; }
.card:hover { box-shadow: 0 6px 20px rgba(11, 37, 69, .1); color: var(--ink); }
.card h2 { margin-top: 0; }
.card-link { color: var(--blue); font-weight: 700; }

/* ---- text pages ---- */

.prose { max-width: 720px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 40px; }
.lead { font-size: 1.15rem; color: var(--muted); }
.steps { padding-left: 1.2em; }
.steps li::marker { font-family: var(--serif); color: var(--heading); font-weight: 400; font-size: 1.3rem; } /* like the step titles (Suzy 2026-11-08) */
.steps h2 { font-size: 1.3rem; margin-bottom: .2em; }

/* ---- panels & forms ---- */

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; margin: 0 0 20px; }
.narrow { max-width: 480px; margin: 0 auto; }
fieldset.panel { min-width: 0; }
legend { font-family: var(--serif); font-weight: 400; font-size: 1.45rem; color: var(--heading); padding: 0 8px; }

.form label, .field > label { display: block; font-weight: 700; margin: 0 0 4px; }
.form label input { margin-top: 4px; }
.form > label, .row-2 { margin-bottom: 16px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row-2 label { margin: 0; }
.field { margin-bottom: 20px; }
.field small, .form small { display: block; color: var(--muted); font-weight: 400; font-size: .88rem; margin-top: 4px; }

input[type=text], input[type=email], input[type=tel], input[type=date], input[type=number], input[type=password], select, textarea {
    width: 100%; font: inherit; font-weight: 400; color: var(--ink); background: #fff;
    border: 1px solid #c3ccd7; border-radius: 6px; padding: .55em .7em;
}
/* dropdowns drawn by us, so Safari makes them the same height as the text boxes */
select {
    -webkit-appearance: none; appearance: none; line-height: inherit; padding-right: 2.2em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230b2545' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .8em center; background-size: 12px 8px;
}
select[multiple] { background-image: none; padding-right: .7em; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
textarea { resize: vertical; }
.req { color: var(--error); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--error); }
.field-error { color: var(--error); font-size: .9rem; margin-top: 4px; }
.current-file { margin: 0 0 6px; font-size: .95rem; }

.form-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; }
.form-actions.at-end { position: static; }

/* ---- messages & status ---- */

.flash { border-radius: 8px; padding: 12px 16px; margin-bottom: 20px; }
.flash-ok { background: #e7f5ee; color: var(--ok); }
.flash-info { background: #e8f0fa; color: var(--navy); }
.flash-error { background: #fdecea; color: var(--error); }

.page-head { margin-bottom: 20px; }

/* step 1 / step 2 indicator on profile.php and application.php */
.progress { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 20px; font-size: .9rem; }
.progress li { flex: 1; padding: 8px 12px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); color: var(--muted); }
.progress li.current { border-color: var(--blue); color: var(--navy); font-weight: 700; }
.progress li.done, .progress li.available { color: var(--ok); }
.progress li.done::before { content: '\2713  '; }
.progress a { color: inherit; }
.page-head p { margin: 0 0 8px; }
.status { display: inline-block; font-size: .8rem; font-weight: 700; padding: .2em .8em; border-radius: 999px; background: #eef1f5; color: var(--muted); }
.status-submitted { background: #e8f0fa; color: var(--blue-dark); }
.status-under_review { background: #fff4d6; color: #7a5b00; }
.status-approved { background: #e7f5ee; color: var(--ok); }
.status-declined { background: #fdecea; color: var(--error); }

/* ---- answers (read only) ---- */

.answers { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 28px 20px; margin-bottom: 20px; }
.answers dl { margin: 0; }
.answers dt { font-weight: 700; margin-top: 14px; }
.answers dd { margin: 2px 0 0; }

/* ---- admin ---- */

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tabs a { text-decoration: none; padding: .35em .9em; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: .9rem; }
.tabs a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table.data th, table.data td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th { background: #f0f3f7; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.status-form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.status-form label { font-weight: 700; }
.status-form select { width: auto; }
.status-form small { flex-basis: 100%; color: var(--muted); }

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

@media (max-width: 640px) {
    body { font-size: 16px; }
    .wrap { padding: 0 16px; }
    .row-2 { grid-template-columns: 1fr; }
    .hero-img { height: 300px; }
    .hero-text { padding: 20px; }
    .hero-text h1 { font-size: 1.9rem; }
    .prose, .panel, .answers { padding: 20px; }
    .header-row { gap: 14px; }
    .brand-logo { padding: 4px 8px; }
    .brand-logo img { height: 68px; }
    .site-title { font-size: 1.4rem; }
}

/* ---- added for the nyycpsf tables ---- */

.choice-row { display: flex; gap: 20px; padding: 4px 0; }
.choice { display: flex !important; align-items: center; gap: 6px; font-weight: 400 !important; margin: 0 !important; }
.results-grid { display: grid; grid-template-columns: 1fr 90px 90px; gap: 8px 12px; align-items: start; }
.results-grid > span { font-weight: 700; font-size: .9rem; color: var(--muted); align-self: end; line-height: 1.2; }
.results-list { margin: 0 0 8px; padding-left: 1.2em; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.inline-form label { font-weight: 700; }
.inline-form select { width: auto; max-width: 100%; }
.date-row { display: flex; gap: 8px; }
.date-row select { width: auto; }
.status-form .amount { width: 120px; }
table.data td.wrap-cell { white-space: normal; min-width: 180px; }
fieldset.has-error { border-color: var(--error); }

@media (max-width: 640px) {
    .results-grid { grid-template-columns: 1fr 64px 64px; gap: 6px 8px; }
}

.reset-offer { margin: -8px 0 20px; }

/* admin/view.php: the crew's answers under the helm's */
.crew-head { margin-top: 40px; padding-top: 20px; border-top: 2px solid var(--line); }

/* questions hidden by show_if (application_fields.php) */
[hidden] { display: none !important; }
.page-links { margin: 0 0 12px; font-size: .95rem; }

/* post-event reports */
.report-results { grid-template-columns: 1.4fr 70px 70px 1.6fr; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin: 8px 0 16px; }
.photo-grid figure { margin: 0; }
.photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; background: #eee; }
.photo-grid figcaption { font-size: .85rem; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
@media (max-width: 640px) {
    .report-results { grid-template-columns: 1fr 56px 56px; }
    .report-results > :nth-child(4n) { grid-column: 1 / -1; }
}
.inline-form input[type=text] { width: auto; }
.regatta-choice { display: flex; flex-direction: column; gap: 6px; }
.other-regatta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.other-regatta input[type=text] { flex: 1; min-width: 160px; }
.other-regatta label { font-size: .9rem; display: flex; align-items: center; gap: 6px; }
.other-regatta input[name$="[other_date]"] { width: 11em; }
/* the name and date boxes only matter when "Other" is chosen (browsers without :has() always show them) */
.regatta-choice:not(:has(option[value="other"]:checked)) .other-regatta { display: none; }
.planned-regattas { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.add-regatta { align-self: flex-start; }
.results-grid > span.regatta-name { font-weight: 700; font-size: 1rem; color: inherit; }
.sub-head { font-size: 1rem; margin: 22px 0 8px; }
.report-list { padding-left: 18px; margin: 0 0 12px; }
.report-list li { margin: 4px 0; }

/* home page: where your support goes */
.home-form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.home-form select { width: auto; max-width: 100%; }
.home-form small { flex-basis: 100%; }
.funded { margin-top: 40px; }
.funded-stats { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 1.05rem; margin: 0 0 18px; }
.funded-stats strong { font-size: 1.6rem; color: var(--navy); margin-right: 4px; }
.funded-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.funded-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.funded-card img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.funded-body { padding: 18px 20px; }
.funded-body h3 { margin: 0 0 4px; }
.funded-body p { margin: 0 0 10px; font-size: .92rem; }
.funded-results { list-style: none; padding: 0; margin: 0; }
.funded-results li { padding: 6px 0; border-top: 1px solid var(--line); font-size: .95rem; }
.data td.num { text-align: right; }
.podiums { white-space: nowrap; font-size: 1.15rem; letter-spacing: 2px; }
.podiums .tip { position: relative; cursor: default; }
/* instant hover/tap label for each medal (the browser's title tooltip is slow) */
.podiums .tip:hover::after, .podiums .tip:focus::after {
    content: attr(data-tip); position: absolute; left: 100%; top: 50%; transform: translateY(-50%);
    margin-left: 6px; z-index: 5; white-space: nowrap; pointer-events: none;
    background: var(--navy); color: #fff; font-size: .8rem; letter-spacing: 0; line-height: 1.3;
    padding: 4px 8px; border-radius: 6px; box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}
.program-intro { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-top: 28px; }
.program-intro h2 { margin-top: 0; }
.program-intro p { margin-bottom: 0; line-height: 1.6; }
.photo-table img { display: block; width: 140px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: #eee; }
/* sortable column headings (media.php) */
table.sortable th button { all: unset; cursor: pointer; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; }
table.sortable th button::after { content: ' \2195'; opacity: .4; }
table.sortable th button[data-dir="asc"]::after { content: ' \25B2'; opacity: 1; }
table.sortable th button[data-dir="desc"]::after { content: ' \25BC'; opacity: 1; }
table.sortable th button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
table.data th.two-line { white-space: normal; line-height: 1.25; }
table.data th.two-line small { font-size: .75em; }
/* admin application view: question on the left, answer on the right */
.answers-side .answers dl { display: grid; grid-template-columns: minmax(150px, 32%) 1fr; }
.answers-side .answers dt, .answers-side .answers dd { margin: 0; padding: 10px 0; border-top: 1px solid var(--line); }
.answers-side .answers dt:first-of-type, .answers-side .answers dt:first-of-type + dd { border-top: 0; }
.answers-side .answers dt { color: var(--muted); font-weight: 700; padding-right: 24px; }
.answers-side .answers .wide { grid-column: 1 / -1; padding-right: 0; }
.answers-side .answers dd.wide { border-top: 0; padding-top: 0; }
@media (max-width: 640px) {
    .answers-side .answers dl { grid-template-columns: 1fr; }
    .answers-side .answers dd { border-top: 0; padding-top: 0; }
}
/* a folded section on the admin view (About) */
details.answers > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
details.answers > summary::-webkit-details-marker { display: none; }
details.answers > summary::after { content: '\25B6'; font-size: 1.6em; line-height: 1; color: var(--red); transition: transform .15s; }
details.answers[open] > summary::after { transform: rotate(90deg); }
.eval-form input[type=text], .eval-form textarea { width: 100%; }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 44px; }
.password-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 6px; cursor: pointer; color: var(--muted); line-height: 0; }
.password-eye:hover, .password-eye:focus-visible { color: var(--navy); }
/* mm/dd/yyyy boxes get a calendar button (includes/footer.php); the real date input behind it stays invisible */
.us-date { position: relative; display: inline-block; }
.us-date input[placeholder="mm/dd/yyyy"] { padding-right: 40px; }
.us-date-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 6px; cursor: pointer; color: var(--muted); line-height: 0; }
.us-date-btn:hover, .us-date-btn:focus-visible { color: var(--navy); }
.us-date-picker { position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; opacity: 0; border: 0; padding: 0; pointer-events: none; }
.delete-form { display: inline; margin: 0; }
.btn-link-danger { background: none; border: 0; padding: 0; color: var(--red); text-decoration: underline; cursor: pointer; font: inherit; }
.funded-body h3 a { color: inherit; text-decoration: none; }
.funded-body h3 a:hover { text-decoration: underline; }
.funded-results .medal { font-size: 1.15em; }
.funded-more { margin: 10px 0 0; font-size: .92rem; }
.steps h3 { font-size: 1rem; margin: .8em 0 .2em; }
.data.wrap-head th { white-space: normal; }
.code-input { display: block; font-size: 1.4rem; letter-spacing: .3em; max-width: 12em; }
.form + .form { margin-top: 12px; }

/* Program Stats (admin/stats.php) */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin: 8px 0 32px; }
.stat-tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stat-tile strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 2.6rem; line-height: 1.1; color: var(--heading); }
.stat-tile span { display: block; color: var(--muted); font-size: .92rem; line-height: 1.4; margin-top: 6px; }
.stats-table td:not(:first-child), .stats-table th:not(:first-child) { text-align: right; white-space: nowrap; }
.home-col { text-align: center; white-space: nowrap; }
.home-col input { width: 18px; height: 18px; }
/* admin/regattas.php: regattas typed in as "Other" (Suzy 2026-11-18) */
.regatta-todo h2 { margin-top: 0; }
.regatta-todo .inline-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin-top: 10px; }
.regatta-todo .inline-form label { display: flex; flex-direction: column; gap: 4px; }
.regatta-todo label:has(input[name=name]) { flex: 0 0 100%; } /* Name on its own full-width line, dates below (Suzy 2026-11-18) */
.regatta-todo input[name=name] { width: 100%; }
.regatta-todo input[name=url] { width: 16em; max-width: 100%; }
.regatta-todo input[name=start], .regatta-todo input[name=end] { width: 11em; }

/* admin/view.php: site-owner-only Delete this application, folded away so it isn't hit by accident */
.danger-zone { margin-top: 40px; border-color: var(--error); padding: 14px 20px; }
.danger-zone summary { cursor: pointer; color: var(--error); font-weight: 600; }
.danger-zone form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.danger-zone input[name="confirm"] { width: 10em; margin-left: 6px; }
.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { background: #8f1c13; color: #fff; }

/* application form: each reference in its own bordered box (Suzy 2026-11-18) */
fieldset.ref-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 20px 4px; margin: 0 0 20px; min-width: 0; }
fieldset.ref-box legend { font-size: 1.15rem; }
.answers .ref-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 20px 14px; margin: 16px 0 0; }
.answers .ref-box h3 { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; color: var(--heading); margin: 10px 0 0; }

/* admin/summary.php: every application in one wide table, like the committee spreadsheet (Suzy 2026-11-18).
   Wider than the page, scrolls both ways inside its box, with the header row and the names column kept in view. */
.summary-filter { margin-bottom: 14px; flex-wrap: wrap; }
.summary-filter .check { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; }
.summary-scroll { width: calc(100vw - 40px); margin-left: calc(50% - 50vw + 20px); max-height: 80vh; overflow: auto;
    border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.summary { border-collapse: separate; border-spacing: 0; font-size: .85rem; min-width: 100%; }
table.summary th, table.summary td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 8px 10px;
    vertical-align: top; text-align: left; background: #fff; }
table.summary thead th { position: sticky; top: 0; z-index: 2; background: #f0f3f7; font-size: .75rem; font-weight: 700;
    color: var(--ink); vertical-align: bottom; min-width: 90px; }
table.summary .col-name { position: sticky; left: 0; z-index: 1; min-width: 190px; font-weight: 600; }
table.summary thead .col-name { z-index: 3; font-family: var(--serif); font-size: 1.1rem; font-weight: 400; color: var(--heading); }
table.summary thead .col-name small { font-family: inherit; font-size: .7rem; color: var(--muted); }
table.summary .col-wide { min-width: 260px; max-width: 360px; }
table.summary .col-xwide { min-width: 520px; max-width: 720px; } /* To Be Used For and Recent Results, twice as wide (Suzy 2026-11-19) */
table.summary .score { min-width: 80px; max-width: 100px; text-align: center; }
table.summary thead .score { text-align: left; }
table.summary .num { min-width: 90px; max-width: 170px; }
table.summary .group-row th, table.summary .group-row td { background: #e8edf3; font-weight: 700; color: var(--navy); }
table.summary .status { white-space: nowrap; }
table.summary .summary-input { width: 100%; min-width: 60px; padding: 4px 6px; font: inherit; border: 1px solid var(--line); border-radius: 4px;
    background: #fffdf3; transition: background .3s; }
/* comments and notes boxes fill the whole cell, as tall as the row (at least 90px) */
table.summary td.fill { position: relative; height: 90px; }
table.summary td.fill textarea.summary-input { position: absolute; top: 6px; right: 6px; bottom: 6px; left: 6px; width: auto; height: auto; resize: none; }
/* "To be used for" and "Recent results" as bullets, not indented */
table.summary .cell-list { margin: 0; padding: 0; list-style: disc inside; }
table.summary .cell-list li { margin: 0 0 3px; }
table.summary .summary-input.saved { background: #dff3e6; }
table.summary .summary-input.failed { background: #fde4e1; border-color: var(--error); }
/* score colours on the Summary table (script in admin/summary.php) */
table.summary td.score-5 { background: #dcf2e3; }
table.summary td.score-4 { background: #fdf6cf; }
table.summary td.score-3 { background: #fde3c8; }
table.summary td.score-low { background: #fbd9d6; }
table.summary td.score .summary-input:not(.saved):not(.failed) { background: rgba(255, 255, 255, .55); }

/* home page: "Where your support goes" with the Program Stats button beside it (committee and admins) */
.funded-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.funded-head h2 { margin: 0; }
.field small.field-link { margin: 0 0 6px; }
.field input.money-input { max-width: 14em; } /* budget and amount boxes (Suzy 2026-11-19) */
.field .field-note { margin: 0 0 10px; } /* instruction line above a question, e.g. the budget template (Suzy 2026-11-20) */
.field small.file-chosen { color: var(--text, #1f2937); word-break: break-word; } /* full name of a file picked for upload (Suzy 2026-11-21) */

/* admin/applications.php: the site owner's tools in one box (Suzy 2026-11-22) */
.nav-count { display: inline-block; min-width: 1.4em; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: .72rem; font-weight: 700; line-height: 1.4; text-align: center; vertical-align: 1px; }
.sum-tag { display: inline-block; margin: 2px 0 0 4px; padding: 0 6px; border-radius: 3px; background: var(--navy, #0b2545); color: #fff;
    font-size: .68rem; font-weight: 600; letter-spacing: .02em; white-space: nowrap; vertical-align: 1px; }
.sum-tag-podium { background: var(--red); }
.regatta-edit td { padding: 6px 6px; }
.regatta-edit input[name=name] { min-width: 240px; }
.regatta-edit input[name=start], .regatta-edit input[name=end] { width: 10.5em; }
.regatta-edit input[name=url] { min-width: 180px; }
.owner-tools .open-cycle-form { margin: 0 0 14px; }
.owner-tools p { margin: 6px 0; }
.owner-tools p:last-child { margin-bottom: 0; }

/* Program Stats: missing data list (Suzy 2026-11-22) */
.missing-data summary { cursor: pointer; }
.missing-data summary h2 { display: inline; margin: 0 .5rem 0 0; }
.missing-data h3 { margin-top: 1rem; }

/* Applications list: cycle picker under the title, collapsible owner tools (Suzy 2026-11-22) */
.cycle-picker { margin: 0 0 16px; }
.owner-tools > summary { cursor: pointer; font-weight: 600; }
.owner-tools[open] > summary { margin-bottom: 12px; }
.owner-tools > summary .muted { font-weight: normal; }
.athlete-apps { margin: 4px 0 10px; }
.applied-for { white-space: normal; }
.applied-for .status { margin: 2px 4px 2px 0; text-decoration: none; white-space: nowrap; }
.applied-for .status:hover { text-decoration: underline; }
.status-legend .status { margin-right: 4px; }

/* "Saved automatically at ..." beside the Save buttons (Suzy 2026-11-22) */
.autosave-status { align-self: center; margin-left: 4px; }

/* About banner on the application page (Suzy 2026-11-22): photo, Helm/Crew, name, tags, on navy */
details.answers.sailor { padding: 0; overflow: hidden; }
details.answers.sailor > dl { padding: 8px 28px 20px; }
details.answers.sailor > summary { background: var(--navy); color: #fff; padding: 22px 28px; gap: 22px; justify-content: flex-start; }
details.answers.sailor > summary::after { color: #fff; margin-left: auto; }
.headshot { flex: none; width: 104px; height: 104px; border-radius: 50%; border: 3px solid rgba(255,255,255,.35); object-fit: cover; background: #fff; }
.headshot-none { display: inline-flex; align-items: center; justify-content: center; background: #1f3a5f; color: #fff; font-size: 2rem; font-weight: 700; letter-spacing: .04em; }
.sailor-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sailor-role { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; font-size: .9rem; color: rgba(255,255,255,.6); }
details.answers.sailor > summary h2 { margin: 0; color: #fff; font-family: inherit; font-weight: 700; font-size: 1.9rem; line-height: 1.15; }
.sailor-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.sailor-tags .tag { text-transform: uppercase; letter-spacing: .04em; font-weight: 700; font-size: .85rem; }
.sailor-tags .tag-red { background: var(--red); padding: 5px 10px; border-radius: 3px; }
.sailor-tags .tag-place::before { content: '\1F4CD'; margin-right: 4px; }
.headshot-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 640px) {
    details.answers.sailor > summary { padding: 16px; gap: 14px; }
    details.answers.sailor > dl { padding: 8px 16px 16px; }
    .headshot { width: 72px; height: 72px; }
    details.answers.sailor > summary h2 { font-size: 1.4rem; }
}

/* Committee evaluation scores by quarter on the application page (Suzy 2026-11-22) */
.eval-history { margin: 8px 0 4px; }
.eval-history th[scope=row] { text-align: left; font-weight: 600; min-width: 220px; }
.eval-history td { text-align: center; white-space: nowrap; }
.eval-history td a { color: inherit; text-decoration: none; display: block; }
.eval-history td.current, .eval-history thead th:nth-child(2) { background: #eef3f9; font-weight: 700; }
.eval-history td.current input { width: 7em; text-align: center; }

/* application page (Suzy 2026-11-22): sailors' banners first; the applications picker with the submitted date beside it */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.app-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-bottom: 8px; }
.app-meta .athlete-apps { margin: 0; }
.sailor-role .sailor-class { text-transform: none; letter-spacing: .02em; }
/* smaller banners, helm and crew side by side (Suzy 2026-11-22) */
.sailor-pair.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; align-items: start; }
.sailor-pair.two details.answers.sailor[open] { grid-column: 1 / -1; }
details.answers.sailor > summary { padding: 14px 18px; gap: 14px; }
details.answers.sailor .headshot { width: 68px; height: 68px; }
details.answers.sailor .headshot-none { font-size: 1.3rem; }
details.answers.sailor > summary h2 { font-size: 1.3rem; }
.sailor-role { font-size: .75rem; }
.sailor-tags .tag { font-size: .72rem; }
.sailor-tags .tag-red { padding: 3px 7px; }
.sailor-text { gap: 4px; }
details.answers.sailor > summary::after { font-size: 1.2em; }
@media (max-width: 760px) { .sailor-pair.two { grid-template-columns: 1fr; } }
/* the athlete's own photo on their profile (Suzy 2026-11-22) */
.headshot-current { display: flex; align-items: center; gap: 14px; }
.headshot-current .headshot { width: 72px; height: 72px; border-color: var(--line); }
/* the athlete's own banner at the top of their profile (Suzy 2026-11-22), styled like the application page's */
.sailor-banner { display: flex; align-items: center; gap: 16px; background: var(--navy); color: #fff; border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px; }
.sailor-banner .headshot { width: 76px; height: 76px; }
.sailor-banner .headshot-none { font-size: 1.4rem; }
.sailor-banner h1 { margin: 0; color: #fff; font-family: inherit; font-weight: 700; font-size: 1.5rem; line-height: 1.15; }
.sailor-banner .sailor-email { font-size: .9rem; color: rgba(255,255,255,.8); overflow-wrap: anywhere; }
.sailor-banner .sailor-email a { color: #fff; }

/* post-event reporting (Suzy 2026-11-23) */
.report-due-table th, .report-due-table td { padding: 10px 10px; }
.report-due-table td.sailors-cell { white-space: normal; min-width: 150px; }
.report-due-table td.wrap-cell { min-width: 130px; }
.report-due ul { margin: 6px 0 0 1.2em; padding: 0; }
.report-state { font-weight: 700; font-size: .85rem; white-space: nowrap; }
.report-overdue { color: var(--error); }
.report-done { color: var(--ok); }
.report-not_due { color: var(--muted); }
.report-flag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 3px; background: var(--error); color: #fff; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; vertical-align: middle; }
