/* Karambit.Network / stats v7 — page sections. Shared chrome: /nc_assets/css/kn-site.css */
main { padding-bottom: 40px; }
.mono { font-family: var(--mono); }
.empty { padding: 26px 4px; color: var(--dim); }
.vip-tag { display: inline-flex; vertical-align: 2px; padding: 1px 6px; border-radius: 4px; background: #e7c99522; color: #e7c995; border: 1px solid #e7c99544; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
span.av { display: block; flex: none; width: 36px; height: 36px; border-radius: 7px; overflow: hidden; background: var(--panel-2); }
span.av img { display: block; width: 100%; height: 100%; object-fit: cover; }
.alert { margin: 0 0 24px; padding: 14px 18px; border-radius: var(--radius-m); background: #3a1420; border: 1px solid #e0334a44; color: #ffc3cb; }
.search-small { height: 36px; }
.select select { height: 38px; padding: 0 34px 0 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--void) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a6b6' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px; color: var(--ink); appearance: none; font-size: 15px; }
.search { display: flex; align-items: center; gap: 10px; padding: 0 12px; height: 38px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--void); color: var(--dim); }
.search:focus-within { border-color: #4a4f63; }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--ink); font-size: 15px; }

/* Page head */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: clamp(36px, 5vw, 64px) 0 26px; }
.page-head h1 { font-size: clamp(44px, 6vw, 80px); letter-spacing: -.055em; line-height: .95; }
.totals { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 14px; color: var(--muted); font-size: 17px; }
.totals b { color: var(--ink); font-variant-numeric: tabular-nums; }
.jump { display: flex; gap: 8px; width: min(380px, 100%); }
.jump .search { flex: 1; }

/* Leaderboard hero */
.board { padding-bottom: clamp(56px, 7vw, 96px); }
.board-hero { position: relative; min-height: clamp(340px, 34vw, 460px); display: flex; align-items: flex-end; border-radius: 24px; overflow: hidden; border: 1px solid var(--line); background: radial-gradient(ellipse at 70% 30%, #e0334a30, transparent 60%), var(--panel); isolation: isolate; }
.board-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.board-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, #08090d 0%, #08090dcc 22%, transparent 70%), linear-gradient(90deg, #08090de0 0%, #08090d55 45%, transparent 75%); }
.board-hero-body { width: 100%; padding: clamp(24px, 3.5vw, 44px); padding-bottom: clamp(96px, 9vw, 120px); }
.board-kicker { color: var(--muted); font-weight: 500; font-size: 15px; }
.board-hero h2 { margin-top: 8px; font-size: clamp(42px, 6.4vw, 92px); letter-spacing: -.055em; line-height: .9; text-transform: capitalize; text-shadow: 0 6px 40px #000a; }
.board-tech { margin-top: 10px; font: 500 14px var(--mono); color: var(--muted); }
.board-stats { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 22px 0 0; }
.board-stats div { display: grid; }
.board-stats dt { font-size: 13px; color: var(--muted); font-weight: 500; }
.board-stats dd { margin: 0; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.board-stats dd.mono { font: 600 22px var(--mono); padding-top: 3px; color: var(--red-hot); }
.modes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.modes a { padding: 6px 12px; border-radius: 20px; background: #08090daa; border: 1px solid var(--line); text-decoration: none; font-size: 14px; font-weight: 500; color: var(--muted); }
.modes a[aria-current="true"] { background: var(--red); border-color: var(--red); color: #fff; }

/* Podium: the top three overlap the bottom of the map art. */
.podium { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 14px; margin: -84px clamp(12px, 6vw, 80px) 26px; padding: 0; list-style: none; }
.podium-step a { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 22px 16px 18px; border-radius: 18px; background: #12141dee; backdrop-filter: blur(12px); border: 1px solid var(--line); text-decoration: none; overflow: hidden; transition: transform .25s var(--ease-out), border-color .2s; }
.podium-step a:hover { transform: translateY(-4px); border-color: #3f4458; }
.podium-step.p1 a { padding-top: 34px; padding-bottom: 26px; border-color: #f2b45366; box-shadow: 0 0 0 1px #f2b45322, 0 30px 70px -20px #f2b45340; }
.podium-step.p2 a { border-color: #c9d2e055; }
.podium-step.p3 a { border-color: #d0875355; }
.podium-pos { position: absolute; right: 12px; top: -6px; font-size: 92px; font-weight: 700; line-height: 1; letter-spacing: -.06em; color: #ffffff08; pointer-events: none; }
.podium-step.p1 .podium-pos { color: #f2b45318; font-size: 120px; }
.podium-step span.av { width: 64px; height: 64px; border-radius: 14px; box-shadow: 0 0 0 3px #08090d, 0 0 0 5px var(--medal, #3a3f52); }
.podium-step.p1 span.av { width: 84px; height: 84px; --medal: #f2b453; }
.podium-step.p2 span.av { --medal: #c9d2e0; }
.podium-step.p3 span.av { --medal: #d08753; }
.podium-name { margin-top: 6px; font-size: 18px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-step.p1 .podium-name { font-size: 21px; }
.podium-tier { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 500; }
.podium-time { margin-top: 4px; font: 600 20px var(--mono); }
.podium-step.p1 .podium-time { font-size: 24px; color: #f6c46d; }
.podium-gap { color: var(--dim); font-size: 13px; }

/* Leaderboard table + side */
.board-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.table-card { background: #10121af5; border: 1px solid var(--line-soft); border-radius: 20px; padding: 20px 22px 12px; }
.table-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.table-tools .search { flex: 1 1 220px; }
.table-sub { margin: 12px 0 8px; color: var(--dim); font-size: 14px; }
.rank-head, .rank { display: grid; grid-template-columns: 44px minmax(0, 2.3fr) minmax(0, 1fr) 112px minmax(0, 1.2fr); gap: 14px; align-items: center; }
.rank-head { padding: 8px 10px; color: var(--dim); font-size: 13px; font-weight: 500; border-bottom: 1px solid var(--line-soft); }
.rank-head span:nth-child(4) { text-align: right; }
.ranks { list-style: none; margin: 0; padding: 0; }
.ranks li + li .rank { border-top: 1px solid var(--line-soft); }
.rank { padding: 10px; margin: 0 -10px; border-radius: 10px; text-decoration: none; transition: background-color .15s; }
.ranks li + li .rank { border-radius: 0; }
.rank:hover { background: #ffffff06; }
.rank-pos { font-weight: 700; color: var(--dim); font-variant-numeric: tabular-nums; }
.rank.is-top .rank-pos { color: var(--ink); }
.ranks li:nth-child(1) .rank-pos { color: #f6c46d; } .ranks li:nth-child(2) .rank-pos { color: #d5dce8; } .ranks li:nth-child(3) .rank-pos { color: #e09a68; }
.rank-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rank-who > span:last-child { min-width: 0; }
.rank-who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-who small { display: flex; align-items: center; gap: 5px; color: var(--dim); font-size: 13px; overflow: hidden; white-space: nowrap; }
.rank-who small img { flex: none; }
.rank-maps b { display: block; font-variant-numeric: tabular-nums; }
.rank-maps small { color: var(--dim); font-size: 13px; }
.rank-time { text-align: right; font: 600 15px var(--mono); }
.rank-gap { display: grid; gap: 5px; }
.rank-gap small { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.rank-gap i { display: block; height: 4px; border-radius: 4px; background: linear-gradient(90deg, #ffffff10, #ffffff10) no-repeat; position: relative; overflow: hidden; }
.rank-gap i::after { content: ''; position: absolute; inset: 0; width: var(--w, 0%); min-width: 3px; border-radius: inherit; background: linear-gradient(90deg, var(--red), var(--red-hot)); transform-origin: 0 50%; }
.ranks li:first-child .rank-gap i::after { background: #f2b453; }
.rank.is-me { background: #e0334a1a; box-shadow: inset 3px 0 0 var(--red-hot); }
.ranks li.is-flash .rank { animation: flash 1.8s ease; }
.board-side { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 14px; }
.server-card { border-radius: 20px; overflow: hidden; border: 1px solid var(--line-soft); background: #10121af5; }
.server-art { height: 120px; background: radial-gradient(ellipse at 70% 30%, #e0334a40, transparent 60%), repeating-linear-gradient(135deg, #ffffff05 0 10px, transparent 10px 20px), var(--panel-2); background-size: cover; background-position: center; position: relative; }
.server-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, #10121a, transparent 70%); }
.server-body { padding: 4px 18px 18px; margin-top: -18px; position: relative; }
.server-state { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); font-weight: 500; }
.server-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.server-state i.is-online { background: var(--live); animation: ping 2.2s ease-out infinite; }
.server-map { margin-top: 6px; font-size: 22px; font-weight: 700; letter-spacing: -.02em; text-transform: capitalize; overflow-wrap: anywhere; }
.server-players { color: var(--muted); font-size: 15px; margin-bottom: 14px; }
.copy-line { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 8px; padding: 9px 12px; border: 1px dashed var(--line); border-radius: var(--radius-s); background: none; color: var(--muted); font-size: 14px; }
.copy-line code { font: 600 14px var(--mono); color: var(--ink); }
.copy-line:hover { border-color: #4a4f63; color: var(--ink); }
.server-board-link { display: block; margin-top: 12px; color: var(--red-hot); font-size: 14px; font-weight: 700; text-underline-offset: 3px; }
.me-card { padding: 18px; border-radius: 20px; background: linear-gradient(135deg, #2a1119, #10121a 60%); border: 1px solid #e0334a44; }
.me-label { color: var(--muted); font-size: 14px; font-weight: 500; }
.me-rank { display: flex; align-items: baseline; gap: 12px; margin-top: 4px; }
.me-rank b { font-size: 40px; letter-spacing: -.04em; }
.me-rank span { font: 600 18px var(--mono); }
.me-gap { color: var(--muted); font-size: 14px; }

/* All courses */
.courses { padding-bottom: clamp(56px, 7vw, 96px); }
.course-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.course-tools .search { width: 240px; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.course-tile { display: flex; flex-direction: column; height: 100%; border-radius: 16px; overflow: hidden; background: var(--panel); border: 1px solid var(--line-soft); text-decoration: none; transition: border-color .2s, transform .25s var(--ease-out); }
.course-tile:hover { border-color: #3f4458; transform: translateY(-3px); }
.course-tile.is-selected { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.course-img { display: block; aspect-ratio: 16 / 9; background: var(--panel-2); overflow: hidden; }
.course-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease-out); }
.course-tile:hover .course-img img { transform: scale(1.05); }
.course-name { padding: 12px 14px 4px; font-weight: 700; text-transform: capitalize; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.course-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; padding: 0 14px 14px; color: var(--dim); font-size: 13px; }
.course-meta .mono { color: var(--muted); }

/* Runners + recent */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel { background: #10121acc; border: 1px solid var(--line-soft); border-radius: 20px; padding: 22px 24px; }
.panel-head { margin-bottom: 8px; }
.panel-head h2 { font-size: 22px; }
.runner-cards, .recent-list { list-style: none; margin: 0; padding: 0; }
.runner-cards li + li, .recent-list li + li { border-top: 1px solid var(--line-soft); }
.runner-card { display: grid; grid-template-columns: 22px 44px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 0; text-decoration: none; }
.rc-pos { color: var(--dim); font-weight: 700; }
.runner-card span.av { width: 44px; height: 44px; border-radius: 9px; }
.rc-info b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-info small { display: block; color: var(--dim); font-size: 13px; }
.rc-info i { display: block; height: 3px; margin-top: 7px; border-radius: 3px; background: linear-gradient(90deg, var(--red), var(--red-hot)); width: var(--w); }
.runner-card:hover b, .recent:hover b { color: var(--red-hot); }
.recent { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 0; text-decoration: none; }
.recent img { width: 64px; height: 36px; border-radius: 6px; object-fit: cover; background: var(--panel-2); }
.recent-who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-who small { display: block; color: var(--dim); font-size: 13px; text-transform: capitalize; }
.recent-time { text-align: right; }
.recent-time b { display: block; font: 600 14px var(--mono); }
.recent-time small { color: var(--dim); font-size: 13px; }

/* Profile */
.profile { padding-bottom: 40px; scroll-margin-top: calc(var(--header-h) + 16px); }
.profile-card { border-radius: 24px; padding: clamp(20px, 3vw, 34px); background: radial-gradient(ellipse at 0% 0%, #e0334a22, transparent 50%), #10121aee; border: 1px solid var(--line); }
.profile-card.is-vip { background: radial-gradient(ellipse at 0% 0%, #e7c99522, transparent 50%), #10121aee; border-color: #e7c99544; }
.profile-id { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.profile-id span.av { width: 88px; height: 88px; border-radius: 18px; box-shadow: 0 0 0 3px #08090d, 0 0 0 5px var(--red); }
.profile-card.is-vip .profile-id span.av { box-shadow: 0 0 0 3px #08090d, 0 0 0 5px #e7c995; }
.profile-kicker { color: var(--muted); font-weight: 500; }
.profile-id h2 { font-size: clamp(30px, 4vw, 48px); letter-spacing: -.04em; }
.profile-steam { margin-top: 4px; color: var(--dim); font-size: 14px; }
.profile-steam code { font-family: var(--mono); color: var(--muted); }
.profile-steam a { color: var(--red-hot); }
.profile-close { margin-left: auto; }
.profile-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 26px 0; }
.profile-stats div { padding: 16px 18px; border-radius: 14px; background: #08090d88; border: 1px solid var(--line-soft); }
.profile-stats dt { color: var(--muted); font-size: 14px; font-weight: 500; }
.profile-stats dd { margin: 4px 0 0; font-size: 34px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.profile-stats dd.hot { color: var(--red-hot); }
.pb-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.pb-head h3 { font-size: 20px; }
.pb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 24px; list-style: none; margin: 0; padding: 0; max-height: 520px; overflow-y: auto; scrollbar-width: thin; }
.pb { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-soft); text-decoration: none; }
.pb img { width: 64px; height: 36px; border-radius: 6px; object-fit: cover; background: var(--panel-2); }
.pb-map b { display: block; text-transform: capitalize; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-map small { color: var(--dim); font: 12px var(--mono); }
.pb-time { text-align: right; }
.pb-time b { display: block; font: 600 14px var(--mono); }
.pb-time small { color: var(--dim); font-size: 13px; }
.pb.is-wr .pb-time small { color: #f6c46d; font-weight: 700; }
.pb:hover .pb-map b { color: var(--red-hot); }

/* One orchestrated entrance: the map art settles, the title strafes in, the podium rises, rows follow. */
.js .board-art { animation: art-settle 1.6s var(--ease-out) both; }
.js .board-hero h2 { animation: strafe-in .9s var(--ease-out) .1s both; }
.js .board-kicker, .js .board-tech, .js .board-stats { animation: rise-in .7s var(--ease-out) both; animation-delay: .25s; }
.js .podium-step { animation: podium-up .8s var(--ease-out) both; }
.js .podium-step.p1 { animation-delay: .35s; } .js .podium-step.p2 { animation-delay: .5s; } .js .podium-step.p3 { animation-delay: .6s; }
.js .ranks li:nth-child(-n+12) { animation: rise-in .5s var(--ease-out) both; animation-delay: calc(.6s + var(--n, 0) * 40ms); }
.js .rank-gap i::after { animation: bar-grow 1.2s var(--ease-out) both; animation-delay: .8s; }
.js .page-head h1 { animation: strafe-in .9s var(--ease-out) both; }
@keyframes art-settle { from { transform: scale(1.12); filter: saturate(.4) brightness(.6); } to { transform: none; filter: none; } }
@keyframes strafe-in { from { transform: translateX(-.4em) skewX(-12deg); opacity: 0; filter: blur(8px); } to { transform: none; opacity: 1; filter: none; } }
@keyframes podium-up { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes bar-grow { from { transform: scaleX(0); } }
@keyframes flash { 0%, 50% { background: #e0334a2e; } 100% { background: transparent; } }

/* Responsive */
@media (max-width: 1080px) {
  .board-grid { grid-template-columns: 1fr; }
  .board-side { position: static; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .page-head { flex-direction: column; align-items: flex-start; }
  .duo { grid-template-columns: 1fr; }
  .rank-head, .rank { grid-template-columns: 34px minmax(0, 1fr) 100px; }
  .rank-head span:nth-child(3), .rank-head span:nth-child(5), .rank-maps, .rank-gap { display: none; }
  .profile-stats { grid-template-columns: 1fr 1fr 1fr; }
  .profile-stats dd { font-size: 26px; }
}
@media (max-width: 600px) {
  .podium { margin: -64px 0 22px; gap: 8px; }
  .podium-step a { padding: 16px 8px 14px; }
  .podium-step.p1 a { padding-top: 22px; }
  .podium-step span.av { width: 46px; height: 46px; }
  .podium-step.p1 span.av { width: 58px; height: 58px; }
  .podium-name { font-size: 14px !important; }
  .podium-time { font-size: 14px !important; }
  .podium-tier { font-size: 11px; }
  .podium-pos { font-size: 64px !important; }
  .board-side { grid-template-columns: 1fr; }
  .table-card { padding: 16px 14px 8px; }
  .rank-who .sid { display: none; }
  .rank { margin: 0 -6px; padding: 10px 6px; }
  .course-tools, .course-tools .search { width: 100%; }
  .course-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .course-meta span:nth-child(2) { display: none; }
  .profile-stats { grid-template-columns: 1fr; }
  .profile-close { margin-left: 0; }
  .pb-list { grid-template-columns: 1fr; }
}
