/*
 * SoccerFours site styles. Plain CSS, no build step: edit and reload.
 * Brand gold #B79B6B comes from the original site.
 */
:root {
    --gold: #b79b6b;
    --gold-dark: #8a7148;
    --ink: #1f2328;
    --muted: #5f6670;
    --line: #dfe2e6;
    --bg: #f6f5f2;
    --card: #ffffff;
    --ok-bg: #e8f4ea;
    --ok-ink: #1d5b2c;
    --err-bg: #fbeaea;
    --err-ink: #8a1f1f;
    --warn-bg: #fff6e0;
    --warn-ink: #7a5a00;
    --radius: 10px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.5; font-size: 16px; }
a { color: var(--gold-dark); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; margin-top: 1.5em; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
small, .muted { color: var(--muted); }

/* Header */
.site-header { background: var(--ink); color: #fff; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .75rem; padding-bottom: .75rem; flex-wrap: wrap; }
.site-header img { height: 24px; width: auto; display: block; }
.site-header nav { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.site-header nav a, .site-header nav button { color: #fff; text-decoration: none; font-size: .95rem; background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }
.site-header nav a:hover, .site-header nav button:hover { color: var(--gold); }
.site-header .tag { background: var(--gold); color: var(--ink); font-size: .75rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; }

.wrap { max-width: 960px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
main.wrap { padding-top: 1.5rem; padding-bottom: 3rem; }
.narrow { max-width: 440px; }

/* Cards and tables */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.stat { font-size: 2rem; font-weight: 700; line-height: 1; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.table-scroll { overflow-x: auto; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }

/* Forms */
label { display: block; font-weight: 600; margin-bottom: .25rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=search], textarea, select {
    width: 100%; padding: .6rem .7rem; border: 1px solid #c8ccd1; border-radius: 8px; font: inherit; background: #fff;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.field { margin-bottom: 1rem; }
.field .hint { font-size: .85rem; color: var(--muted); margin-top: .25rem; }
.field .error { font-size: .9rem; color: var(--err-ink); margin-top: .25rem; }
.check { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400; }
.check input { margin-top: .3rem; }
.btn { display: inline-block; background: var(--gold); color: var(--ink); border: 0; border-radius: 8px; padding: .65rem 1.1rem; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--gold-dark); color: #fff; }
.btn-secondary { background: #e9ebee; }
.btn-danger { background: #b3261e; color: #fff; }
.btn-danger:hover { background: #8a1f1f; }
.inline-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: end; }
.inline-form .field { margin: 0; flex: 1 1 200px; }

/* Messages */
.flash { border-radius: 8px; padding: .75rem 1rem; margin-bottom: 1rem; }
.flash-ok { background: var(--ok-bg); color: var(--ok-ink); }
.flash-err { background: var(--err-bg); color: var(--err-ink); }
.flash-warn { background: var(--warn-bg); color: var(--warn-ink); }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; background: #eceef1; color: var(--muted); white-space: nowrap; }
.badge-gold { background: #f3ecdf; color: var(--gold-dark); }
.badge-ok { background: var(--ok-bg); color: var(--ok-ink); }
.badge-err { background: var(--err-bg); color: var(--err-ink); }
.badge-warn { background: var(--warn-bg); color: var(--warn-ink); }

/* Roster (used on phones at the field) */
.roster-head { position: sticky; top: 0; z-index: 2; background: var(--ink); color: #fff; padding: .9rem 16px; }
.roster-head .count { font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--gold); }
.roster-head .asof { font-size: .9rem; color: #c9ccd1; margin-top: .35rem; }
.roster-head .asof time { color: #fff; font-weight: 600; }
.roster-head .reload { margin-top: .5rem; }
.roster-slot h3 { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.roster-list { list-style: none; margin: 0; padding: 0; }
.roster-list li { display: flex; justify-content: space-between; gap: .5rem; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
.roster-list li:last-child { border-bottom: 0; }
.roster-list .signed-up { display: block; font-size: .8rem; color: var(--muted); }
.roster-order { font-size: .85rem; margin: -.25rem 0 .25rem; }

.site-footer { color: var(--muted); font-size: .85rem; text-align: center; padding: 2rem 16px; }
.qr svg { width: 200px; height: 200px; background: #fff; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.codes { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; columns: 2; }

/* Public pages */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lead { font-size: 1.1rem; }
.intro { margin-bottom: 1rem; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.5em; }
.section-head h2 { margin: 0; }
.filter select { width: auto; min-width: 14rem; }
.date-head { margin: 1.25rem 0 .5rem; color: var(--muted); font-size: .9rem; text-transform: uppercase; letter-spacing: .04em; }
a.card { display: block; color: inherit; text-decoration: none; }
a.card:hover { border-color: var(--gold); }
.session-row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .5rem; padding: .9rem 1.1rem; }
.spots { display: flex; gap: .35rem; flex-wrap: wrap; }
fieldset { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
legend { font-weight: 700; margin-bottom: .5rem; padding: 0; }
.slot-choice { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.slot-choice:last-of-type { border-bottom: 0; }
.choices .check, fieldset .check { margin-bottom: .5rem; }
.policy { background: #f3ecdf; border-radius: 8px; padding: .75rem 1rem; margin: 0 0 1rem; font-size: .92rem; }
.or { text-align: center; margin: .25rem 0 .75rem; }
.link-button { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: .9rem; }
#dropin-container { margin-bottom: 1rem; min-height: 60px; }
.prose p:last-child { margin-bottom: 0; }
.ticks { margin: 0; padding-left: 1.2rem; }
.ticks li { margin: .2rem 0; }

/* Account */
.tabs { display: flex; gap: .25rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.tabs a { padding: .5rem .8rem; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--gold); font-weight: 600; }
.stats .card { padding: 1rem; }
.booking { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.flash .btn { margin-left: .5rem; padding: .35rem .8rem; }

/* Pagination */
.pagination { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin: 1rem 0 0; }
.pagination a, .pagination .disabled { padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.pagination .disabled { color: var(--muted); }

.site-footer nav { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: .5rem; }
.site-footer nav a { color: var(--muted); }

/* Admin forms */
.narrow-wide { max-width: 720px; }
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-row .field { flex: 1 1 160px; }
.sub-form { background: var(--bg); border-radius: 8px; padding: 1rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.row-action summary { cursor: pointer; color: var(--gold-dark); white-space: nowrap; }
.row-action form { margin-top: .5rem; display: grid; gap: .35rem; min-width: 12rem; }
.danger-zone { border-color: #e7b8b5; }
th .sort-link { color: inherit; text-decoration: none; }
th .sort-link:hover, th .sort-link[data-active] { color: var(--ink); }

/* Admin pages use more of the screen so the menu fits on one line. */
.admin .wrap { max-width: 1240px; }
.admin .site-header nav { gap: .8rem; }
.admin .site-header nav a, .admin .site-header nav button { font-size: .9rem; }
.site-header nav form { margin: 0; display: flex; }
.site-header nav button { line-height: inherit; }

/* Public look: pill menu bar, location picker, session listing (matches the original site) */
:root { --pill: #373737; --rule: #d9d9d9; --display: "Montserrat", "Avenir Next", "Century Gothic", "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.public-header { background: #f6f6f6; }
.public-header .utility { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem 0 .2rem; }
.public-header .utility img { height: 66px; width: auto; display: block; }
.public-header .utility nav { display: flex; gap: 1rem; align-items: center; font-size: .85rem; }
.public-header .utility a, .public-header .utility button { color: var(--muted); text-decoration: none; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.public-header .utility a:hover, .public-header .utility button:hover { color: var(--gold-dark); }
.public-header .utility form { margin: 0; }
.pillbar { display: flex; background: var(--pill); border-radius: 999px; padding: 0; margin: .4rem 0 .9rem; overflow: hidden; }
.pillbar a { flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: .4rem; padding: .85rem .5rem; color: #fff; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: .72rem; letter-spacing: .02em; text-transform: uppercase; border-radius: 999px; }
.pillbar a:hover { color: var(--gold); }
.pillbar a[aria-current="page"] { background: #fff; color: var(--pill); margin: 0; box-shadow: 0 0 0 1px var(--pill); }
.pillbar .ball { width: 14px; height: 14px; color: var(--gold-dark); flex: none; }

.home .tab-panel[hidden] { display: none; }
.home .center { text-align: center; }
.loc-filter { display: flex; justify-content: center; margin: .5rem 0 1.5rem; }
.loc-select { position: relative; display: inline-flex; border: 1px solid var(--gold); border-radius: 999px; overflow: hidden; background: #fff; }
.loc-select select { appearance: none; -webkit-appearance: none; border: 0; border-radius: 0; background: transparent; width: auto; min-width: 15rem; padding: .75rem 4rem .75rem 1.9rem; font-family: var(--display); font-weight: 700; font-size: .8rem; letter-spacing: .02em; text-transform: uppercase; color: #8c8c8c; cursor: pointer; }
.loc-select select:focus { outline: 0; }
.loc-select:focus-within { box-shadow: 0 0 0 2px var(--gold); }
.loc-select .chev { position: absolute; right: 0; top: 0; bottom: 0; width: 3.5rem; background: var(--gold); display: flex; align-items: center; justify-content: center; pointer-events: none; }
.loc-select .chev svg { width: 20px; height: 12px; }

.listing { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 1rem; align-items: start; padding: 2rem 0; border-bottom: 1px solid var(--rule); font-family: var(--display); text-transform: uppercase; }
.listing:last-child { border-bottom: 0; }
.listing .when { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding-top: 2.6rem; }
.listing .dot { width: 60px; height: 60px; border-radius: 50%; background: var(--pill); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; font-weight: 800; }
.listing .monthyear { font-size: .72rem; font-weight: 700; color: var(--pill); }
.listing .what { font-size: .74rem; font-weight: 600; color: #4a4a4a; letter-spacing: .01em; }
.listing .pin { width: 25px; height: 38px; color: var(--gold); display: block; margin-bottom: .6rem; }
.listing .place { font-weight: 700; margin-bottom: .75rem; }
.listing .kind { color: var(--gold); font-weight: 800; font-size: .86rem; margin-bottom: .4rem; }
.listing .time { font-weight: 700; color: #222; margin-bottom: .6rem; }
.listing .price { font-weight: 500; }
.listing .price strong { font-weight: 800; }
.listing .muted { text-transform: none; font-size: .75rem; }
.listing .badge { text-transform: none; }
.listing .go { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding-top: 1rem; }
.join-btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-width: 14rem; padding: .85rem 1.5rem; border: 2px solid var(--gold); border-radius: 999px; color: var(--gold-dark); background: #fff; text-decoration: none; text-transform: uppercase; font-family: var(--display); font-weight: 800; font-size: 1rem; }
.join-btn:hover { background: var(--gold); color: #fff; }
.join-btn .arrow { width: 22px; height: 12px; flex: none; }
.listing .caption { font-size: .62rem; font-weight: 700; font-style: italic; color: #333; }
.listing .caption.full { color: var(--err-ink); }
.empty { text-align: center; color: var(--muted); padding: 2rem 0; }
.home .intro { text-align: center; max-width: 640px; margin: 1.5rem auto; }
.prepaid-panel { max-width: 560px; margin: 2rem auto; }

@media (max-width: 640px) {
    .pillbar a { font-size: .6rem; padding: .75rem .25rem; gap: .2rem; }
    .pillbar .ball { display: none; }
    .listing { grid-template-columns: 5.5rem 1fr; padding: 1.25rem 0; }
    .listing .when { padding-top: .25rem; }
    .listing .dot { width: 48px; height: 48px; font-size: 1.1rem; }
    .listing .go { grid-column: 1 / -1; padding-top: .25rem; }
    .join-btn { min-width: 0; width: 100%; max-width: 20rem; }
    .loc-select select { min-width: 12rem; }
}
body:has(.public-header) { background: #fff; }
.join-btn { color: var(--gold); }

/* Home tab */
.pillbar .ball { display: none; }
.pillbar a[aria-current="page"] .ball { display: block; }
.welcome h1 { text-align: center; text-transform: uppercase; font-family: var(--display); font-weight: 800; font-size: 1.5rem; margin: 2rem 0 1.5rem; }
.welcome-text { max-width: 820px; margin: 0 auto 1rem; font-size: 1.05rem; }
.welcome-text p { margin-bottom: 1rem; }
.glance { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; max-width: 960px; margin: 2rem auto; }
.glance h2 { text-align: center; text-transform: uppercase; font-family: var(--display); font-weight: 800; font-size: 1.25rem; margin: 0 0 1rem; }
.glance ul { margin: 0; padding-left: 1.2rem; font-size: 1.05rem; }
.glance li { margin: .2rem 0; }
.video-label { text-align: center; font-weight: 700; margin: 0 0 .5rem; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 6px; overflow: hidden; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 720px) { .glance { grid-template-columns: 1fr; gap: 1.5rem; } }

/* Petition */
.petition-count { font-size: 1.15rem; text-align: center; margin: 1rem 0 1.5rem; }
.petition-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.5rem; align-items: start; }
.petition aside { position: sticky; top: 1rem; }
.letter { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; font-size: .98rem; }
.letter .letterhead { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.letter .letterhead img { height: 56px; width: auto; }
.letter address { font-style: normal; text-align: right; font-size: .85rem; color: var(--muted); }
.signers { margin: 0; color: var(--muted); }
.callout { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; border: 2px solid var(--gold); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 0 auto 2rem; max-width: 820px; background: #fbf8f2; }
.callout p { margin: 0; }
.callout .join-btn { min-width: 0; padding: .6rem 1.2rem; font-size: .9rem; }
@media (max-width: 800px) { .petition-layout { grid-template-columns: 1fr; } .petition aside { position: static; } }
@media (max-width: 640px) { .public-header .utility img { height: 46px; } }
