/* Indian tricolour theme: saffron, white, India green, Ashoka chakra navy.
   Saffron = what to look at first (#1, featured, follow), navy = structure and
   numbers, green = titles and positive accents. */
:root {
  --saffron: #ff9933;
  --saffron-ink: #b35400;     /* saffron dark enough for text on white */
  --saffron-soft: #fff3e6;
  --green: #138808;
  --green-ink: #0e6b06;
  --green-soft: #e9f6e7;
  --navy: #000080;
  --navy-soft: #eef0fb;

  --bg: #ffffff;
  --text: #1a1a2e;
  --muted: #5f6070;
  --faint: #8d8f9c;
  --line: #e9e9ef;
  --soft: #f7f7fa;
  --radius: 8px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --saffron: #ff9f45; --saffron-ink: #ffb066; --saffron-soft: #2e2113;
    --green: #3fbf3a; --green-ink: #6fd86a; --green-soft: #15261a;
    --navy: #a9b4ff; --navy-soft: #1b1f3a;
    --bg: #12131a; --text: #ececf2; --muted: #a2a4b3; --faint: #737586;
    --line: #262836; --soft: #1a1b24;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.5; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }

/* tricolour stripe */
.flag { height: 6px; background: radial-gradient(circle at 50% 50%, var(--navy) 0 2.6px, transparent 3px), linear-gradient(to right, var(--saffron) 0 33.3%, #ffffff 33.3% 66.6%, var(--green) 66.6%); }
@media (prefers-color-scheme: dark) { .flag { background: radial-gradient(circle at 50% 50%, #000080 0 2.6px, transparent 3px), linear-gradient(to right, var(--saffron) 0 33.3%, #e8e8e8 33.3% 66.6%, var(--green) 66.6%); } }

.top, main, footer { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.top { display: flex; align-items: center; justify-content: space-between; height: 62px; border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; color: var(--navy); font-size: 17px; letter-spacing: -.01em; }
.brand span { color: var(--saffron-ink); }
.top nav { display: flex; gap: 18px; font-size: 14px; }
.top nav a { color: var(--muted); padding: 4px 0; border-bottom: 2px solid transparent; }
.top nav a:hover { text-decoration: none; color: var(--text); }
.top nav a.active { color: var(--navy); font-weight: 600; border-bottom-color: var(--saffron); }

.search { display: flex; gap: 8px; margin-top: 28px; }
.search input {
  flex: 1; font: inherit; font-size: 16px; padding: 12px 14px; border-radius: var(--radius);
  border: 1.5px solid var(--line); background: var(--bg); color: var(--text); outline: none;
}
.search input:focus { border-color: var(--saffron); box-shadow: 0 0 0 3px var(--saffron-soft); }
.search button { padding: 0 20px; border-radius: var(--radius); border: 0; background: var(--navy); color: #fff; font-weight: 600; }
@media (prefers-color-scheme: dark) { .search button { color: #12131a; } }
.search button:hover { filter: brightness(1.15); }
.examples { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 24px; }
.examples button, .chip {
  font-size: 13px; padding: 3px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--soft); color: var(--muted);
}
.examples button:hover { color: var(--navy); border-color: var(--navy); }

/* featured #1: the thing that should stand out most */
.feature {
  display: flex; align-items: center; gap: 16px; padding: 20px 22px; border-radius: 14px; margin-bottom: 28px;
  background: var(--saffron-soft); border: 1.5px solid var(--saffron); color: inherit;
}
.feature:hover { text-decoration: none; box-shadow: 0 4px 16px rgba(255, 153, 51, .2); }
.feature .label { font-size: 12px; font-weight: 700; color: var(--saffron-ink); text-transform: uppercase; letter-spacing: .06em; }
.feature .name { font-size: 22px; font-weight: 700; color: var(--text); }
.feature .meta { font-size: 13px; color: var(--muted); }
.feature .rating { margin-left: auto; text-align: right; }
.feature .rating b { font-size: 36px; font-weight: 800; display: block; line-height: 1.05; color: var(--navy); }
.feature .avatar { width: 56px; height: 56px; font-size: 16px; background: var(--saffron); color: #fff; }
.avatar {
  flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--navy-soft); color: var(--navy);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
}

.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.seg button { border: 0; background: none; padding: 6px 13px; font-size: 13px; color: var(--muted); }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--navy); color: #fff; font-weight: 600; }
@media (prefers-color-scheme: dark) { .seg button.on { color: #12131a; } }
select { font: inherit; font-size: 13px; padding: 6px 8px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.spacer { flex: 1; }

.summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 14px; color: var(--muted); }
.summary .chip { background: var(--green-soft); color: var(--green-ink); border-color: transparent; font-weight: 500; }
.summary .clear { border: 0; background: none; color: var(--navy); font-size: 13px; padding: 0 4px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; color: var(--faint); font-size: 12px; padding: 8px 6px; border-bottom: 1.5px solid var(--line); }
th.main { color: var(--navy); }
td { padding: 10px 6px; border-bottom: 1px solid var(--line); }
tr.row { cursor: pointer; }
tr.row:hover td { background: var(--soft); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.rating-main b { color: var(--navy); font-size: 15px; font-weight: 700; }
td.rank { width: 42px; }
.r { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; border-radius: 12px; font-size: 12px; color: var(--faint); font-weight: 600; }
.r1 { background: var(--saffron); color: #fff; }
.r2, .r3 { background: var(--saffron-soft); color: var(--saffron-ink); }
tr.top1 td { background: var(--saffron-soft); }
tr.top1:hover td { filter: brightness(.98); }
td.pname { font-weight: 500; }
tr.top1 td.pname { font-weight: 700; }
.title { display: inline-block; font-size: 10.5px; font-weight: 700; color: var(--green-ink); background: var(--green-soft); padding: 1px 5px; border-radius: 4px; margin-right: 7px; letter-spacing: .03em; vertical-align: 1px; }
.dim { color: var(--muted); }
.star { border: 0; background: none; font-size: 18px; line-height: 1; color: var(--faint); padding: 2px 4px; }
.star:hover { color: var(--saffron); }
.star.on { color: var(--saffron); }
.empty { padding: 40px 0; text-align: center; color: var(--muted); }

.profile h1 { font-size: 28px; margin: 0; font-weight: 700; }
.profile .head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.profile .head .avatar { background: var(--saffron); color: #fff; width: 56px; height: 56px; }
.profile .head .star { font-size: 28px; margin-left: auto; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 22px; }
.card { background: var(--soft); border-radius: var(--radius); padding: 14px 16px; border-top: 3px solid var(--navy); }
.card:first-child { border-top-color: var(--saffron); }
.card:last-child { border-top-color: var(--green); }
.card .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.card .v { font-size: 30px; font-weight: 800; color: var(--navy); }
.card .s { font-size: 12px; color: var(--muted); }
.card .s b { color: var(--saffron-ink); }
.back { font-size: 14px; display: inline-block; margin-bottom: 16px; }
.prose { max-width: 620px; color: var(--text); }
.prose h2 { font-size: 20px; color: var(--navy); }

footer { margin-top: 48px; padding-top: 16px; padding-bottom: 40px; border-top: 1px solid var(--line); font-size: 12px; color: var(--faint); }

@media (max-width: 600px) {
  .top nav { gap: 12px; }
  .brand { font-size: 15px; }
  .hide-sm { display: none; }
  .feature { padding: 16px; }
  .feature .name { font-size: 18px; }
  .feature .rating b { font-size: 28px; }
}

/* ---------- home page ---------- */
.feature { color: inherit; }
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 28px; }
.feature.mini { margin: 0; padding: 14px 16px; gap: 12px; }
.feature.mini .avatar { width: 42px; height: 42px; font-size: 13px; }
.feature.mini .name { font-size: 16px; }
.feature.mini .label { font-size: 11px; }
.feature.mini .rating b { font-size: 24px; }
.feature.mini .who { min-width: 0; }
.feature.mini .avatar { display: none; }
.feature.mini .name { line-height: 1.25; margin: 2px 0; }
.feature.mini .label { white-space: nowrap; }

.block { margin-bottom: 32px; }
.block-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.block-head h2 { font-size: 19px; margin: 0; color: var(--navy); font-weight: 700; }
.block-head .controls { margin: 0; }
.block-head .dim { font-size: 13px; }

.block.highlight { border: 1.5px solid var(--green); border-radius: 14px; padding: 16px 18px 10px; background: var(--green-soft); }
.block.highlight h2 { color: var(--green-ink); }
.newtitles { display: flex; flex-direction: column; }
.newtitle { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-top: 1px solid rgba(19, 136, 8, .15); color: var(--text); }
.newtitle:first-child { border-top: 0; }
.newtitle:hover { text-decoration: none; background: rgba(19, 136, 8, .06); }
.newtitle .badge { flex: none; min-width: 48px; text-align: center; font-size: 13px; font-weight: 800; padding: 4px 8px; border-radius: 6px; background: var(--green); color: #fff; }
.newtitle.gm .badge { background: var(--saffron); font-size: 15px; padding: 6px 10px; }
.newtitle.gm .nt-name { font-size: 17px; font-weight: 700; }
.nt-name { flex: 1; font-weight: 600; min-width: 0; }
.nt-name .dim { font-weight: 400; font-size: 13px; }
.nt-rating { font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tile { background: var(--soft); border-radius: var(--radius); padding: 14px 16px; color: var(--text); border-left: 0; }
.tile:hover { text-decoration: none; background: var(--navy-soft); }
.tile b { display: block; font-size: 28px; font-weight: 800; color: var(--navy); line-height: 1.15; }
.tile span { font-size: 13px; color: var(--muted); }
.tile:first-child b { color: var(--saffron-ink); }

.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.mini-list a { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); color: var(--text); font-size: 14px; }
.mini-list a:hover { text-decoration: none; background: var(--soft); }
.mini-list .ml-name { flex: 1; font-weight: 500; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-list .dim { font-size: 12px; font-variant-numeric: tabular-nums; }
.gain { color: var(--green-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.loss { color: #c0392b; font-weight: 700; }
.mark { background: var(--saffron); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.empty.small { padding: 16px 0; font-size: 14px; }

/* ---------- titles page ---------- */
.title-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 8px; margin-bottom: 8px; }
.title-tabs button { border: 1px solid var(--line); background: var(--bg); border-radius: var(--radius); padding: 8px 6px; text-align: center; }
.title-tabs button b { display: block; font-size: 15px; color: var(--green-ink); }
.title-tabs button span { font-size: 12px; color: var(--muted); }
.title-tabs button:hover { border-color: var(--navy); }
.title-tabs button.on { background: var(--navy); border-color: var(--navy); }
.title-tabs button.on b, .title-tabs button.on span { color: #fff; }
@media (prefers-color-scheme: dark) { .title-tabs button.on b, .title-tabs button.on span { color: #12131a; } }
.new-pill { background: var(--saffron); color: #fff; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
tr.inactive td { opacity: .6; }

/* ---------- player page ---------- */
.banner { background: var(--saffron); color: #fff; font-weight: 700; padding: 10px 14px; border-radius: var(--radius); margin-bottom: 14px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.facts span { background: var(--navy-soft); color: var(--navy); font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.facts span .gain, .facts span .loss { font-weight: 700; }

.top nav { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 600px) {
  .top { height: auto; padding-top: 10px; padding-bottom: 6px; flex-wrap: wrap; gap: 6px; }
  .top nav { gap: 10px; font-size: 13px; justify-content: flex-start; }
}

/* ---------- GM timeline: each title year gets its own colour (--h = hue) ---------- */
.titles-sub { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 14px; }
.titles-sub p { margin: 0; }
.small-note { font-size: 12px; margin: 6px 0 18px; }

.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 18px; border-bottom: 1.5px solid var(--line); }
.bar { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.bar .fill { width: 100%; border-radius: 4px 4px 0 0; background: hsl(var(--h) 75% 48%); transition: filter .15s; }
.bar:hover .fill { filter: brightness(1.15); }
.bar .n { position: absolute; bottom: calc(var(--top, 0) + 2px); font-size: 10.5px; font-weight: 700; color: hsl(var(--h) 70% 32%); }
.bar.zero { pointer-events: none; }
.bar-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); margin-top: 4px; }

.timeline { display: flex; flex-direction: column; gap: 10px; }
.yr-row { display: flex; gap: 14px; align-items: stretch; border-radius: 12px; padding: 10px; background: hsl(var(--h) 80% 97%); border: 1px solid hsl(var(--h) 60% 88%); scroll-margin: 80px; }
.yr-row.flash { animation: flash 1.2s ease; }
@keyframes flash { 0% { box-shadow: 0 0 0 4px hsl(var(--h) 75% 55%); } 100% { box-shadow: 0 0 0 0 transparent; } }
.yr { flex: none; width: 74px; display: flex; align-items: center; justify-content: center; border-radius: 9px;
      background: hsl(var(--h) 72% 45%); color: #fff; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.yr-body { flex: 1; min-width: 0; }
.yr-meta { display: flex; gap: 10px; align-items: baseline; font-size: 13px; margin-bottom: 6px; }
.yr-meta b { color: hsl(var(--h) 70% 30%); }
.yr-names { display: flex; flex-wrap: wrap; gap: 6px; }
.gm-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
           background: #fff; color: hsl(var(--h) 70% 25%); border: 1px solid hsl(var(--h) 55% 78%); }
.gm-chip small { font-size: 11px; font-weight: 500; color: var(--faint); }
.gm-chip:hover { text-decoration: none; background: hsl(var(--h) 75% 45%); color: #fff; border-color: transparent; }
.gm-chip:hover small { color: rgba(255,255,255,.85); }
.gm-chip.inactive { opacity: .6; }
.since { color: hsl(var(--h) 70% 38%); }

@media (prefers-color-scheme: dark) {
  .bar .n { color: hsl(var(--h) 80% 72%); }
  .yr-row { background: hsl(var(--h) 35% 13%); border-color: hsl(var(--h) 35% 24%); }
  .yr { background: hsl(var(--h) 65% 42%); }
  .yr-meta b { color: hsl(var(--h) 80% 75%); }
  .gm-chip { background: hsl(var(--h) 30% 18%); color: hsl(var(--h) 80% 82%); border-color: hsl(var(--h) 35% 32%); }
  .since { color: hsl(var(--h) 80% 72%); }
}
@media (max-width: 600px) {
  .yr { width: 58px; font-size: 16px; }
  .bars { gap: 1px; }
  .bar .n { display: none; }
}

/* ---------- achievements ---------- */
:root {
  --gold-1: #fff4c2; --gold-2: #e8b10e; --gold-3: #9c6f00;
  --silver-1: #ffffff; --silver-2: #b9c1cc; --silver-3: #6f7987;
  --bronze-1: #ffd9b8; --bronze-2: #c47a3a; --bronze-3: #7a4416;
}
.medal { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%;
         font-size: 13px; font-weight: 800; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.3); }
.medal.gold   { background: radial-gradient(circle at 32% 28%, var(--gold-1), var(--gold-2) 55%, var(--gold-3)); box-shadow: 0 2px 6px rgba(200,150,0,.45); }
.medal.silver { background: radial-gradient(circle at 32% 28%, var(--silver-1), var(--silver-2) 55%, var(--silver-3)); box-shadow: 0 2px 6px rgba(100,110,130,.4); }
.medal.bronze { background: radial-gradient(circle at 32% 28%, var(--bronze-1), var(--bronze-2) 55%, var(--bronze-3)); box-shadow: 0 2px 6px rgba(150,80,20,.4); }
.medal.live, .live-dot { background: var(--saffron); animation: pulse 1.6s infinite; }
.live-dot { flex: none; width: 14px; height: 14px; border-radius: 50%; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,153,51,.6); } 50% { box-shadow: 0 0 0 8px rgba(255,153,51,0); } }

/* hero */
.ach-hero { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
  padding: 34px 32px 38px; border-radius: 20px; margin: 4px 0 18px; color: #fff;
  background: radial-gradient(circle at 85% 20%, rgba(255,153,51,.35), transparent 45%), radial-gradient(circle at 10% 110%, rgba(19,136,8,.4), transparent 45%), linear-gradient(135deg, #07134d, #000080 55%, #1b2a8f); }
.ach-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: linear-gradient(to right, var(--saffron) 0 33.3%, #fff 33.3% 66.6%, #138808 66.6%); }
.ach-hero::before { content: "♚"; position: absolute; right: -20px; bottom: -70px; font-size: 260px; color: rgba(255,255,255,.05); line-height: 1; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #ffb366; }
.ach-hero h1 { font-size: 34px; margin: 6px 0 8px; font-weight: 800; letter-spacing: -.02em; }
.ach-hero p { margin: 0; max-width: 460px; color: rgba(255,255,255,.8); font-size: 15px; }
.ach-hero-medals { display: flex; gap: 14px; position: relative; z-index: 1; }
.big-medal { width: 92px; height: 92px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.35); border: 3px solid rgba(255,255,255,.35); }
.big-medal b { font-size: 30px; font-weight: 800; line-height: 1; }
.big-medal span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.big-medal.gold   { background: radial-gradient(circle at 32% 28%, var(--gold-1), var(--gold-2) 55%, var(--gold-3)); }
.big-medal.silver { background: radial-gradient(circle at 32% 28%, var(--silver-1), var(--silver-2) 55%, var(--silver-3)); }
.big-medal.bronze { background: radial-gradient(circle at 32% 28%, var(--bronze-1), var(--bronze-2) 55%, var(--bronze-3)); }

.live-banner { display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-radius: 14px; margin-bottom: 18px;
  background: linear-gradient(90deg, #fff0de, #fff8ef); border: 1.5px solid var(--saffron); color: #3a2410; }
.live-banner a { color: #3a2410; font-weight: 600; }
.live-label { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--saffron-ink); }
.live-banner .ach-note { color: #7a5a3a; }

/* world champions */
.champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 26px; }
.champ { position: relative; overflow: hidden; padding: 22px 24px; border-radius: 18px; color: #3b2a00;
  background: linear-gradient(135deg, #fff7d1 0%, #ffe27a 45%, #f3b81c 100%); box-shadow: 0 6px 20px rgba(200,150,0,.25); }
.champ:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(200,150,0,.35); }
.champ { transition: transform .15s, box-shadow .15s; }
.champ .crown { position: absolute; right: 14px; top: -14px; font-size: 120px; line-height: 1; color: rgba(120,80,0,.14); }
.champ .label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: #8a5d00; }
.champ .name { font-size: 26px; font-weight: 800; letter-spacing: -.01em; margin: 2px 0 10px; }
.champ-years { display: flex; flex-wrap: wrap; gap: 6px; position: relative; }
.champ-years span { font-size: 13px; font-weight: 800; background: #3b2a00; color: #ffd75e; padding: 3px 11px; border-radius: 999px; }

/* category cards */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 26px; }
.cat-card { position: relative; text-align: left; padding: 14px 14px 12px; border-radius: 14px; border: 1.5px solid hsl(var(--h) 60% 85%);
  background: hsl(var(--h) 80% 97%); display: flex; flex-direction: column; gap: 2px; transition: transform .12s, box-shadow .12s; }
.cat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px hsl(var(--h) 60% 50% / .18); }
.cat-icon { font-size: 22px; line-height: 1; color: hsl(var(--h) 70% 42%); margin-bottom: 6px; }
.cat-name { font-weight: 700; font-size: 14px; color: hsl(var(--h) 60% 22%); }
.cat-count { font-size: 12px; color: hsl(var(--h) 25% 40%); }
.cat-count em { font-style: normal; font-weight: 700; color: #9c6f00; }
.cat-card.on { background: hsl(var(--h) 65% 42%); border-color: hsl(var(--h) 65% 42%); box-shadow: 0 6px 18px hsl(var(--h) 60% 40% / .35); }
.cat-card.on .cat-icon, .cat-card.on .cat-name, .cat-card.on .cat-count, .cat-card.on .cat-count em { color: #fff; }

.ach-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ach-toolbar h2 { margin: 0; font-size: 22px; color: var(--navy); font-weight: 800; }
.ach-toolbar h2 span { font-size: 13px; font-weight: 700; background: var(--navy-soft); color: var(--navy); padding: 2px 9px; border-radius: 999px; vertical-align: 3px; }

/* vertical timeline */
.timeline-v { position: relative; padding-left: 4px; }
.timeline-v::before { content: ""; position: absolute; left: 39px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px;
  background: linear-gradient(to bottom, var(--saffron), #c8c8d8 40%, var(--green)); }
.tv-year { position: relative; display: flex; gap: 18px; padding: 10px 0; }
.tv-marker { flex: none; width: 72px; position: relative; z-index: 1; }
.tv-marker span { display: inline-block; background: var(--navy); color: #fff; font-weight: 800; font-size: 14px; padding: 5px 11px; border-radius: 999px;
  box-shadow: 0 0 0 4px var(--bg); }
.tv-cards { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; }
.ach { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border-radius: 14px; background: var(--bg);
  border: 1px solid var(--line); border-left: 4px solid hsl(var(--h) 65% 50%); box-shadow: 0 1px 3px rgba(20,20,60,.05); transition: box-shadow .15s, transform .15s; }
.ach:hover { box-shadow: 0 6px 18px rgba(20,20,60,.1); transform: translateY(-1px); }
.ach.gold { background: linear-gradient(135deg, #fffaf0, #fff3cf); }
.ach.live { background: linear-gradient(135deg, #fff6ec, #ffe8cc); border-color: var(--saffron); border-left-color: var(--saffron); }
.ach-body { flex: 1; min-width: 0; }
.ach-cat { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: hsl(var(--h) 60% 32%);
  background: hsl(var(--h) 75% 93%); padding: 2px 8px; border-radius: 999px; margin-bottom: 5px; }
.ach-cat i { font-style: normal; }
.ach-result { font-size: 16px; font-weight: 800; color: var(--text); line-height: 1.25; }
.ach.gold .ach-result { color: #8a5d00; }
.ach-event { font-size: 13.5px; color: var(--muted); }
.ach-who { font-size: 14px; font-weight: 600; margin-top: 5px; }
.ach-who.team { font-weight: 500; font-size: 12.5px; color: var(--muted); }
.ach-who a { color: var(--navy); }
.ach-who.team a { color: var(--muted); }
.ach-who a:hover { color: var(--saffron-ink); }
.ach-note { font-size: 12.5px; color: var(--faint); margin-top: 3px; }

/* ---------- home layout with side panel ---------- */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.side-card { position: sticky; top: 16px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--bg);
  box-shadow: 0 4px 18px rgba(20,20,60,.07); }
.side-head { display: flex; gap: 12px; align-items: center; padding: 16px 18px 18px; color: #fff; position: relative;
  background: radial-gradient(circle at 90% 0%, rgba(255,153,51,.45), transparent 55%), linear-gradient(135deg, #07134d, #000080); }
.side-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(to right, var(--saffron) 0 33.3%, #fff 33.3% 66.6%, #138808 66.6%); }
.side-head > span { font-size: 30px; line-height: 1; color: #ffd75e; }
.side-head b { display: block; font-size: 16px; }
.side-head small { font-size: 12px; color: rgba(255,255,255,.75); }
.side-live { display: flex; gap: 10px; align-items: center; margin: 12px 12px 0; padding: 10px 12px; border-radius: 12px; color: #3a2410;
  background: linear-gradient(90deg, #fff0de, #fff8ef); border: 1px solid var(--saffron); }
.side-live:hover { text-decoration: none; }
.side-live small { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--saffron-ink); }
.side-live b { display: block; font-size: 13.5px; }
.side-live span { font-size: 12.5px; }
.side-champs { display: flex; flex-direction: column; gap: 6px; margin: 12px; }
.side-champ { display: grid; grid-template-columns: 26px 1fr; align-items: center; column-gap: 8px; padding: 8px 12px; border-radius: 12px;
  background: linear-gradient(135deg, #fff7d1, #ffe27a); color: #3b2a00; }
.side-champ .crown-sm { grid-row: span 2; font-size: 24px; color: #9c6f00; }
.side-champ b { font-size: 14px; }
.side-champ small { font-size: 11.5px; color: #7a5600; font-weight: 600; }
.side-list { display: flex; flex-direction: column; padding: 0 8px; }
.side-item { display: flex; gap: 10px; align-items: flex-start; padding: 9px 8px; border-radius: 10px; color: var(--text); border-left: 3px solid transparent; }
.side-item:hover { text-decoration: none; background: hsl(var(--h) 80% 97%); border-left-color: hsl(var(--h) 65% 50%); }
.side-item .medal { width: 26px; height: 26px; font-size: 11px; }
.side-item small { display: block; font-size: 11px; color: var(--faint); }
.side-item b { display: block; font-size: 13.5px; line-height: 1.25; }
.side-item span { font-size: 12px; color: var(--muted); }
.side-all { display: block; margin: 6px 12px 14px; text-align: center; padding: 9px; border-radius: 10px; background: var(--navy); color: #fff; font-weight: 700; font-size: 13px; }
.side-all:hover { text-decoration: none; filter: brightness(1.2); }

/* player page achievements */
.sub-h { font-size: 18px; color: var(--navy); margin: 22px 0 10px; display: flex; gap: 10px; align-items: baseline; }
.sub-h a { font-size: 13px; font-weight: 400; }
.pa-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.pa { display: flex; gap: 12px; align-items: flex-start; padding: 9px 12px; border-radius: 12px; font-size: 14px; border: 1px solid var(--line); }
.pa.gold { background: linear-gradient(135deg, #fffaf0, #fff3cf); border-color: transparent; }
.pa-yr { font-weight: 800; color: var(--navy); width: 40px; padding-top: 6px; }
.pa > div { padding-top: 5px; }

@media (prefers-color-scheme: dark) {
  .ach { box-shadow: none; }
  .ach.gold, .pa.gold { background: linear-gradient(135deg, #2a2210, #33280d); }
  .ach.gold .ach-result { color: #ffd75e; }
  .ach.live { background: #2e2113; }
  .cat-card { background: hsl(var(--h) 30% 14%); border-color: hsl(var(--h) 30% 26%); }
  .cat-name { color: hsl(var(--h) 70% 85%); } .cat-icon { color: hsl(var(--h) 70% 65%); } .cat-count { color: hsl(var(--h) 20% 70%); }
  .cat-count em { color: #ffd75e; }
  .ach-cat { background: hsl(var(--h) 35% 20%); color: hsl(var(--h) 70% 80%); }
  .tv-marker span { color: #12131a; }
  .side-item:hover { background: hsl(var(--h) 30% 15%); }
  .side-all { color: #12131a; }
}
@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; }
  .side-card { position: static; }
}
@media (max-width: 600px) {
  .ach-hero { padding: 24px 20px 28px; }
  .ach-hero h1 { font-size: 26px; }
  .big-medal { width: 70px; height: 70px; } .big-medal b { font-size: 22px; }
  .timeline-v::before { left: 30px; }
  .tv-year { flex-direction: column; gap: 8px; }
  .tv-cards { grid-template-columns: 1fr; }
}
