/* FG Tour portal — shared theme + leaderboard styles
   Palette sampled from the official 2026 leaderboard chart. */
:root {
  --ink:        #141414;
  --ink-soft:   #3a3a3a;
  --orange:     #F2A007;   /* accent: ranks, points */
  --orange-deep:#E2890A;
  --gold:       #FBAB05;   /* rank-1 highlight + header right */
  --peach-hi:   #FFF1DD;   /* header glossy highlight */
  --orange-lite:#FFB84F;
  --row-line:   #ECECEC;
  --muted:      #AEB2B2;   /* below-cut grey */
  --pill:       #101010;
  --page-bg:    #EEF0F3;
  --card:       #FFFFFF;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.display { font-family: "Saira Condensed", "Inter", sans-serif; }

/* ------------------------------------------------------------------ nav */
.site-nav {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1080px; margin: 0 auto; padding: 14px 20px;
}
.site-nav .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.site-nav .brand img { height: 34px; width: auto; display: block; }
.site-nav .brand b {
  font-family: "Saira Condensed", sans-serif; font-weight: 800; font-style: italic;
  font-size: 1.15rem; letter-spacing: .02em; color: var(--ink); text-transform: uppercase;
  white-space: nowrap;
}
.site-nav .brand { flex: none; }
.site-nav .links { flex-wrap: wrap; justify-content: flex-end; }
.site-nav .links { display: flex; gap: 4px; }
.site-nav .links a {
  text-decoration: none; color: var(--ink-soft); font-weight: 700; font-size: .82rem;
  text-transform: uppercase; letter-spacing: .04em;
  padding: 8px 14px; border-radius: 999px; transition: background .15s, color .15s;
}
.site-nav .links a:hover { background: rgba(0,0,0,.05); }
.site-nav .links a.active { background: var(--ink); color: #fff; }

/* --------------------------------------------------------------- board */
.wrap { max-width: 1080px; margin: 0 auto; padding: 6px 20px 56px; }

.board-card {
  background: var(--card);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(20,20,20,.14), 0 2px 6px rgba(20,20,20,.06);
}

.board-head {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: clamp(20px, 4.2vw, 40px) clamp(22px, 4.5vw, 48px);
  background:
    radial-gradient(135% 130% at 58% -35%, var(--peach-hi) 0%, var(--orange-lite) 30%, #F8A511 62%, #EF9606 100%);
}
.board-head .head-left { display: flex; flex-direction: row; align-items: center; gap: 16px; flex-wrap: wrap; min-width: 0; }
.board-title {
  margin: 0;
  font-family: "Saira Condensed", sans-serif;
  font-weight: 800; font-style: italic; text-transform: uppercase;
  color: var(--ink);
  font-size: clamp(2rem, 5.4vw, 3.4rem);
  line-height: .88; letter-spacing: -.005em;
  white-space: nowrap;
}
.state-pill {
  align-self: center; flex: none;
  background: var(--pill); color: #fff;
  font-family: "Saira Condensed", sans-serif; font-weight: 600; font-style: italic;
  text-transform: uppercase; letter-spacing: .12em;
  font-size: clamp(.72rem, 1.7vw, 1.05rem);
  padding: .42em 1.1em; border-radius: 999px;
}
.board-logo {
  height: clamp(42px, 6.8vw, 83px); width: auto; flex: none; max-width: 40%;
  object-fit: contain;
}

.board-body {
  position: relative;
  padding: clamp(14px, 3.4vw, 36px) clamp(18px, 4vw, 44px) clamp(22px, 4vw, 40px);
  overflow: hidden;
}
.board-watermark {
  position: absolute; right: -4%; bottom: -16%;
  width: 58%; aspect-ratio: 83/58;
  background: url("images/fg-mark.png") right bottom / contain no-repeat;
  opacity: .045; transform: skewX(-8deg);
  pointer-events: none; z-index: 0;
}

.cols {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr;
  column-gap: clamp(22px, 5vw, 70px);
}
@media (max-width: 720px) { .cols { grid-template-columns: 1fr; row-gap: 0; } }

.row {
  display: grid; grid-template-columns: 46px 1fr auto;
  align-items: center; gap: 10px;
  padding: clamp(9px, 1.4vw, 13px) 4px;
  border-bottom: 1px solid var(--row-line);
}
.row .c-rank {
  color: var(--orange); font-weight: 800;
  font-size: clamp(.92rem, 1.5vw, 1.08rem); font-variant-numeric: tabular-nums;
}
.row .c-name {
  color: var(--ink); font-weight: 800; text-transform: uppercase;
  font-size: clamp(.86rem, 1.4vw, 1rem); letter-spacing: .005em;
  line-height: 1.12; min-width: 0;
}
.row .c-pts {
  color: var(--orange); font-weight: 800; text-align: right;
  font-size: clamp(.92rem, 1.5vw, 1.08rem); font-variant-numeric: tabular-nums;
}

/* header labels */
.row.row-head { border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.row.row-head span { color: var(--ink); font-weight: 800; font-size: .72rem; letter-spacing: .08em; }
.row.row-head .c-pts { text-align: right; }

/* rank-1 winner highlight */
.row.is-first {
  background: var(--gold);
  border-radius: 14px; border-bottom-color: transparent;
  padding-left: 12px; padding-right: 12px; margin: 2px 0;
  box-shadow: 0 6px 16px rgba(248,165,17,.35);
}
.row.is-first .c-rank, .row.is-first .c-name, .row.is-first .c-pts { color: var(--ink); }

/* below the cut */
.row.below-cut .c-rank, .row.below-cut .c-pts { color: var(--muted); }
.row.below-cut .c-name { color: var(--muted); }

/* clickable rows -> profile */
.row.link { cursor: pointer; text-decoration: none; }
.row.link:hover:not(.is-first) { background: rgba(242,160,7,.07); border-radius: 10px; }

/* the cut divider */
.cut {
  display: flex; align-items: center; text-align: center;
  color: var(--orange-deep); font-weight: 700; font-size: .76rem;
  letter-spacing: .04em; margin: 8px 2px;
}
.cut::before, .cut::after { content: ""; flex: 1; height: 1px; background: #EBC98A; }
.cut span { padding: 0 12px; white-space: nowrap; }

/* footer note */
.board-foot {
  max-width: 1080px; margin: 18px auto 0; padding: 0 20px;
  color: #8a8d92; font-size: .76rem; text-align: center; line-height: 1.5;
}
.board-foot a { color: var(--orange-deep); text-decoration: none; }

/* ============================================================ inner pages */
.page-head {
  max-width: 1080px; margin: 0 auto; padding: 8px 20px 0;
}
.page-head h1 {
  font-family: "Saira Condensed", sans-serif; font-weight: 800; font-style: italic;
  text-transform: uppercase; color: var(--ink); margin: 6px 0 2px;
  font-size: clamp(1.6rem, 4.5vw, 2.6rem); letter-spacing: -.005em;
}
.page-head .sub { color: #6b7075; font-weight: 600; font-size: .9rem; }
.page-head .crumb { color: var(--orange-deep); text-decoration: none; font-weight: 700; font-size: .8rem; }

.toolbar { display: flex; gap: 10px; align-items: center; margin: 14px 0 4px; flex-wrap: wrap; }
.search {
  flex: 1; min-width: 180px; max-width: 420px;
  border: 1px solid #dfe2e6; border-radius: 999px; padding: 10px 16px;
  font: inherit; font-size: .92rem; background: #fff; color: var(--ink);
}
.search:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(242,160,7,.15); }

/* card grid */
.grid {
  max-width: 1080px; margin: 14px auto 60px; padding: 0 20px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px;
}
.pcard {
  display: flex; align-items: center; gap: 14px; text-decoration: none;
  background: var(--card); border: 1px solid #eceef1; border-radius: 16px;
  padding: 14px 16px; box-shadow: 0 4px 14px rgba(20,20,20,.05);
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.pcard:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(20,20,20,.12); border-color: #e2c89a; }
.pcard .rankchip {
  flex: none; width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; font-weight: 800; font-size: 1.05rem;
  background: #fff4dd; color: var(--orange-deep); font-variant-numeric: tabular-nums;
}
.pcard.top1 .rankchip { background: var(--gold); color: var(--ink); box-shadow: 0 4px 12px rgba(248,165,17,.4); }
.pcard.top3 .rankchip { background: #ffe7b8; }
.pcard .who { min-width: 0; flex: 1; }
.pcard .who .nm { font-weight: 800; color: var(--ink); text-transform: uppercase; font-size: .95rem; line-height: 1.1; }
.pcard .who .meta { color: #80858b; font-size: .78rem; margin-top: 3px; }
.pcard .pts { text-align: right; flex: none; }
.pcard .pts b { display: block; font-size: 1.3rem; font-weight: 800; color: var(--orange-deep); font-variant-numeric: tabular-nums; line-height: 1; }
.pcard .pts span { font-size: .68rem; color: #9aa0a6; text-transform: uppercase; letter-spacing: .06em; }

/* profile hero */
.phero {
  max-width: 1080px; margin: 12px auto 0; padding: 0 20px;
}
.phero-card {
  background: linear-gradient(135deg, #fff 0%, #fff 60%, #fff7ea 100%);
  border: 1px solid #eceef1; border-radius: 22px; padding: clamp(18px,3vw,30px);
  box-shadow: 0 14px 36px rgba(20,20,20,.08); position: relative; overflow: hidden;
  display: flex; align-items: center; gap: clamp(16px, 3vw, 30px); flex-wrap: wrap;
}
.phero-card .avatar {
  flex: none; width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-items: center; font-family: "Saira Condensed", sans-serif;
  font-weight: 800; font-size: 1.8rem; color: #fff;
  background: linear-gradient(135deg, var(--orange-lite), var(--orange-deep));
  box-shadow: 0 6px 16px rgba(226,137,10,.35);
}
.phero-card .pid { flex: 1; min-width: 200px; }
.phero-card .pid h1 {
  font-family: "Saira Condensed", sans-serif; font-weight: 800; font-style: italic;
  text-transform: uppercase; font-size: clamp(1.7rem,5vw,2.8rem); margin: 0; line-height: .95; color: var(--ink);
}
.phero-card .pid .sub { color: #6b7075; font-weight: 600; font-size: .88rem; margin-top: 6px; }
.phero-card .standing { flex: none; text-align: center; padding-left: clamp(8px,2vw,20px); }
.phero-card .standing .rk {
  font-family: "Saira Condensed", sans-serif; font-weight: 800; font-style: italic;
  font-size: clamp(2rem,6vw,3.2rem); color: var(--orange-deep); line-height: 1;
}
.phero-card .standing .pl { font-size: .72rem; color: #9aa0a6; text-transform: uppercase; letter-spacing: .08em; }
.phero-card .standing .pts { font-weight: 800; color: var(--ink); font-size: 1.1rem; margin-top: 6px; }

/* tabs */
.tabs { max-width: 1080px; margin: 18px auto 0; padding: 0 20px; display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button {
  border: none; background: #eef0f3; color: var(--ink-soft); font: inherit; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; font-size: .8rem;
  padding: 9px 16px; border-radius: 999px; cursor: pointer; transition: background .12s, color .12s;
}
.tabs button:hover { background: #e4e7ea; }
.tabs button.active { background: var(--ink); color: #fff; }
.tab-panel { max-width: 1080px; margin: 14px auto 60px; padding: 0 20px; }
.tab-panel[hidden] { display: none; }

/* generic stat tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px,1fr)); gap: 12px; margin-bottom: 18px; }
.tile { background: #fff; border: 1px solid #eceef1; border-radius: 14px; padding: 14px; box-shadow: 0 3px 10px rgba(20,20,20,.04); }
.tile .v { font-family: "Saira Condensed", sans-serif; font-weight: 800; font-size: 1.7rem; color: var(--ink); line-height: 1; }
.tile .v small { font-size: .9rem; color: #9aa0a6; }
.tile .k { color: #80858b; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; margin-top: 6px; }
.tile .x { color: #9aa0a6; font-size: .72rem; margin-top: 3px; }

.section-title {
  font-family: "Saira Condensed", sans-serif; font-weight: 800; font-style: italic; text-transform: uppercase;
  font-size: 1.15rem; color: var(--ink); margin: 20px 0 10px;
}

/* events / points breakdown table */
.evtable { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #eceef1; border-radius: 14px; overflow: hidden; }
.evtable th { text-align: left; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: #80858b; padding: 10px 12px; background: #faf7f1; border-bottom: 1px solid #eceef1; }
.evtable td { padding: 11px 12px; border-bottom: 1px solid #f1f2f4; font-size: .88rem; }
.evtable tr:last-child td { border-bottom: none; }
.evtable td.r, .evtable th.r { text-align: right; font-variant-numeric: tabular-nums; }
.evtable tr.counts { background: #fff8ea; }
.evtable tr.counts td { font-weight: 700; }
.evtable .epts { font-weight: 800; color: var(--orange-deep); }
.evtable .star { color: var(--orange); font-weight: 800; }
.evtable .muted { color: #9aa0a6; }

/* scorecards */
.sccard { background: #fff; border: 1px solid #eceef1; border-radius: 16px; margin-bottom: 12px; overflow: hidden; box-shadow: 0 3px 10px rgba(20,20,20,.04); }
.sccard > summary { list-style: none; cursor: pointer; padding: 14px 16px; display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.sccard > summary::-webkit-details-marker { display: none; }
.sccard .sc-h { display: flex; flex-direction: column; gap: 2px; }
.sccard .sc-h b { font-weight: 800; color: var(--ink); font-size: .95rem; }
.sccard .sc-h span { color: #80858b; font-size: .78rem; }
.sccard .sc-tot { text-align: right; }
.sccard .sc-tot b { font-size: 1.3rem; color: var(--orange-deep); font-weight: 800; }
.sccard .sc-tot span { display: block; font-size: .68rem; color: #9aa0a6; text-transform: uppercase; }
.sc-wrap { overflow-x: auto; padding: 0 8px 14px; }
table.sc { border-collapse: collapse; width: 100%; min-width: 620px; font-variant-numeric: tabular-nums; }
table.sc th, table.sc td { text-align: center; padding: 6px 4px; font-size: .78rem; }
table.sc th { color: #9aa0a6; font-weight: 700; }
table.sc td.lbl, table.sc th.lbl { text-align: left; color: #80858b; font-weight: 700; text-transform: uppercase; font-size: .66rem; white-space: nowrap; padding-left: 10px; }
table.sc tr.parrow td { color: #6b7075; }
table.sc td.seg { background: #faf7f1; font-weight: 800; color: var(--ink); }
table.sc .hsep { border-left: 2px solid #eceef1; }

.pill { display: inline-grid; place-items: center; width: 26px; height: 26px; font-weight: 800; font-size: .78rem; border-radius: 7px; }
.pill.circle { border-radius: 50%; }
.pill.g-eagle { background: #16a34a; color: #fff; border-radius: 50%; }
.pill.g-birdie { background: #f43f5e; color: #fff; border-radius: 50%; }
.pill.g-par { color: var(--ink); }
.pill.g-bogey { background: #3b82f6; color: #fff; }
.pill.g-double { background: #1f2937; color: #fff; }
.pill.p4 { background: #16a34a; color: #fff; border-radius: 50%; }
.pill.p3 { background: #f43f5e; color: #fff; border-radius: 50%; }
.pill.p2 { color: var(--ink); }
.pill.p1 { background: #3b82f6; color: #fff; }
.pill.p0 { background: #eef0f3; color: #9aa0a6; border: 1px dashed #cfd3d8; }

/* strengths grid */
.str-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 10px; }
.str { background: #fff; border: 1px solid #eceef1; border-radius: 12px; padding: 12px; box-shadow: 0 3px 10px rgba(20,20,20,.04); }
.str .top { display: flex; justify-content: space-between; align-items: baseline; }
.str .fam { font-weight: 800; color: var(--ink); font-size: .85rem; }
.str .band { font-size: .68rem; color: #9aa0a6; text-transform: uppercase; }
.str .aop { font-family: "Saira Condensed", sans-serif; font-weight: 800; font-size: 1.5rem; margin: 6px 0 2px; }
.str .aop.good { color: #16a34a; } .str .aop.mid { color: var(--orange-deep); } .str .aop.bad { color: #ef4444; }
.str .det { font-size: .72rem; color: #80858b; }

.empty { color: #9aa0a6; text-align: center; padding: 30px; font-size: .9rem; }

/* ---------------------------------------------------------------- hero */
.hero { max-width: 1080px; margin: 10px auto 2px; padding: 0 20px; }
.hero img {
  width: 100%; display: block;
  height: clamp(220px, 36vw, 430px); object-fit: cover; object-position: center 78%;
  border-radius: 22px; box-shadow: 0 18px 44px rgba(20,20,20,.20);
}
@media (max-width: 560px) { .hero img { object-position: 30% 80%; } }

/* ---------------------------------------------------------------- badges */
.badge-grid { max-width: 1080px; margin: 14px auto 60px; padding: 0 20px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 14px; }
.btile { background: #fff; border: 1px solid #eceef1; border-radius: 16px; overflow: hidden;
  box-shadow: 0 4px 14px rgba(20,20,20,.05); }
.btile > summary { list-style: none; cursor: pointer; padding: 16px; display: flex; gap: 14px; align-items: center; }
.btile > summary::-webkit-details-marker { display: none; }
.btile .art { flex: none; width: 60px; height: 60px; object-fit: contain; }
.btile .bi { min-width: 0; flex: 1; }
.btile .bi .bn { font-weight: 800; color: var(--ink); font-size: .96rem; display: flex; align-items: center; gap: 8px; }
.btile .bi .bd { color: #80858b; font-size: .76rem; margin-top: 3px; line-height: 1.3; }
.btile .cnt { flex: none; text-align: right; }
.btile .cnt b { font-size: 1.4rem; font-weight: 800; color: var(--orange-deep); line-height: 1; }
.btile .cnt span { font-size: .64rem; color: #9aa0a6; text-transform: uppercase; letter-spacing: .05em; display: block; }
.btile.unearned { opacity: .5; }
.btile.unearned .art { filter: grayscale(1); }
.tier { font-size: .58rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
  padding: 2px 7px; border-radius: 999px; color: #fff; }
.tier.legendary { background: #f5b301; } .tier.epic { background: #a855f7; }
.tier.rare { background: #2f9be0; } .tier.common { background: #9aa0a6; }
.earners { border-top: 1px solid #f1f2f4; padding: 6px 8px 10px; }
.earners a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; text-decoration: none; border-radius: 8px; }
.earners a:hover { background: #faf7f1; }
.earners .er-rk { width: 34px; color: var(--orange-deep); font-weight: 800; font-size: .8rem; }
.earners .er-nm { flex: 1; color: var(--ink); font-weight: 600; font-size: .85rem; }
.earners .er-v { color: #9aa0a6; font-size: .78rem; }

/* profile badge chips */
.pbadges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 12px; }
.pbadge { background: #fff; border: 1px solid #eceef1; border-radius: 14px; padding: 14px; text-align: center; box-shadow: 0 3px 10px rgba(20,20,20,.04); }
.pbadge img { width: 64px; height: 64px; object-fit: contain; }
.pbadge .bn { font-weight: 800; color: var(--ink); font-size: .85rem; margin-top: 6px; }
.pbadge .bv { color: var(--orange-deep); font-weight: 700; font-size: .76rem; margin-top: 2px; }

/* ---- mobile fixes ---- */
@media (max-width: 600px) {
  .board-title { white-space: normal; line-height: .92; }
  .site-nav { flex-wrap: wrap; gap: 6px; }
  .site-nav .links a { padding: 7px 11px; font-size: .76rem; }
}
