/* =========================================================
   OWLWAYS — STATISTIKSEITE
   statistics.php / stats template
========================================================= */


/* =========================================================
   SEITENRAHMEN
========================================================= */

.owlstat-page {
	width: calc(100% - 20px);
	max-width: var(--owlh-content-width, 1120px);
	margin: 0 auto 42px;
	box-sizing: border-box;
	color: var(--owlh-text);
	font-size: 13px;
	line-height: 1.65;
}

.owlstat-page *,
.owlstat-page *::before,
.owlstat-page *::after {
	box-sizing: border-box;
}


/* =========================================================
   KOPF
========================================================= */

.owlstat-hero {
	margin-bottom: 18px;
	padding: 26px 28px 25px;
	background: var(--owlh-surface-raised);
	border: 1px solid var(--owlh-border-soft);
	box-shadow: 0 7px 22px var(--owlh-shadow);
}

.owlstat-kicker {
	margin-bottom: 5px;
	color: var(--owlh-accent);
	font-size: 9px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.owlstat-hero h1 {
	position: relative;
	margin: 0;
	padding-bottom: 11px;
	color: var(--owlh-heading);
	font-family: var(--owlh-font-serif, Georgia, "Times New Roman", serif);
	font-size: 31px;
	font-weight: normal;
	font-style: italic;
	line-height: 1.1;
}

.owlstat-hero h1::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 62px;
	height: 1px;
	background: var(--owlh-accent);
}

.owlstat-hero p {
	max-width: 72ch;
	margin: 13px 0 0;
	color: var(--owlh-text-soft);
	font-size: 12.5px;
	line-height: 1.7;
}


/* =========================================================
   HAUPTSEKTIONEN
========================================================= */

.owlstat-section {
	margin-bottom: 18px;
	background: var(--owlh-surface);
	border: 1px solid var(--owlh-border-soft);
	box-shadow: 0 5px 16px var(--owlh-shadow);
}

.owlstat-section-head {
	min-height: 82px;
	padding: 16px 22px;
	background: var(--owlh-surface-soft);
	border-bottom: 1px solid var(--owlh-border-soft);
}

.owlstat-section-head > div {
	display: flex;
	align-items: center;
	gap: 18px;
}

.owlstat-section-number {
	flex: 0 0 auto;
	color: var(--owlh-accent-soft);
	font-family: var(--owlh-font-serif, Georgia, "Times New Roman", serif);
	font-size: 38px;
	line-height: 1;
}

.owlstat-section-title {
	min-width: 0;
	padding-left: 18px;
	border-left: 1px solid var(--owlh-border);
}

.owlstat-section-title > span {
	display: block;
	margin-bottom: 3px;
	color: var(--owlh-accent);
	font-size: 8px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .13em;
	text-transform: uppercase;
}

.owlstat-section-title h2 {
	margin: 0;
	color: var(--owlh-heading);
	font-family: var(--owlh-font-serif, Georgia, "Times New Roman", serif);
	font-size: 22px;
	font-weight: normal;
	line-height: 1.15;
}


/* =========================================================
   COMMUNITY-ZAHLEN
========================================================= */

.owlstat-overview-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
}

.owlstat-overview-card {
	min-width: 0;
	min-height: 122px;
	padding: 20px 15px 18px;
	display: flex;
	align-items: center;
	flex-direction: column;
	justify-content: center;
	background: var(--owlh-surface-raised);
	border-right: 1px solid var(--owlh-border-soft);
	text-align: center;
}

.owlstat-overview-card:nth-child(even) {
	background: var(--owlh-surface);
}

.owlstat-overview-card:last-child {
	border-right: 0;
}

.owlstat-overview-label {
	min-height: 30px;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	color: var(--owlh-text-muted);
	font-size: 8px;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.owlstat-overview-value {
	margin-top: 8px;
	color: var(--owlh-heading);
	font-family: var(--owlh-font-serif, Georgia, "Times New Roman", serif);
	font-size: 29px;
	font-weight: normal;
	line-height: 1;
}


/* =========================================================
   PANELS
========================================================= */

.owlstat-panel {
	margin: 18px;
	background: var(--owlh-surface-raised);
	border: 1px solid var(--owlh-border-soft);
}

.owlstat-panel + .owlstat-panel {
	margin-top: 0;
}

.owlstat-panel-head {
	padding: 15px 18px 13px;
	border-bottom: 1px solid var(--owlh-border-soft);
}

.owlstat-panel-head > div > span {
	display: block;
	margin-bottom: 3px;
	color: var(--owlh-text-muted);
	font-size: 8px;
	font-weight: 700;
	letter-spacing: .10em;
	text-transform: uppercase;
}

.owlstat-panel-head h3 {
	position: relative;
	margin: 0;
	padding-bottom: 8px;
	color: var(--owlh-heading);
	font-family: var(--owlh-font-serif, Georgia, "Times New Roman", serif);
	font-size: 20px;
	font-weight: normal;
	font-style: italic;
	line-height: 1.15;
}

.owlstat-panel-head h3::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 48px;
	height: 1px;
	background: var(--owlh-accent);
}


/* =========================================================
   ALTERSVERTEILUNG
========================================================= */

.owlstat-age-list {
	padding: 6px 18px 10px;
}

.owlstat-age-row {
	min-height: 45px;
	display: grid;
	grid-template-columns: minmax(150px, .85fr) 120px minmax(220px, 1.8fr);
	align-items: center;
	gap: 20px;
	padding: 8px 4px;
	border-bottom: 1px solid var(--owlh-border-soft);
}

.owlstat-age-row:last-child {
	border-bottom: 0;
}

.owlstat-age-label {
	color: var(--owlh-heading);
	font-family: var(--owlh-font-serif, Georgia, "Times New Roman", serif);
	font-size: 13px;
}

.owlstat-age-count {
	color: var(--owlh-text-muted);
	font-size: 11px;
	text-align: right;
}

.owlstat-age-count strong {
	color: var(--owlh-text-soft);
	font-size: 12px;
}

.owlstat-age-meter {
	position: relative;
	height: 8px;
	overflow: hidden;
	background: var(--owlh-surface-soft);
	border: 1px solid var(--owlh-border-soft);
}

.owlstat-age-meter > span {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	max-width: 100%;
	display: block;
	background: var(--owlh-accent);
}


/* =========================================================
   KATEGORIEKARTEN
========================================================= */

.owlstat-category-grid {
	display: grid;
}

.owlstat-category-grid-six {
	grid-template-columns: repeat(6, minmax(0, 1fr));
}

.owlstat-category-grid-five {
	grid-template-columns: repeat(5, minmax(0, 1fr));
}

.owlstat-category-card {
	min-width: 0;
	min-height: 102px;
	padding: 17px 10px 14px;
	display: flex;
	align-items: center;
	flex-direction: column;
	justify-content: center;
	background: var(--owlh-surface);
	border-right: 1px solid var(--owlh-border-soft);
	text-align: center;
}

.owlstat-category-card:last-child {
	border-right: 0;
}

.owlstat-category-card strong {
	display: block;
	color: var(--owlh-heading);
	font-family: var(--owlh-font-serif, Georgia, "Times New Roman", serif);
	font-size: 25px;
	font-weight: normal;
	line-height: 1;
}

.owlstat-category-card span {
	margin-top: 8px;
	color: var(--owlh-text-muted);
	font-size: 8px;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: .07em;
	text-transform: uppercase;
}

.owlstat-category-card-main {
	background: var(--owlh-surface-soft);
}


/* =========================================================
   GRUPPEN
========================================================= */

.owlstat-groupblock + .owlstat-groupblock {
	border-top: 1px solid var(--owlh-border-soft);
}

.owlstat-groupblock-title {
	padding: 9px 13px 8px;
	background: var(--owlh-surface-soft);
	color: var(--owlh-accent);
	font-size: 8px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}


/* Hausgruppen: vorhandene Textfarben bleiben möglich,
   die Karten selbst bleiben im Style neutral. */

.owlstat-category-card.Gryffindor strong,
.owlstat-category-card.Hufflepuff strong,
.owlstat-category-card.Ravenclaw strong,
.owlstat-category-card.Slytherin strong {
	color: inherit;
}


/* =========================================================
   HAUSPUNKTE
========================================================= */

.owlstat-housepoints-panel {
	overflow: hidden;
}

.owlstat-housepoints {
	padding: 18px;
	color: var(--owlh-text);
}

.owlstat-housepoints table {
	width: 100%;
	max-width: 100%;
}

.owlstat-housepoints img {
	max-width: 100%;
	height: auto;
}


/* =========================================================
   LINKS
========================================================= */

.owlstat-page a {
	color: var(--owlh-accent);
	text-decoration: none;
}

.owlstat-page a:hover {
	color: var(--owlh-accent-hover);
	text-decoration: none;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

	.owlstat-overview-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.owlstat-overview-card {
		border-bottom: 1px solid var(--owlh-border-soft);
	}

	.owlstat-overview-card:nth-child(3n) {
		border-right: 0;
	}

	.owlstat-overview-card:nth-last-child(-n + 2) {
		border-bottom: 0;
	}

	.owlstat-category-grid-six {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.owlstat-category-grid-five {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.owlstat-category-card {
		border-bottom: 1px solid var(--owlh-border-soft);
	}

	.owlstat-age-row {
		grid-template-columns: minmax(130px, .8fr) 105px minmax(170px, 1.4fr);
		gap: 14px;
	}

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

	.owlstat-page {
		width: calc(100% - 12px);
		margin-bottom: 28px;
	}

	.owlstat-hero {
		padding: 21px 18px 20px;
	}

	.owlstat-hero h1 {
		font-size: 27px;
	}

	.owlstat-section-head {
		min-height: 0;
		padding: 14px 16px;
	}

	.owlstat-section-number {
		font-size: 30px;
	}

	.owlstat-section-title {
		padding-left: 13px;
	}

	.owlstat-overview-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.owlstat-overview-card,
	.owlstat-overview-card:nth-child(3n) {
		border-right: 1px solid var(--owlh-border-soft);
		border-bottom: 1px solid var(--owlh-border-soft);
	}

	.owlstat-overview-card:nth-child(2n) {
		border-right: 0;
	}

	.owlstat-overview-card:last-child {
		grid-column: 1 / -1;
		border-right: 0;
		border-bottom: 0;
	}

	.owlstat-panel {
		margin: 12px;
	}

	.owlstat-age-list {
		padding: 5px 13px 8px;
	}

	.owlstat-age-row {
		grid-template-columns: 1fr auto;
		gap: 4px 12px;
		padding: 10px 0;
	}

	.owlstat-age-label {
		font-size: 13px;
	}

	.owlstat-age-count {
		text-align: right;
	}

	.owlstat-age-meter {
		grid-column: 1 / -1;
		height: 8px;
		margin-top: 4px;
	}

	.owlstat-category-grid-six,
	.owlstat-category-grid-five {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.owlstat-category-card {
		border-right: 1px solid var(--owlh-border-soft);
	}

	.owlstat-category-card:nth-child(2n) {
		border-right: 0;
	}

	.owlstat-housepoints {
		padding: 13px;
	}

}


/* =========================================================
   KLEINE SMARTPHONES
========================================================= */

@media (max-width: 460px) {

	.owlstat-page {
		width: calc(100% - 8px);
	}

	.owlstat-overview-grid,
	.owlstat-category-grid-six,
	.owlstat-category-grid-five {
		grid-template-columns: 1fr;
	}

	.owlstat-overview-card,
	.owlstat-overview-card:nth-child(2n),
	.owlstat-overview-card:nth-child(3n),
	.owlstat-category-card,
	.owlstat-category-card:nth-child(2n) {
		grid-column: auto;
		border-right: 0;
		border-bottom: 1px solid var(--owlh-border-soft);
	}

	.owlstat-overview-card:last-child,
	.owlstat-category-card:last-child {
		border-bottom: 0;
	}

	.owlstat-overview-card {
		min-height: 92px;
	}

	.owlstat-category-card {
		min-height: 82px;
	}

}


/* =========================================================
   HAUSPUNKTE — VIER HÄUSER
========================================================= */

.owlhp-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
}

.owlhp-house {
	--owlhp-house: var(--owlh-accent);

	position: relative;
	min-width: 0;
	min-height: 170px;

	display: flex;
	align-items: stretch;

	overflow: hidden;

	background: var(--owlh-surface);
	border: 1px solid var(--owlh-border-soft);
	border-top: 3px solid var(--owlhp-house);
}

.owlhp-gryffindor {
	--owlhp-house: var(--owlh-rust);
}

.owlhp-hufflepuff {
	--owlhp-house: var(--owlh-gold);
}

.owlhp-ravenclaw {
	--owlhp-house: var(--owlh-accent);
}

.owlhp-slytherin {
	--owlhp-house: var(--owlh-olive);
}


/* großes, sehr dezentes Hausinitial */

.owlhp-house-letter {
	position: absolute;
	right: 8px;
	bottom: -18px;

	color: var(--owlhp-house);

	font-family: var(--owlh-font-serif, Georgia, "Times New Roman", serif);
	font-size: 108px;
	font-weight: normal;
	line-height: 1;

	opacity: .08;

	pointer-events: none;
	user-select: none;
}


/* Inhalt */

.owlhp-house-content {
	position: relative;
	z-index: 1;

	width: 100%;
	padding: 20px 16px 18px;

	display: flex;
	align-items: center;
	flex-direction: column;
	justify-content: center;

	text-align: center;
}


.owlhp-kicker {
	margin-bottom: 8px;

	color: var(--owlh-text-muted);

	font-size: 8px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .11em;

	text-transform: uppercase;
}


.owlhp-points {
	display: block;

	color: var(--owlhp-house);

	font-family: var(--owlh-font-serif, Georgia, "Times New Roman", serif);
	font-size: 34px;
	font-weight: normal;
	line-height: 1.05;
}


.owlhp-name {
	position: relative;

	margin-top: 11px;
	padding-top: 10px;

	display: block;

	color: var(--owlh-heading);

	font-family: var(--owlh-font-serif, Georgia, "Times New Roman", serif);
	font-size: 15px;
	font-weight: normal;
	font-style: italic;
	line-height: 1.2;
}


.owlhp-name::before {
	content: "";

	position: absolute;
	left: 50%;
	top: 0;

	width: 28px;
	height: 1px;

	transform: translateX(-50%);

	background: var(--owlhp-house);
}


/* =========================================================
   HAUSPUNKTE — RESPONSIVE
========================================================= */

@media (max-width: 850px) {

	.owlhp-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

}


@media (max-width: 480px) {

	.owlhp-grid {
		grid-template-columns: 1fr;
	}

	.owlhp-house {
		min-height: 125px;
	}

	.owlhp-house-content {
		padding: 16px;
	}

	.owlhp-points {
		font-size: 30px;
	}

	.owlhp-house-letter {
		font-size: 88px;
	}

}
