/* UnitedRigs Driver Ranks. Uses the theme's colors when present, safe fallbacks otherwise. */
.urk {
	--urk-ink: var(--ink, #0b1424);
	--urk-muted: var(--muted, #5a6475);
	--urk-line: var(--line, #e3e7ed);
	--urk-surface: var(--surface, #fff);
	--urk-primary: var(--primary, #1d4ed8);
	--urk-radius: var(--radius, 18px);
	--urk-shadow: var(--shadow, 0 1px 2px rgba(11, 20, 36, .06), 0 8px 24px rgba(11, 20, 36, .06));
	color: var(--urk-ink);
}

/* Badges (all pairs pass WCAG AA contrast). */
.urk-badge {
	display: inline-block;
	margin-left: 4px;
	padding: 1px 8px;
	border-radius: 999px;
	font-size: .72rem;
	font-weight: 700;
	line-height: 1.6;
	letter-spacing: .02em;
	vertical-align: middle;
	white-space: nowrap;
	text-transform: uppercase;
}
.urk-tier-0 { background: #eef1f5; color: #3f4857; }
.urk-tier-1 { background: #e3ecfd; color: #1a44b8; }
.urk-tier-2 { background: #dcf3e6; color: #0f6b3a; }
.urk-tier-3 { background: #fdebd6; color: #9a3412; }
.urk-tier-4 { background: #1f2a3d; color: #fff; }
.urk-tier-5 { background: #f58220; color: #0b1424; }
.urk-badge--staff { background: #0b1424; color: #fff; }

/* Leaderboard */
.urk-board { margin: 1.5em 0; }
.urk-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.urk-tabs a {
	padding: 8px 16px;
	border: 1px solid var(--urk-line);
	border-radius: 999px;
	color: var(--urk-ink);
	font-weight: 700;
	text-decoration: none;
	background: var(--urk-surface);
}
.urk-tabs a[aria-current="page"] { background: var(--urk-ink); border-color: var(--urk-ink); color: #fff; }
.urk-tabs a:focus-visible { outline: 3px solid var(--urk-primary); outline-offset: 2px; }
.urk-list {
	list-style: none;
	margin: 0;
	padding: 0;
	background: var(--urk-surface);
	border: 1px solid var(--urk-line);
	border-radius: var(--urk-radius);
	box-shadow: var(--urk-shadow);
	overflow: hidden;
}
.urk-row {
	display: grid;
	grid-template-columns: 40px 1fr auto;
	gap: 12px;
	align-items: center;
	margin: 0;
	padding: 12px 16px;
	border-top: 1px solid var(--urk-line);
}
.urk-row:first-child { border-top: 0; }
.urk-pos {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #eef1f5;
	font-weight: 800;
}
.urk-row--top .urk-pos { background: #f58220; color: #0b1424; }
.urk-who { min-width: 0; }
.urk-name { font-weight: 700; }
.urk-did { display: block; color: var(--urk-muted); font-size: .85rem; }
.urk-pts { font-weight: 800; white-space: nowrap; }
.urk-empty {
	padding: 18px;
	border: 1px dashed var(--urk-line);
	border-radius: var(--urk-radius);
	color: var(--urk-muted);
}

/* How it works */
.urk-how {
	margin-top: 16px;
	padding: 12px 16px;
	border: 1px solid var(--urk-line);
	border-radius: var(--urk-radius);
	background: var(--urk-surface);
}
.urk-how summary { cursor: pointer; font-weight: 700; }
.urk-how summary:focus-visible { outline: 3px solid var(--urk-primary); outline-offset: 2px; }
.urk-how__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 28px; margin-top: 10px; }
.urk-how h3 { margin: .4em 0; font-size: 1rem; }
.urk-how ul { list-style: none; margin: 0; padding: 0; }
.urk-how li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--urk-line); }
.urk-how li:first-child { border-top: 0; }
.urk-how li .urk-badge { margin-left: 0; }
.urk-note { color: var(--urk-muted); font-size: .85rem; }

/* My rank */
.urk-me__now { font-size: 1.05rem; }
.urk-bar {
	height: 10px;
	border-radius: 999px;
	background: #eef1f5;
	overflow: hidden;
}
.urk-bar span { display: block; height: 100%; background: var(--urk-primary); border-radius: inherit; }
.urk-me__next { color: var(--urk-muted); margin-top: 6px; }

@media (max-width: 480px) {
	.urk-row { grid-template-columns: 32px 1fr auto; gap: 8px; padding: 10px 12px; }
	.urk-pos { width: 28px; height: 28px; }
}

/* ==========================================================================
   Member photos — built on the theme's own tokens (no prefers-color-scheme;
   the theme doesn't switch, so neither do we).
   ========================================================================== */
/* .avatar is added by core; the pair beats the theme's ".entry-content img" radius. */
.urk-avatar,.urk-avatar.avatar{border-radius:50%;object-fit:cover;background:var(--ink-2,#1f2a3d);vertical-align:middle}

.urk-flag{display:inline;margin:0;padding:0}
.urk-flag__btn{background:none;border:0;padding:0 .15rem;margin:0 0 0 .35rem;line-height:1;
  cursor:pointer;color:#475569;font-size:.85em;border-radius:3px}
.urk-flag__btn:hover,.urk-flag__btn:focus-visible{color:var(--accent-text,#c2410c)}
.urk-flag__btn:focus-visible{outline:2px solid var(--primary,#1d4ed8);outline-offset:2px}

/* ---- The profile card --------------------------------------------------- */
.urk-profile{max-width:720px;margin:0 auto}

.urk-profile__card{
  position:relative;overflow:hidden;color:#fff;
  padding:clamp(20px,4vw,34px);
  border-radius:calc(var(--radius,18px) + 6px);
  background:
    radial-gradient(120% 95% at 14% -10%, rgba(245,130,32,.20) 0%, rgba(245,130,32,0) 55%),
    radial-gradient(95% 75% at 92% 4%, rgba(29,78,216,.34) 0%, rgba(29,78,216,0) 62%),
    linear-gradient(180deg,#17253e 0%, var(--navy,#0b1424) 62%);
  box-shadow:var(--shadow-lg,0 2px 4px rgba(11,20,36,.06),0 24px 48px rgba(11,20,36,.14));
}
.urk-profile__card::before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  border:1px solid rgba(255,255,255,.12);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.14)}
.urk-profile__card::after{content:"";position:absolute;inset:0;pointer-events:none;opacity:.045;
  background-image:repeating-linear-gradient(0deg,#fff 0 1px,transparent 1px 3px);mix-blend-mode:overlay}
.urk-profile__card > *{position:relative;z-index:1}

.urk-profile__head{display:flex;gap:clamp(14px,3vw,22px);align-items:center;flex-wrap:wrap;
  margin:0 0 clamp(18px,3vw,26px)}

.urk-profile__shot{flex:none;padding:4px;border-radius:50%;
  background:conic-gradient(from 210deg,#e2e8f0,#8b97a8 22%,#f8fafc 42%,#5d6878 58%,#cbd5e1 78%,#e2e8f0);
  box-shadow:0 12px 30px rgba(0,0,0,.5),inset 0 0 0 1px rgba(255,255,255,.4)}
.urk-profile__shot img,.urk-profile__shot img.urk-avatar{display:block;width:118px;height:118px;
  border-radius:50%;object-fit:cover;box-shadow:0 0 0 4px rgba(11,20,36,.9)}

.urk-profile__who{min-width:0;flex:1 1 12rem}
.urk-profile__name{
  font-family:var(--display,"Barlow Condensed","Inter",system-ui,sans-serif);
  font-weight:900;text-transform:uppercase;letter-spacing:.015em;
  font-size:clamp(1.65rem,4.4vw,2.3rem);line-height:1;margin:0 0 .5rem;overflow-wrap:anywhere;
  color:#fff;
  background:linear-gradient(180deg,#fff 0%,#e2e8f0 58%,#9aa7b8 100%);
  -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;
  text-shadow:0 2px 10px rgba(0,0,0,.35)}
@supports not ((-webkit-background-clip:text) or (background-clip:text)){
  .urk-profile__name{-webkit-text-fill-color:#fff;background:none}
}
.urk-profile__rank{margin:0;display:flex;gap:.55rem;align-items:center;flex-wrap:wrap}
.urk-profile__pts{color:rgba(255,255,255,.72);font-size:.9rem}
.urk-profile__held{margin:.7rem 0 0;font-size:.9rem;color:#ffd7bd;
  border-left:3px solid var(--accent,#f58220);padding-left:.7rem}

/* ---- Upload ------------------------------------------------------------- */
.urk-profile__label{display:block;font-family:var(--display,inherit);font-weight:700;
  text-transform:uppercase;letter-spacing:.06em;font-size:.82rem;color:rgba(255,255,255,.64);
  margin:0 0 .6rem}

.urk-file{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip-path:inset(50%);white-space:nowrap;border:0}

.urk-drop{display:flex;align-items:center;gap:.95rem;cursor:pointer;
  padding:1rem 1.15rem;border-radius:var(--radius-sm,10px);
  border:1.5px dashed rgba(255,255,255,.24);background:rgba(255,255,255,.045);
  transition:border-color .15s ease,background .15s ease,transform .15s ease}
.urk-drop:hover{border-color:rgba(245,130,32,.65);background:rgba(245,130,32,.08);transform:translateY(-1px)}
.urk-drop.is-over{border-color:var(--accent,#f58220);background:rgba(245,130,32,.14);border-style:solid}
.urk-file:focus-visible + .urk-drop{outline:2px solid var(--accent,#f58220);outline-offset:3px}
.urk-drop__icon{flex:none;width:42px;height:42px;border-radius:12px;display:grid;place-items:center;
  background:linear-gradient(180deg,rgba(255,255,255,.16),rgba(255,255,255,.05));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.28)}
.urk-drop__icon svg{width:20px;height:20px;fill:none;stroke:#fff;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round}
.urk-drop__text{min-width:0}
.urk-drop__text strong{display:block;font-size:1rem;line-height:1.2}
.urk-drop__name{display:block;font-size:.85rem;color:rgba(255,255,255,.6);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.urk-drop__name.is-set{color:var(--accent,#f58220);font-weight:600}

.urk-profile__hint{color:rgba(255,255,255,.58);font-size:.85rem;line-height:1.5;margin:.85rem 0 0}
.urk-profile__actions{display:flex;align-items:center;gap:1rem;flex-wrap:wrap;margin:1.15rem 0 0}
.urk-profile__save{margin:0}
.urk-profile__remove{margin:.9rem 0 0}
.urk-profile__rm{background:none;border:0;padding:0;cursor:pointer;font-size:.9rem;
  color:rgba(255,255,255,.62);text-decoration:underline;text-underline-offset:3px}
.urk-profile__rm:hover{color:#fff}
.urk-profile__rm:focus-visible{outline:2px solid var(--accent,#f58220);outline-offset:3px;border-radius:3px}

.urk-profile__legal{color:var(--muted,#5a6475);font-size:.84rem;line-height:1.55;margin:1rem .25rem 0}

.urk-note{border-radius:var(--radius-sm,10px);padding:.8rem 1rem;margin:0 0 1rem;font-size:.93rem;
  border:1px solid transparent}
.urk-note--ok{background:#ecfdf5;border-color:#a7f3d0;color:#065f46}
.urk-note--err{background:#fef2f2;border-color:#fecaca;color:#991b1b}

.urk-profile--out{background:var(--surface,#fff);border:1px solid var(--line,#e3e7ed);
  border-radius:var(--radius,18px);padding:1.4rem;box-shadow:var(--shadow,0 1px 2px rgba(11,20,36,.06))}

/* Leaderboard photos */
.urk-lb__shot,.urk-lb__shot.avatar{width:34px;height:34px;border-radius:50%;flex:0 0 34px}

@media (max-width:480px){
  .urk-profile__shot img,.urk-profile__shot img.urk-avatar{width:92px;height:92px}
  .urk-profile__head{gap:14px}
  .urk-drop{padding:.85rem .9rem;gap:.7rem}
  .urk-profile__actions{gap:.75rem}
  .urk-profile__save{width:100%;justify-content:center}
}
