/* NautiApp: mobile-first. Big tap targets, readable type, little chrome. */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    background: #f6f7f9;
    padding-bottom: env(safe-area-inset-bottom);
}

.app-navbar {
    background: #0b3a5b;
    /* In the Android app (and a home-screen app on iPhone) the page runs under the phone's status bar: keep the bar's
       contents below it, with the navy carrying on behind the clock and battery. 0 in an ordinary browser. */
    padding-top: calc(var(--bs-navbar-padding-y, .5rem) + env(safe-area-inset-top, 0px));
}

.app-navbar .btn-link.nav-link {
    border: 0;
    padding-left: var(--bs-navbar-nav-link-padding-x, 0.5rem);
}

main.container {
    max-width: 720px;
}

h1 {
    font-size: 1.6rem;
    font-weight: 650;
}

.btn {
    min-height: 44px; /* comfortable tap target on phones */
}

.btn-sm {
    min-height: 36px;
}

.card-link-row {
    color: inherit;
    text-decoration: none;
}

.card-link-row:hover .card {
    border-color: #9ab7cf;
}

.muted-small {
    font-size: 0.875rem;
    color: #6c757d;
}

.month-heading {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #51606e;
    margin: 1.25rem 0 0.5rem;
}

.race-card.race-off .race-title {
    text-decoration: line-through;
    color: #6c757d;
}

.race-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
}

.race-actions form {
    display: inline;
}

.btn-link.btn-inline {
    min-height: 0;
    padding: 0 0.25rem;
    vertical-align: baseline;
}

.rsvp-form .btn {
    font-weight: 600;
}

.race-card.needs-reply {
    border-left: 4px solid #0d6efd;
}

.roster-group + .roster-group {
    margin-top: 0.75rem;
}

.roster-label {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.roster li {
    padding: 0.15rem 0;
}

.link-box {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8rem;
    word-break: break-all;
    background: #f1f3f5;
    border-radius: 0.375rem;
    padding: 0.5rem;
}

.external-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: #fff;
    font-weight: 500;
}

.or-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #6c757d;
    font-size: 0.875rem;
}

.or-divider::before,
.or-divider::after {
    content: "";
    flex: 1;
    border-top: 1px solid #dee2e6;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
}

.admin-stat {
    padding: 0.75rem;
}

.admin-stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
}

.admin-stat-label {
    font-weight: 600;
}

.admin-facts dt {
    font-weight: 600;
    color: #51606e;
}

/* ---- Visitor home page ---------------------------------------------------------------------------------------- */
main.landing {
    padding: 0;
}

.landing-flash {
    max-width: 720px;
}

.hero {
    position: relative;
    color: #fff;
    /* Photo: J/24s racing at the 2007 European championship, by Jmulrich, CC BY-SA 3.0 (credited in the page footer).
       Darker towards the bottom-left, where the text sits. */
    background:
        linear-gradient(90deg, rgba(6, 30, 48, 0.55) 0%, rgba(6, 30, 48, 0.25) 60%, rgba(6, 30, 48, 0.05) 100%),
        linear-gradient(180deg, rgba(6, 30, 48, 0.05) 0%, rgba(6, 30, 48, 0.25) 50%, rgba(6, 30, 48, 0.8) 100%),
        url("../img/hero.jpg") center 40% / cover no-repeat,
        #0b3a5b;
    min-height: min(78vh, 640px);
    display: flex;
    align-items: flex-end;
}

.hero-inner {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    padding: 4rem 1.25rem 2.5rem;
}

.hero h1 {
    font-size: clamp(2rem, 6vw, 3.4rem);
    font-weight: 750;
    letter-spacing: -0.02em;
    line-height: 1.05;
    max-width: 14ch;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.hero-lead {
    font-size: clamp(1.05rem, 2.6vw, 1.3rem);
    max-width: 36rem;
    margin: 1rem 0 1.5rem;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero-cta .btn-light {
    color: #0b3a5b;
    font-weight: 650;
}

.hero-note {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
    opacity: 0.85;
}

.hero-welcome {
    display: inline-block;
    margin-bottom: 1.25rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #0b3a5b;
    text-decoration: none;
    font-size: 0.95rem;
}

.landing-section {
    max-width: 1040px;
    margin: 0 auto;
    padding: 3rem 1.25rem;
}

.section-title {
    font-size: clamp(1.4rem, 3.5vw, 1.9rem);
    font-weight: 700;
    color: #0b3a5b;
    text-align: center;
    margin-bottom: 1.5rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.step {
    position: relative;
    background: #fff;
    border: 1px solid #e3e8ee;
    border-radius: 14px;
    padding: 1.4rem 1.25rem 1.1rem;
}

.step-icon {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 0.6rem;
}

.step-num {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: #0b3a5b;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.step p {
    color: #51606e;
    margin: 0;
}

.landing-band {
    background: linear-gradient(180deg, #e9f2f8, #f6f7f9);
    padding: 3rem 1.25rem;
}

.landing-split {
    max-width: 1040px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: center;
}

@media (max-width: 720px) {
    .landing-split {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .landing-split .section-title {
        text-align: center !important;
    }
}

.phone-frame {
    width: 100%;
    max-width: 300px;
    padding: 10px;
    border-radius: 34px;
    background: #10202e;
    box-shadow: 0 20px 50px rgba(11, 58, 91, 0.28);
}

.phone-frame img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 26px;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    display: flex;
    gap: 0.9rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid #dfe6ed;
}

.feature-list li:last-child {
    border-bottom: 0;
}

.feature-list li > span {
    font-size: 1.5rem;
    line-height: 1.2;
}

.feature-list strong {
    display: block;
    color: #0b3a5b;
}

.feature-list div {
    color: #51606e;
}

.final-cta {
    text-align: center;
}

.final-cta h2 {
    font-weight: 750;
    color: #0b3a5b;
}

.final-cta p {
    color: #51606e;
    margin-bottom: 1.25rem;
}

.landing-footer {
    max-width: 1040px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 2.5rem;
    border-top: 1px solid #e3e8ee;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    justify-content: space-between;
    color: #6c757d;
    font-size: 0.85rem;
}

@media (max-width: 720px) {
    .hero {
        min-height: 560px;
        background:
            linear-gradient(180deg, rgba(6, 30, 48, 0.1) 0%, rgba(6, 30, 48, 0.45) 45%, rgba(6, 30, 48, 0.88) 100%),
            url("../img/hero-small.jpg") 62% 35% / cover no-repeat,
            #0b3a5b;
    }

    .hero-inner {
        padding-top: 7rem;
    }
}

.photo-credit {
    flex-basis: 100%;
    font-size: 0.75rem;
    color: #8a96a2;
}

.photo-credit a {
    color: inherit;
}

.coming-soon {
    cursor: default;
    pointer-events: none;
}

.welcome-preview {
    background: #e7f7ec;
    border-radius: 0.6rem 0.6rem 0.6rem 0.15rem;
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    word-break: break-word;
}

/* ---- Crew states (minimum / maximum crew) ------------------------------------------------------------------- */
:root {
    --crew-enough: #1d7f47;  --crew-enough-soft: #e3f4ea;
    --crew-nearly: #a86a00;  --crew-nearly-soft: #fff1d2;
    --crew-short: #c2412f;   --crew-short-soft: #fde5e1;
    --crew-over: #6b4bb8;    --crew-over-soft: #ece6fa;
    --crew-off: #7d8892;     --crew-off-soft: #eceff2;
}

.crew-state { font-weight: 650; }
.crew-enough { color: var(--crew-enough); }
.crew-nearly { color: var(--crew-nearly); }
.crew-short { color: var(--crew-short); }
.crew-over { color: var(--crew-over); }

/* ---- Crew calendar ------------------------------------------------------------------------------------------------ */
main.container.wide { max-width: 1280px; }

.cc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 14px; }
.cc-month { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.cc-month strong { min-width: 9.5em; text-align: center; }
.cc-views { display: inline-flex; }
.cc-views .btn { border: 1px solid #dde4ea; background: #fff; border-radius: 0; }
.cc-views .btn:first-child { border-radius: 8px 0 0 8px; }
.cc-views .btn:last-child { border-radius: 0 8px 8px 0; border-left: 0; }
.cc-views .btn[aria-pressed="true"] { background: #0b3a5b; color: #fff; border-color: #0b3a5b; }

.cc-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.cc-sum { background: #fff; border: 1px solid #dde4ea; border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; }
.cc-sum b { font-size: 22px; font-variant-numeric: tabular-nums; }
.cc-sum span { font-size: 13px; color: #5d6b77; }
.cc-sum.crew-enough b { color: var(--crew-enough); } .cc-sum.crew-nearly b { color: var(--crew-nearly); }
.cc-sum.crew-short b { color: var(--crew-short); } .cc-sum.crew-over b { color: var(--crew-over); }

.cc-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; color: #5d6b77; margin-bottom: 14px; }
.cc-legend > span { display: inline-flex; align-items: center; gap: 6px; }

.cc-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 650; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.cc-pill.enough { background: var(--crew-enough-soft); color: var(--crew-enough); }
.cc-pill.nearly { background: var(--crew-nearly-soft); color: var(--crew-nearly); }
.cc-pill.short { background: var(--crew-short-soft); color: var(--crew-short); }
.cc-pill.over { background: var(--crew-over-soft); color: var(--crew-over); }
.cc-pill.off { background: var(--crew-off-soft); color: var(--crew-off); }

.cc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.cc-cal { background: #fff; border: 1px solid #dde4ea; border-radius: 12px; overflow: hidden; }
.cc-dow, .cc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cc-dow div { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; color: #5d6b77; padding: 8px 10px; border-bottom: 1px solid #dde4ea; }
.cc-day { min-height: 104px; border-right: 1px solid #dde4ea; border-bottom: 1px solid #dde4ea; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cc-day:nth-child(7n) { border-right: 0; }
.cc-day.other { background: #f4f6f8; }
.cc-day.other .cc-num { opacity: 0.45; }
.cc-num { font-size: 13px; font-variant-numeric: tabular-nums; color: #5d6b77; }
.cc-day.today .cc-num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #1f6fb2; color: #fff; font-weight: 700; }

.cc-race { all: unset; box-sizing: border-box; display: grid; gap: 2px; padding: 5px 7px 6px; border-radius: 7px; cursor: pointer; border-left: 4px solid; font-size: 12.5px; line-height: 1.25; color: #1c2730; }
.cc-race:focus-visible { outline: 2px solid #1f6fb2; outline-offset: 1px; }
.cc-race.enough { background: var(--crew-enough-soft); border-color: var(--crew-enough); }
.cc-race.nearly { background: var(--crew-nearly-soft); border-color: var(--crew-nearly); }
.cc-race.short { background: var(--crew-short-soft); border-color: var(--crew-short); }
.cc-race.over { background: var(--crew-over-soft); border-color: var(--crew-over); }
.cc-race.off { background: var(--crew-off-soft); border-color: var(--crew-off); color: #5d6b77; }
.cc-race.off .cc-t { text-decoration: line-through; }
.cc-race[aria-current="true"] { box-shadow: 0 0 0 2px #1f6fb2; }
.cc-t { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-m { display: flex; align-items: center; justify-content: space-between; gap: 4px; color: #5d6b77; font-variant-numeric: tabular-nums; }
.cc-time { white-space: nowrap; }
.cc-count { font-weight: 700; }
.cc-race.enough .cc-count { color: var(--crew-enough); } .cc-race.nearly .cc-count { color: var(--crew-nearly); }
.cc-race.short .cc-count { color: var(--crew-short); } .cc-race.over .cc-count { color: var(--crew-over); }
.cc-bar { position: relative; display: block; height: 4px; border-radius: 2px; background: rgba(28, 39, 48, 0.1); }
.cc-bar-fill { display: block; height: 100%; border-radius: 2px; }
.cc-bar-min { position: absolute; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: #1c2730; opacity: 0.55; border-radius: 1px; }
.enough .cc-bar-fill { background: var(--crew-enough); } .nearly .cc-bar-fill { background: var(--crew-nearly); }
.short .cc-bar-fill { background: var(--crew-short); } .over .cc-bar-fill { background: var(--crew-over); }

.cc-list { display: grid; gap: 8px; }
.cc-list .cc-race { border-left-width: 5px; padding: 10px 12px; font-size: 14px; }
.cc-list .cc-t { white-space: normal; font-size: 15px; }
.cc-date { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em; color: #5d6b77; margin-top: 6px; }

.cc-detail { background: #fff; border: 1px solid #dde4ea; border-radius: 12px; padding: 16px; position: sticky; top: 16px; }
.cc-panel { display: grid; gap: 12px; }
.cc-panel h2 { margin: 0; font-size: 18px; text-wrap: balance; }
.cc-big { display: flex; align-items: baseline; gap: 8px; }
.cc-big b { font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.cc-big-bar .cc-bar { height: 8px; border-radius: 4px; margin-bottom: 4px; }
.cc-scale { display: flex; justify-content: space-between; font-size: 11.5px; color: #5d6b77; font-variant-numeric: tabular-nums; }
.cc-groups { display: grid; gap: 8px; }
.cc-label { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em; color: #5d6b77; margin-bottom: 4px; }
.cc-names { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-name { font-size: 13px; padding: 2px 8px; border-radius: 6px; background: #f4f6f8; border: 1px solid #dde4ea; }
.cc-positions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.cc-pos { font-size: 12.5px; padding: 5px 7px; border-radius: 6px; border: 1px solid #dde4ea; display: flex; justify-content: space-between; gap: 4px; }
.cc-pos.missing { border-color: var(--crew-short); color: var(--crew-short); background: var(--crew-short-soft); font-weight: 650; }
.cc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-actions .btn { flex: 1 1 auto; }

@media (max-width: 900px) {
    .cc-layout { grid-template-columns: 1fr; }
    .cc-detail { position: static; }
}

@media (max-width: 640px) {
    .cc-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cc-summary .cc-sum:first-child { grid-column: 1 / -1; }
    .cc-month { margin-left: 0; }
    .cc-day { min-height: 54px; padding: 4px 2px; align-items: center; }
    .cc-day .cc-race { width: 100%; padding: 3px 2px; border-left-width: 0; border-top: 3px solid; text-align: center; }
    .cc-day .cc-race .cc-t, .cc-day .cc-race .cc-bar, .cc-day .cc-race .cc-time { display: none; }
    .cc-day .cc-race .cc-m { justify-content: center; }
}
.cc-list .cc-bar { margin: 4px 0; }

/* Add to home screen */
.home-icon { max-width: 480px; }
.home-icon-img { border-radius: 22%; box-shadow: 0 2px 8px rgba(11, 58, 91, .25); flex: none; }
.home-icon-steps { padding-left: 1.25rem; display: grid; gap: .6rem; font-size: 1.05rem; }
.hi-share { width: 1.3em; height: 1.3em; vertical-align: -.25em; fill: none; stroke: #0a66d8; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.home-icon-card { display: flex; gap: .75rem; align-items: center; }
.home-icon-card img { border-radius: 22%; flex: none; }

/* Dev site banner (Site:Banner) */
.site-banner { background: #ffc107; color: #3d2e00; font-weight: 700; font-size: .85rem; text-align: center; padding: 4px 12px; letter-spacing: .04em; }

/* Spares */
.spare-page { max-width: 560px; }
.spare-steps { display: flex; gap: 6px; margin-bottom: 12px; }
.spare-steps span { flex: 1; height: 4px; border-radius: 2px; background: #dee2e6; }
.spare-steps span.on { background: #0b3a5b; }
.spare-label { font-size: .75rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: #4f5d68; margin-bottom: .4rem; float: none; width: auto; }
.spare-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.spare-chips .btn { border-radius: 999px; }
.spare-day { padding: 6px 0 6px 1.75em; border-top: 1px solid #eef0f2; }
.spare-day:first-of-type { border-top: 0; }
.spare-tick { width: 22px; height: 22px; border-radius: 5px; display: grid; place-items: center; font-size: 13px; color: #fff; background: #198754; flex: none; }
.ride-card { border-left: 4px solid var(--crew-short); }
.ride-card.nearly { border-left-color: var(--crew-nearly); }
.ride-card.offer { border-left-color: #198754; }
.spare-avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; background: #44637a; flex: none; }
.ride-strip { max-width: 1040px; margin: 28px auto 0; padding: 22px 24px; border: 2px solid #0d6efd; border-radius: 14px; background: #fff;
    display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; margin-inline: max(16px, calc((100% - 1040px) / 2)); }
.ride-strip h2 { font-size: 1.4rem; margin: 0 0 4px; }
.ride-strip p { margin: 0; color: #5b6b78; max-width: 60ch; }

/* Privacy */
.privacy { max-width: 680px; }
.privacy h2 { font-size: 1.15rem; margin-top: 1.6rem; }
.privacy li { margin-bottom: .35rem; }
.site-footer { text-align: center; padding: 18px 16px 28px; font-size: .85rem; color: #6c757d; }
.site-footer a { color: inherit; }

/* Help */
.help { max-width: 700px; }
.help .lead-small { font-size: 1.05rem; color: #495057; }
.help section { padding-top: .5rem; }
.help h2 { font-size: 1.4rem; margin-top: 2rem; padding-top: .75rem; border-top: 1px solid #dee2e6; }
.help h3 { font-size: 1.05rem; margin-top: 1.25rem; }
.help li { margin-bottom: .4rem; }
.help-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 1rem 0 .5rem; }
.help-jump a { padding: 6px 14px; border-radius: 999px; border: 1px solid #0b3a5b; color: #0b3a5b; text-decoration: none; font-weight: 600; font-size: .9rem; }
.help-jump a:hover { background: #0b3a5b; color: #fff; }
.help-note { background: #fff8e1; border: 1px solid #ffe08a; border-radius: 8px; padding: 8px 12px; }
.help-faq dt { margin-top: 1rem; }
.help-faq dd { margin: .25rem 0 0; color: #495057; }

/* Home page showcase: real screens on a navy band */
.showcase { background: radial-gradient(ellipse at 50% 0%, #1a5f8f 0%, #0b3a5b 55%, #082b44 100%); color: #fff; padding: 3.5rem 0 4rem; overflow: hidden; }
.showcase-inner { max-width: 1100px; margin: 0 auto; padding-inline: max(1.25rem, env(safe-area-inset-left, 0px)); }
.showcase h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 750; letter-spacing: -0.01em; text-align: center; margin-bottom: .5rem; }
.showcase-lead { text-align: center; color: rgba(255,255,255,.82); max-width: 40rem; margin: 0 auto 2.25rem; font-size: 1.08rem; }
.showcase-phones { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 2rem; align-items: start; }
.showcase-item { margin: 0; display: grid; gap: 1rem; justify-items: center; }
.showcase-item:nth-child(2) { transform: translateY(-14px); }
.sc-phone { width: 100%; max-width: 290px; padding: 9px; border-radius: 38px; background: #0d1820; box-shadow: 0 24px 50px -18px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.08) inset; }
.sc-phone img { display: block; width: 100%; height: auto; border-radius: 30px; }
.showcase figcaption { text-align: center; color: rgba(255,255,255,.8); font-size: .97rem; max-width: 290px; }
.showcase figcaption strong { display: block; color: #fff; font-size: 1.12rem; margin-bottom: .2rem; }
.showcase-laptop { margin: 3.25rem auto 0; display: grid; gap: 1rem; justify-items: center; }
.sc-browser { width: 100%; max-width: 980px; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 30px 60px -24px rgba(0,0,0,.75); }
.sc-browser-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: #e9edf1; }
.sc-browser-bar span { width: 11px; height: 11px; border-radius: 50%; background: #c6ced6; }
.sc-browser-bar em { margin: 0 auto; font-style: normal; font-size: .8rem; color: #5b6b78; background: #fff; border-radius: 6px; padding: 2px 40px; }
.sc-browser img { display: block; width: 100%; height: auto; }
.showcase-laptop figcaption { max-width: 40rem; }
/* Phones: a row you swipe through */
@media (max-width: 760px) {
    .showcase-phones { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 1.25rem; padding-bottom: .75rem; margin-inline: -1.25rem; padding-inline: 1.25rem; scrollbar-width: none; }
    .showcase-phones::-webkit-scrollbar { display: none; }
    .showcase-item { flex: 0 0 72%; scroll-snap-align: center; }
    .showcase-item:nth-child(2) { transform: none; }
    .sc-browser-bar em { padding-inline: 16px; }
}

/* Admin: sidebar beside the page */
.admin-shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 28px; align-items: start; }
.admin-side { position: sticky; top: calc(12px + env(safe-area-inset-top, 0px)); background: #0b3a5b; border-radius: 14px; padding: 16px 10px; color: rgba(255,255,255,.78); }
.admin-side-title { color: #fff; font-weight: 700; font-size: 1.15rem; padding: 0 10px 12px; display: grid; }
.admin-side-title span { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.admin-side nav { display: grid; gap: 2px; }
.admin-side a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: inherit; text-decoration: none; font-weight: 500; }
.admin-side a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-side a.on { background: rgba(255,255,255,.16); color: #fff; font-weight: 650; }
.admin-side svg { width: 18px; height: 18px; fill: currentColor; flex: none; opacity: .9; }
.admin-main { min-width: 0; }
@media (max-width: 900px) {
    .admin-shell { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .admin-side { position: static; padding: 8px; }
    .admin-side-title { display: none; }
    .admin-side nav { display: flex; overflow-x: auto; scrollbar-width: none; }
    .admin-side nav::-webkit-scrollbar { display: none; }
    .admin-side a { white-space: nowrap; padding: 7px 11px; }
}

/* Admin dashboard */
.dash-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.dash-tile { background: #fff; border: 1px solid #e3e8ee; border-radius: 14px; padding: 12px 14px 10px; display: grid; gap: 2px; color: inherit; text-decoration: none; }
.dash-tile:hover { border-color: #b9c7d4; color: inherit; }
.dash-tile small { color: #5b6b78; font-size: .8rem; }
.dash-tile b { font-size: 1.7rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.dash-tile b em { font-style: normal; font-size: .85rem; color: #7c8994; font-weight: 500; }
.dash-tile svg { width: 100%; height: 30px; margin-top: 4px; overflow: visible; }
.dash-tile polyline { fill: none; stroke: #2f9e62; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.dash-tile rect { fill: #4c8fd6; }
.dash-hint { font-size: .7rem; color: #9aa6b1; }
.dash-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-bottom: 16px; }
.dash-panel { background: #fff; border: 1px solid #e3e8ee; border-radius: 14px; padding: 14px; display: grid; gap: 2px; align-content: start; }
.dash-panel h2 { font-size: 1rem; font-weight: 700; margin: 0 0 6px; }
.dash-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 8px; color: inherit; text-decoration: none; }
.dash-row:hover { background: #f3f6f9; color: inherit; }
.dash-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dash-dot.red { background: #c2412f; } .dash-dot.amber { background: #e2a03f; } .dash-dot.green { background: #2f9e62; } .dash-dot.grey { background: #b6c0c9; }
.dash-chev { color: #9aa6b1; }
.dash-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .72rem; flex: none; background: #44637a; }
.dash-av.k-skipper { background: #0b3a5b; } .dash-av.k-spare { background: #b5651d; } .dash-av.k-crew { background: #2f7d6d; }
.dash-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.dash-more div { background: #f3f6f9; border-radius: 12px; padding: 10px 14px; display: grid; }
.dash-more b { font-size: 1.2rem; font-variant-numeric: tabular-nums; } .dash-more span { color: #5b6b78; font-size: .82rem; }
@media (max-width: 500px) { .dash-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-tile:last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* Club race day */
.rd-head { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin-bottom: 14px; }
.rd-pick { min-width: 260px; }
.rd-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.rd-kpis > div { background: #fff; border: 1px solid #e3e8ee; border-radius: 12px; padding: 10px 14px; display: grid; }
.rd-kpis small { color: #5b6b78; font-size: .78rem; } .rd-kpis b { font-size: 1.8rem; line-height: 1.15; font-variant-numeric: tabular-nums; } .rd-kpis span { color: #7c8994; font-size: .78rem; }
.rd-kpis .hl { background: #0b3a5b; border-color: #0b3a5b; color: #fff; } .rd-kpis .hl small, .rd-kpis .hl span { color: rgba(255,255,255,.75); }
.rd-kpis .warn b { color: #c2412f; }
.rd-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.rd-table { background: #fff; border: 1px solid #e3e8ee; border-radius: 12px; }
.rd-table th { font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; color: #5b6b78; }
.rd-mono { font-family: ui-monospace, Menlo, monospace; font-size: .85rem; color: #44515d; white-space: nowrap; }
.rd-crew summary { cursor: pointer; list-style: none; } .rd-crew summary::-webkit-details-marker { display: none; }
.rd-crew summary b::after { content: " ▾"; color: #9aa6b1; font-weight: 400; font-size: .8em; }
.rd-people { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; max-width: 520px; }
.rd-pp { border: 1px solid #dfe5eb; border-radius: 999px; padding: 2px 9px; font-size: .8rem; background: #fff; } .rd-pp em { font-style: normal; color: #7c8994; margin-left: 4px; }
.rd-pp.sk { border-color: #0b3a5b; } .rd-pp.guest { background: #dff3fb; border-color: #bfe6f5; }
.rd-st { font-size: .76rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.rd-st.ok { background: var(--crew-enough-soft); color: var(--crew-enough); } .rd-st.warn { background: var(--crew-short-soft); color: var(--crew-short); }
.rd-st.wait { background: var(--crew-nearly-soft); color: var(--crew-nearly); } .rd-st.off { background: var(--crew-off-soft); color: var(--crew-off); }
.rd-yes { color: var(--crew-enough); font-weight: 600; } .rd-out { color: var(--crew-short); font-weight: 700; }
.rd-off td { color: #9aa6b1; } .rd-off b { text-decoration: line-through; color: #7d8892; }
.pob-sheet { max-width: 900px; } .pob-sheet h1 { font-size: 1.4rem; margin-bottom: 2px; } .pob-sub { color: #555; font-size: .85rem; }
.pob-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.pob-table th { text-align: left; border-bottom: 2px solid #111; padding: 5px; } .pob-table td { border-bottom: 1px solid #ccc; padding: 6px 5px; vertical-align: top; }
.pob-n { font-weight: 700; text-align: center; } .pob-write { width: 110px; border-left: 1px solid #ccc; }
.pob-sheet.wide { max-width: 1200px; } .pob-long { font-weight: 600; color: #444; } .pob-table td.pob-write { height: 2.4em; }
.pob-total td { font-weight: 700; border-top: 2px solid #111; border-bottom: 0; }
@media print { .no-print, header, .site-footer, .site-banner, .ask-fab { display: none !important; } body { background: #fff; } main.container { max-width: none; padding: 0; } }


.rd-phone { font-size: .85rem; font-variant-numeric: tabular-nums; color: var(--bs-secondary-color, #6c757d); user-select: all; }

/* Race-day sign-on inside a race */
.signon.so-todo.card { border-color: #0b3a5b; box-shadow: 0 0 0 1px #0b3a5b inset; }
.signon.so-on.card { border-color: #1f7a47; box-shadow: 0 0 0 1px #1f7a47 inset; }
.so-tag { font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #0b3a5b; }
.so-on .so-tag { color: #1f7a47; }
.so-strip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.so-list { list-style: none; padding: 0; margin: 6px 0 8px; font-size: .88rem; display: grid; gap: 2px; }
.so-list .so-unnamed { color: #8a5a00; }

/* Boat races: Upcoming / History */
.race-tabs { display: flex; gap: 4px; margin: 4px 0 10px; }
.race-tabs a { flex: 1; text-align: center; font-weight: 600; font-size: .9rem; padding: 7px; border-radius: 8px; background: #e8eef3; color: #0b3a5b; text-decoration: none; }
.race-tabs a.on { background: #0b3a5b; color: #fff; }
.history-row { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid #e3e7ea; border-radius: 10px; padding: 8px 12px; }
.history-n { text-align: right; font-size: .78rem; color: #495057; white-space: nowrap; }
.history-n b { display: block; font-size: .98rem; color: #212529; font-variant-numeric: tabular-nums; }

/* Race day: live updates */
.rd-live { font-size: .8rem; color: #495057; display: flex; align-items: center; gap: 6px; margin: 6px 0 10px; }
.rd-dot { width: 8px; height: 8px; border-radius: 50%; background: #1f7a47; box-shadow: 0 0 0 0 rgba(31,122,71,.6); animation: rd-pulse 2s infinite; }
@keyframes rd-pulse { 70% { box-shadow: 0 0 0 7px rgba(31,122,71,0); } 100% { box-shadow: 0 0 0 0 rgba(31,122,71,0); } }
.rd-live.flash .rd-updated { background: #fff3cd; border-radius: 4px; padding: 0 4px; }
@media (prefers-reduced-motion: reduce) { .rd-dot { animation: none; } }
@media print { .rd-live { display: none; } }

/* Race-day sign-on: Note + quick ticks */
.so-note { margin-top: 8px; }
.so-note summary { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; cursor: pointer; }
.so-note summary::-webkit-details-marker { display: none; }
.so-note-btn { border: 1px dashed #9fb1c0; background: #fff; color: #0b3a5b; border-radius: 999px; font-weight: 600; font-size: .78rem; padding: 3px 10px; }
.so-note[open] .so-plus { display: inline-block; transform: rotate(45deg); }
.so-note[open] .so-tags { display: none; }
.so-tag-pill, .rd-tick { display: inline-block; background: #0b3a5b; color: #fff; border-radius: 999px; font-size: .72rem; font-weight: 600; padding: 2px 9px; margin: 0 4px 3px 0; }
.so-note-box { background: #fbfcfd; border: 1px solid #dfe5ea; border-radius: 9px; padding: 8px 10px; margin-top: 6px; }
.so-check { display: flex; gap: 8px; align-items: center; font-size: .88rem; padding: 3px 0; cursor: pointer; }
.so-check input { width: 18px; height: 18px; accent-color: #0b3a5b; }
.rd-notes { display: grid; text-decoration: none; color: inherit; border: 1px solid #e7c27a; border-radius: 12px; padding: 10px 14px; background: #fffaf0; }
.rd-notes.on { background: #fff3d6; box-shadow: 0 0 0 1px #b8860b inset; }
.rd-owner { font-size: .76rem; color: #6c757d; }
.race-skipper { margin: 6px 0 10px; max-width: 360px; }
.skipper-banner { background: #e8f1f8; color: #0b3a5b; border-radius: 8px; padding: 6px 10px; font-size: .88rem; font-weight: 600; margin-bottom: 6px; }
.rd-st.cancel { background: #fde8e4; color: #a1361c; }
.rd-markon summary { list-style: none; } .rd-markon summary::-webkit-details-marker { display: none; }
.rd-markon-box { text-align: left; background: #fff; border: 1px solid #dfe5ea; border-radius: 9px; padding: 8px 10px; margin-top: 6px; min-width: 220px; white-space: normal; }

/* ---- Landing page refresh (.lp): same layout, lighter modern finish, plus race day and sailors ---------------- */
.lp { font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.lp h1, .lp h2, .lp h3 { letter-spacing: -.02em; }
.lp .btn-lg { border-radius: 999px; padding: .7rem 1.5rem; }
.lp .hero h1 { font-weight: 800; font-size: clamp(2.2rem, 6.5vw, 3.9rem); }
.lp .step { border-radius: 20px; padding: 1.6rem 1.4rem 1.3rem; border-color: #e7ecf1; box-shadow: 0 1px 2px rgba(11,58,91,.04), 0 12px 30px -22px rgba(11,58,91,.35); transition: transform .2s ease, box-shadow .2s ease; }
.lp .step:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -22px rgba(11,58,91,.45); }
.lp .step-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: #e8f2f9; font-size: 1.6rem; }
.lp .step-num { border-radius: 10px; width: 1.9rem; height: 1.9rem; }
.lp .showcase { background: radial-gradient(ellipse at 50% 0%, #1d6a9c 0%, #0b3a5b 55%, #061e30 100%); }
.lp .sc-phone { border-radius: 42px; }
.lp .sc-phone img, .lp .sc-phone .lp-screen { border-radius: 34px; }
.lp .sc-browser { border-radius: 18px; }
.lp .landing-band { background: linear-gradient(180deg, #eaf3f9, #f6f7f9); }
.lp .feature-list li { align-items: center; border-bottom-color: #e3eaf0; }
.lp .feature-list li > span { width: 44px; height: 44px; flex: none; border-radius: 13px; background: #fff; display: grid; place-items: center; font-size: 1.3rem; box-shadow: 0 1px 2px rgba(11,58,91,.06), 0 6px 16px -10px rgba(11,58,91,.35); }
.lp-group { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #1d78a8; margin: 1.2rem 0 .2rem; }
.lp-group:first-of-type { margin-top: 0; }
.lp-final { background: #fff; border: 1px solid #e7ecf1; border-radius: 28px; margin-block: 3rem; box-shadow: 0 20px 50px -35px rgba(11,58,91,.45); }
.lp-final h2 { font-weight: 800; }
.lp-club-ask { margin: 1.75rem auto 0; max-width: 560px; background: #f5f8fb; border: 1px solid #e3e8ee; border-radius: 18px; padding: 1rem 1.25rem; display: flex; gap: 1rem; align-items: center; text-align: left; }
.lp-club-ask > span { font-size: 1.8rem; }
.lp-club-ask div { flex: 1; color: #51606e; font-size: .95rem; }
.lp-club-ask strong { display: block; color: #0b3a5b; }
@media (max-width: 720px) { .lp-final { margin-inline: 16px; border-radius: 22px; } }
@media (prefers-reduced-motion: reduce) { .lp .step { transition: none; } .lp .step:hover { transform: none; } }

/* sailors */
.lp-sail { max-width: 1080px; margin: 2.5rem auto 0; padding-inline: max(1.25rem, env(safe-area-inset-left, 0px)); }
.lp-sail-card { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 2.5rem; align-items: center; background: #fff; border: 1px solid #e7ecf1; border-radius: 28px; padding: 2.4rem; box-shadow: 0 20px 50px -35px rgba(11,58,91,.45); }
.lp-kicker { font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #1d78a8; }
.lp-sail h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; color: #0b3a5b; line-height: 1.08; margin-top: .4rem; }
.lp-sail p { color: #51606e; font-size: 1.08rem; margin: .8rem 0 1.2rem; max-width: 52ch; }
.lp-levels { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.4rem; }
.lp-levels span { border: 1.5px solid #d6e2ec; border-radius: 999px; padding: .45rem .9rem; font-weight: 700; font-size: .92rem; color: #0b3a5b; background: #f8fbfd; }
.lp-levels small { display: block; font-weight: 500; font-size: .74rem; color: #6b7b88; }
.lp-sail-cta { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem; }
.lp-btn-sail { background: #f2c230; color: #1b1300; border-radius: 999px; padding: .8rem 1.6rem; font-weight: 800; text-decoration: none; font-size: 1.05rem; }
.lp-btn-sail:hover { background: #e6b51f; color: #1b1300; }
.lp-sail-cta span { color: #6b7b88; font-size: .9rem; }
.lp-phone { justify-self: center; width: 100%; max-width: 300px; padding: 9px; border-radius: 40px; background: #10202e; box-shadow: 0 24px 50px -24px rgba(11,58,91,.55); }
.lp-sailor { background: #fff; border: 1px solid #dee2e6; border-radius: 11px; padding: 9px 11px; margin-bottom: 7px; display: flex; gap: 9px; align-items: center; }
.lp-sailor > div { flex: 1; min-width: 0; } .lp-sailor b { display: block; font-size: .88rem; }
.lp-av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; flex: none; font-size: .82rem; }
.lp-xp { display: inline-block; border-radius: 999px; font-size: .64rem; font-weight: 700; padding: 1px 7px; margin-right: 4px; }
.lp-xp.beginner { background: #e7f7ec; color: #1f7a47; } .lp-xp.some { background: #e8f2f9; color: #0b3a5b; } .lp-xp.pro { background: #fff4cc; color: #7a5800; }
.lp-invite { background: #0b3a5b; color: #fff; border-radius: 8px; font-size: .74rem; font-weight: 700; padding: 5px 10px; }
@media (max-width: 820px) { .lp-sail-card { grid-template-columns: 1fr; padding: 1.6rem; } }

/* app screens drawn in HTML (the app's own look) */
.lp-screen { background: #f4f6f8; border-radius: 32px; padding: 14px 11px 16px; font: 13.5px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #212529; text-align: left; }
.lp-screen.lp-tall { min-height: 520px; }
.lp-bar { background: #0b3a5b; color: #fff; margin: -14px -11px 12px; padding: 13px 14px; border-radius: 32px 32px 0 0; font-weight: 700; }
.lp-h { font-weight: 700; font-size: 1.05rem; margin: 0 3px 2px; }
.lp-m { font-size: .76rem; color: #6c757d; } .lp-gap { margin: 0 3px 10px; }
.lp-card { background: #fff; border: 1px solid #dee2e6; border-radius: 11px; padding: 10px 12px; margin: 8px 0; }
.lp-todo { border-color: #0b3a5b; box-shadow: 0 0 0 1px #0b3a5b inset; }
.lp-tag { font-size: .64rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #0b3a5b; }
.lp-t { font-weight: 600; }
.lp-list { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 1px; font-size: .84rem; }
.lp-un { color: #8a5a00; }
.lp-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.lp-ghost { border: 1px solid #b8c6d1; border-radius: 7px; font-size: .74rem; font-weight: 600; color: #0b3a5b; padding: 3px 8px; }
.lp-note { border: 1px dashed #9fb1c0; border-radius: 999px; font-size: .72rem; font-weight: 600; color: #0b3a5b; padding: 2px 9px; }
.lp-chip { display: inline-block; background: #0b3a5b; color: #fff; border-radius: 999px; font-size: .66rem; font-weight: 600; padding: 2px 8px; }
.lp-go { display: block; text-align: center; background: #0b3a5b; color: #fff; border-radius: 9px; padding: 9px; font-weight: 600; margin-top: 8px; }
.lp-office { padding: 14px; background: #f4f6f8; color: #212529; font: 13px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; text-align: left; }
.lp-office-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.lp-office-h b { font-size: 1.1rem; } .lp-office-h span { color: #6c757d; }
.lp-live { margin-left: auto; font-size: .74rem; color: #495057; display: inline-flex; align-items: center; gap: 6px; }
.lp-live i { width: 8px; height: 8px; border-radius: 50%; background: #1f7a47; display: inline-block; }
.lp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 10px; }
.lp-kpis > div { background: #fff; border: 1px solid #e3e8ee; border-radius: 10px; padding: 7px 11px; }
.lp-kpis small { display: block; color: #5b6b78; font-size: .7rem; } .lp-kpis strong { font-size: 1.45rem; font-variant-numeric: tabular-nums; }
.lp-kpis .hl { background: #0b3a5b; color: #fff; border-color: #0b3a5b; } .lp-kpis .hl small { color: #b9d0e2; }
.lp-kpis .nt { background: #fffaf0; border-color: #e7c27a; }
.lp-tbl { overflow-x: auto; background: #fff; border: 1px solid #e3e8ee; border-radius: 10px; }
.lp-tbl table { width: 100%; border-collapse: collapse; min-width: 560px; }
.lp-tbl th { text-align: left; font-size: .68rem; color: #6c757d; font-weight: 600; padding: 7px 9px; border-bottom: 1px solid #e3e8ee; }
.lp-tbl td { padding: 7px 9px; border-bottom: 1px solid #f1f3f5; vertical-align: top; }
.lp-tbl .sail { font-family: ui-monospace, Menlo, monospace; font-size: .76rem; }
.lp-tbl .n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.lp-tbl .mob { font-size: .7rem; color: #6c757d; }
.lp-st { border-radius: 999px; font-size: .68rem; font-weight: 700; padding: 2px 8px; white-space: nowrap; }
.lp-st.ok { background: #e3f3ea; color: #1f7a47; } .lp-st.wait { background: #fff3cd; color: #8a5a00; } .lp-st.x { background: #fde8e4; color: #a1361c; }
.lp .steps-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* What's new (in-app notifications) */
.whats-new { background: #fff; border: 1px solid #f0d9a8; border-left: 4px solid #f2c230; border-radius: 12px; padding: 10px 14px; }
.whats-new ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.whats-new li { font-size: .92rem; }
.whats-new li a { color: inherit; text-decoration: none; }
.whats-new li a:hover { text-decoration: underline; }
.push-card { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; background: #e8f2f9; border-radius: 12px; padding: 10px 14px; font-size: .92rem; }

/* Admin → Visits */
.vs-seg { display: inline-flex; border: 1px solid #dfe5ea; border-radius: 999px; overflow: hidden; background: #fff; }
.vs-seg a { padding: 5px 14px; font-weight: 600; font-size: .85rem; color: #14212c; text-decoration: none; }
.vs-seg a.on { background: #0b3a5b; color: #fff; }
.vs-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.vs-tile, .vs-panel { background: #fff; border: 1px solid #e1e7ed; border-radius: 14px; padding: 12px 14px; min-width: 0; }
.vs-tile small { color: #5d6d7b; font-weight: 600; font-size: .78rem; }
.vs-v { font-size: 1.8rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.15; }
.vs-d { font-size: .76rem; font-weight: 700; } .vs-d.up { color: #1f7a47; } .vs-d.down { color: #8a5a00; }
.vs-panel h2 { font-size: .95rem; font-weight: 700; margin-bottom: 8px; }
.vs-chart svg { display: block; width: 100%; height: 200px; }
.vs-grid { stroke: #e1e7ed; stroke-width: 1; } .vs-axis { font-size: 11px; fill: #8796a3; }
.vs-bar { fill: #2f7fb5; } .vs-bar:hover { fill: #0b3a5b; }
.vs-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.vs-w2 { grid-column: span 2; }
.vs-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.vs-bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; font-size: .86rem; }
.vs-bars .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-bars .num { font-weight: 700; font-variant-numeric: tabular-nums; }
.vs-bars .num span { color: #8796a3; font-weight: 600; margin-left: 6px; }
.vs-track { grid-column: 1 / -1; display: block; height: 6px; border-radius: 3px; background: #d6e7f3; overflow: hidden; }
.vs-track > * { display: block; height: 100%; background: #2f7fb5; border-radius: 3px; }
.vs-track.tall { height: 20px; border-radius: 6px; } .vs-track.tall > * { background: #14527e; border-radius: 6px; }
.vs-funnel { display: grid; gap: 8px; font-size: .86rem; }
@media (max-width: 1000px) { .vs-grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .vs-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .vs-grid3 { grid-template-columns: 1fr; } .vs-w2 { grid-column: span 1; } }

/* Wind and tide forecasts */
.wx-strip { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 4px; font-size: .8rem; font-weight: 600; color: #0b3a5b; background: #eef6fb; border-radius: 8px; padding: 4px 8px; width: fit-content; max-width: 100%; }
.wx-warn { color: #a1361c; }
.wx-detail { background: #fff; border: 1px solid #e3e8ee; border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.wx-chart { display: block; width: 100%; max-width: 420px; height: auto; }
.wx-grid { stroke: #e1e7ed; stroke-width: 1; } .wx-axis { font-size: 9px; fill: #6c757d; }
.wx-bar { fill: #1d78a8; } .wx-gust { fill: #a7cde6; } .wx-arrow { fill: #0b3a5b; }
.wx-tides { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: .86rem; margin-top: 6px; }
.wx-credit { font-size: .7rem; color: #8a96a0; margin-top: 6px; }

/* Admin mode */
.admin-mode-bar { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: center; background: #f2c230; color: #1b1300; font-size: .9rem; padding: 6px 12px;
  padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
@media print { .admin-mode-bar { display: none; } }

/* Enquire page: a short pitch beside the form. The extra questions follow the "I'm a…" choice. */
.enq-page { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 2.5rem; align-items: start; padding-block: 1.5rem 2.5rem; }
.enq-why h1 { font-size: 1.9rem; margin-bottom: .5rem; }
.enq-why p { color: #495057; }
.enq-why ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.enq-why li { display: flex; gap: .65rem; }
.enq-why li > span { flex: none; width: 30px; height: 30px; border-radius: 8px; background: #e7f1fb; display: grid; place-items: center; }
.enq-form { background: #fff; border: 1px solid #e3e8ee; border-radius: 14px; padding: 1.4rem 1.5rem 1.25rem; box-shadow: 0 10px 30px -22px rgba(6,30,48,.4); }
.enq-field { margin-bottom: .9rem; min-width: 0; }
.enq-field legend { font-size: 1rem; }
.enq-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .9rem; }
.enq-opt { font-weight: 400; color: #6c757d; }
.enq-kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.enq-kinds label { border: 1px solid #ced4da; border-radius: 10px; padding: .6rem .4rem; text-align: center; font-weight: 600; font-size: .9rem; cursor: pointer; background: #fff; }
.enq-kinds label span { display: block; font-size: 1.3rem; }
.enq-kinds .btn-check:checked + label { background: #e7f1fb; border-color: #0b5ed7; color: #0b3a5b; box-shadow: inset 0 0 0 1px #0b5ed7; }
.enq-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.enq-chips label { border: 1px solid #ced4da; border-radius: 999px; padding: .25rem .85rem; cursor: pointer; background: #fff; font-size: .92rem; }
.enq-chips .btn-check:checked + label { background: #0b5ed7; border-color: #0b5ed7; color: #fff; }
.btn-check:focus-visible + label { outline: 2px solid #0b5ed7; outline-offset: 2px; }
.enq-extra { display: none; background: #f7f9fb; border: 1px solid #e3e8ee; border-radius: 10px; padding: .75rem .9rem 0; margin-bottom: .9rem; }
.enq-form:has(#kind-Skipper:checked) .enq-extra[data-for="Skipper"],
.enq-form:has(#kind-Club:checked) .enq-extra[data-for="Club"],
.enq-form:has(#kind-Crew:checked) .enq-extra[data-for="Crew"] { display: grid; }
.enq-form:has(#kind-Crew:checked) .enq-crewnow { display: none; }
.enq-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.enq-send { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.enq-thanks { max-width: 560px; margin: 2.5rem auto; text-align: center; }
.enq-thanks h1 { font-size: 1.7rem; }
.enq-tick { width: 60px; height: 60px; border-radius: 50%; background: #d1e7dd; color: #146c43; font-size: 1.9rem; line-height: 60px; margin: 0 auto .75rem; }
@media (max-width: 820px) { .enq-page { grid-template-columns: 1fr; gap: 1.25rem; } .enq-kinds { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .enq-two { grid-template-columns: 1fr; } .enq-form { padding: 1.1rem 1rem 1rem; } }

/* Admin → Enquiries */
.enq-tiles { display: flex; flex-wrap: wrap; gap: .6rem; margin: .75rem 0; }
.enq-tiles > div { border: 1px solid #e3e8ee; border-radius: 10px; padding: .4rem 1rem; font-size: .85rem; color: #6c757d; background: #fff; }
.enq-tiles b { display: block; font-size: 1.3rem; color: #212529; font-variant-numeric: tabular-nums; }
.enq-filters { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem; }
.enq-filters a { border: 1px solid #ced4da; border-radius: 999px; padding: .2rem .9rem; font-size: .88rem; color: #212529; text-decoration: none; background: #fff; }
.enq-filters a.on { background: #1d78a8; border-color: #1d78a8; color: #fff; }
.enq-table { font-size: .9rem; min-width: 900px; }
.enq-table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: #6c757d; font-weight: 600; }
.enq-table small { display: block; color: #6c757d; }
.enq-msg { max-width: 260px; white-space: pre-line; }
.enq-contact { width: 200px; }
.enq-new { background: #0b5ed7; color: #fff; border-radius: 4px; font-size: .68rem; padding: 0 5px; margin-left: 5px; font-weight: 700; vertical-align: 1px; }
.enq-kind { display: inline-block; border-radius: 999px; padding: 1px 9px; font-size: .74rem; font-weight: 700; }
.enq-k-skipper { background: #dbeafe; color: #1e3a8a; } .enq-k-club { background: #fde68a; color: #713f12; } .enq-k-crew { background: #dcfce7; color: #14532d; } .enq-k-other { background: #e5e7eb; color: #374151; }

/* Race day flags: a tab on the right edge of the race day screen that opens a narrow column of small flags. */
.rf-drawer { position: fixed; right: 0; top: 140px; z-index: 1030; display: flex; flex-direction: row-reverse; align-items: flex-start; }
.rf-tab { list-style: none; writing-mode: vertical-rl; transform: rotate(180deg); background: #0b3a5b; color: #fff; font-weight: 700; font-size: .85rem;
  padding: .7rem .35rem; border-radius: 0 8px 8px 0; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.2); user-select: none; }
.rf-tab::-webkit-details-marker { display: none; }
.rf-tab[data-n]:not([data-n=""])::after { content: attr(data-n); display: inline-block; margin-top: .35rem; background: #d93b1a; color: #fff; border-radius: 999px; padding: .1rem .3rem; font-size: .7rem; transform: rotate(180deg); }
.rf-panel { background: #fff; border: 1px solid #d5dde5; border-right: 0; border-radius: 10px 0 0 10px; padding: .6rem .5rem .7rem; width: 124px;
  max-height: calc(100vh - 160px); overflow-y: auto; box-shadow: -6px 8px 20px rgba(6,30,48,.15); display: grid; gap: .3rem; align-content: start; }
.rf-gl { font-size: .62rem; letter-spacing: .05em; text-transform: uppercase; color: #6c757d; text-align: center; margin-top: .2rem; }
.rf-col { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; }
.rf-form { margin: 0; }
.rf-fb { position: relative; width: 100%; display: grid; justify-items: center; gap: 1px; background: #f7f9fb; border: 1px solid #d5dde5; border-radius: 7px; padding: .3rem .1rem;
  box-shadow: 0 1.5px 0 #c9d2db; cursor: pointer; }
.rf-fb svg { width: 32px; height: 21px; display: block; }
.rf-fb.two svg { width: 26px; height: 15px; }
.rf-fb[aria-pressed="true"] { background: #fff1b8; border-color: #e0a800; box-shadow: inset 0 2px 3px rgba(120,80,0,.3); transform: translateY(1.5px); }
.rf-fb[aria-pressed="true"]::after { content: ""; position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: #d93b1a; }
.rf-lower { width: 100%; margin-top: .3rem; border: 1px solid #ced4da; background: #fff; border-radius: 7px; padding: .25rem; font-size: .75rem; color: #495057; }
.rf-hint { font-size: .66rem; color: #6c757d; text-align: center; }
@media (max-width: 575.98px) { .rf-drawer { top: auto; bottom: 90px; } .rf-panel { max-height: 60vh; } }

/* Flags in a skipper's race-day row: just the flags; tap one for what it means. */
.sf-row { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .5rem; padding-top: .5rem; border-top: 1px dashed #d5dde5; }
.sf-row .sf-lbl { font-size: .75rem; color: #6c757d; font-weight: 600; }
.sf-btn { border: 0; background: none; padding: 2px; border-radius: 5px; display: grid; gap: 1px; cursor: pointer; }
.sf-btn svg { width: 30px; height: 20px; display: block; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.sf-btn.urgent { box-shadow: 0 0 0 2px #d93b1a; }
.sf-btn[aria-expanded="true"] { background: #fff1b8; }
.sf-m { width: 100%; background: #14212c; color: #fff; border-radius: 9px; padding: .5rem .65rem; font-size: .85rem; }
.sf-m b { display: block; }
.sf-m.urgent b { color: #ffb4a3; }
.sf-m small { display: block; color: #b8c6d2; margin-top: 2px; }
/* On a race card (boat's races list): the flags sit in a strip joined to the bottom of the card. */
.sf-row.sf-attached { margin: -0.6rem 0 .5rem; background: #fff; border: 1px solid rgba(0,0,0,.175); border-top: 1px dashed #d5dde5; border-radius: 0 0 .375rem .375rem; padding: .4rem .75rem .5rem; }

/* Position planner: a spot name beside who's on it (skipper's race page), and "You're on …" for crew. */
.spot-row { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 8px; align-items: center; margin-bottom: 6px; }
.spot-name { font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #51606e; }
.spot-empty { background-color: #fff8e6; border-color: #e3b552; }
.spot-list li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 8px; padding: 2px 0; }
.my-spot { background: #0b3a5b; color: #fff; border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: 1.1rem; font-weight: 700; }
.my-spot small { display: block; font-size: .8rem; font-weight: 500; opacity: .85; }

/* Race briefing: the skipper's plan at the top of a crew member's race page. */
.briefing { border: 2px solid #0b3a5b; border-radius: 14px; overflow: hidden; }
.briefing-head { background: #0b3a5b; color: #fff; font-weight: 700; padding: 8px 14px; }
.briefing .card-body { display: flex; flex-direction: column; gap: 10px; }
.briefing-board { background: #e3f4ea; color: #145c33; border-radius: 10px; padding: 8px 12px; font-size: 1.05rem; font-weight: 700; }
.briefing-spot { font-weight: 700; color: #0b3a5b; }
.briefing-text { white-space: pre-line; }
.race-board { font-size: .85rem; font-weight: 600; color: #145c33; }
.briefing-when { font-size: .85rem; color: #145c33; background: #e3f4ea; border-radius: 8px; padding: 6px 10px; }
.briefing-changed { background: #fff1d2; border-radius: 4px; padding: 0 3px; }
.briefing-tag { font-size: .75rem; font-weight: 700; background: #f2c230; color: #3d2e00; border-radius: 999px; padding: 2px 9px; }
.briefing-bring { font-size: .9rem; }
.briefing-bring b { display: block; font-size: .72rem; letter-spacing: .06em; color: #51606e; }

/* My races filter: All / I'm in / Not replied, and a chip per boat. Scrolls sideways on a narrow phone. */
.race-filter { display: flex; gap: 0.4rem; overflow-x: auto; scrollbar-width: none; margin: 0 0 0.25rem; padding-bottom: 0.25rem; }
.race-filter[hidden] { display: none; }
.race-filter .chip { flex: none; border: 1px solid #d5dde4; background: #fff; color: inherit; border-radius: 999px; padding: 0.3rem 0.75rem; font-size: 0.9rem; }
.race-filter .chip b { font-weight: 600; color: #51606e; margin-left: 0.15rem; }
.race-filter .chip.chip-todo b { color: #b23b3b; }
.race-filter .chip.on { background: #0b3a5b; border-color: #0b3a5b; color: #fff; }
.race-filter .chip.on b { color: #cfe3f2; }
.race-filter .chip-sep { flex: none; width: 1px; background: #d5dde4; margin: 0.25rem 0.1rem; }
.race-filter-empty { border: 1px dashed #d5dde4; border-radius: 0.75rem; padding: 1rem; text-align: center; color: #51606e; margin-top: 0.75rem; }

/* Boat tracking (behind Tracking:Enabled): the skipper's share switch and the race officer's boat map. */
.track { border: 2px solid #0b3a5b; border-radius: 14px; overflow: hidden; background: #fff; }
.track-head { background: #0b3a5b; color: #fff; font-weight: 700; padding: 8px 14px; display: flex; align-items: center; justify-content: space-between; }
.track-body { padding: 12px 14px; display: grid; gap: 12px; }
.track .form-switch .form-check-input { width: 3.2em; height: 1.7em; cursor: pointer; }
.track .form-switch .form-check-label { font-weight: 600; padding-left: .4rem; padding-top: .15rem; }
.track .big { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.track .big div { background: #f6f7f9; border-radius: 10px; padding: 8px 12px; }
.track .big small { display: block; font-size: .75rem; color: #5b6b78; }
.track .big b { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.track-status { font-weight: 600; border-radius: 10px; padding: 8px 12px; background: #eceff2; color: #44515d; }
.track-status.ok { background: #e3f4ea; color: #145c33; }
.track-status.warn { background: #fff1d2; color: #6b4600; }
.track-status.bad { background: #fde8e4; color: #a1361c; }
.track-keep, .who-sees { font-size: .85rem; color: #44515d; background: #f6f7f9; border-radius: 8px; padding: 8px 10px; }
.off-note { font-size: .92rem; color: #44515d; }
.map-card { background: #fff; border: 1px solid #e3e8ee; border-radius: 12px; overflow: hidden; }
.map-top { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 8px 12px; border-bottom: 1px solid #e3e8ee; font-size: .8rem; color: #44515d; }
.map-top .lg { display: flex; align-items: center; gap: 6px; }
.map-top .sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.boat-map { height: min(62vh, 560px); min-height: 320px; background: #e9ecef; }
.boat-pin { background: none; border: 0; }
.boat-pin svg { display: block; }
.boat-pin span { position: absolute; left: 24px; top: 3px; font: 700 12px/1 system-ui, sans-serif; white-space: nowrap; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; }
.pos { font-size: .85rem; white-space: nowrap; }
.pos small { display: block; color: #6c757d; font-size: .75rem; }
.pos.m { color: #145c33; } .pos.s { color: #8a5a00; } .pos.n { color: #6c757d; }
.track-soon { font-size: .9rem; color: #44515d; background: #f2f6f9; border: 1px dashed #b9c6d0; border-radius: 10px; padding: 8px 12px; }
.rd-pos { font-size: .74rem; color: #44515d; font-variant-numeric: tabular-nums; white-space: nowrap; margin-top: 2px; user-select: all; }
.rd-pos:empty { display: none; }
.rd-pos.stale { color: #8a5a00; }
.map-all { box-shadow: 0 1px 4px rgba(0,0,0,.3); font-weight: 600; }
.map-names[aria-pressed=false] { color: #5b6b78; text-decoration: line-through; }
.hide-names .boat-pin span, .hide-names .watch-lbl, .hide-tracks .boat-trail { display: none; }
.watch-pin { background: none; border: 0; }
.watch-pin svg { display: block; transition: transform .3s linear; }
.watch-start { min-height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid #c3ced5; background: #fff; font-weight: 600; font-size: .85rem; }
.watch-to-start { color: #5b6b78; font-weight: 600; font-variant-numeric: tabular-nums; }
.track-keep-race { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: .9rem; color: #44515d; background: #fff; border: 1px solid #e3e8ee; border-radius: 12px; padding: 10px 12px; margin-top: 12px; }
.pub-card { border: 2px solid #0b3a5b; border-radius: 14px; overflow: hidden; background: #fff; }
.pub-head { background: #0b3a5b; color: #fff; font-weight: 700; padding: 8px 14px; display: flex; justify-content: space-between; align-items: center; }
.pub-body { padding: 12px 14px; display: grid; gap: 14px; }
.pub-card .form-switch .form-check-input { width: 3.2em; height: 1.7em; cursor: pointer; }
.pub-card .form-switch .form-check-label { font-weight: 600; padding-left: .4rem; padding-top: .15rem; }

/* Public race viewer (behind Tracking:Enabled): /watch/{club}. */
.watch-live { display: inline-flex; align-items: center; gap: 6px; background: #fde8e4; color: #a1361c; font-weight: 700; font-size: .78rem; border-radius: 999px; padding: 3px 10px; letter-spacing: .04em; }
.watch-live i { width: 8px; height: 8px; border-radius: 50%; background: #c2412f; animation: watch-pulse 1.6s infinite; }
@keyframes watch-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .watch-live i { animation: none; } }
.watch-replay { display: inline-flex; align-items: center; gap: 6px; background: #e8eef3; color: #0b3a5b; font-weight: 700; font-size: .78rem; border-radius: 999px; padding: 3px 10px; }
.watch-body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 12px; }
@media (max-width: 900px) { .watch-body { grid-template-columns: 1fr; } }
.watch-map { height: min(64vh, 560px); min-height: 320px; background: #e9ecef; }
.watch-player { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border-top: 1px solid #e3e8ee; }
.watch-player input[type=range] { flex: 1 1 200px; accent-color: #0b3a5b; }
.watch-play { width: 44px; height: 44px; border-radius: 22px; border: 0; background: #0b3a5b; color: #fff; font-size: 1.05rem; }
.watch-clock { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 110px; }
.watch-speeds { display: flex; gap: 4px; }
.watch-speeds button { min-height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid #c3ced5; background: #fff; font-weight: 600; font-size: .85rem; }
.watch-speeds button.on { background: #0b3a5b; color: #fff; border-color: #0b3a5b; }
.watch-side { background: #fff; border: 1px solid #e3e8ee; border-radius: 12px; overflow: hidden; align-self: start; }
.watch-side h2 { font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; color: #5b6b78; margin: 0; padding: 10px 12px; border-bottom: 1px solid #e3e8ee; }
.watch-boat { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid #eef1f4; background: #fff; padding: 8px 12px; min-height: 52px; }
.watch-boat.sel { background: #eef4f9; box-shadow: inset 4px 0 0 var(--c, #0b3a5b); }
.watch-boat .dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.watch-boat .place { width: 1.4em; flex-shrink: 0; text-align: right; font-weight: 700; color: #5b6b78; font-variant-numeric: tabular-nums; }
.watch-boat b { display: block; font-size: .95rem; }
.watch-boat small { color: #5b6b78; font-size: .78rem; }
.watch-boat .kn { margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; font-size: .9rem; }
.watch-boat .kn small { display: block; font-weight: 400; }
.watch-delay { font-size: .8rem; color: #5b6b78; padding: 8px 12px; border-top: 1px solid #e3e8ee; background: #f9fafb; }
.watch-lbl { background: none; border: 0; box-shadow: none; font: 700 12px system-ui, sans-serif; padding: 0 0 0 4px; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; }
.watch-lbl::before { display: none; }
.watch-hist { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; background: #fff; border: 1px solid #e3e8ee; border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }

/* Full screen boat maps (boat map, public race viewer): the map with the boat list down the side. */
.full-btn { min-height: 36px; min-width: 40px; padding: 0 10px; border-radius: 8px; border: 1px solid #c3ced5; background: #fff; color: #0b3a5b; font-weight: 700; }
.boats-toggle { display: none; }
.panel-side { display: none; }
.panel-title { display: none; }
.map-full-open, .map-full-open body { overflow: hidden; }
.map-panel.is-full { position: fixed; inset: 0; z-index: 2000; margin: 0 !important; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0;
    background: #0b3a5b; height: 100vh; height: 100dvh; box-sizing: border-box;
    padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.map-panel.is-full > .map-card { border: 0; border-radius: 0; display: flex; flex-direction: column; min-height: 0; height: 100%; margin: 0 !important; }
.map-panel.is-full .panel-map { flex: 1 1 auto; height: auto !important; min-height: 0; }
.map-panel.is-full .panel-side, .map-panel.is-full .watch-side { display: block; border: 0; border-left: 1px solid #e3e8ee; border-radius: 0; height: 100%;
    overflow-y: auto; align-self: stretch; background: #fff; }
.map-panel.is-full .panel-title { display: block; padding: 12px; font-weight: 700; font-size: 1rem; color: #0e1a24; border-bottom: 1px solid #e3e8ee; }
.panel-side h2 { font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; color: #5b6b78; margin: 0; padding: 10px 12px; border-bottom: 1px solid #e3e8ee; }
.side-boat { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid #eef1f4; background: #fff; padding: 8px 12px; min-height: 52px; }
.side-boat:hover { background: #f6f9fb; }
.side-boat.sel { background: #eef4f9; box-shadow: inset 4px 0 0 #0b3a5b; }
#map-rows tr.sel > td { background: #eef4f9; }
/* The boat picked in the list (or tapped on the map) gets a pulsing ring in its own colour. */
.watch-pin.sel::before, .boat-pin.sel::before { content: ''; position: absolute; left: -10px; top: -10px; width: 44px; height: 44px; border: 3px solid currentColor;
    border-radius: 50%; pointer-events: none; animation: pin-ring 1.6s ease-out infinite; }
@keyframes pin-ring { 0% { transform: scale(.75); opacity: 1; } 100% { transform: scale(1.25); opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .watch-pin.sel::before, .boat-pin.sel::before { animation: none; } }
.side-boat b { display: block; font-size: .95rem; }
.side-boat small { display: block; color: #5b6b78; font-size: .76rem; font-variant-numeric: tabular-nums; }
.side-boat .dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; background: #c3ced5; }
.side-boat .dot.m { background: #0b3a5b; } .side-boat .dot.s { background: #a06a00; }
.side-boat .kn { margin-left: auto; text-align: right; font-weight: 700; font-size: .9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 900px) {
    .map-panel.is-full { grid-template-columns: 1fr; }
    .map-panel.is-full .panel-side, .map-panel.is-full .watch-side { position: absolute; top: env(safe-area-inset-top, 0px); right: 0; bottom: 0; width: min(320px, 86vw); z-index: 1100;
        transform: translateX(100%); transition: transform .2s; box-shadow: -4px 0 16px rgba(0, 0, 0, .2); }
    .map-panel.is-full.show-boats .panel-side, .map-panel.is-full.show-boats .watch-side { transform: none; }
    .map-panel.is-full .boats-toggle { display: inline-flex; align-items: center; }
}
@media (prefers-reduced-motion: reduce) { .map-panel.is-full .panel-side, .map-panel.is-full .watch-side { transition: none; } }
.race-finished { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; background: #eef4f9; border: 1px solid #c9d8e4; border-radius: 10px; padding: 8px 12px; font-size: .9rem; }
.race-finished-note { font-size: .85rem; font-weight: 600; color: #0b3a5b; }

/* Course editor (boat map) and course marks on the maps. */
.course-card { border: 2px solid #0b3a5b; border-radius: 14px; overflow: hidden; background: #fff; }
.course-body { padding: 12px 14px; display: grid; gap: 12px; }
.course-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.c-row { display: grid; grid-template-columns: 18px 22px minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; align-items: center;
    background: #f6f7f9; border: 1px solid #e3e8ee; border-radius: 10px; padding: 6px 8px; }
.c-row.dragging { opacity: .5; } .c-row.drop { border-color: #0b3a5b; }
.c-handle { cursor: grab; color: #8796a2; user-select: none; }
.c-num { font-weight: 700; color: #0b3a5b; text-align: center; }
.c-row input { font-variant-numeric: tabular-nums; }
.c-buttons { display: flex; gap: 2px; }
.c-buttons .btn { min-height: 32px; min-width: 32px; padding: 0 6px; }
@media (max-width: 640px) {
    .c-row { grid-template-columns: 18px 22px minmax(0, 1fr) auto; }
    .c-row .c-lat, .c-row .c-lon { grid-column: 3 / 5; }
}
.course-save { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; border-top: 1px solid #e3e8ee; padding-top: 12px; }
#c-tap.active { background: #0b3a5b; color: #fff; }
.mark-lbl { font: 700 11px system-ui, sans-serif; color: #0e1a24; background: #f2c230; border: 0; border-radius: 4px; padding: 1px 5px; box-shadow: none; }
.mark-lbl::before { display: none; }

/* ★ favourite clubs */
.club-row { position: relative; }
.club-row .card-body { padding-right: 60px; }
.club-fav { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); margin: 0; }
.fav-btn { width: 44px; height: 44px; border: 0; background: transparent; color: #8a96a1; font-size: 1.5rem; line-height: 1; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; cursor: pointer; }
.fav-btn:hover, .fav-btn:focus-visible { background: #eef3f7; color: #5b6b78; }
.fav-btn.on { color: #c98a00; }

/* 🛡 Admin mode: delete for good */
.admin-danger { border: 1px solid #e8b4ab; background: #fdf3f1; border-radius: 10px; padding: 12px 14px; }

/* ---- Club lists: My clubs and the race day club picker share one quiet list ---------------------------------------- */
.list-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.list-head h1 { margin: 0; flex: 1; }
.club-cards { max-width: 640px; }
.club-search { margin-bottom: 14px; border-radius: 10px; }
.club-group-title { font-size: .85rem; font-weight: 400; color: #66737f; margin: 16px 4px 6px; }
.club-group:first-of-type .club-group-title { margin-top: 0; }
.club-list { background: #fff; border: 1px solid #e6ebef; border-radius: 12px; overflow: hidden; }
.club-card { position: relative; border-top: 1px solid #e6ebef; }
.club-card:first-child { border-top: 0; }
.club-card[hidden] { display: none; }
.club-card-link { display: block; padding: 12px 56px 12px 14px; color: inherit; text-decoration: none; }
.club-card-link:hover { background: #fafbfc; color: inherit; }
.club-name { display: block; font-weight: 600; }
.club-name small { font-weight: 400; color: #66737f; font-size: .85em; }
.club-line { display: block; font-size: .85rem; color: #66737f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.club-line .in { color: #1d7f47; }
.club-line .today { color: #c2410c; font-weight: 600; }
.club-line .today::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #c2410c; margin-right: 5px; vertical-align: 1px; }
.club-card .club-fav { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); margin: 0; }
.club-none { color: #66737f; text-align: center; padding: 18px; }

/* Home page: How it works for skippers and crew, and for clubs; the race viewer and share screen in the showcase */
.sc-watch { margin: 3.25rem auto 0; max-width: 1100px; display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
@media (max-width: 860px) { .sc-watch { grid-template-columns: 1fr; } }
.sc-watch figure { margin: 0; display: grid; gap: 1rem; justify-items: center; min-width: 0; }
.sc-watch figcaption { text-align: center; color: rgba(255,255,255,.8); font-size: .97rem; max-width: 34rem; }
.sc-watch figcaption strong { display: block; color: #fff; font-size: 1.12rem; margin-bottom: .2rem; }
.wv { display: grid; grid-template-columns: minmax(0, 1fr) 220px; background: #fff; color: #1f2a33; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 12.5px; text-align: left; }
@media (max-width: 560px) { .wv { grid-template-columns: 1fr; } }
.wv-top { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 9px 12px; border-bottom: 1px solid #e6ebef; }
.wv-top b { font-size: 14px; }
.wv-top .sub { color: #66737f; }
.wv-live { display: inline-flex; align-items: center; gap: 5px; background: #fde8e8; color: #b42318; font-weight: 700; font-size: 11px; padding: 2px 8px; border-radius: 999px; }
.wv-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #d92d20; }
.wv-top .delay { margin-left: auto; color: #66737f; font-size: 11.5px; }
.wv-map { position: relative; min-height: 300px; background: #dfe3e6; overflow: hidden; }
.wv-map svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wv-ctl { position: absolute; display: flex; flex-direction: column; gap: 6px; }
.wv-ctl.tl { left: 10px; top: 10px; }
.wv-ctl.tr { right: 10px; top: 10px; align-items: flex-end; }
.wv-btn { background: #fff; border: 1px solid #c9d1d8; border-radius: 6px; padding: 4px 9px; font-size: 11.5px; font-weight: 600; color: #1f2a33; box-shadow: 0 1px 3px rgba(0,0,0,.12); white-space: nowrap; }
.wv-btn.on { background: #0b3a5b; color: #fff; border-color: #0b3a5b; }
.wv-btn.off { color: #8996a1; text-decoration: line-through; }
.wv-zoom { display: grid; background: #fff; border: 1px solid #c9d1d8; border-radius: 6px; width: 28px; font-weight: 700; text-align: center; line-height: 26px; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.wv-zoom span + span { border-top: 1px solid #e0e5ea; }
.wv-layers { background: #fff; border: 1px solid #c9d1d8; border-radius: 8px; padding: 6px 9px; display: grid; gap: 2px; font-size: 11.5px; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.wv-layers .r { display: flex; align-items: center; gap: 6px; }
.wv-layers .r::before { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #8996a1; }
.wv-layers .r.sel::before { border-color: #0b5ed7; background: radial-gradient(#0b5ed7 45%, transparent 50%); }
.wv-layers .c::before { border-radius: 2px; }
.wv-layers hr { margin: 3px 0; border: 0; border-top: 1px solid #e6ebef; }
.wv-bottom { position: absolute; left: 10px; right: 10px; bottom: 10px; background: rgba(255,255,255,.95); border-radius: 8px; padding: 7px 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.wv-clock { font-variant-numeric: tabular-nums; font-weight: 700; color: #0b3a5b; }
.wv-slider { flex: 1 1 120px; height: 5px; border-radius: 3px; background: linear-gradient(90deg, #0b5ed7 78%, #d5dce2 78%); position: relative; min-width: 80px; }
.wv-slider::after { content: ""; position: absolute; left: 78%; top: 50%; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%; background: #fff; border: 2px solid #0b5ed7; }
.wv-side { border-left: 1px solid #e6ebef; padding: 8px 0; min-width: 0; }
@media (max-width: 560px) { .wv-side { border-left: 0; border-top: 1px solid #e6ebef; } }
.wv-side h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #66737f; margin: 2px 12px 6px; font-weight: 700; }
.wv-row { display: grid; grid-template-columns: 18px 4px minmax(0, 1fr) auto; gap: 0 8px; align-items: center; padding: 5px 12px; }
.wv-row .pl { color: #66737f; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.wv-row .bar { align-self: stretch; border-radius: 2px; }
.wv-row .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wv-row .nm small { display: block; font-weight: 400; color: #66737f; }
.wv-row .kn { color: #66737f; font-variant-numeric: tabular-nums; font-size: 11.5px; }
.wv-row.ld { background: #eef5fb; }
.wv-row.ld .nm small { color: #0b5ed7; }
.wv-row.fin .kn { color: #1d7f47; font-weight: 600; }
.sc-share .lp-screen { text-align: left; }
.lp-share { border: 1px solid #e7ecf1; border-radius: 14px; padding: 11px 12px; margin-top: 8px; background: #fff; }
.lp-share .t { font-weight: 700; }
.lp-switch { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-weight: 700; }
.lp-switch i { width: 40px; height: 23px; border-radius: 999px; background: #1d7f47; position: relative; flex: none; }
.lp-switch i::after { content: ""; position: absolute; right: 3px; top: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; }
.lp-sending { display: flex; align-items: center; gap: 7px; margin-top: 8px; font-size: 12px; color: #1d7f47; font-weight: 600; }
.lp-sending::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #1d7f47; box-shadow: 0 0 0 4px rgba(29,127,71,.18); }
.lp-mini-map { margin-top: 10px; height: 92px; border-radius: 10px; background: #dfe3e6; position: relative; overflow: hidden; }
.lp-mini-map svg { width: 100%; height: 100%; display: block; }
.lp .steps-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
@media (min-width: 900px) { .lp .steps-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.hw-who { text-align: center; font-weight: 800; color: #0b3a5b; font-size: 1.05rem; margin: 1.6rem 0 1rem; }
.section-title + .hw-who { margin-top: .2rem; }

/* Public race viewer: estimated gap to the leader in the boat list */
.watch-side h2 .watch-gap-h { float: right; text-transform: none; letter-spacing: 0; font-weight: 400; }
.watch-boat .kn.gap-off { color: #8996a1; font-weight: 600; }
.watch-boat .kn.gap-fin { color: #1d7f47; }

/* Public race viewer: modelled wind badge and wind lines */
.wind-badge { display: flex; align-items: center; gap: 9px; background: rgba(255,255,255,.96); border-radius: 10px; padding: 6px 11px 6px 6px;
    box-shadow: 0 1px 5px rgba(0,0,0,.25); font-size: .8rem; line-height: 1.3; }
.wind-badge[hidden] { display: none; }
.wind-badge svg { width: 48px; height: 48px; flex: none; display: block; }
.wind-badge circle { fill: #fff; stroke: #c9d1d8; stroke-width: 1.5; }
.wind-badge text { font: 700 10px system-ui, sans-serif; fill: #5b6b78; text-anchor: middle; }
.wind-badge .wind-arrow path { fill: none; stroke: #0b3a5b; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.wind-badge .wind-arrow .head { fill: #0b3a5b; stroke: none; }
.wind-badge .wind-arrow .tail { stroke-width: 2.5; }
.wind-badge b { display: block; font-size: .95rem; color: #0b3a5b; font-variant-numeric: tabular-nums; }
.wind-badge small { display: block; color: #5b6b78; }
.wind-badge .w-fleet { color: #1f2a33; }
.wind-badge .w-fleet[hidden] { display: none; }
.wind-lines { position: absolute; left: 0; top: 0; }
.wind-lines line { stroke: #fff; stroke-width: 2.2; stroke-linecap: round; opacity: .75; }
.hide-wind .wind-lines { display: none; }
