/* Upper Valley Singles Ladder — stylesheet ver 2.1 (design ver 3 + phone sweep)
   Palette: court green + clay + tennis-ball yellow, on warm off-white. Fonts: Fraunces (display), Inter (text).
   No JS. Works from file://. Only external request: Google Fonts (has system fallbacks). */
:root {
  --green: #1f5f3f; --green-deep: #143f2b; --clay: #c8552d; --ball: #d9e84a;
  --ink: #1b2620; --muted: #66706a; --line: #e2ded3; --bg: #faf8f2; --card: #ffffff; --tint: #eef3ec;
  --due: #b3421f; --ok: #1f7a46;
  --radius: 14px; --shadow: 0 1px 2px rgba(20,40,30,.06), 0 8px 24px rgba(20,40,30,.06);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.55 var(--text); color: var(--ink); background: var(--bg); }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 1.25rem; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; line-height: 1.15; margin: 0 0 .5rem; }
h2 { font-size: 1.6rem; } h3 { font-size: 1.2rem; }
p { margin: .4rem 0 .9rem; }

/* ---- header ---- */
header.top { position: sticky; top: 0; z-index: 10; background: rgba(250,248,242,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; padding-top: .35rem; padding-bottom: .35rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--display); font-weight: 700; font-size: 1.2rem; color: var(--green-deep); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.mark { width: 28px; height: 28px; flex: none; }
header nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .25rem; }   /* tabs wrap whole, never mid-phrase (Jeff, 2026-08-29) */
header nav a { white-space: nowrap; padding: .42rem .62rem; border-radius: 999px; color: var(--ink); font-weight: 500; font-size: .92rem; }
header nav a:hover { background: var(--tint); text-decoration: none; }
header nav a.on { background: var(--green); color: #fff; }

/* ---- hero (home) ---- */
.hero { position: relative; color: #fff; background: linear-gradient(135deg, var(--green-deep), var(--green) 60%, #2c7a52); overflow: hidden; }
.hero .photo { position: absolute; inset: 0; background: url(img/hero.jpg) center/cover no-repeat; opacity: .55; }
.hero .photo .court { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .35; }
.hero .photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,63,43,.85) 0%, rgba(20,63,43,.55) 55%, rgba(20,63,43,.25) 100%); }
.hero .wrap { position: relative; padding: 3.5rem 1.25rem 3rem; max-width: 1040px; }
.hero .kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 600; color: var(--ball); margin: 0 0 .6rem; }
.hero h1 { font-size: clamp(1.7rem, 4.2vw, 3rem); max-width: 22ch; margin-bottom: .8rem; }
.nowrap { white-space: nowrap; }
.hero .lede { max-width: 48ch; font-size: 1.08rem; opacity: .95; }
.hero .cta { margin-top: 1.4rem; display: flex; gap: .6rem; flex-wrap: wrap; }
.button { display: inline-block; padding: .65rem 1.15rem; background: var(--clay); color: #fff; border-radius: 999px; font-weight: 600; box-shadow: var(--shadow); }
.button:hover { background: #b0481f; text-decoration: none; }
.button.ghost { background: transparent; border: 2px solid rgba(255,255,255,.8); box-shadow: none; }
.button.ghost:hover { background: rgba(255,255,255,.12); }

/* ---- stat tiles ---- */
main { padding: 1.5rem 1.25rem 3rem; }
.stats { display: grid; grid-template-columns: 1fr 0.9fr 1.2fr 1.1fr 1.5fr; gap: .8rem; margin: -2.4rem 0 1.4rem; position: relative; }
.stat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: .9rem 1rem; }
.stat .v { font-family: var(--display); font-size: 1.7rem; font-weight: 700; color: var(--green-deep); line-height: 1.1; }
.stat .l { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: .15rem; }
.stat .sub { font-size: .85rem; color: var(--ink); margin-top: .3rem; }

/* ---- cards ---- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem 1.4rem; margin: 0 0 1.2rem; overflow-x: auto; }
.card.slim { padding: .9rem 1.4rem; }
.cardhead { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.asof { color: var(--muted); font-size: .9rem; }
.empty { color: var(--muted); padding: 1rem 0; }
.fine { color: var(--muted); font-size: .85rem; }
.center { text-align: center; }
.muted { color: var(--muted); }
ul.plain { padding-left: 1.1rem; }

/* ---- tables ---- */
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .6rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; border-bottom: 2px solid var(--line); }
tbody tr:hover { background: var(--tint); }
tbody tr:last-child td { border-bottom: 0; }
/* standings table, design ver 3 (league-table style from fork variant A; Jeff 2026-08-27) */
tbody tr:hover { background: #fbfaf6; }
table.ladder td.rank, table.ladder th.rank { width: 2.6rem; font-weight: 700; font-size: 1.05rem; color: var(--green-deep); padding-left: .3rem; }
table.ladder tbody tr:nth-child(-n+3) td.rank { color: var(--clay); }
td.name a, td.name .nm { font-weight: 600; color: var(--ink); font-size: 1rem; }
td.name a:hover { color: var(--green); }
.tag { display: inline-block; margin-left: .5rem; padding: .1rem .45rem; border: 1px solid #cfcabd; border-radius: 4px; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; vertical-align: middle; }
td.num, th.num { text-align: right; font-weight: 600; white-space: nowrap; width: 4.5rem; font-variant-numeric: tabular-nums; }
td.mvc, th.mvc { width: 3.2rem; white-space: nowrap; }
td.last, th.last, .last { color: var(--muted); white-space: nowrap; }
td.q, th.q { white-space: nowrap; width: 8rem; }
.mv { font-size: .78rem; font-weight: 700; }
.mv.up { color: var(--ok); } .mv.down { color: var(--due); }
.dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .45rem; vertical-align: 1px; }
.dot.ok { background: var(--ok); } .dot.due { background: var(--clay); } .dot.none { background: #cfcabd; }
.qt { font-size: .9rem; }
ul.defs { margin: .2rem 0 1rem 1.1rem; padding: 0; font-size: .95rem; line-height: 1.5; }
ul.defs li { margin: .2rem 0; }
iframe.gform.tall { height: 1560px; }
.thanks { padding: 2rem 0 1rem; }
.thanks h3 { font-size: 1.6rem; margin-bottom: .5rem; }
iframe.gform { width: 100%; height: 720px; border: 0; background: #fff; border-radius: 8px; }
ul.key { list-style: none; margin: .9rem 0 .4rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; color: var(--muted); font-size: .85rem; }
ul.key li { display: flex; align-items: center; gap: .35rem; }
ul.key .tag { margin-left: 0; }
td.rec, thead th { white-space: nowrap; }
td.rec { font-variant-numeric: tabular-nums; font-weight: 600; }
td.date, .date { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
td.score, .score { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .95rem; white-space: nowrap; }
tr.admin td { color: var(--muted); font-style: italic; font-size: .92rem; }
.pill { display: inline-block; padding: .18rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.pill.ok { background: #e3f1e8; color: var(--ok); }
.pill.due { background: #fbe9e2; color: var(--due); }
.trend { font-size: .78rem; font-weight: 700; margin-left: .3rem; }
.trend.up { color: var(--ok); } .trend.down { color: var(--due); }
.frozen { color: var(--muted); font-family: ui-monospace, monospace; font-size: .85rem; }
.wl { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 6px; font-weight: 700; font-size: .8rem; }
.wl.w { background: #e3f1e8; color: var(--ok); } .wl.l { background: #fbe9e2; color: var(--due); }

/* ---- player profile ---- */
.profile { display: flex; gap: 1.4rem; align-items: center; }
.bigrung { font-family: var(--display); font-size: 3.4rem; font-weight: 700; color: var(--green-deep); background: var(--ball); border-radius: var(--radius); min-width: 5.2rem; text-align: center; line-height: 1.6; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.profile .grow { flex: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid2 .card { margin: 0 0 1rem; }
.grid2 h3, .card h3 { margin-bottom: .5rem; }
.pbig { font-family: var(--display); font-size: 1.7rem; font-weight: 700; line-height: 1.1; }
.pbig.ok { color: var(--ok); } .pbig.due { color: var(--due); }
.bars { display: flex; gap: .3rem; margin: .5rem 0 .6rem; }
.bar { width: 2.4rem; height: .45rem; border-radius: 3px; background: var(--line); }
.bar.on { background: var(--ok); }
.muted.small, .fine { font-size: .85rem; }
ul.who { list-style: none; margin: 0; padding: 0; }
ul.who li { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
ul.who li:last-child { border-bottom: 0; }
ul.who .rank { color: var(--muted); font-weight: 600; width: 2rem; font-size: .9rem; }
ul.who a { font-weight: 600; color: var(--ink); flex: 1; }
ul.picker { columns: 1; }   /* one name per row (Jeff, 2026-08-29) */
ul.picker li { break-inside: avoid; }

/* ---- rules ---- */
.summary ol { padding-left: 1.3rem; margin: .4rem 0; } .summary li { margin: .35rem 0; }
.toc { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.2rem; }
.toc a { padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; background: var(--card); }
.prose h1 { font-size: 1.7rem; } .prose h2 { font-size: 1.25rem; margin-top: 1.6rem; padding-top: .4rem; border-top: 1px solid var(--line); }
.prose li { margin: .3rem 0; } .prose code { background: var(--tint); padding: .1rem .35rem; border-radius: 4px; font-size: .9em; }
pre { background: var(--tint); padding: .8rem 1rem; border-radius: 10px; overflow-x: auto; font-size: .95rem; }

/* ---- report / join ---- */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.venues { margin-top: .6rem; }
.venues .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.venues figure { margin: 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.venues .ph { aspect-ratio: 4/3; background: linear-gradient(135deg, var(--green) 0%, #3a8a5e 100%) center/cover no-repeat; }
.venues figcaption { padding: .7rem .9rem .9rem; font-size: .9rem; color: var(--muted); } .venues figcaption strong { color: var(--ink); }

/* ---- footer ---- */
footer { margin-top: 2rem; border-top: 1px solid var(--line); background: #f3f0e8; color: var(--muted); font-size: .88rem; }
footer .cols { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.2rem; padding: 1.4rem 1.25rem 1.8rem; }
footer strong { color: var(--ink); }

/* ---- mobile (ver 2.1, 2026-08-27: phone sweep at 390px — nav pills wrap whole, never mid-phrase; header not sticky;
   stat tiles 3-5 full width; standings 'This period' wraps; ON LEAVE tag stays on one line; results/log tables drop the
   'moved' column and keep names on one line) ---- */
@media (max-width: 720px) {
  body { overflow-x: hidden; }
  header.top { position: static; backdrop-filter: none; }
  header.top .wrap { height: auto; flex-wrap: wrap; padding: .6rem 1rem .5rem; gap: .35rem; }
  header nav { width: 100%; flex-wrap: wrap; gap: .25rem; }
  header nav a { white-space: nowrap; padding: .5rem .7rem; font-size: .92rem; }
  .hero .wrap { padding: 2.4rem 1rem 2.6rem; }
  .hero .lede { font-size: 1rem; }
  main { padding: 1.2rem 1rem 2.5rem; }
  .card { padding: 1rem; }
  .cardhead { flex-wrap: wrap; gap: .2rem .8rem; }
  .asof { white-space: nowrap; }
  .pill { font-size: .74rem; white-space: normal; }
  .grid2 { grid-template-columns: 1fr; }
  ul.picker { columns: 1; }
  .stats { grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: -1.6rem; }
  .stats .stat { min-width: 0; }
  .stats .stat:nth-child(n+3) { grid-column: 1 / -1; }
  .stat .v { font-size: 1.5rem; }
  table.ladder th.last, table.ladder td.last, table.ladder th.mvc, table.ladder td.mvc { display: none; }
  td.q, th.q { width: 44%; white-space: normal; }   /* 'This period' gets the room, names stay on one line */
  .tag { white-space: nowrap; margin-left: .4rem; }
  td.name a, td.name .nm { white-space: nowrap; }
  table.log th:last-child, table.log td:last-child { display: none; }
  td.score, .score { font-size: .85rem; }
  th, td { padding: .5rem .3rem; }
  .two, .venues .grid { grid-template-columns: 1fr; }
  .profile { flex-direction: column; align-items: flex-start; }
  .prose h1 { font-size: 1.45rem; }
}
.profile h2 { font-family: var(--text); font-weight: 700; letter-spacing: 0; }   /* Fraunces goes wobbly at this size (Jeff) */
.summary ul.periods { list-style: disc; padding-left: 1.3rem; margin: .2rem 0 0; }
.summary ul.periods li { margin: .1rem 0; }
.prose ul ul { margin: .2rem 0 0; padding-left: 1.3rem; }
.prose ul ul li { margin: .1rem 0; }
