/* TennisTips: dark design from the spec mockups (lime accent on deep green-black) */
:root {
  --bg: #0b100e; --bg2: #0f1513; --card: #151e1b; --card2: #1a2421; --line: #24312d;
  --fg: #eef3ef; --mut: #93a29c; --dim: #66756f;
  --lime: #d4f24a; --lime-d: #b6d42f; --lime-bg: #1d2614; --lime-line: #4b5a1c;
  --blue: #5b7ee8; --blue-bg: #1a2338; --red: #ef6b5f; --red-bg: #2a1614; --green: #7ad67a;
  --r: 14px; --r2: 10px;
  --font: "Noto Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.55 var(--font); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--lime); }
img { max-width: 100%; }
.wrap { max-width: 1100px; margin: 0 auto; padding-inline: max(16px, env(safe-area-inset-left, 0px)); }
main.wrap { padding-block: 28px 56px; }
h1 { font-size: 30px; line-height: 1.2; margin: 0 0 6px; }
h2 { font-size: 20px; margin: 0 0 14px; }
h3 { font-size: 16px; margin: 0 0 10px; }
p { margin: 0 0 12px; }
.mut { color: var(--mut); } .dim { color: var(--dim); } .lime { color: var(--lime); } .red { color: var(--red); } .grn { color: var(--green); }
.small { font-size: 13px; } .tiny { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.num { font-variant-numeric: tabular-nums; font-weight: 700; }

/* header */
.hdr { position: sticky; top: 0; z-index: 20; background: rgba(11,16,14,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.hdr .wrap { display: flex; align-items: center; gap: 22px; height: 60px; }
.logo { font-weight: 800; font-size: 19px; white-space: nowrap; } .logo b { color: var(--lime); }
.nav { display: flex; gap: 18px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav a { color: var(--mut); font-size: 14px; white-space: nowrap; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a.on { color: var(--fg); border-color: var(--lime); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 10px; padding: 10px 18px; font-weight: 700; font-size: 14px; border: 1px solid var(--line); background: transparent; color: var(--fg); cursor: pointer; white-space: nowrap; }
.btn.pri { background: var(--lime); color: #10140a; border-color: var(--lime); }
.btn.pri:hover { background: var(--lime-d); color: #10140a; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.burger { display: none; background: none; border: 0; color: var(--fg); font-size: 24px; cursor: pointer; }
@media (max-width: 860px) {
  .burger { display: block; margin-left: auto; }
  .hdr .btn.pri { display: none; }
  .nav { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg2); border-bottom: 1px solid var(--line); padding: 8px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; border: 0; }
}

/* cards & grids */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; min-width: 0; }
.card.hl { background: var(--lime-bg); border-color: var(--lime-line); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } h1 { font-size: 25px; } }
.sec { margin-top: 32px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.sec-h h2 { margin: 0; }
.stat .v { font-size: 26px; font-weight: 800; } .stat .l { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-top: 4px; }

/* chips & badges */
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); color: var(--mut); font-size: 13px; font-weight: 600; }
.chip.on, a.chip:hover { background: var(--lime); color: #10140a; border-color: var(--lime); }
.badge { display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .04em; background: var(--card2); color: var(--mut); }
.badge.lime { background: var(--lime-bg); color: var(--lime); border: 1px solid var(--lime-line); }
.badge.blue { background: var(--blue-bg); color: #9db3f5; }
.badge.red { background: var(--red-bg); color: var(--red); }
.wl { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 11px; font-weight: 800; }
.wl.w { background: #dff1df; color: #1d5e2a; } .wl.l { background: var(--red-bg); color: var(--red); }

/* tables */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }

/* bars */
.bar { height: 7px; border-radius: 4px; background: var(--blue); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--lime); border-radius: 4px 0 0 4px; }
.bar.solo { background: var(--card2); }

/* avatar */
.av { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--lime); color: #10140a; font-weight: 800; font-size: 13px; flex: none; overflow: hidden; }
.av.b { background: var(--blue); color: #fff; }
.av img { width: 100%; height: 100%; object-fit: cover; }

/* forms */
input, select { background: var(--bg2); color: var(--fg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; font: inherit; font-weight: 700; width: 100%; }
input:focus, select:focus { outline: 2px solid var(--lime-line); border-color: var(--lime-line); }
label { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin: 12px 0 6px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-child { border-bottom: 0; }

/* prose (legal, faq, analysis) */
.prose h2 { font-size: 19px; margin-top: 22px; } .prose h3 { margin-top: 18px; }
.prose p, .prose li { color: #cfd8d3; }
.prose ul { padding-left: 20px; }
.prose a { color: var(--lime); }
details.qa { border-bottom: 1px solid var(--line); padding: 14px 0; }
details.qa summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.qa summary::after { content: "+"; color: var(--mut); }
details.qa[open] summary::after { content: "–"; }
details.qa p { margin: 10px 0 0; color: #cfd8d3; }

/* footer */
.ftr { border-top: 1px solid var(--line); background: var(--bg2); padding-block: 36px 28px; margin-top: 40px; }
.ftr .cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.ftr h4 { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin: 0 0 12px; }
.ftr a { display: block; color: var(--mut); font-size: 14px; padding: 3px 0; }
.ftr .rg { margin-top: 26px; border: 1px solid var(--line); border-radius: var(--r2); padding: 14px 16px; color: var(--mut); font-size: 13px; }
.ftr .copy { color: var(--dim); font-size: 12px; margin-top: 14px; }
@media (max-width: 700px) { .ftr .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.crumbs { font-size: 13px; color: var(--dim); margin-bottom: 14px; } .crumbs a { color: var(--mut); font-weight: 600; }
.empty { text-align: center; padding: 36px 16px; color: var(--mut); }

/* partner brands */
.brands .brow { display: grid; grid-template-columns: 22px 96px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.brands .brow:last-of-type { border-bottom: 0; }
.brands .bn { color: var(--dim); font-weight: 800; }
.blogo { display: grid; place-items: center; width: 96px; height: 44px; border-radius: 10px; background: #fff; overflow: hidden; color: #10140a; font-weight: 800; }
.blogo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.binfo { min-width: 0; } .bname { font-weight: 800; display: block; } .bbonus { color: var(--lime); font-size: 13px; font-weight: 700; }
@media (max-width: 600px) { .brands .brow { grid-template-columns: 76px minmax(0, 1fr) auto; } .brands .bn { display: none; } .blogo { width: 76px; height: 38px; } }
.bbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: #121a17; border-top: 1px solid var(--lime-line); box-shadow: 0 -6px 20px rgba(0,0,0,.4); }
.bbar img { height: 34px; width: 80px; object-fit: contain; background: #fff; border-radius: 8px; padding: 3px; }
.bbar .bt { flex: 1; min-width: 0; font-size: 13px; line-height: 1.3; } .bbar .bt b { display: block; } .bbar .bt span { color: var(--lime); font-weight: 700; }
.bbar button { background: none; border: 0; color: var(--mut); font-size: 22px; cursor: pointer; }
.bbar small { position: absolute; right: 52px; top: -18px; color: var(--dim); font-size: 10px; display: none; }
body { padding-bottom: 64px; }
/* photos */
.av.ph { background: var(--card2); }
.av.ph img { width: 100%; height: 100%; object-fit: cover; }
/* editorial text */
.prose h2 { font-size: 20px; } .prose ul li { margin-bottom: 6px; }

/* Predictions, tour listings, results, and match detail */
body:has(> main.wrap > :is(.ph, .card.mh)) {
  --tt-secondary: #a4b3ac;
  --tt-rule: #2f3e36;
  --tt-surface: #192420;
}

body:has(> main.wrap > :is(.ph, .card.mh)) :is(.hdr, main.wrap, .ftr) :focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

body:has(> main.wrap > :is(.ph, .card.mh)) .hdr {
  box-shadow: 0 4px 16px rgb(0 0 0 / 16%);
}

body:has(> main.wrap > :is(.ph, .card.mh)) .ftr {
  border-top-color: var(--tt-rule);
}

body:has(> main.wrap > :is(.ph, .card.mh)) .ftr :is(h4, .copy) {
  color: var(--tt-secondary);
}

main.wrap > .ph {
  align-items: center;
  gap: 16px 24px;
  padding: clamp(16px, 3vw, 26px);
  border: 1px solid var(--tt-rule);
  border-left: 3px solid var(--lime);
  border-radius: var(--r);
  background: radial-gradient(ellipse at 15% 0%, #263321, transparent 67%), var(--card);
}

main.wrap > .ph h1 {
  margin-bottom: 7px;
  font-size: clamp(27px, 3.7vw, 40px);
  letter-spacing: -.034em;
}

main.wrap > .ph .mut {
  color: var(--tt-secondary);
  font-variant-numeric: tabular-nums;
}

main.wrap > .ph > .chips {
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--tt-rule);
  border-radius: var(--r2);
  background: var(--bg2);
}

main.wrap > .ph .chip {
  border-radius: 7px;
}

main.wrap > .ph .chip:not(.on, :hover) {
  border-color: transparent;
  background: transparent;
  color: var(--tt-secondary);
}

main.wrap:has(> .ph) > .intro {
  color: var(--tt-secondary);
  line-height: 1.65;
}

main.wrap > .filters {
  padding: 12px 16px;
  background: var(--bg2);
}

main.wrap > .filters .tiny {
  color: var(--tt-secondary);
  font-size: 12px;
  font-weight: 700;
}

main.wrap > .filters .chip.on {
  border-color: var(--lime-line);
  background: var(--lime-bg);
  color: var(--lime);
}

main.wrap > .best .card.bt {
  padding: 16px 18px;
  border-color: var(--tt-rule);
  background: linear-gradient(140deg, var(--tt-surface), var(--card));
}

main.wrap > .best .card.bt.hl {
  border-color: var(--lime-line);
  border-top: 2px solid var(--lime);
  background: linear-gradient(145deg, #283322, var(--lime-bg) 68%);
}

main.wrap > .best .bt .tiny {
  color: var(--tt-secondary);
  white-space: normal;
}

main.wrap > .best .bt .lbl {
  font-size: clamp(17px, 2vw, 19px);
  letter-spacing: -.012em;
}

main.wrap > .best .bt .nums {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 10px;
  padding-block: 9px;
  border-block: 1px solid var(--tt-rule);
}

main.wrap > .best .bt .go {
  padding-top: 2px;
}

main.wrap > .grp {
  border-color: var(--tt-rule);
  box-shadow: 0 3px 10px rgb(0 0 0 / 12%);
}

main.wrap > .grp .gh {
  align-items: baseline;
  border-left: 3px solid var(--lime-line);
  background: var(--tt-surface);
  color: var(--tt-secondary);
  font-size: 12px;
  font-weight: 680;
  letter-spacing: .035em;
}

main.wrap > .grp .gh > span {
  flex: none;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

main.wrap > .grp .row:nth-child(odd) {
  background: rgb(0 0 0 / 10%);
}

main.wrap > .grp .row:is(:hover, :focus-visible) {
  background: #1d2a21;
  box-shadow: inset 3px 0 var(--lime);
}

main.wrap > .grp .row:focus-visible {
  outline-offset: -2px;
}

main.wrap > .grp .row .t {
  color: var(--tt-secondary);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

main.wrap > .grp .row .pn {
  line-height: 1.3;
}

main.wrap > .grp .row .rk {
  color: var(--tt-secondary);
}

main.wrap > .grp .row .pn.won .nm {
  color: var(--green);
}

main.wrap > .grp .row .mt > small:not(.tip, .live) {
  color: var(--tt-secondary);
  font-variant-numeric: tabular-nums;
}

main.wrap > .grp .row .ob {
  border-color: var(--tt-rule);
  background: var(--bg2);
  font-variant-numeric: tabular-nums;
}

main.wrap > .grp .row .ob.on {
  border-color: var(--lime-line);
  background: var(--lime-bg);
}

main.wrap > .grp .row .ob small {
  color: var(--tt-secondary);
  font-size: 11px;
}

main.wrap > .grp .row .ob.on small {
  color: var(--lime);
}

main.wrap:has(> :is(.ph, .card.mh)) .sec.card.prose {
  border-color: var(--tt-rule);
  background: var(--bg2);
}

main.wrap:has(> :is(.ph, .card.mh)) .prose :is(p, li) {
  max-width: 80ch;
  line-height: 1.7;
}

main.wrap:has(> :is(.ph, .card.mh)) .qa[open] > summary {
  color: var(--lime);
}

main.wrap:has(> :is(.ph, .card.mh)) .brands .brow {
  border-color: var(--tt-rule);
}

main.wrap:has(> :is(.ph, .card.mh)) .brands .bbonus {
  overflow-wrap: anywhere;
}

main.wrap > .empty {
  border-style: dashed;
  border-color: var(--tt-rule);
  background: var(--bg2);
  color: var(--tt-secondary);
}

@media (max-width: 600px) {
  main.wrap > .ph .chip {
    padding: 8px 11px;
  }

  main.wrap > .filters .chip {
    min-height: 34px;
  }

  main.wrap > .grp .row .pn {
    align-items: start;
    gap: 5px;
  }

  main.wrap > .grp .row .pn .nm {
    overflow-wrap: anywhere;
    white-space: normal;
  }

  main.wrap > .grp .row .rk {
    padding-top: 3px;
  }
}

@media (max-width: 420px) {
  main.wrap > .grp .row {
    grid-template-columns: 34px minmax(0, 1fr) 44px 44px;
    gap: 6px;
    padding-inline: 10px;
  }

  main.wrap > .grp .row .av {
    width: 20px;
    height: 20px;
  }

  main.wrap > .grp .row .rk {
    font-size: 10px;
  }

  main.wrap:has(> :is(.ph, .card.mh)) .brands .brow {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 8px;
  }

  main.wrap:has(> :is(.ph, .card.mh)) .brands .blogo {
    width: 58px;
  }

  main.wrap:has(> :is(.ph, .card.mh)) .brands .btn {
    padding-inline: 7px;
  }
}

/* Match detail: the hero card styles live in match.html. */
main.wrap:has(> .card.mh) .pick {
  box-shadow: inset 3px 0 var(--lime);
}

main.wrap:has(> .card.mh) .tbl-wrap {
  border: 1px solid var(--line);
  border-radius: var(--r2);
}

main.wrap:has(> .card.mh) .tbl th {
  background: var(--bg2);
  color: var(--mut);
}

main.wrap:has(> .card.mh) .tbl tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--card2) 66%, var(--card));
}

main.wrap:has(> .card.mh) .card.pick {
  border-color: #708438;
  background: linear-gradient(140deg, #293921, var(--lime-bg) 72%);
  box-shadow: inset 4px 0 var(--lime);
}

main.wrap:has(> .card.mh) .pick .big {
  color: var(--lime);
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: -.028em;
}

main.wrap:has(> .card.mh) .pick > .grid {
  padding-block: 10px;
  border-block: 1px solid var(--lime-line);
}

main.wrap:has(> .card.mh) .pick :is(.tiny:not(.lime), p.dim) {
  color: var(--mut);
}

main.wrap:has(> .card.mh) .card .sec-h {
  padding-bottom: 9px;
  border-bottom: 1px solid #3a4c41;
}

main.wrap:has(> .card.mh) .tbl th {
  background: #26372d;
  color: var(--fg);
}

main.wrap:has(> .card.mh) .h2hs > div:first-child,
main.wrap:has(> .card.mh) .h2hs > div:last-child {
  padding-block: 10px;
  border-radius: var(--r2);
  background: var(--card2);
}

main.wrap:has(> .card.mh) .keys li::marker,
main.wrap:has(> .card.mh) details summary::marker {
  color: var(--lime);
}

/* Keep the daily board dense. */
main.wrap:has(> .ph) {
  padding-top: 20px;
}

main.wrap > .ph {
  gap: 10px 16px;
  padding: 12px 15px;
  margin-bottom: 10px;
  background: var(--card);
}

main.wrap > .ph h1 {
  margin-bottom: 3px;
  font-size: clamp(25px, 3.1vw, 34px);
}

main.wrap > .ph .chip {
  padding: 5px 11px;
}

main.wrap:has(> .ph) > .intro {
  margin-bottom: 13px;
  line-height: 1.56;
}

main.wrap > .filters {
  padding: 8px 13px;
}

main.wrap > .best {
  margin-top: 13px;
}

main.wrap > .best .sec-h {
  gap: 3px 12px;
}

main.wrap > .best .sec-h .dim {
  color: var(--tt-secondary);
}

main.wrap > .best .grid {
  gap: 10px;
}

main.wrap > .best .card.bt {
  gap: 5px;
  padding: 11px 13px;
}

main.wrap > .best .bt .nums {
  gap: 4px;
  padding-block: 0;
  border-block: 0;
}

main.wrap > .best .bt .nums > span {
  min-width: 0;
  padding: 4px 6px;
  border-radius: 5px;
  background: var(--bg2);
  color: var(--tt-secondary);
  font-size: 11px;
  line-height: 1.35;
}

main.wrap > .best .bt .nums b {
  display: block;
  color: var(--fg);
  font-size: 14px;
  line-height: 1.15;
}

main.wrap > .best .bt .nums > span:first-child b {
  color: var(--lime);
}

main.wrap > .best .bt .go {
  padding-top: 0;
}

main.wrap > .grp {
  margin-top: 12px;
}

main.wrap > .grp .gh {
  background: #203021;
  border-left-color: var(--lime);
  color: #d3e0cf;
}

main.wrap > .grp .row .ob.on {
  border-color: #687e3d;
  background: #26351d;
}

main.wrap > .grp .row:has(.pn.won) .mt > small:not(.tip, .live) {
  width: fit-content;
  margin-top: 5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #222e1c;
  color: #c0dec0;
}

@media (min-width: 375px) and (max-width: 600px), (min-width: 1070px) {
  main.wrap > .best .bt .nums {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  main.wrap > .ph .chip {
    min-height: 34px;
  }

  main.wrap > .filters {
    gap: 5px;
  }

  main.wrap > .filters .chips {
    gap: 5px;
  }

  main.wrap > .filters .chip {
    padding-inline: 9px;
  }
}
/* phones (QA 2026-11-20): number tiles two by two, the tip numbers in one row, small tables scroll instead of breaking scores */
@media (max-width: 600px) {
  .grid.g2:has(> .stat), .grid.g3:has(> .stat), .grid.g4:has(> .stat) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat .v { font-size: 22px; }
  .card.hl .grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .card.hl .grid.g3 .v { font-size: 18px !important; }
  .tbl.sm td, .tbl.sm th { white-space: nowrap; }
}
