/* =========================================================
   EdgePick: main stylesheet
   ========================================================= */

/* ---------- Colours ---------- */
:root {
  --pitch: #0F3D2E;   /* dark green: header, buttons, headings */
  --chalk: #FFFFFF;   /* white: cards */
  --turf: #E8EFE9;    /* light green: page background */
  --line: #C9D6CC;    /* borders */
  --card: #F2C230;    /* yellow: VIP and highlights */
  --loss: #B3261E;    /* red: losses and errors */
  --text: #1D2A24;
  --muted: #5B6B62;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  color: var(--text);
  background: var(--turf);
  line-height: 1.5;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--card);
  outline-offset: 2px;
}

main { max-width: 760px; margin: 0 auto; padding: 20px; }

h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2.4rem;
  margin: 8px 0 4px;
  color: var(--pitch);
}

.record { margin: 0 0 16px; color: var(--muted); }
.disclaimer { font-size: .85rem; color: var(--muted); margin-top: 24px; }

.empty {
  background: var(--chalk);
  padding: 24px;
  text-align: center;
  border-radius: 4px;
  color: var(--muted);
  margin: 0 0 12px;
}

.note {
  background: var(--chalk);
  border-left: 6px solid var(--card);
  padding: 10px 14px;
  border-radius: 4px;
  margin: 0 0 20px;
}

/* ---------- Header and navigation ---------- */
.top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--pitch);
  color: var(--chalk);
}

.logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--chalk);
  text-decoration: none;
}
.logo span { color: var(--card); }

.nav { display: flex; gap: 16px; margin-right: auto; margin-left: 20px; }
.nav a { color: var(--chalk); text-decoration: none; font-weight: 600; opacity: .8; }
.nav a[aria-current="page"] { opacity: 1; border-bottom: 2px solid var(--card); }

.account { display: flex; gap: 10px; align-items: center; }

/* ---------- Buttons ---------- */
.btn {
  font: inherit;
  font-weight: 600;
  border: 0;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
.btn:disabled { opacity: .6; cursor: wait; }
.btn-vip { background: var(--card); color: var(--pitch); }
.btn-ghost { background: transparent; color: var(--chalk); border: 1px solid rgba(255, 255, 255, .4); }
.btn-dark { background: var(--pitch); color: var(--chalk); }
.btn-line { background: transparent; color: var(--pitch); border: 1px solid var(--pitch); justify-self: start; }
.btn-ghost-dark { background: transparent; color: var(--loss); border: 1px solid var(--line); }
.btn-small { padding: 4px 10px; font-size: .85rem; }
.btn-big { width: 100%; padding: 12px 16px; font-size: 1.05rem; }

.badge {
  font-size: .75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--card);
  color: var(--pitch);
}

/* ---------- Home: hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
  margin: 8px 0 16px;
}
.eyebrow {
  margin: 0;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.tagline { font-size: 1.15rem; margin: 4px 0 8px; max-width: 560px; }

.hero-cta {
  background: var(--pitch);
  color: var(--chalk);
  border-radius: 6px;
  padding: 16px;
  max-width: 290px;
}
.hero-cta p { margin: 0 0 12px; }
.hero-cta .vip-on { margin: 0; }

/* ---------- Home: animated pitch ---------- */
.sport-strip {
  position: relative;
  height: 76px;
  margin: 0 0 18px;
  border-radius: 6px;
  overflow: hidden;
  background: repeating-linear-gradient(90deg, #1E6B45 0 44px, #237A4F 44px 88px);
}
.sport-strip::before {   /* halfway line */
  content: '';
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, .5);
}
.sport-strip::after {    /* centre circle */
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 46px; height: 46px;
  margin: -23px 0 0 -23px;
  border: 2px solid rgba(255, 255, 255, .5);
  border-radius: 50%;
}

.ball {
  position: absolute;
  bottom: 8px;
  z-index: 1;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .3));
}
.ball-football {
  width: 34px; height: 34px;
  left: -40px;
  z-index: 2;
  animation: roll-across 7s linear infinite;
}
.ball-basketball {
  width: 36px; height: 36px;
  left: 16%;
  transform-origin: 50% 100%;
  animation: bounce 1.1s infinite;
}
.ball-tennis {
  width: 24px; height: 24px;
  left: 80%;
  transform-origin: 50% 100%;
  animation: bounce-small .8s infinite;
  animation-delay: -.3s;
}

@keyframes roll-across {
  from { left: -40px; transform: rotate(0deg); }
  to   { left: calc(100% + 40px); transform: rotate(900deg); }
}
@keyframes bounce {
  0%, 100% { transform: translateY(0) scale(1.1, .88); }
  10%      { transform: translateY(0) scale(1); animation-timing-function: ease-out; }
  55%      { transform: translateY(-32px) scale(1); animation-timing-function: ease-in; }
}
@keyframes bounce-small {
  0%, 100% { transform: translateY(0) scale(1.12, .85); }
  10%      { transform: translateY(0) scale(1); animation-timing-function: ease-out; }
  55%      { transform: translateY(-38px) scale(1); animation-timing-function: ease-in; }
}

/* ---------- Home: latest results strip ---------- */
.strip {
  background: var(--chalk);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 18px;
  display: grid;
  gap: 10px;
}
.strip-title {
  margin: 0;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.strip-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 2px; }
.mini {
  flex: 0 0 auto;
  display: grid;
  padding: 4px 12px;
  border-left: 4px solid var(--line);
  font-size: .9rem;
}
.mini.won { border-left-color: var(--pitch); }
.mini.lost { border-left-color: var(--loss); }
.mini-res { font-weight: 700; }
.mini.won .mini-res { color: var(--pitch); }
.mini.lost .mini-res { color: var(--loss); }
.mini-odds { color: var(--muted); }
.strip-link { font-weight: 600; font-size: .9rem; color: var(--pitch); }

/* ---------- Home: how it works ---------- */
.how {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.how-step { display: flex; gap: 12px; background: var(--chalk); border-radius: 6px; padding: 14px; }
.how-step p { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }
.how-num {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--pitch);
  color: var(--card);
  display: grid;
  place-items: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
}

/* ---------- Filters ---------- */
.filters { display: grid; gap: 10px; margin-bottom: 20px; }
.filters div { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.filters button {
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--chalk);
  color: var(--text);
  cursor: pointer;
}
.filters button[aria-pressed="true"] {
  background: var(--pitch);
  color: var(--chalk);
  border-color: var(--pitch);
}

/* ---------- Sections ---------- */
.group { margin-bottom: 24px; }
.group-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}
.group-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.6rem;
  color: var(--pitch);
  margin: 0 0 10px;
}
.group-head .group-title { margin: 0; }
.count { color: var(--muted); font-size: .9rem; }
.more { text-align: center; color: var(--muted); margin: 0 0 12px; }

.unlock {
  background: var(--pitch);
  color: var(--chalk);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 12px;
}
.unlock p { margin: 0 0 12px; }

/* ---------- Pick cards ---------- */
.pick {
  background: var(--chalk);
  border-left: 6px solid var(--pitch);
  border-radius: 4px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.pick.vip { border-left-color: var(--card); }
.pick.locked .teams { color: var(--muted); }
.pick.locked dd { color: var(--muted); font-weight: 400; }

.meta {
  font-size: .85rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.teams {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 4px 0 10px;
  color: var(--pitch);
}
.teams small { font-weight: 600; color: var(--muted); margin: 0 8px; font-size: 1rem; }

.tip {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 20px;
  margin: 0;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}
.tip dt { font-size: .8rem; color: var(--muted); }
.tip dd { margin: 0; font-weight: 600; }

.result-won { color: var(--pitch); font-weight: 700; }
.result-lost { color: var(--loss); font-weight: 700; }
.result-void { color: var(--muted); font-weight: 700; }

.pick details { margin-top: 10px; }
summary { cursor: pointer; font-weight: 600; color: var(--pitch); }

.pick-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; }
.pick-actions a { color: var(--pitch); font-weight: 600; font-size: .9rem; }
.share-all { margin-bottom: 12px; }

/* ---------- Forms (shared) ---------- */
.field { display: grid; gap: 4px; font-weight: 600; }
.field input,
.field select,
textarea {
  font: inherit;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  width: 100%;
  background: var(--chalk);
  color: var(--text);
}
textarea { resize: vertical; }

.msg { margin: 0; color: var(--loss); }
.msg.ok { color: var(--pitch); }

/* ---------- Login and reset pages ---------- */
.auth { max-width: 420px; }
.auth form {
  display: grid;
  gap: 14px;
  background: var(--chalk);
  padding: 20px;
  border-radius: 6px;
}
.auth label { display: grid; gap: 4px; font-weight: 600; }
.auth label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
}
.auth input:not([type="checkbox"]) {
  font: inherit;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

/* ---------- VIP plans page ---------- */
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.plan {
  background: var(--chalk);
  border-top: 6px solid var(--pitch);
  border-radius: 4px;
  padding: 16px;
  display: grid;
  gap: 6px;
  align-content: start;
}
.plan.best { border-top-color: var(--card); }
.plan h2 {
  font-family: 'Barlow Condensed', sans-serif;
  margin: 0;
  font-size: 1.4rem;
  color: var(--pitch);
}
.plan p { margin: 0; }
.plan .btn { margin-top: 8px; }
.price {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--pitch);
}
.status {
  background: var(--chalk);
  border-left: 6px solid var(--loss);
  padding: 12px 14px;
  border-radius: 4px;
}
.status.ok { border-left-color: var(--pitch); }
.pay-note { color: var(--muted); }

/* ---------- Results page and tables ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.stat {
  background: var(--chalk);
  border-top: 6px solid var(--pitch);
  border-radius: 4px;
  padding: 14px 16px;
}
.stat h3 { margin: 0; font-size: .9rem; color: var(--muted); font-weight: 600; }
.stat p { margin: 0; }
.stat-big {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--pitch);
}

.table-wrap { overflow-x: auto; background: var(--chalk); border-radius: 4px; }
table.stats { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.stats th,
table.stats td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.stats thead th { font-size: .8rem; color: var(--muted); font-weight: 600; }
table.stats tbody th { font-weight: 600; }
table.stats td.wrap { white-space: normal; min-width: 260px; font-size: .85rem; }

/* ---------- Calculator ---------- */
.calc {
  background: var(--chalk);
  border-radius: 6px;
  padding: 16px;
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}
#rows { display: grid; gap: 12px; }
.calc-row { display: flex; gap: 8px; align-items: end; }
.calc-row .field { flex: 1; }
.remove {
  font: inherit;
  background: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--loss);
}
.calc-result {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
.calc-result div {
  background: var(--pitch);
  color: var(--chalk);
  border-radius: 6px;
  padding: 12px 14px;
  display: grid;
}
.calc-result span { font-size: .85rem; opacity: .8; }
.calc-result strong { font-family: 'Barlow Condensed', sans-serif; font-size: 1.6rem; }

/* ---------- Admin page ---------- */
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  background: var(--chalk);
  padding: 16px;
  border-radius: 6px;
}
.form-row .field { flex: 1 1 220px; }
.link-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}
.link-list a {
  background: var(--chalk);
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--pitch);
  font-weight: 600;
  text-decoration: none;
}

/* ---------- Help and support ---------- */
.help-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.help-card {
  display: grid;
  gap: 4px;
  background: var(--pitch);
  color: var(--chalk);
  border-radius: 6px;
  padding: 16px;
  text-decoration: none;
}
.help-card.wa { background: #128C4A; }
.help-card strong { font-size: 1.1rem; }
.help-card span { opacity: .9; }

.faq details { background: var(--chalk); border-radius: 6px; padding: 12px 14px; margin: 0 0 8px; }
.faq p { margin: 8px 0 0; }

.ticket-form {
  display: grid;
  gap: 12px;
  background: var(--chalk);
  padding: 16px;
  border-radius: 6px;
}
.ticket-form input,
.ticket-form select {
  font: inherit;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  width: 100%;
  background: var(--chalk);
  color: var(--text);
}

.ticket { background: var(--chalk); border-radius: 6px; padding: 12px 14px; margin-bottom: 10px; }
.ticket summary { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tstatus { font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.tstatus.open { background: var(--card); color: var(--pitch); }
.tstatus.in_progress { background: #DCE8F7; color: #1C3F6E; }
.tstatus.resolved { background: var(--turf); color: var(--pitch); }

.thread { display: grid; gap: 8px; margin: 12px 0; }
.bubble {
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--turf);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bubble.staff { background: #E3EEE6; border-left: 4px solid var(--pitch); }
.bubble small {
  display: block;
  color: var(--muted);
  font-size: .8rem;
  margin-bottom: 4px;
  white-space: normal;
}
.reply-form { display: grid; gap: 8px; }

.ticket-view { background: var(--chalk); border-radius: 6px; padding: 16px; margin-top: 12px; }
.ticket-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.4rem;
  color: var(--pitch);
  margin: 0 0 4px;
}
.status-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-top: 12px; }
.status-row .field { flex: 0 1 200px; }


/* ---------- Match news ---------- */
.news-card {
  background: var(--chalk);
  border-left: 6px solid var(--line);
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.news-card.won { border-left-color: var(--pitch); }
.news-card.lost { border-left-color: var(--loss); }
.news-card.void { border-left-color: var(--muted); }
.news-card p { margin: 6px 0 0; }

.news-meta { margin: 0; font-size: .85rem; color: var(--muted); }
.news-tag {
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--turf);
  color: var(--pitch);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-right: 4px;
}
.news-tag.won { background: var(--pitch); color: var(--chalk); }
.news-tag.lost { background: var(--loss); color: var(--chalk); }
.news-tag.void { background: var(--muted); color: var(--chalk); }

.news-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.4rem;
  color: var(--pitch);
  margin: 6px 0 4px;
}
.news-pick { font-weight: 600; }

.news-card.spotlight { background: var(--pitch); border-left-color: var(--card); color: var(--chalk); margin-bottom: 24px; }
.news-card.spotlight .news-title { color: var(--card); font-size: 1.7rem; }
.news-card.spotlight .news-meta { color: rgba(255, 255, 255, .8); }
.news-card.spotlight .news-tag { background: var(--card); color: var(--pitch); }

.day-head {
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 18px 0 8px;
}


/* ---------- Legal pages ---------- */
.legal { max-width: 720px; }
.legal h2 {
  font-family: 'Barlow Condensed', sans-serif;
  color: var(--pitch);
  font-size: 1.5rem;
  margin: 28px 0 8px;
}
.legal p,
.legal li { line-height: 1.65; }
.legal .updated { color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--pitch);
  color: var(--chalk);
  margin-top: 40px;
  padding: 28px 20px 90px;   /* extra bottom space so the Help button never covers text */
}
.footer-inner { max-width: 760px; margin: 0 auto; display: grid; gap: 16px; }
.footer-inner p { margin: 6px 0 0; opacity: .85; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { color: var(--chalk); font-weight: 600; }
.footer-small { font-size: .85rem; }

/* ---------- Floating Help button ---------- */
.help-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  color: var(--pitch);
  font-weight: 700;
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.help-fab span {
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--pitch);
  color: var(--card);
  font-size: .85rem;
}

/* ---------- Wider pages on PC (results, admin) ---------- */
main.wide { max-width: 1040px; }

@media (min-width: 900px) {
  .breakdowns { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
}

/* ---------- News posts ---------- */
.news-card.post { border-left-color: var(--card); }
.news-card details { margin-top: 8px; }
.news-tag.draft { background: var(--card); color: var(--pitch); }

.post-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--chalk);
  border-radius: 6px;
  padding: 12px 14px;
  margin-top: 8px;
}
.post-row .admin-actions { gap: 6px; }
.post-row .news-meta { margin-top: 4px; }

/* ---------- Tables become cards on phones ---------- */
@media (max-width: 600px) {
  table.responsive thead { display: none; }
  table.responsive,
  table.responsive tbody { display: block; }
  table.responsive tr {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 6px 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
  }
  table.responsive th,
  table.responsive td {
    display: block;
    padding: 0;
    border: 0;
    white-space: normal;
  }
  table.responsive th[scope="row"],
  table.responsive .cell-main {
    grid-column: 1 / -1;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--pitch);
  }
  table.responsive td::before {
    content: attr(data-label);
    display: block;
    font-size: .72rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
  }
  table.responsive .cell-main::before { content: none; }

  /* Results page: the three stat boxes sit side by side */
  .results-page .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .results-page .stat { padding: 10px; }
  .results-page .stat h3 { font-size: .75rem; }
  .results-page .stat-big { font-size: 1.7rem; }
  .results-page .stat p:not(.stat-big) { font-size: .8rem; }
}

/* ---------- Phones and tablets ---------- */
@media (max-width: 600px) {
  .hero { grid-template-columns: 1fr; }
  .hero-cta { max-width: none; }
}

@media (max-width: 480px) {
  .top { padding: 12px 14px; }
  .nav { order: 3; width: 100%; margin: 8px 0 0; }
  .account .btn { padding: 6px 10px; font-size: .9rem; }
  .tip { grid-template-columns: 1fr 1fr; }
  .tip div:first-child { grid-column: 1 / -1; }
  .calc-result { grid-template-columns: 1fr; }
}

/* ---------- Reduce motion (respects phone settings) ---------- */
@media (prefers-reduced-motion: reduce) {
  .ball { animation: none; }
  .ball-football { left: 42%; }
}