/*
 * IPLSalary Profiles – loaded ONLY on /team/, /player/, /coach/, /umpire/ pages.
 * Every selector is scoped under .ipls-profile (or .ipls-page) so nothing can reach other pages.
 * Clean, white, data-first look: thin borders, no gradients, team colours only as small accents.
 */
.ipls-profile {
	--ipls-ink: #0f172a;
	--ipls-text: #334155;
	--ipls-muted: #6b7280;
	--ipls-line: #e5e7eb;
	--ipls-line-soft: #f1f2f4;
	--ipls-subtle: #f8f9fa;
	--ipls-green: #16a34a;
	--ipls-green-bg: #f0fdf4;
	--ipls-red: #dc2626;
	--ipls-accent: #e11d2e;
	--ipls-radius: 14px;
	--ipls-team: #fd850f;
	--ipls-team-2: #003d98;
	color: var(--ipls-text);
	background: #fff;
	font-variant-numeric: tabular-nums;
}

/* Astra pads "page builder" articles; our layout sets its own spacing. */
.ipls-page .site-main > article.ipls-profile,
.ipls-page .site-main > .ipls-profile {
	padding: 0;
}

.ipls-profile .ipls-wrap {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 24px;
}
.ipls-profile a {
	color: var(--ipls-ink);
	text-decoration: none;
}
.ipls-profile a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------- Team icon: ring in primary colour, dot in secondary ---------- */
.ipls-profile .ipls-ticon {
	display: inline-block;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	vertical-align: -4px;
	background: radial-gradient(circle at center, var(--t2) 0 28%, var(--t1) 30% 100%);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.ipls-profile .ipls-ticon--md { width: 26px; height: 26px; }
.ipls-profile .ipls-ticon--lg { width: 40px; height: 40px; }
.ipls-profile .ipls-ticon--xl { width: 84px; height: 84px; }

/* Official team logo (replaces the colour badge when the team has a featured image) */
.ipls-profile .ipls-ticon--logo {
	background: none;
	box-shadow: none;
	border-radius: 0;
}
.ipls-profile .ipls-ticon--logo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}
.ipls-profile .ipls-ticon--logo.ipls-ticon--sm { width: 22px; height: 22px; vertical-align: -6px; }
.ipls-profile .ipls-ticon--logo.ipls-ticon--md { width: 32px; height: 32px; }
.ipls-profile .ipls-ticon--logo.ipls-ticon--lg { width: 48px; height: 48px; }
.ipls-profile .ipls-ticon--logo.ipls-ticon--xl {
	width: 136px;
	height: 136px;
	padding: 16px;
	box-sizing: border-box;
	border: 1px solid var(--ipls-line);
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 28px -18px rgba(15, 23, 42, 0.25);
}

/* ---------- Avatars (players/coaches) ---------- */
.ipls-profile .ipls-avatar {
	flex: 0 0 auto;
	display: inline-grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	overflow: hidden;
	background: var(--ipls-subtle);
}
.ipls-profile .ipls-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 15%;
	display: block;
}
.ipls-profile .ipls-identity > .ipls-avatar:not(.ipls-avatar--initials) {
	width: 112px;
	height: 112px;
	box-shadow: 0 0 0 1px var(--ipls-line), 0 0 0 5px #fff, 0 0 0 6px var(--ipls-team);
}
.ipls-profile .ipls-player-cell {
	display: flex;
	flex-wrap: nowrap;
	min-height: 32px;
}
.ipls-profile .ipls-player-cell .ipls-avatar {
	width: 32px;
	height: 32px;
	font-size: 11px;
	line-height: 1;
}
.ipls-profile .ipls-credit {
	margin: 12px 0 0;
	padding-top: 10px;
	border-top: 1px solid var(--ipls-line-soft);
	font-size: 11.5px;
	line-height: 1.5;
	color: var(--ipls-muted);
}
.ipls-profile .ipls-credit a {
	color: var(--ipls-muted);
	text-decoration: underline;
}
.ipls-profile .ipls-avatar--initials {
	color: var(--ipls-ink);
	font-weight: 700;
	font-size: 13px;
	background: #fff;
	box-shadow: inset 0 0 0 2px var(--ipls-av, var(--ipls-team));
}
.ipls-profile .ipls-identity > .ipls-avatar {
	width: 84px;
	height: 84px;
	font-size: 28px;
	box-shadow: inset 0 0 0 4px var(--ipls-team);
}

/* ---------- Hero ---------- */
.ipls-profile .ipls-hero {
	background: #fff;
	color: var(--ipls-text);
	padding: 28px 0 36px;
	border-bottom: 1px solid var(--ipls-line);
}
.ipls-profile .ipls-breadcrumb {
	font-size: 13px;
	color: var(--ipls-muted);
	margin-bottom: 24px;
}
.ipls-profile .ipls-breadcrumb a {
	color: var(--ipls-muted);
}
.ipls-profile .ipls-breadcrumb a:hover {
	color: var(--ipls-ink);
}
.ipls-profile .ipls-hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 40px;
	align-items: center;
}
.ipls-profile .ipls-identity {
	display: flex;
	gap: 28px;
	align-items: flex-start;
	min-width: 0;
}
.ipls-profile .ipls-identity-text {
	min-width: 0;
}
/* The photo/logo follows the H1 in the source; show it first (left) on wide screens. */
.ipls-profile .ipls-identity > :not(.ipls-identity-text) {
	order: -1;
}
.ipls-profile .ipls-kicker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ipls-muted);
}
.ipls-profile .ipls-kicker a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--ipls-ink);
}
.ipls-profile .ipls-kicker .ipls-ticon {
	margin-right: 6px;
}
.ipls-profile .ipls-kicker-sep {
	color: #cbd5e1;
}
.ipls-profile .ipls-title {
	color: var(--ipls-ink);
	font-size: clamp(28px, 3.6vw, 42px);
	line-height: 1.15;
	letter-spacing: -0.02em;
	font-weight: 800;
	margin: 8px 0 12px;
}
.ipls-profile .ipls-lead {
	color: var(--ipls-muted);
	font-size: 17px;
	line-height: 1.6;
	max-width: 680px;
	margin: 0 0 16px;
}
.ipls-profile .ipls-chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 0;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 14px;
	color: var(--ipls-text);
}
.ipls-profile .ipls-chips li {
	margin: 0;
	padding: 0;
	font-weight: 600;
}
.ipls-profile .ipls-chips li + li::before {
	content: "";
	display: inline-block;
	width: 4px;
	height: 4px;
	margin: 0 12px;
	border-radius: 50%;
	background: #cbd5e1;
	vertical-align: middle;
}
.ipls-profile .ipls-chips small {
	font-weight: 500;
	color: var(--ipls-muted);
	margin-right: 4px;
}

/* Key figure card */
.ipls-profile .ipls-hero-card {
	padding: 22px 24px 8px;
	border: 1px solid var(--ipls-line);
	border-radius: var(--ipls-radius);
	background: #fff;
}
.ipls-profile .ipls-hero-card-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--ipls-muted);
}
.ipls-profile .ipls-hero-card-value {
	display: block;
	margin: 4px 0 14px;
	font-size: clamp(30px, 3.2vw, 38px);
	line-height: 1.1;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--ipls-green);
}
.ipls-profile .ipls-hero-card-value small {
	display: block;
	margin-top: 6px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0;
	color: var(--ipls-muted);
}
.ipls-profile .ipls-hero-card-list {
	margin: 0;
	border-top: 1px solid var(--ipls-line);
}
.ipls-profile .ipls-hero-card-list > div {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding: 12px 0;
	border-bottom: 1px solid var(--ipls-line-soft);
}
.ipls-profile .ipls-hero-card-list > div:last-child {
	border-bottom: 0;
}
.ipls-profile .ipls-hero-card-list dt {
	margin: 0;
	font-size: 14px;
	font-weight: 500;
	color: var(--ipls-muted);
}
.ipls-profile .ipls-hero-card-list dd {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: var(--ipls-ink);
	text-align: right;
}

/* ---------- Segmented section nav (sticky) ---------- */
.ipls-profile .ipls-subnav {
	position: sticky;
	top: 0;
	z-index: 20;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	padding: 14px 0;
	border-bottom: 1px solid var(--ipls-line);
}
.admin-bar .ipls-profile .ipls-subnav {
	top: 32px;
}
.ipls-profile .ipls-subnav ul {
	display: flex;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 4px;
	width: max-content;
	max-width: 100%;
	overflow-x: auto;
	scrollbar-width: none;
	background: var(--ipls-subtle);
	border: 1px solid var(--ipls-line);
	border-radius: 12px;
}
.ipls-profile .ipls-subnav ul::-webkit-scrollbar {
	display: none;
}
.ipls-profile .ipls-subnav li {
	margin: 0;
	flex: 0 0 auto;
}
.ipls-profile .ipls-subnav a {
	display: block;
	padding: 8px 16px;
	border-radius: 9px;
	font-size: 14px;
	font-weight: 600;
	color: var(--ipls-text);
	white-space: nowrap;
	text-decoration: none;
	transition: background 0.15s, color 0.15s;
}
.ipls-profile .ipls-subnav a:hover {
	background: #111827;
	color: #fff;
	text-decoration: none;
}

/* ---------- Layout ---------- */
.ipls-profile .ipls-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 28px;
	padding-top: 28px;
	padding-bottom: 64px;
	align-items: start;
}
.ipls-profile .ipls-main {
	min-width: 0;
}
.ipls-profile .ipls-section {
	scroll-margin-top: 90px;
}
.ipls-profile .ipls-panel {
	background: #fff;
	border: 1px solid var(--ipls-line);
	border-radius: var(--ipls-radius);
	padding: 26px 28px;
	margin: 0 0 24px;
}
.ipls-profile .ipls-panel > h2,
.ipls-profile .ipls-content h2 {
	font-size: 22px;
	line-height: 1.3;
	letter-spacing: -0.01em;
	font-weight: 800;
	color: var(--ipls-ink);
	margin: 0 0 18px;
}

/* ---------- Tables (standings style) ---------- */
.ipls-profile .ipls-table-wrap {
	overflow-x: auto;
}
.ipls-profile .ipls-table,
.ipls-profile .ipls-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
	border: 0;
	font-size: 15px;
}
.ipls-profile .ipls-table th,
.ipls-profile .ipls-table td,
.ipls-profile .ipls-content table th,
.ipls-profile .ipls-content table td {
	padding: 14px 12px;
	text-align: left;
	border: 0;
	border-bottom: 1px solid var(--ipls-line-soft);
	vertical-align: middle;
}
.ipls-profile .ipls-table thead th,
.ipls-profile .ipls-content table thead th {
	padding-top: 10px;
	padding-bottom: 10px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ipls-muted);
	background: transparent;
	border-bottom: 1px solid var(--ipls-line);
	text-transform: none;
	letter-spacing: 0;
}
.ipls-profile .ipls-table tbody tr:last-child td {
	border-bottom: 0;
}
.ipls-profile .ipls-table tbody tr:hover {
	background: var(--ipls-subtle);
}
.ipls-profile .ipls-table td:first-child {
	font-weight: 600;
	color: var(--ipls-ink);
}
.ipls-profile .ipls-table .ipls-col-num {
	text-align: right;
	white-space: nowrap;
}
.ipls-profile .ipls-table td.ipls-col-num:first-child,
.ipls-profile .ipls-table th.ipls-col-num:first-child {
	text-align: left;
	width: 36px;
}
.ipls-profile .ipls-muted {
	color: var(--ipls-muted);
}
.ipls-profile .ipls-table td.ipls-muted {
	font-weight: 500;
}
.ipls-profile .ipls-strong {
	font-weight: 700;
	color: var(--ipls-ink);
}
.ipls-profile .ipls-table tfoot th,
.ipls-profile .ipls-table tfoot td {
	font-weight: 800;
	color: var(--ipls-ink);
	border-top: 1px solid var(--ipls-line);
	border-bottom: 0;
}

/* Squad table extras */
.ipls-profile .ipls-player-cell {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.ipls-profile .ipls-player-name a {
	color: var(--ipls-ink);
	font-weight: 600;
}
.ipls-profile .ipls-chip {
	display: inline-block;
	padding: 1px 7px;
	border-radius: 6px;
	font-size: 11px;
	font-weight: 700;
	color: var(--ipls-muted);
	background: var(--ipls-subtle);
	border: 1px solid var(--ipls-line);
}
.ipls-profile .ipls-chip--dark {
	color: #fff;
	background: #111827;
	border-color: #111827;
}
.ipls-profile .ipls-status {
	font-size: 13px;
	font-weight: 600;
	color: var(--ipls-text);
	white-space: nowrap;
}
.ipls-profile .ipls-status::before {
	content: "";
	display: inline-block;
	width: 7px;
	height: 7px;
	margin-right: 7px;
	border-radius: 50%;
	vertical-align: 1px;
	background: #9ca3af;
}
.ipls-profile .ipls-status--retained::before { background: var(--ipls-green); }
.ipls-profile .ipls-status--auction::before { background: #f59e0b; }
.ipls-profile .ipls-status--traded::before { background: #3b82f6; }
.ipls-profile .ipls-status--replacement::before { background: #a855f7; }

/* Segmented filter (pure CSS radios) */
.ipls-profile .ipls-filter-input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.ipls-profile .ipls-segment {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 14px;
}
.ipls-profile .ipls-segment-btn {
	cursor: pointer;
	padding: 8px 14px;
	border: 1px solid var(--ipls-line);
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	color: var(--ipls-text);
	background: #fff;
	user-select: none;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ipls-profile .ipls-segment-btn span {
	margin-left: 4px;
	font-weight: 500;
	color: var(--ipls-muted);
}
.ipls-profile .ipls-segment-btn:hover {
	border-color: #cbd5e1;
}
#ipls-f-all:checked ~ .ipls-segment .ipls-segment-btn--all,
#ipls-f-bat:checked ~ .ipls-segment .ipls-segment-btn--bat,
#ipls-f-wk:checked ~ .ipls-segment .ipls-segment-btn--wk,
#ipls-f-ar:checked ~ .ipls-segment .ipls-segment-btn--ar,
#ipls-f-bowl:checked ~ .ipls-segment .ipls-segment-btn--bowl {
	background: #111827;
	border-color: #111827;
	color: #fff;
}
#ipls-f-all:checked ~ .ipls-segment .ipls-segment-btn--all span,
#ipls-f-bat:checked ~ .ipls-segment .ipls-segment-btn--bat span,
#ipls-f-wk:checked ~ .ipls-segment .ipls-segment-btn--wk span,
#ipls-f-ar:checked ~ .ipls-segment .ipls-segment-btn--ar span,
#ipls-f-bowl:checked ~ .ipls-segment .ipls-segment-btn--bowl span {
	color: rgba(255, 255, 255, 0.7);
}
.ipls-profile .ipls-filter-input:focus-visible ~ .ipls-segment {
	outline: 2px solid #93c5fd;
	outline-offset: 4px;
	border-radius: 10px;
}
#ipls-f-bat:checked ~ .ipls-table-wrap tbody tr:not([data-role="bat"]),
#ipls-f-wk:checked ~ .ipls-table-wrap tbody tr:not([data-role="wk"]),
#ipls-f-ar:checked ~ .ipls-table-wrap tbody tr:not([data-role="ar"]),
#ipls-f-bowl:checked ~ .ipls-table-wrap tbody tr:not([data-role="bowl"]) {
	display: none;
}

/* Squad summary row */
.ipls-profile .ipls-summary {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-bottom: 22px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--ipls-line);
}
.ipls-profile .ipls-summary > div {
	padding: 0 18px;
	border-right: 1px solid var(--ipls-line);
}
.ipls-profile .ipls-summary > div:first-child {
	padding-left: 0;
}
.ipls-profile .ipls-summary > div:last-child {
	border-right: 0;
}
.ipls-profile .ipls-summary strong {
	display: block;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.2;
	color: var(--ipls-ink);
}
.ipls-profile .ipls-summary span {
	font-size: 13px;
	color: var(--ipls-muted);
}

/* ---------- Salary by year: thin bars ---------- */
.ipls-profile .ipls-bars {
	list-style: none;
	margin: 0;
	padding: 0;
}
.ipls-profile .ipls-bar {
	display: grid;
	grid-template-columns: 56px 230px minmax(0, 1fr) 160px;
	align-items: center;
	gap: 16px;
	margin: 0;
	padding: 11px 0;
	border-bottom: 1px solid var(--ipls-line-soft);
}
.ipls-profile .ipls-bar:last-child {
	border-bottom: 0;
}
.ipls-profile .ipls-bar-year {
	font-weight: 700;
	color: var(--ipls-ink);
}
.ipls-profile .ipls-bar-team {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 500;
	color: var(--ipls-text);
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ipls-profile .ipls-bar-team a {
	color: var(--ipls-text);
}
.ipls-profile .ipls-bar-track {
	height: 6px;
	border-radius: 999px;
	background: var(--ipls-line-soft);
	overflow: hidden;
}
.ipls-profile .ipls-bar-fill {
	display: block;
	height: 100%;
	border-radius: 999px;
}
.ipls-profile .ipls-bar-value {
	text-align: right;
	font-weight: 700;
	color: var(--ipls-ink);
}
.ipls-profile .ipls-bar--empty .ipls-bar-value {
	font-weight: 500;
	font-size: 13px;
	color: var(--ipls-muted);
}
.ipls-profile .ipls-bars-total {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 4px;
	padding: 16px 0 0;
	border-top: 1px solid var(--ipls-line);
}
.ipls-profile .ipls-bars-total span {
	font-weight: 600;
	color: var(--ipls-ink);
}
.ipls-profile .ipls-bars-total strong {
	font-size: 22px;
	font-weight: 800;
	color: var(--ipls-green);
}

/* ---------- Stat figures (records, staff) – no inner boxes ---------- */
.ipls-profile .ipls-statgrid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 22px 28px;
	margin: 0;
}
.ipls-profile .ipls-statcard {
	padding: 0;
	margin: 0;
}
.ipls-profile .ipls-statcard dt {
	margin: 0 0 4px;
	font-size: 13px;
	font-weight: 500;
	color: var(--ipls-muted);
}
.ipls-profile .ipls-statcard dt a {
	color: var(--ipls-ink);
	font-weight: 600;
}
.ipls-profile .ipls-statcard dd {
	margin: 0;
	font-size: 24px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--ipls-ink);
}
.ipls-profile .ipls-statcard dd small {
	display: block;
	margin-top: 4px;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0;
	color: var(--ipls-muted);
}
.ipls-profile .ipls-statgrid--text dd {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.45;
}

/* ---------- Long-form content ---------- */
.ipls-profile .ipls-content {
	font-size: 16.5px;
	line-height: 1.75;
	color: var(--ipls-text);
}
.ipls-profile .ipls-content h2 {
	margin-top: 34px;
	scroll-margin-top: 90px;
}
.ipls-profile .ipls-content > h2:first-child {
	margin-top: 0;
}
.ipls-profile .ipls-content h3 {
	font-size: 18px;
	font-weight: 700;
	color: var(--ipls-ink);
	margin: 22px 0 8px;
}
.ipls-profile .ipls-content a {
	color: #1d4ed8;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.ipls-profile .ipls-content figure.wp-block-table {
	overflow-x: auto;
	border: 0;
	border-radius: 0;
	margin: 18px 0;
	box-shadow: none;
}
/* Neutralise theme/editor table colours so content tables match the data tables. */
.ipls-profile .ipls-content table thead,
.ipls-profile .ipls-content table thead tr,
.ipls-profile .ipls-content table thead th {
	background: #fff;
	color: var(--ipls-muted);
	border-color: var(--ipls-line);
}
.ipls-profile .ipls-content table tbody tr:nth-child(odd),
.ipls-profile .ipls-content table tbody tr:nth-child(even) {
	background: transparent;
}
.ipls-profile .ipls-content table td:first-child {
	font-weight: 600;
	color: var(--ipls-ink);
}
.ipls-profile .ipls-content ul,
.ipls-profile .ipls-content ol {
	margin: 0 0 1.3em 1.2em;
}
.ipls-profile .ipls-content li {
	margin-bottom: 0.45em;
}
.ipls-profile .ipls-content strong {
	color: var(--ipls-ink);
}

/* ---------- FAQ ---------- */
.ipls-profile .ipls-faq {
	border-top: 1px solid var(--ipls-line);
}
.ipls-profile .ipls-faq-item {
	border-bottom: 1px solid var(--ipls-line-soft);
	background: #fff;
}
.ipls-profile .ipls-faq-item:last-child {
	border-bottom: 0;
}
.ipls-profile .ipls-faq-item summary {
	cursor: pointer;
	list-style: none;
	position: relative;
	padding: 16px 40px 16px 0;
	font-weight: 600;
	font-size: 15.5px;
	color: var(--ipls-ink);
}
.ipls-profile .ipls-faq-item summary:hover {
	color: #000;
}
.ipls-profile .ipls-faq-item summary::-webkit-details-marker {
	display: none;
}
.ipls-profile .ipls-faq-item summary::after {
	content: "";
	position: absolute;
	right: 6px;
	top: 50%;
	width: 8px;
	height: 8px;
	margin-top: -6px;
	border-right: 2px solid var(--ipls-muted);
	border-bottom: 2px solid var(--ipls-muted);
	transform: rotate(45deg);
	transition: transform 0.2s;
}
.ipls-profile .ipls-faq-item[open] summary::after {
	transform: rotate(-135deg);
	margin-top: -2px;
}
.ipls-profile .ipls-faq-answer {
	padding: 0 40px 16px 0;
	line-height: 1.7;
	color: var(--ipls-text);
}
.ipls-profile .ipls-faq-answer p {
	margin: 0;
}

/* ---------- Sidebar ---------- */
.ipls-profile .ipls-aside {
	position: sticky;
	top: 96px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}
.admin-bar .ipls-profile .ipls-aside {
	top: 128px;
}
.ipls-profile .ipls-side-card {
	background: #fff;
	border: 1px solid var(--ipls-line);
	border-radius: var(--ipls-radius);
	padding: 20px 22px;
}
.ipls-profile .ipls-side-title {
	font-size: 18px;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: var(--ipls-ink);
	margin: 0 0 10px;
}
.ipls-profile .ipls-side-facts {
	margin: 0;
}
.ipls-profile .ipls-side-facts > div {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 11px 0;
	border-bottom: 1px solid var(--ipls-line-soft);
}
.ipls-profile .ipls-side-facts > div:last-child {
	border-bottom: 0;
}
.ipls-profile .ipls-side-facts dt {
	margin: 0;
	font-size: 14px;
	color: var(--ipls-muted);
	flex: 0 0 auto;
}
.ipls-profile .ipls-side-facts dd {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--ipls-ink);
	text-align: right;
}
.ipls-profile .ipls-side-list {
	list-style: none;
	margin: 0 -8px;
	padding: 0;
}
.ipls-profile .ipls-side-list li {
	margin: 0;
	border-bottom: 1px solid var(--ipls-line-soft);
}
.ipls-profile .ipls-side-list li:last-child {
	border-bottom: 0;
}
.ipls-profile .ipls-side-list a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 8px;
	border-radius: 8px;
	color: var(--ipls-ink);
	text-decoration: none;
}
.ipls-profile .ipls-side-list a:hover {
	background: var(--ipls-subtle);
}
.ipls-profile .ipls-side-name {
	display: flex;
	flex-direction: column;
	font-weight: 600;
	font-size: 14.5px;
	line-height: 1.3;
}
.ipls-profile .ipls-side-name small {
	font-weight: 500;
	font-size: 13px;
	color: var(--ipls-muted);
}
.ipls-profile .ipls-side-more {
	display: block;
	margin-top: 12px;
	padding: 10px 14px;
	border-radius: 10px;
	text-align: center;
	font-weight: 700;
	font-size: 14px;
	color: #fff;
	background: #22c55e;
	text-decoration: none;
	transition: background 0.15s;
}
.ipls-profile .ipls-side-more:hover {
	background: var(--ipls-green);
	color: #fff;
	text-decoration: none;
}

.ipls-profile .ipls-meta {
	font-size: 13px;
	color: var(--ipls-muted);
	margin: 4px 2px 0;
}

/* ---------- Hub pages ---------- */
.ipls-profile.ipls-hub .ipls-hero {
	text-align: center;
	padding-bottom: 32px;
}
.ipls-profile.ipls-hub .ipls-breadcrumb {
	text-align: left;
}
.ipls-profile .ipls-hub-intro {
	max-width: 760px;
	margin: 0 auto;
}
.ipls-profile.ipls-hub .ipls-lead {
	margin-left: auto;
	margin-right: auto;
}
.ipls-profile.ipls-hub .ipls-subnav ul {
	margin: 0 auto;
}
.ipls-profile.ipls-hub .ipls-body {
	padding: 32px 0 64px;
}
.ipls-profile .ipls-hub-heading {
	font-size: 24px;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: var(--ipls-ink);
	margin: 8px 0 18px;
	scroll-margin-top: 90px;
}
.ipls-profile .ipls-section h3 {
	font-size: 17px;
	font-weight: 700;
	color: var(--ipls-ink);
	margin: 22px 0 10px;
}
.ipls-profile .ipls-hub-group {
	margin: 0 0 32px;
	scroll-margin-top: 90px;
}
.ipls-profile .ipls-hub-group > h2 {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 20px;
	font-weight: 800;
	color: var(--ipls-ink);
	margin: 0 0 12px;
}
.ipls-profile .ipls-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 10px;
}
.ipls-profile .ipls-grid-item {
	margin: 0;
	scroll-margin-top: 90px;
}
.ipls-profile .ipls-tile-team {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 6px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ipls-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ipls-profile .ipls-tile {
	display: flex;
	gap: 12px;
	align-items: center;
	height: 100%;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid var(--ipls-line);
	border-radius: 12px;
	color: var(--ipls-ink);
	text-decoration: none;
	transition: border-color 0.15s, background 0.15s;
}
.ipls-profile .ipls-tile:hover {
	border-color: #cbd5e1;
	background: var(--ipls-subtle);
	text-decoration: none;
}
.ipls-profile .ipls-tile-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex: 1;
}
.ipls-profile .ipls-tile-name {
	font-size: 15.5px;
	font-weight: 700;
	line-height: 1.3;
	overflow-wrap: anywhere;
}
.ipls-profile .ipls-tile-sub {
	font-size: 13px;
	color: var(--ipls-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ipls-profile .ipls-tile-stat {
	font-size: 15px;
	font-weight: 700;
	white-space: nowrap;
	color: var(--ipls-green);
}
.ipls-profile .ipls-empty {
	font-size: 16px;
	color: var(--ipls-muted);
}

/* Team hub content */
.ipls-profile.ipls-hub .ipls-panel {
	margin-top: 8px;
}
.ipls-profile .ipls-intro {
	margin: -8px 0 16px;
	color: var(--ipls-muted);
	font-size: 15.5px;
	line-height: 1.6;
}
.ipls-profile .ipls-note {
	margin: 14px 0 0;
	font-size: 13px;
	color: var(--ipls-muted);
}
.ipls-profile .ipls-team-cell {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
	color: var(--ipls-ink);
	white-space: nowrap;
}
.ipls-profile .ipls-table--compare td {
	white-space: nowrap;
}
.ipls-profile .ipls-table--compare td:first-child {
	font-weight: 600;
}
.ipls-profile .ipls-rank {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--ipls-line);
}
.ipls-profile .ipls-content .ipls-rank li,
.ipls-profile .ipls-rank li {
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 10px 0;
	border-bottom: 1px solid var(--ipls-line-soft);
}
/* Ranking rows with a note column (e.g. team and title years). */
.ipls-profile .ipls-rank--note li {
	grid-template-columns: 44px minmax(0, 1fr) auto auto;
}
.ipls-profile .ipls-rank .ipls-player-cell {
	align-items: center;
	gap: 10px;
}
.ipls-profile .ipls-rank-note {
	font-size: 14px;
	color: var(--ipls-muted);
	text-align: right;
}
@media (max-width: 600px) {
	.ipls-profile .ipls-rank--note li {
		grid-template-columns: 28px minmax(0, 1fr) auto;
		row-gap: 2px;
	}
	.ipls-profile .ipls-rank--note .ipls-rank-note {
		grid-column: 2 / -1;
		grid-row: 2;
		padding-left: 42px;
		font-size: 13px;
		text-align: left;
	}
}
.ipls-profile .ipls-rank-pos {
	font-size: 13px;
	font-weight: 700;
	color: var(--ipls-muted);
}
.ipls-profile .ipls-rank strong {
	color: var(--ipls-green);
	font-weight: 800;
}
.ipls-profile .ipls-content .ipls-team-cell {
	color: var(--ipls-ink);
	text-decoration: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
	.ipls-profile .ipls-layout {
		grid-template-columns: minmax(0, 1fr);
	}
	.ipls-profile .ipls-aside {
		position: static;
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	}
}
@media (max-width: 900px) {
	.ipls-profile .ipls-hero-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}
}
@media (max-width: 720px) {
	.ipls-profile .ipls-wrap {
		padding: 0 16px;
	}
	.ipls-profile .ipls-hero {
		padding: 18px 0 26px;
	}
	.ipls-profile .ipls-breadcrumb {
		margin-bottom: 18px;
	}
	/* Phones: kicker and H1 lead the hero, the photo/logo sits small at their right. */
	.ipls-profile .ipls-identity {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 0 14px;
		align-items: start;
	}
	.ipls-profile .ipls-identity-text {
		display: contents;
	}
	.ipls-profile .ipls-identity > :not(.ipls-identity-text) {
		grid-column: 2;
		grid-row: 1 / span 2;
		order: 0;
		margin-top: 2px;
	}
	.ipls-profile .ipls-identity .ipls-kicker {
		grid-column: 1;
		grid-row: 1;
		flex-wrap: wrap;
		row-gap: 4px;
	}
	.ipls-profile .ipls-identity .ipls-title {
		grid-column: 1;
		grid-row: 2;
	}
	.ipls-profile .ipls-identity .ipls-lead,
	.ipls-profile .ipls-identity .ipls-chips {
		grid-column: 1 / -1;
	}
	.ipls-profile .ipls-ticon--logo.ipls-ticon--xl {
		width: 64px;
		height: 64px;
		padding: 7px;
		border-radius: 14px;
	}
	.ipls-profile .ipls-ticon--xl:not(.ipls-ticon--logo),
	.ipls-profile .ipls-identity > .ipls-avatar,
	.ipls-profile .ipls-identity > .ipls-avatar:not(.ipls-avatar--initials) {
		width: 60px;
		height: 60px;
		font-size: 19px;
	}
	.ipls-profile .ipls-identity > .ipls-avatar:not(.ipls-avatar--initials) {
		box-shadow: 0 0 0 1px var(--ipls-line), 0 0 0 3px #fff, 0 0 0 4px var(--ipls-team);
	}
	.ipls-profile .ipls-identity > .ipls-avatar--initials {
		box-shadow: inset 0 0 0 3px var(--ipls-team);
	}
	.ipls-profile .ipls-title {
		font-size: 26px;
	}
	.ipls-profile .ipls-lead {
		font-size: 16px;
	}
	.ipls-profile .ipls-subnav {
		padding: 10px 0;
	}
	.ipls-profile .ipls-layout {
		padding-top: 18px;
		gap: 18px;
	}
	.ipls-profile .ipls-panel {
		padding: 20px 16px;
		border-radius: 12px;
	}
	.ipls-profile .ipls-panel > h2,
	.ipls-profile .ipls-content h2 {
		font-size: 20px;
	}
	.ipls-profile .ipls-bar {
		grid-template-columns: 44px minmax(0, 1fr) auto;
		grid-template-areas: "year team value" "track track track";
		row-gap: 8px;
		padding: 12px 0;
	}
	.ipls-profile .ipls-bar-year { grid-area: year; }
	.ipls-profile .ipls-bar-team { grid-area: team; }
	.ipls-profile .ipls-bar-value { grid-area: value; }
	.ipls-profile .ipls-bar-track { grid-area: track; }
	.ipls-profile .ipls-bars-total strong {
		font-size: 19px;
	}
	.ipls-profile .ipls-summary {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	.ipls-profile .ipls-summary > div {
		padding: 0 10px;
	}
	.ipls-profile .ipls-summary strong {
		font-size: 17px;
	}
	.ipls-profile .ipls-segment {
		flex-wrap: nowrap;
		overflow-x: auto;
		max-width: 100%;
		scrollbar-width: none;
	}
	.ipls-profile .ipls-segment-btn {
		flex: 0 0 auto;
	}
}

/* Phones: generic data tables stack as label/value rows; the squad table stays a compact table. */
@media (max-width: 600px) {
	.ipls-profile .ipls-table:not(.ipls-table--squad) thead {
		display: none;
	}
	.ipls-profile .ipls-table:not(.ipls-table--squad),
	.ipls-profile .ipls-table:not(.ipls-table--squad) tbody,
	.ipls-profile .ipls-table:not(.ipls-table--squad) tr,
	.ipls-profile .ipls-table:not(.ipls-table--squad) td {
		display: block;
		width: 100%;
	}
	.ipls-profile .ipls-table:not(.ipls-table--squad) tbody tr {
		padding: 10px 0;
		border-bottom: 1px solid var(--ipls-line-soft);
	}
	.ipls-profile .ipls-table:not(.ipls-table--squad) tbody td {
		display: flex;
		justify-content: space-between;
		gap: 16px;
		padding: 3px 0;
		border: 0;
		text-align: right;
	}
	.ipls-profile .ipls-table:not(.ipls-table--squad) tbody td::before {
		content: attr(data-label);
		flex: 0 0 auto;
		text-align: left;
		font-size: 13px;
		font-weight: 500;
		color: var(--ipls-muted);
	}
	.ipls-profile .ipls-table:not(.ipls-table--squad) tbody td:first-child {
		text-align: left;
		font-size: 16px;
	}
	.ipls-profile .ipls-table:not(.ipls-table--squad) tbody td:first-child::before {
		display: none;
	}
	/* Squad: hide # and Role columns, keep Player / Acquired / Price */
	.ipls-profile .ipls-table--squad th:nth-child(1),
	.ipls-profile .ipls-table--squad td:nth-child(1),
	.ipls-profile .ipls-table--squad th:nth-child(3),
	.ipls-profile .ipls-table--squad td:nth-child(3) {
		display: none;
	}
	.ipls-profile .ipls-table--squad th,
	.ipls-profile .ipls-table--squad td {
		padding: 12px 6px;
		font-size: 14px;
	}
	.ipls-profile .ipls-status {
		font-size: 12px;
	}
}

/* Team hub: roomier tiles so names and captains fit */
.ipls-profile.ipls-hub--team .ipls-grid {
	grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
}
.ipls-profile.ipls-hub--team .ipls-tile-sub {
	white-space: normal;
}

/* Team hero facts: one per line (long stadium names) */
.ipls-profile--team .ipls-chips {
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
}
.ipls-profile--team .ipls-chips li + li::before {
	display: none;
}
.ipls-profile--team .ipls-chips small {
	display: inline-block;
	min-width: 96px;
	margin-right: 8px;
	font-size: 13px;
}
.ipls-profile--team .ipls-chips li {
	display: grid;
	grid-template-columns: 104px minmax(0, 1fr);
	align-items: baseline;
}
.ipls-profile--team .ipls-chips small {
	min-width: 0;
	margin: 0;
}
