/* Toli brand layer — loaded last. Court-mat green, white court lines, shuttle-lime actions.
   Replaces the photo background (bg.jpg, 3.3 MB) with drawn court lines. */
:root{
  --court:#0E5A47;        /* synthetic court mat */
  --court-deep:#09402F;
  --line:#FFFFFF;         /* court lines */
  --lime:#D4F34A;         /* shuttle / primary action */
  --lime-ink:#1F2A05;
  --ink:#10251E;          /* text */
  --mist:#EEF3F0;         /* page */
  --rule:#D3DFD8;
  --green:var(--court);--green-dark:var(--court-deep);--text:var(--ink);--muted:#4F655C;--border:var(--rule);--bg:var(--mist);
  --font-body:'Barlow',system-ui,-apple-system,'Segoe UI',sans-serif;
  --font-display:'Barlow Condensed','Barlow',system-ui,sans-serif;
  --shadow:0 1px 2px #10251E0d,0 8px 24px #10251E0a;
  --radius-lg:20px;--radius:14px;--radius-sm:10px;
}
html{background:var(--mist)}
body{
  font-family:var(--font-body);color:var(--ink);
  background:var(--mist);
}
h1,h2,h3,.card-title,.app-logo,.stat .v,.overall-number{font-family:var(--font-display)}
h1{font-weight:700;letter-spacing:-.01em;line-height:1.02}
h2,h3{font-weight:700;letter-spacing:0}

/* ---------- App shell ---------- */
.main-menu{background:#fff;border:1px solid var(--rule);border-radius:var(--radius-lg);box-shadow:var(--shadow);backdrop-filter:none}
.app-logo{display:inline-flex;align-items:center;gap:10px;font-family:var(--font-display);font-size:26px;font-weight:800;letter-spacing:.01em;color:var(--court);text-decoration:none}
.app-logo::before{content:'';width:30px;height:30px;flex:none;border-radius:8px;background:var(--court) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cg fill='none' stroke='%23fff' stroke-width='1.6'%3E%3Crect x='6' y='5' width='18' height='20'/%3E%3Cpath d='M6 15h18M15 5v20'/%3E%3C/g%3E%3Ccircle cx='21' cy='9' r='3.2' fill='%23D4F34A'/%3E%3C/svg%3E") center/100% no-repeat}
.app-logo span{font-family:var(--font-body);font-size:11px;font-weight:600;letter-spacing:.04em;color:var(--muted);text-transform:none}
.nav-link{font-weight:600;color:var(--muted)}.nav-link.active,.nav-link[aria-current]{color:var(--court)}
.account-chip{border-color:var(--rule);background:var(--mist);color:var(--ink)}

.btn{border-radius:var(--radius-sm);font-weight:700;letter-spacing:0;box-shadow:none}
.btn-green{background:var(--court);color:#fff;box-shadow:none}
.btn-green:hover{background:var(--court-deep);box-shadow:0 6px 16px #0E5A4733}
.btn-secondary,.btn-outline{background:#fff;color:var(--ink);border:1px solid var(--rule)}
.btn-secondary:hover,.btn-outline:hover{background:var(--mist);border-color:#B4C8BD}
.btn:focus-visible,.tab:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid var(--lime);outline-offset:3px;box-shadow:0 0 0 6px var(--court)}

.card,.stat,.insight,.quick-note-item,.team-block{background:#fff;border:1px solid var(--rule);box-shadow:var(--shadow);border-radius:var(--radius)}
.card-header{background:#fff;border-color:var(--rule)}
.card-title{font-size:24px;font-weight:700}
.stat .v,.avg-bold{color:var(--court);font-weight:800}
.stat-featured{background:var(--court);border-color:var(--court)}.stat-featured .v{color:var(--lime)}.stat-featured .l{color:#CFE5DB}

/* Home heading becomes a court panel */
.home-heading{background:var(--court) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1340 610'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.18' stroke-width='6'%3E%3Crect x='3' y='3' width='1334' height='604'/%3E%3Cpath d='M3 46h1334M3 564h1334M76 3v604M1264 3v604M472 3v604M868 3v604M3 305h469M868 305h469'/%3E%3C/g%3E%3Cpath d='M670 -10v630' stroke='%23D4F34A' stroke-opacity='.5' stroke-width='8' stroke-dasharray='3 14'/%3E%3C/svg%3E") right 28px center/auto 78% no-repeat;border:0;border-radius:var(--radius-lg);box-shadow:none;color:#fff}
.home-heading h1{color:#fff;font-size:clamp(36px,5.4vw,64px);letter-spacing:-.01em;text-transform:none}
.home-heading p{color:#D5EAE0}.home-heading small{color:var(--lime);letter-spacing:.02em;text-transform:none;font-weight:600}
.option-card,.option-card:nth-child(n){background:#fff;border:1px solid var(--rule);border-radius:var(--radius);box-shadow:var(--shadow)}
.option-card:after{content:'';width:12px;height:12px;border-radius:50%;background:var(--lime);border:2px solid var(--court);top:22px;right:22px}
.option-card h2{font-size:28px}
@media(hover:hover){.option-card:hover,.competition-card:hover{transform:translateY(-2px);border-color:var(--court);box-shadow:0 10px 24px #0E5A471f}}
.competition-card{border-left:4px solid var(--court)}

/* League header */
.topbar{background:var(--court) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1340 610'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.18' stroke-width='6'%3E%3Crect x='3' y='3' width='1334' height='604'/%3E%3Cpath d='M3 46h1334M3 564h1334M76 3v604M1264 3v604M472 3v604M868 3v604M3 305h469M868 305h469'/%3E%3C/g%3E%3Cpath d='M670 -10v630' stroke='%23D4F34A' stroke-opacity='.5' stroke-width='8' stroke-dasharray='3 14'/%3E%3C/svg%3E") right 28px center/auto 80% no-repeat;border:0;border-radius:var(--radius-lg);box-shadow:none}
.topbar::before,.topbar::after{display:none}
.brand h1{font-size:clamp(36px,5vw,56px);color:#fff}.brand small{color:var(--lime);text-transform:none;letter-spacing:.02em}.brand .tagline{color:#D5EAE0}
.topbar .btn-outline{background:#ffffff14;color:#fff;border-color:#ffffff40}.topbar .btn-outline:hover{background:#ffffff26}

.tabbar{gap:6px;padding:6px;background:#fff;border:1px solid var(--rule);border-radius:var(--radius);width:fit-content;max-width:100%;overflow-x:auto}
.tab{background:transparent;border:0;box-shadow:none;color:var(--muted);border-radius:var(--radius-sm);font-weight:700}
.tab:hover{color:var(--court);background:var(--mist)}
.tab.active{background:var(--court);color:#fff;box-shadow:none}

th{background:var(--mist);color:var(--muted);font-weight:700;text-transform:none;letter-spacing:.01em}
tr:hover td{background:#F4F8F6}
.badge-green,.form-win{background:#E3F6D4;color:#2D5B0B;border-color:#C6E8A4}
.rn{background:var(--mist);color:var(--ink);font-family:var(--font-display);font-weight:700}

/* Login dialog */
.login-backdrop{background:#09402Fcc;backdrop-filter:blur(10px)}
.modal,.login-backdrop .modal{background:#fff;border:1px solid var(--rule);border-radius:var(--radius-lg);box-shadow:0 30px 80px #04201866}
.login-kicker{color:var(--court);letter-spacing:.02em;font-weight:700;text-transform:none}
.login-backdrop h1{font-size:34px}

@media(max-width:700px){body{padding:12px}.home-heading{padding:28px 22px}.tabbar{width:100%}}

/* ---------- Landing page (logged-out visitors) ---------- */
#landing-view{display:block;max-width:1200px;margin:0 auto;color:var(--ink)}
#landing-view[hidden]{display:none}
.app:has(#landing-view:not([hidden])) .main-menu{display:none}
.lp-nav{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:8px 4px 28px}
.lp-nav-actions{display:flex;gap:8px;align-items:center}
.lp-link{background:none;border:0;padding:10px 12px;font:600 15px var(--font-body);color:var(--ink);cursor:pointer;border-radius:var(--radius-sm)}
.lp-link:hover{background:#fff}
.btn-lime{background:var(--lime);color:var(--lime-ink);border:0;font-weight:800}
.btn-lime:hover{background:#C6E83A;box-shadow:0 8px 20px #8DB51E40}

.lp-hero{position:relative;display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:40px;align-items:center;padding:56px;border-radius:28px;background:var(--court);color:#fff;overflow:hidden}
.lp-hero h1{font-size:clamp(48px,7.2vw,96px);line-height:.92;font-weight:800;letter-spacing:-.015em;margin:0 0 22px;color:#fff;text-transform:uppercase;max-width:9ch}
.lp-hero p{font-size:19px;line-height:1.55;color:#D5EAE0;max-width:46ch;margin:0 0 30px}
.lp-cta{display:flex;flex-wrap:wrap;gap:12px}
.lp-cta .btn{min-height:50px;padding:0 22px;font-size:16px}
.lp-hero .btn-ghost{background:transparent;color:#fff;border:1px solid #ffffff59}
.lp-hero .btn-ghost:hover{background:#ffffff14}
.lp-hero .lp-hero-note{margin:18px 0 0;font-size:14px;color:#A9CBBC}

.lp-court{position:relative;aspect-ratio:61/134;justify-self:center;width:100%;max-width:250px}
.lp-court svg{width:100%;height:100%;display:block}
.lp-court .shuttle{transform-origin:center;animation:lp-rally 3.6s cubic-bezier(.45,.05,.4,1) infinite alternate}
@keyframes lp-rally{0%{transform:translate(0,0)}100%{transform:translate(-200px,760px)}}
.lp-table{position:absolute;right:-150px;bottom:40px;width:min(290px,80%);background:#fff;color:var(--ink);border-radius:16px;padding:16px 16px 10px;box-shadow:0 24px 50px #03241a66}
.lp-table header{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:8px}
.lp-table header strong{font:700 20px var(--font-display)}
.lp-table header span{font-size:12px;color:var(--muted);white-space:nowrap}.lp-table header strong{white-space:nowrap}
.lp-row{display:grid;grid-template-columns:22px 1fr auto auto;gap:10px;align-items:center;padding:8px 0;border-top:1px solid #E6EEE9;font-size:14px}
.lp-row b{font:800 16px var(--font-display);color:var(--court)}
.lp-pts{font:700 16px var(--font-display);font-variant-numeric:tabular-nums}
.lp-form{display:flex;gap:3px}.lp-form i{width:7px;height:7px;border-radius:50%;background:#C8D6CE}.lp-form i.w{background:#3E8E1A}
.lp-logged{position:absolute;left:-90px;top:60px;background:var(--lime);color:var(--lime-ink);font-weight:700;font-size:14px;padding:10px 14px;border-radius:12px;box-shadow:0 14px 30px #03241a55}

.lp-sports{display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding:26px 4px 8px}
.lp-sports span{font-size:14px;color:var(--muted);margin-right:6px}
.lp-chip{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border-radius:999px;background:#fff;border:1px solid var(--rule);font-weight:600;font-size:15px}
.lp-chip.live{background:var(--court);color:#fff;border-color:var(--court)}
.lp-chip.live::before{content:'';width:8px;height:8px;border-radius:50%;background:var(--lime)}
.lp-chip small{font-size:12px;color:var(--muted);font-weight:500}

.lp-section{padding:80px 4px 0}
.lp-section>h2{font-size:clamp(34px,4.4vw,52px);line-height:1;margin:0 0 14px;max-width:16ch}
.lp-section>p.lp-lede{font-size:18px;color:var(--muted);max-width:56ch;margin:0 0 36px;line-height:1.6}
.lp-features{display:grid;grid-template-columns:1.3fr 1fr;grid-template-rows:auto auto;gap:16px}
.lp-feature{background:#fff;border:1px solid var(--rule);border-radius:var(--radius-lg);padding:30px}
.lp-feature h3{font-size:28px;margin:0 0 10px;line-height:1.05}
.lp-feature p{margin:0;color:var(--muted);line-height:1.6;font-size:16px}
.lp-feature.big{grid-row:span 2;display:flex;flex-direction:column;justify-content:space-between;gap:26px}
.lp-score{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:14px;padding:22px;border-radius:16px;background:var(--mist)}
.lp-score .side{display:grid;gap:4px}.lp-score .side strong{font:700 18px var(--font-display)}.lp-score .side small{color:var(--muted)}
.lp-score .side:last-child{text-align:right}
.lp-score .num{font:800 44px/1 var(--font-display);color:var(--court);font-variant-numeric:tabular-nums}
.lp-score .num em{font-style:normal;color:#9AB0A6}
.lp-score .winner{grid-column:1/-1;display:flex;justify-content:space-between;font-size:14px;color:var(--muted);border-top:1px dashed var(--rule);padding-top:12px}
.lp-score .winner b{color:var(--court)}

.lp-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;counter-reset:step;list-style:none;padding:0;margin:0}
.lp-steps li{counter-increment:step;padding:26px 26px 28px;border-top:3px solid var(--court);background:#fff;border-radius:0 0 var(--radius) var(--radius)}
.lp-steps li::before{content:counter(step);display:block;font:800 48px/1 var(--font-display);color:var(--court);margin-bottom:12px}
.lp-steps h3{font-size:24px;margin:0 0 6px}.lp-steps p{margin:0;color:var(--muted);line-height:1.55}

.lp-final{margin:80px 0 0;padding:52px;border-radius:28px;background:var(--court-deep);color:#fff;display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:24px}
.lp-final h2{font-size:clamp(32px,4vw,48px);margin:0;max-width:18ch;color:#fff}
.lp-final p{margin:8px 0 0;color:#B6D3C6}
.lp-footer{display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;padding:30px 4px 10px;color:var(--muted);font-size:14px}
.lp-footer a{color:var(--ink)}

@media(max-width:900px){
  .lp-hero{grid-template-columns:minmax(0,1fr);padding:36px 24px 28px;gap:28px}
  .lp-court{max-width:300px}
  .lp-court{max-width:200px}.lp-table{right:-110px;bottom:20px}.lp-logged{left:-70px}
  .lp-features{grid-template-columns:1fr}.lp-feature.big{grid-row:auto}
  .lp-steps{grid-template-columns:1fr}
  .lp-final{padding:32px 24px}
}
@media(max-width:560px){
  .lp-nav .lp-link.hide-sm{display:none}
  .lp-hero h1{font-size:52px}
  .lp-hero p{font-size:17px}
  .lp-cta .btn{width:100%;justify-content:center}
  .lp-section{padding-top:56px}
}
@media(prefers-reduced-motion:reduce){.lp-court .shuttle{animation:none}}
.login-backdrop .modal-header{position:relative}
.login-close{position:absolute;top:14px;right:14px;width:40px;height:40px;border-radius:50%;border:1px solid var(--rule);background:#fff;font-size:24px;line-height:1;color:var(--ink);cursor:pointer}
.login-close:hover{background:var(--mist)}

@media(max-width:560px){
  .lp-table header span{display:none}
  .lp-court{max-width:none;aspect-ratio:auto;display:grid;grid-template-columns:110px minmax(0,1fr);gap:14px;align-items:center}
  .lp-court svg{width:110px;height:auto;aspect-ratio:61/134}
  .lp-table{position:static;width:auto;box-shadow:0 14px 30px #03241a55}
  .lp-logged{left:8px;top:auto;bottom:14px;font-size:12px;padding:7px 10px}
  .lp-score{grid-template-columns:1fr;text-align:center}.lp-score .side:last-child{text-align:center}
  .lp-score .winner{flex-direction:column;gap:4px;align-items:center}
  .lp-final h2{font-size:32px}
}

.option-card:nth-child(2n){background:var(--court);border-color:var(--court);color:#fff}
.option-card:nth-child(2n) h2{color:#fff}.option-card:nth-child(2n) p{color:#D5EAE0}
.option-card:nth-child(2n):after{background:var(--lime);border-color:#fff}
.option-card h2{color:var(--ink)}.option-card p{color:var(--muted)}
.card-header .card-title{color:var(--ink)}
.competition-card .badge{display:inline-block;width:auto}
@media(max-width:700px){.home-heading,.topbar{background-size:auto 55%;background-position:right -40px bottom 12px}}
.card.hero-card{background:var(--court);border-color:var(--court);color:#fff}
.hero-card .card-header{background:transparent;border-color:#ffffff26}
.hero-card .card-header .card-title{color:#fff!important}
.hero-pill{background:#ffffff14;color:#fff;border-color:#ffffff40}.hero-pill:hover{background:var(--lime);color:var(--lime-ink)}
.tab{font-size:14px;white-space:nowrap}
.nav-account .btn,.account-chip{white-space:nowrap}
@media(max-width:560px){.tabbar{display:flex}.tab{flex:1;padding:0 8px;font-size:13px}}
