/* Benchmark Crew Cup (copied from the Slow Horses portal): Benchmark Surveys blue (#054571) and yellow (#fbae2c).
   The variable names are kept from the original so the rest of the sheet is unchanged. */
:root {
  --green-950: #021f33;
  --green-900: #043555;
  --green-700: #054571;
  --green-500: #2f6a96;
  --green-100: #dbe7f1;
  --parchment: #eceff3;
  --paper: #fbfcfd;
  --ink: #16191f;
  --muted: #5d6573;
  --gold: #fbae2c;
  --gold-deep: #b97a06;
  --gold-soft: #fdebc6;
  --line: #d3d9e2;
  --red: #a63a28;
  --red-soft: #f4dcd3;
  --radius: 12px;
  --display: 'Oswald', 'Arial Narrow', Impact, sans-serif;
  --serif: 'Bitter', Georgia, serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font: 16px/1.45 var(--sans);
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; }
.poster { display: block; width: 100%; border-radius: 8px; border: 1px solid var(--line); }

/* ---- Merch ---- */
.shopgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.product h3 { margin: 0; font: 600 19px var(--display); }
.pimg { display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: var(--parchment); }
.pimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pimg.ph { display: grid; place-items: center; }
.pimg.ph img { width: 40%; height: auto; opacity: .35; }
.mphotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mphotos figure { margin: 0; display: grid; gap: 2px; justify-items: start; font-size: 13px; }
.mphotos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.order { padding: 10px 0; border-top: 1px solid var(--line); }
.order select { max-width: 48%; }
.struck { text-decoration: line-through; opacity: .6; }
.boot { padding: 40vh 0 0; text-align: center; color: var(--muted); }

#app { max-width: 680px; margin: 0 auto; min-height: 100dvh; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }

/* ---- Header & tabs ---- */
.top {
  background: var(--green-900);
  border-bottom: 3px solid var(--gold);
  color: var(--paper);
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 44px; width: auto; }
.brand b { display: block; font: 600 22px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; }
.brand small { display: block; font: 500 11px/1 var(--display); letter-spacing: .28em; text-transform: uppercase; color: var(--gold); margin-top: 4px; }
.who { border: 1px solid rgba(255,255,255,.25); background: transparent; color: var(--paper); border-radius: 10px; padding: 5px 10px; text-align: right; font-size: 12px; line-height: 1.25; }
.who b { display: block; font-size: 15px; }
.who[aria-current] { border-color: var(--gold); }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  background: var(--green-900); border-top: 3px solid var(--gold);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs div { max-width: 680px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); }
.tabs button {
  border: 0; background: none; padding: 8px 2px 7px; color: #a9b9a8;
  font: 500 11px var(--display); letter-spacing: .08em; text-transform: uppercase;
  display: grid; gap: 3px; justify-items: center;
}
.tabs svg { width: 22px; height: 22px; }
.tabs button[aria-current] { color: var(--gold); }
.tabs button { position: relative; }
.tabs .dot { position: absolute; top: 6px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px var(--green-900); }

main { padding: 14px 12px 8px; display: grid; gap: 14px; }

/* ---- Cards ---- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.card > h2, .sect {
  font: 600 14px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--green-700);
  margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.card > h2 small { font: 400 13px var(--sans); letter-spacing: 0; text-transform: none; color: var(--muted); }
.hero {
  background: var(--green-900) linear-gradient(160deg, var(--green-700), var(--green-950));
  color: var(--paper); border: 0; border-bottom: 3px solid var(--gold);
}
.hero .kicker { font: 500 12px var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.hero h1 { font: 600 28px/1.1 var(--display); letter-spacing: .03em; text-transform: uppercase; margin-top: 2px; }
.hero p { color: #cbd6c6; font-size: 14px; margin-top: 4px; }
.hero .row { margin-top: 12px; }
.muted { color: var(--muted); font-size: 14px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.stack { display: grid; gap: 10px; }
.banner { display: flex; gap: 12px; align-items: center; background: var(--gold-soft); border: 1px solid #e2c77a; border-radius: var(--radius); padding: 10px 12px; font-size: 14px; }
.banner .ball { flex: none; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6cf, var(--gold) 55%, var(--gold-deep)); box-shadow: inset 0 -2px 3px rgba(0,0,0,.25); }

/* ---- Buttons ---- */
.btn {
  border: 1px solid var(--line); background: var(--paper); border-radius: 10px;
  padding: 10px 14px; font-weight: 600; font-size: 15px; min-height: 44px;
}
.btn.primary { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.btn.gold { background: var(--gold); border-color: var(--gold-deep); color: #22190a; }
.btn.danger { color: var(--red); border-color: #dfb3a6; }
.btn.small { min-height: 36px; padding: 6px 10px; font-size: 14px; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; border-color: rgba(255,255,255,.35); color: var(--paper); }
.btn:disabled { opacity: .5; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: inherit; }
.hero .details a { color: var(--gold-soft); }
.link { border: 0; background: none; padding: 4px 0; color: var(--green-700); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 12px; font-size: 14px; min-height: 36px; }
.chip.me { border-color: var(--green-500); background: var(--green-100); }
.chip small { color: var(--muted); margin-left: 4px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #e3d8bc; border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; border-radius: 8px; padding: 8px 4px; font: 500 13px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--green-700); color: #fff; }

/* ---- Tables ---- */
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { font: 500 12px var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 6px; border-bottom: 1px solid var(--line); }
td { padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
th.n, td.n { text-align: right; }
th.c, td.c { text-align: center; }
td.pos { width: 32px; color: var(--muted); }
tr.tap { cursor: pointer; }
tr.is-me td { background: #eef3e6; }
b.big { font: 600 20px var(--display); }
.medal { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font: 600 13px var(--display); background: #e6dcc2; color: var(--ink); }
.medal.p1 { background: var(--gold); }
.medal.p2 { background: #cdd1cf; }
.medal.p3 { background: #d6a473; }
.tag { display: inline-block; border-radius: 6px; padding: 1px 6px; font-size: 12px; font-weight: 600; background: #e6dcc2; color: var(--ink); white-space: nowrap; }
.tag.down { background: var(--green-100); color: var(--green-700); }
.tag.up { background: var(--red-soft); color: var(--red); }
.tag.gold { background: var(--gold-soft); color: #6a4f0a; }
.tag.dark { background: var(--green-700); color: #fff; }
.scroll { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.owes { color: var(--red); font-weight: 600; }
.credit { color: var(--green-700); font-weight: 600; }

/* ---- Groups ---- */
.group { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fff; }
.group h3 { font: 600 14px var(--display); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }

/* ---- Forms ---- */
label.field, .field { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
input[type=text], input[type=date], input[type=number], input[type=password], select, textarea {
  width: 100%; border: 1px solid #cbbd98; border-radius: 10px; padding: 11px 12px; background: #fff; font-size: 16px; min-height: 46px;
}
textarea { min-height: 160px; resize: vertical; line-height: 1.45; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible { outline: 3px solid rgba(199,154,46,.6); outline-offset: 1px; }
.nines { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nines label { border: 1px solid #cbbd98; border-radius: 12px; padding: 10px; background: #fff; display: block; cursor: pointer; position: relative; }
.nines input { position: absolute; opacity: 0; }
.nines b { display: block; font: 600 16px var(--display); letter-spacing: .04em; text-transform: uppercase; }
.nines span { font-size: 13px; color: var(--muted); }
.nines label:has(input:checked) { border-color: var(--green-700); background: var(--green-100); box-shadow: inset 0 0 0 1px var(--green-700); }
.check { display: flex; gap: 8px; align-items: center; font-size: 15px; color: var(--ink); font-weight: 400; }
.check input { width: 20px; height: 20px; accent-color: var(--green-700); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---- Gate / login ---- */
.gate { min-height: 100dvh; display: grid; align-content: center; gap: 18px; padding: 24px 18px; margin-bottom: -76px; }
.gate .logo { display: flex; justify-content: center; align-items: center; gap: 18px; }
.gate .logo img.crest { height: 118px; }
.gate .logo img.lockup { height: 132px; }
.gate .tagline { text-align: center; font: 500 13px var(--display); letter-spacing: .22em; text-transform: uppercase; color: var(--green-700); }
.names { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.names .btn { text-align: left; font-weight: 500; }
.err { color: var(--red); font-size: 14px; font-weight: 600; }

/* ---- Scoring ---- */
.scorebar { position: sticky; top: 0; z-index: 4; background: var(--green-900); border-bottom: 3px solid var(--gold); color: var(--paper); padding: calc(10px + env(safe-area-inset-top)) 12px 10px; }
.scorebar .spread b { font: 600 18px var(--display); letter-spacing: .08em; text-transform: uppercase; }
.scorebar .btn { min-height: 38px; padding: 6px 12px; }
.sync { font-size: 12px; color: #b5c3b2; }
.finalbanner { background: var(--green-100); border-color: var(--green-500); }
.finalbanner > span { font-size: 22px; }
.finalbanner > div { flex: 1; }
.scoretitle { display: grid; justify-items: center; line-height: 1.1; }
.scorebar .spread .btn { white-space: nowrap; }
.holes { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; margin-top: 10px; }
.holes button { border: 1px solid rgba(255,255,255,.3); background: transparent; color: var(--paper); border-radius: 8px; padding: 6px 0; font: 600 15px var(--display); }
.holes button.done { background: rgba(255,255,255,.16); }
.holes button[aria-current] { background: var(--gold); border-color: var(--gold); color: #22190a; }
.holeinfo { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.holeinfo div { padding: 4px; }
.holeinfo div + div { border-left: 1px solid var(--line); }
.holeinfo b { display: block; font: 600 30px var(--display); color: var(--green-900); }
.holeinfo span { font: 500 12px var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.prow { display: grid; grid-template-columns: 1fr auto 52px; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.prow:last-child { border-bottom: 0; padding-bottom: 0; }
.prow:first-of-type { padding-top: 0; }
.pinfo b { display: block; font-size: 17px; }
.pinfo span { font-size: 13px; color: var(--muted); }
.pinfo .shots { color: var(--green-700); font-weight: 600; }
.pinfo .links { display: flex; gap: 12px; flex-wrap: wrap; }
.pinfo .link { font-size: 13px; padding: 2px 0; }
.stepper { display: grid; grid-template-columns: 52px 50px 52px; align-items: center; text-align: center; }
.stepper button { height: 52px; border-radius: 50%; border: 1px solid #cbbd98; background: #fff; font-size: 26px; line-height: 1; font-weight: 500; }
.stepper button:active { background: var(--green-100); }
.stepper output { font: 600 32px var(--display); }
.stepper output.empty { color: #bdb49a; }
.stepper output.pu { font: 600 14px var(--sans); color: var(--muted); }
.prow .putts { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; }
.prow .putts span { font: 500 12px var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.prow .putts button { flex: 1; min-width: 0; height: 34px; border-radius: 8px; border: 1px solid #cbbd98; background: #fff; font-weight: 600; font-size: 14px; color: var(--muted); }
.prow .putts button[aria-pressed="true"] { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.ppts { text-align: center; border-radius: 10px; padding: 6px 0; background: #ece3cb; }
.ppts b { display: block; font: 600 22px/1.1 var(--display); }
.ppts small { font-size: 11px; color: var(--muted); }
.ppts.good { background: var(--green-100); }
.ppts.great { background: var(--gold-soft); }
.ppts.none { background: transparent; border: 1px dashed #cbbd98; }
.cardgrid td, .cardgrid th { padding: 7px 3px; text-align: center; font-size: 14px; }
.cardgrid td:first-child, .cardgrid th:first-child { text-align: left; white-space: nowrap; padding-left: 0; }
.cardgrid td.tot { font-weight: 700; }
.cardgrid sub { font-size: 10px; color: var(--green-700); vertical-align: baseline; margin-left: 1px; }
.nav2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.taxrow { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.taxrow:last-child { border-bottom: 0; }
.taxrow .stepper { grid-template-columns: 42px 36px 42px; }
.taxrow .stepper button { height: 42px; font-size: 22px; }
.taxrow .stepper output { font-size: 22px; }

/* ---- Guests & moving players ---- */
td.guesthead { font: 500 12px var(--display); letter-spacing: .1em; text-transform: uppercase; padding-top: 14px; }
.movegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.movegrid .btn { min-height: 48px; }

.sidegame { display: grid; grid-template-columns: 1fr 92px; gap: 10px; align-items: center; }
.sidegame input[type=number] { min-height: 40px; padding: 6px 10px; }
.nines.formats { grid-template-columns: 1fr; }
label.chip input { width: 16px; height: 16px; accent-color: var(--green-700); vertical-align: -3px; }
.holepick { gap: 6px; }
.holepick .chip { min-height: 34px; padding: 5px 10px; font-weight: 600; }
table.summary td, table.summary th { white-space: nowrap; }
ol.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 15px; }
ul.orders { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 2px; font-size: 15px; }

/* ---- Kitty charts ---- */
.bars { display: grid; gap: 6px; }
.barrow { display: grid; grid-template-columns: 36px 1fr 56px; align-items: center; gap: 8px; font-size: 13px; }
.barrow span { color: var(--muted); font: 500 12px var(--display); letter-spacing: .08em; text-transform: uppercase; }
.barrow i { display: block; height: 16px; border-radius: 4px; background: var(--green-500); }
.barrow.latest i { background: var(--gold); }
.barrow b { text-align: right; }

/* ---- News ---- */
.newstitle { font: 600 21px/1.2 var(--display); letter-spacing: .02em; text-transform: uppercase; color: var(--green-900); }
.pdfpages { display: grid; gap: 10px; }
.pdfpage { width: 100%; height: auto; display: block; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
input[type=file] { font-size: 15px; padding: 8px 0; }
input[type=month] { width: 100%; border: 1px solid #cbbd98; border-radius: 10px; padding: 11px 12px; background: #fff; font-size: 16px; min-height: 46px; }

/* ---- Events & rules ---- */
.poster { width: 100%; border-radius: var(--radius); display: block; border: 1px solid var(--line); }
.details { white-space: pre-line; font-size: 15px; }
.details a { color: var(--green-700); word-break: break-all; }
.prose { display: grid; gap: 8px; font-size: 15px; }
.prose ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.bank { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; font-size: 15px; }
.bank dt { color: var(--muted); }
.bank dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.stat div { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 4px; }
.stat b { display: block; font: 600 22px var(--display); color: var(--green-900); }
.stat span { font: 500 11px var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ---- Sheet ---- */
.overlay { position: fixed; inset: 0; z-index: 10; background: rgba(14,31,20,.55); display: grid; align-items: end; }
.sheet {
  background: var(--parchment); border-radius: 18px 18px 0 0; border-top: 3px solid var(--gold); width: 100%; max-width: 680px; margin: 0 auto;
  max-height: 90dvh; overflow-y: auto; padding: 16px 14px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 12px;
}
.sheet > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sheet > header h2 { font: 600 22px var(--display); letter-spacing: .04em; text-transform: uppercase; color: var(--green-900); }
.sheet > header button { border: 0; background: #e0d4b4; border-radius: 50%; width: 36px; height: 36px; font-size: 18px; flex: none; }

#toast {
  position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px);
  background: var(--green-950); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 20;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%); }

/* Banter pop-up for birdies, blow-ups and four-putts. */
#quip {
  position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 24px;
  background: rgba(14,31,20,.35); cursor: pointer;
}
#quip[hidden] { display: none; }
#quip div {
  background: var(--paper); border: 3px solid var(--gold); border-radius: 20px; padding: 22px 26px; max-width: 320px;
  text-align: center; box-shadow: 0 12px 40px rgba(0,0,0,.3); animation: quip-in .35s cubic-bezier(.2,1.6,.4,1);
}
#quip .emoji { font-size: 52px; line-height: 1; display: block; margin-bottom: 8px; }
#quip b { display: block; font: 600 26px/1.15 var(--display); text-transform: uppercase; letter-spacing: .03em; color: var(--green-900); }
#quip small { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; }
@keyframes quip-in { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #quip div { animation: none; } }

details summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
details table { margin-top: 4px; }

@media (min-width: 520px) { .names { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 360px) { .brand small { display: none; } .brand b { font-size: 19px; } }
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }

/* ---- Close the round, sign-your-card pop-up ---- */
.closeround { border: 2px solid var(--gold); background: var(--gold-soft); }

/* ---- Chat: button, new-message bar and panel ---- */
.chatfab {
  position: fixed; right: 14px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 6;
  width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--gold); background: var(--green-900); color: #fff;
  font-size: 24px; box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
.chatfab.scoring { bottom: calc(16px + env(safe-area-inset-bottom)); }
.chatfab i {
  position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: var(--red); color: #fff; font: 700 12px/22px var(--sans); font-style: normal; box-shadow: 0 0 0 2px var(--parchment);
}
#chatbar {
  position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 15; width: min(640px, calc(100vw - 24px));
  display: flex; align-items: stretch; background: var(--green-950); color: #fff; border: 2px solid var(--gold); border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35); transform: translate(-50%, 140%); opacity: 0; transition: transform .25s, opacity .25s; pointer-events: none;
}
#chatbar.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
#chatbar .cb-main { flex: 1; min-width: 0; text-align: left; background: none; border: 0; color: inherit; padding: 10px 12px; }
#chatbar .cb-main b { display: block; color: var(--gold); font-size: 14px; }
#chatbar .cb-main span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
#chatbar .cb-x { background: none; border: 0; color: #cfd8cc; font-size: 18px; padding: 0 14px; }
.chatlist { display: grid; gap: 8px; max-height: 55dvh; overflow-y: auto; padding: 2px; }
.msg { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; max-width: 86%; justify-self: start; }
.msg.mine { background: var(--green-100); justify-self: end; }
.msg .mhead { display: flex; gap: 8px; align-items: baseline; font-size: 12px; color: var(--muted); }
.msg .mhead b { color: var(--green-900); font-size: 13px; }
.msg .mhead .link { margin-left: auto; font-size: 12px; }
.msg .mbody { white-space: pre-wrap; overflow-wrap: anywhere; }
.chatform { display: flex; gap: 8px; align-items: flex-end; }
.chatform textarea { flex: 1; min-width: 0; resize: none; min-height: 46px; max-height: 120px; height: 46px; font: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; }

/* ---- Crew Cup ---- */
.gate .logo .lockup-text { display: grid; gap: 2px; color: var(--green-900); }
.gate .logo .lockup-text b { font: 600 40px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; }
.gate .logo .lockup-text span { font: 600 30px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); }
.gate .logo .lockup-text small { font: 500 11px/1.3 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.crewtag { font-size: 12px; }
.crews { display: grid; gap: 8px; }
.crew { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.crew.leader { border-color: var(--gold); background: var(--gold-soft); }
.crew.mine { box-shadow: inset 4px 0 0 var(--green-700); }
.crewpos { font: 600 24px/1 var(--display); color: var(--green-700); text-align: center; }
.crewname { display: grid; gap: 1px; min-width: 0; }
.crewname b { font: 600 19px/1.1 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.crewname small { font-style: italic; color: var(--muted); }
.crewname .muted { font-size: 13px; }
.crewpts { text-align: right; }
.crewpts b { display: block; font: 600 30px/1 var(--display); }
.crewpts small { color: var(--muted); font-size: 12px; }

/* ---- Ambrose crew scoring ---- */
.teamscore { display: grid; gap: 10px; justify-items: center; text-align: center; }
.stepper.big { grid-template-columns: 72px 96px 72px; }
.stepper.big button { height: 72px; font-size: 34px; }
.stepper.big output { font: 600 56px/72px var(--display); }
.teamword { font: 600 20px var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.teamword.under, .cardgrid td.under { color: #1d7a3e; }
.teamword.over, .cardgrid td.over { color: var(--red); }
.cardgrid td.under { font-weight: 700; }
.teamsum { width: 100%; border-top: 1px solid var(--line); padding-top: 8px; }

/* ---- Benchmark branding (logo and LinkedIn banner from benchmarksurveys.com.au / marketing) ---- */
.gate .logo { flex-direction: column; gap: 0; }
.gate .logo .gatebanner { display: block; width: 100%; aspect-ratio: 4 / 1; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; border-bottom: 4px solid var(--gold); }
.gate .logo .lockup-card { width: 100%; background: var(--green-900); border-radius: 0 0 var(--radius) var(--radius); padding: 16px 18px 14px; display: grid; justify-items: center; gap: 8px; }
.gate .logo .bmlogo { width: min(330px, 86%); height: auto; }
.gate .logo .lockup-text { justify-items: center; text-align: center; color: var(--paper); }
.gate .logo .lockup-text span { color: var(--gold); font-size: 28px; letter-spacing: .2em; }
.gate .logo .lockup-text small { color: #b9cde0; }
.brand img { border-radius: 6px; }

/* Old / Tuart switch on the round card */
.hero .seg.course { background: rgba(255,255,255,.12); margin-top: 10px; }
.hero .seg.course button { color: #dbe7f1; font-size: 14px; padding: 10px 4px; }
.hero .seg.course button[aria-pressed="true"] { background: var(--gold); color: var(--green-950); }
