/* Matches ottawavolley.com (Weebly "Unite" theme): white header, Josefin Sans uppercase nav,
   Helvetica body, #f2f2f2 page background — with the club logo's navy and blue as accents. */
:root {
  --navy: #0b1f4f;
  --blue: #3595d6;
  --blue-soft: #e8f3fb;
  --red: #d2232a;
  --green: #1e8e4e;
  --amber: #b7791f;
  --ink: #111;
  --muted: #6b7280;
  --line: #e1e4e6;
  --bg: #f2f2f2;
  --card: #fff;
  --radius: 6px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); }
h1, h2, h3, .nav a, .btn, th, .eyebrow {
  font-family: "Josefin Sans", sans-serif;
}
h1, h2, h3 { color: var(--navy); line-height: 1.2; }
h1 { font-size: 1.9rem; text-transform: uppercase; letter-spacing: .06em; margin: .2em 0 .6em; }
h2 { font-size: 1.3rem; text-transform: uppercase; letter-spacing: .05em; margin: 1.6em 0 .6em; }
h3 { font-size: 1.1rem; margin: 1.2em 0 .4em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; }
.logo img { height: 56px; display: block; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a {
  color: #000; text-decoration: none; text-transform: uppercase; letter-spacing: .05em;
  font-size: 14px; font-weight: 600; padding: 10px 14px; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--blue); }
.nav a.active { border-bottom-color: var(--blue); }
.nav-toggle, .hamburger { display: none; }
@media (max-width: 760px) {
  .logo img { height: 44px; }
  .hamburger { display: block; width: 40px; height: 40px; position: relative; cursor: pointer; }
  .hamburger span, .hamburger span::before, .hamburger span::after {
    content: ''; position: absolute; left: 8px; right: 8px; height: 2px; background: #000;
  }
  .hamburger span { top: 19px; }
  .hamburger span::before { top: -7px; left: 0; right: 0; }
  .hamburger span::after { top: 7px; left: 0; right: 0; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; border-bottom: 1px solid var(--line); padding: 6px 12px 12px; }
  .nav-toggle:checked ~ .nav { display: flex; }
}

.wrap { max-width: 1000px; margin: 0 auto; padding: 24px 16px 48px; background: transparent; }
.site-footer { text-align: center; padding: 24px; font-size: .85rem; color: var(--muted); }
.site-footer a { color: var(--muted); }

/* cards & layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: var(--blue); font-weight: 700; }
.hero { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 22px 22px; margin-bottom: 20px; }
.hero h1 { color: #fff; margin: 0 0 .2em; }
.hero p { margin: 0; opacity: .85; }
.hero .eyebrow { color: #9fd0f2; }

/* flash */
.flash { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; border: 1px solid; }
.flash-ok { background: #ecf8f1; border-color: #b7e4c7; color: #14532d; }
.flash-error { background: #fdecec; border-color: #f5c2c2; color: #7f1d1d; }
.flash-info { background: var(--blue-soft); border-color: #bfdcf2; color: var(--navy); }

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.wrap-ok { white-space: normal; }
tr.mine td { background: var(--blue-soft); }
.standings td:first-child { color: var(--muted); width: 2em; }
.standings .strong { font-weight: 700; color: var(--navy); }

/* games */
.night { margin-bottom: 22px; }
.night-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.night-head h3 { margin: 0; }
.games { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.game { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.game.is-cancelled { opacity: .55; }
.game-meta, .game-foot { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: .8rem; color: var(--muted); }
.game-foot { margin-top: 6px; }
.game-teams { margin-top: 6px; }
.team-line { display: flex; justify-content: space-between; padding: 2px 0; }
.team-line a { color: var(--ink); text-decoration: none; }
.team-line.won { font-weight: 700; }
.team-line.won a { color: var(--navy); }
.team-line.mine .tname, .ref.mine { background: var(--blue-soft); border-radius: 3px; padding: 0 4px; margin-left: -4px; }
.sets { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 1.5em; text-align: right; }
.slot { font-weight: 700; color: var(--navy); }
.slot-1::before { content: '●'; color: #2fa05a; margin-right: 4px; }
.slot-2::before { content: '●'; color: var(--blue); margin-right: 4px; }
.stage { color: var(--red); font-weight: 700; }
.points { font-variant-numeric: tabular-nums; }

/* badges */
.badge { display: inline-block; font-size: .72rem; padding: 2px 8px; border-radius: 999px; font-weight: 700; letter-spacing: .02em; background: #eef0f2; color: #374151; }
.badge-confirmed, .badge-ok, .badge-active { background: #e3f5ea; color: var(--green); }
.badge-submitted, .badge-warn, .badge-pending { background: #fdf3e1; color: var(--amber); }
.badge-disputed, .badge-bad, .badge-withdrawn { background: #fdecec; color: var(--red); }
.badge-captain { background: var(--navy); color: #fff; }

/* forms */
label { display: block; font-weight: 600; font-size: .9rem; margin: 12px 0 4px; }
label.inline { display: flex; gap: 8px; align-items: flex-start; font-weight: normal; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=time], select, textarea {
  width: 100%; padding: 10px 12px; font-size: 16px; border: 1px solid #c5cbcf; border-radius: var(--radius); background: #fff; font-family: inherit;
}
textarea { min-height: 120px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.form-narrow { max-width: 460px; }
.form-row { display: grid; gap: 0 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.btn {
  display: inline-block; background: var(--navy); color: #fff; border: 0; border-radius: var(--radius);
  padding: 11px 20px; font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  cursor: pointer; text-decoration: none; margin-top: 14px;
}
.btn:hover { background: #16336f; }
.btn-blue { background: var(--blue); }
.btn-blue:hover { background: #2a7fbb; }
.btn-ghost { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.btn-ghost:hover { background: #f7f8f9; }
.btn-danger { background: var(--red); }
.btn-sm { padding: 5px 10px; font-size: 12px; margin-top: 0; }
.btn-block { display: block; width: 100%; text-align: center; }
.linkbtn { background: none; border: 0; color: var(--blue); padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }
.linkbtn.danger { color: var(--red); }
form.inline { display: inline; }
.hp { position: absolute; left: -5000px; }

/* score entry (phone-first) */
.score-grid { display: grid; grid-template-columns: 1fr 70px 70px; gap: 8px 10px; align-items: center; }
.score-grid .hdr { font-size: .78rem; font-weight: 700; text-transform: uppercase; color: var(--muted); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-grid input { text-align: center; font-size: 22px; padding: 10px 4px; font-weight: 700; }
.score-grid .setlbl { font-weight: 700; color: var(--navy); }

/* documents */
.doc-body { max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 16px; background: #fafbfc; font-size: .93rem; }
.doc-body.full { max-height: none; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 6px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; }
.checklist li:last-child { border-bottom: 0; }

.stat { font-family: "Josefin Sans", sans-serif; font-size: 1.8rem; font-weight: 700; color: var(--navy); line-height: 1; }
.stat-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stats .card { margin: 0; }
.season-picker { display: inline-block; }
.season-picker select { width: auto; padding: 6px 10px; }
.codebox { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--blue-soft); padding: 8px 12px; border-radius: var(--radius); word-break: break-all; }

/* ---------- website pages ---------- */
.announcement { background: var(--navy); color: #fff; text-align: center; padding: 8px 16px; font-size: .92rem; font-weight: 600; }
.announcement a { color: #fff; }
.nav { align-items: center; }
.nav-group { position: relative; }
.nav-sub { display: none; position: absolute; top: 100%; left: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 18px rgba(0,0,0,.08); min-width: 220px; padding: 6px 0; z-index: 20; }
.nav-sub a { display: block; border-bottom: 0; padding: 9px 16px; }
.nav-group:hover .nav-sub, .nav-group:focus-within .nav-sub { display: block; }
.caret { display: inline-block; width: 0; height: 0; margin-left: 5px; vertical-align: 2px; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; }
.nav-account { display: flex; margin-left: 10px; padding-left: 10px; border-left: 1px solid var(--line); }
.nav-account a { font-size: 12px; color: var(--muted); }
@media (max-width: 960px) {
  .hamburger { display: block; width: 40px; height: 40px; position: relative; cursor: pointer; }
  .hamburger span, .hamburger span::before, .hamburger span::after { content: ''; position: absolute; left: 8px; right: 8px; height: 2px; background: #000; }
  .hamburger span { top: 19px; }
  .hamburger span::before { top: -7px; left: 0; right: 0; }
  .hamburger span::after { top: 7px; left: 0; right: 0; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; border-bottom: 1px solid var(--line); padding: 6px 12px 12px; max-height: 80vh; overflow-y: auto; }
  .nav-toggle:checked ~ .nav { display: flex; }
  .nav-sub { display: block; position: static; border: 0; box-shadow: none; padding: 0 0 0 14px; min-width: 0; }
  .caret { display: none; }
  .nav-account { margin: 8px 0 0; padding: 8px 0 0; border-left: 0; border-top: 1px solid var(--line); }
}
.home-hero {
  background: var(--navy) center/cover no-repeat; color: #fff; border-radius: var(--radius);
  padding: 72px 24px; text-align: center; margin-bottom: 22px;
}
.home-hero h1 { color: #fff; font-size: clamp(1.8rem, 5vw, 3rem); margin: 0; }
.home-hero p { margin: 10px 0 0; font-size: 1.1rem; opacity: .92; }
.page-hero { height: 220px; background: center/cover no-repeat; border-radius: var(--radius); margin-bottom: 18px; }
.content-page { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px 26px; position: relative; }
.content-page h1 { margin-top: 0; }
.edit-page { float: right; margin-left: 10px; }
.content-body h2 { margin-top: 1.4em; }
.content-body h2:first-child { margin-top: 0; }
.content-body img { max-width: 100%; height: auto; border-radius: 4px; }
.content-body iframe { width: 100%; max-width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 4px; }
.content-body table { width: auto; max-width: 100%; }
.content-body td, .content-body th { white-space: normal; border: 1px solid var(--line); }
.content-body blockquote { border-left: 4px solid var(--blue); margin: 1em 0; padding: 4px 16px; background: var(--blue-soft); }
.content-body a.btn { color: #fff; }
.content-body .widget { margin: 16px 0; }
@media (max-width: 600px) { .content-page { padding: 16px; } .home-hero { padding: 48px 16px; } }
.content-body .widget table { width: 100%; }
.content-body .widget td, .content-body .widget th { border: 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
@media (min-width: 961px) and (max-width: 1240px) {
  .nav a { padding: 10px 9px; font-size: 13px; }
  .nav-account a { font-size: 11px; padding: 10px 7px; }
  .logo img { height: 46px; }
}
.nav > a, .nav-group > a { line-height: 1.2; }
.nav-group { display: flex; }

/* ---------- home page ---------- */
.home-hero { padding: 64px 24px 56px; }
.home-hero .hero-tag { display: inline-block; margin: 0 0 14px; background: var(--red); color: #fff; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 5px 12px; border-radius: 999px; opacity: 1; }
.home-hero .hero-sub { max-width: 560px; margin: 12px auto 0; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 24px; }
.hero-ctas .btn { margin: 0; padding: 12px 22px; font-size: 15px; }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--blue-soft); }
.home-facts { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.home-facts li { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--blue); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.home-facts strong { font-family: "Josefin Sans", sans-serif; color: var(--navy); font-size: 1.05rem; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.home-side .card h2 { font-size: 1.2rem; margin: 0 0 4px; }
.home-side .widget { margin: 8px 0 0; }
.home-side .games { grid-template-columns: 1fr; }
@media (max-width: 860px) { .home-grid { grid-template-columns: 1fr; } }
.price-box { border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: var(--radius); padding: 14px 18px; background: #fafbfc; }
.price-box .price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price-box ul { margin: 10px 0 0; padding-left: 18px; }
.price-box li { margin: 3px 0; }
.content-body [id] { scroll-margin-top: 90px; }
.court-map { margin: 0 0 18px; max-width: 260px; }
.court-map img { display: block; width: 100%; height: auto; border-radius: 4px; }
.court-map figcaption { margin-top: 4px; }

/* My League: upcoming games, play vs ref at a glance */
.my-night { margin: 10px 0 14px; }
.my-night-date { font-weight: 700; color: var(--navy); font-size: .9rem; margin-bottom: 6px; }
.my-game { display: grid; grid-template-columns: 52px auto 1fr; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--radius); border-left: 4px solid; margin-bottom: 6px; font-size: .93rem; }
.my-game.is-play { background: var(--blue-soft); border-color: var(--blue); }
.my-game.is-ref { background: #fdf6e7; border-color: var(--amber); color: #5b4a2a; }
.my-game .duty { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; text-align: center; border-radius: 3px; padding: 2px 0; color: #fff; }
.my-game.is-play .duty { background: var(--blue); }
.my-game.is-ref .duty { background: var(--amber); }
.my-game .when { white-space: nowrap; color: var(--muted); }
.my-game.is-ref .when { color: inherit; }
@media (max-width: 480px) { .my-game { grid-template-columns: 44px 1fr; } .my-game .what { grid-column: 2; } }
.game.ref-duty { border-left: 4px solid var(--amber); }
.game.play-duty { border-left: 4px solid var(--blue); }
.duty-tag { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #fff; border-radius: 3px; padding: 1px 6px; }
.duty-tag.play { background: var(--blue); }
.duty-tag.ref { background: var(--amber); }
.gender-tag { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; font-size: .85rem; font-weight: 700; border-radius: 50%; margin-left: 3px; vertical-align: 1px; cursor: help; }
.g-woman { background: #fbe7f1; color: #a3246a; }
.g-man { background: #e3effa; color: #1f5f99; }
.g-other { background: #eef0f2; color: var(--muted); }
/* Tables that wrap instead of scrolling sideways */
table.table-fit th, table.table-fit td { white-space: normal; vertical-align: top; }
table.table-fit td a { word-break: break-word; }
table.table-fit td.actions form { display: block; }
.content-body .widget td.wrap-ok { white-space: normal; }
.home-side .standings th, .home-side .standings td { padding: 7px 6px; }
@media (max-width: 700px) { .hide-sm { display: none; } }
.cell-line { margin-top: 4px; }
/* On phones, table rows become stacked cards (admin players & roster) */
@media (max-width: 600px) {
  table.stack-sm thead { display: none; }
  table.stack-sm, table.stack-sm tbody, table.stack-sm tr, table.stack-sm td { display: block; width: 100%; }
  table.stack-sm tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  table.stack-sm td { border: 0; padding: 3px 0; }
  table.stack-sm td.actions form { display: inline-block; margin-right: 14px; }
}
.gender-tag { font-family: "Segoe UI Symbol", "Apple Symbols", Arial, sans-serif; font-size: 1rem; font-weight: 700; line-height: 1; width: 22px; height: 22px; }
.g-woman { background: #f8d3e6; color: #9b1560; }
.g-man { background: #cfe3f7; color: #154f86; }
