/* ===== Theme ===== */
:root{
  --cream: #FAF7F0;
  --surface: #FFFFFF;
  --ink: #1F2724;
  --muted: #6E756E;
  --gold: #D4AF37;
  --gold-900:#8E7A20;
  --green: #0B3D2E;
  --green-700:#083024;
  --ring: rgba(212,175,55,.3);
  --shadow: 0 8px 26px rgba(12,23,18,.08);
  --shadow-lg: 0 16px 44px rgba(12,23,18,.10);
  --radius: 16px;
}

body{ background: var(--cream); color: var(--ink); }

.container{
  max-width: 1120px;
  margin: 28px auto 64px;
  padding: 0 18px;
}

/* ===== Cards / layout ===== */
.card{
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(10,20,15,.06);
}

.fw-profile .profile-hero{
  display: grid;
  grid-template-columns: 1.4fr .9fr;
  gap: 18px;
  padding: 18px;
}

.hero-left{ display:flex; gap:16px; align-items:flex-start; }
.avatar{
  width: 84px; height: 84px; border-radius: 50%;
  position: relative; overflow: hidden;
  border: 3px solid var(--ring);
  box-shadow: var(--shadow);
}
.avatar img{ width: 100%; height: 100%; object-fit: cover; display:none; }
.avatar-initial{
  width:100%; height:100%; display:grid; place-items:center;
  font-weight: 700; font-size: 28px; color: var(--green);
  background: linear-gradient(180deg,#FDFBF5,#F5F0E0);
}

.identity h1{ margin: 2px 0 2px; font-size: 22px; }
.meta-row{ display:flex; gap:10px; align-items:center; }
.muted{ color: var(--muted); font-size: 13px; }

.pill{
  font-size: 12px; padding: 4px 10px; border-radius: 999px;
  background: rgba(11,61,46,.07); color: var(--green);
  border: 1px solid rgba(11,61,46,.15);
}

.quick-stats{ display:flex; gap:18px; margin-top:12px; }
.qstat .label{ color: var(--muted); font-size: 12px; }
.qstat .value{ font-weight: 700; font-size: 18px; }

.hero-right .highlight{
  height: 100%;
  border-radius: 14px;
  background:
    radial-gradient(1200px 300px at 10% -50%, rgba(212,175,55,.2), transparent 60%),
    linear-gradient(180deg, #FFF, #FBF7EB);
  border: 1px solid rgba(212,175,55,.25);
  padding: 18px;
  display:flex; flex-direction:column; justify-content:center;
}
.highlight .h-label{ color: var(--muted); font-size: 12px; }
.highlight .h-main{ font-size: 30px; font-weight: 800; color: var(--green); line-height: 1.1; }
.highlight .h-sub{ color: var(--muted); font-size: 12px; margin-top: 4px; }

/* ===== Tabs ===== */
.tabs{ margin-top: 18px; padding: 0; }
.tab-bar{
  display:flex; gap:8px; padding:10px; border-bottom: 1px solid rgba(10,20,15,.06);
}
.tab{
  padding: 10px 14px; border-radius: 12px;
  background: #fff; border: 1px solid rgba(10,20,15,.08);
  font-weight: 600; font-size: 14px; color: var(--green);
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.tab:hover{ box-shadow: var(--shadow); transform: translateY(-1px); }
.tab.active{
  background: linear-gradient(180deg,#fff,#FBF7EB);
  border-color: rgba(212,175,55,.45);
  box-shadow: 0 6px 18px rgba(212,175,55,.18);
}

.tab-panels{ padding: 12px; }
.tab-panel{ display:none; }
.tab-panel.active{ display:block; }

/* ===== Panels / grids ===== */
.panel{ padding: 16px; }
.panel-head{ display:flex; align-items:baseline; gap:8px; margin-bottom: 8px; }
.panel-head h3{ font-size: 16px; margin:0; }
.panel-head .sub{ color: var(--muted); font-size: 12px; }

.grid{ display:grid; gap: 16px; }
.grid-3{ grid-template-columns: repeat(3, 1fr); }
.grid-2{ grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px){
  .fw-profile .profile-hero{ grid-template-columns: 1fr; }
  .grid-3{ grid-template-columns: 1fr; }
  .grid-2{ grid-template-columns: 1fr; }
}

/* ===== Stats strip ===== */
.stat-strip{
  margin-top: 16px;
  display:grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.s-card{
  background:#fff; border:1px solid rgba(10,20,15,.06);
  border-radius: 14px; padding: 14px; text-align:center;
  box-shadow: var(--shadow);
}
.s-title{ color: var(--muted); font-size: 12px; }
.s-value{ font-weight: 800; font-size: 20px; color: var(--green); }

/* ===== Achievements ===== */
.badge-grid{
  display:grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
}
.badge{
  background:#fff; border:1px dashed rgba(10,20,15,.15);
  border-radius: 14px; padding: 16px; text-align:center;
  color: var(--muted);
}
.badge .icon{ font-size: 22px; margin-bottom: 6px; }
.badge .b-title{ font-weight: 700; color: var(--ink); }
.badge .b-sub{ font-size: 12px; }
.badge.earned{
  border-style: solid; border-color: rgba(212,175,55,.5);
  box-shadow: var(--shadow);
  background: linear-gradient(180deg,#fff,#FBF7EB);
}

/* ===== Rounds table ===== */
.rounds-table{ margin-top: 6px; }
.rounds-table .r-head,
.rounds-table .r-row{
  display:grid; grid-template-columns: 120px 1fr 100px 80px 1.2fr;
  padding: 10px 12px; border-bottom: 1px solid rgba(10,20,15,.06);
}
.rounds-table .r-head{ color: var(--muted); font-size: 12px; font-weight: 700; }

/* ===== Chart defaults (colours pulled from CSS vars) ===== */
canvas{ width:100%; }
