/*
Theme Name: Håndboldradar
Theme URI: https://nexodigital.dk/
Author: Busekist Media / Nexo Digital
Description: Håndboldstillinger, kampprogram og klubsider med data fra API-Sports Handball. Ligaer og klubber oprettes manuelt én ad gangen og linkes automatisk, når de er udgivet.
Version: 1.7.2
Requires at least: 6.3
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: haandboldradar
*/

/* ---------------------------------------------------------------------------
 * Skrifttyper (selvhostet)
 * ------------------------------------------------------------------------ */

@font-face {
	font-family: "Archivo";
	src: url("assets/fonts/archivo-latin-wdth-normal.woff2") format("woff2");
	font-weight: 100 900;
	font-stretch: 62% 125%;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Archivo";
	src: url("assets/fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2");
	font-weight: 100 900;
	font-stretch: 62% 125%;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face { font-family: "IBM Plex Mono"; src: url("assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("assets/fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("assets/fonts/ibm-plex-mono-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* ---------------------------------------------------------------------------
 * Variabler
 * ------------------------------------------------------------------------ */

:root {
	--hb-ink: #0f2239;
	--hb-navy: #12335b;
	--hb-muted: #586475;
	--hb-muted-2: #8b95a3;
	--hb-red: #cc2827;
	--hb-red-2: #d73431;
	--hb-yellow: #fdc436;
	--hb-green: #1f8a4c;
	--hb-bg: #ecf0f6;
	--hb-paper: #faf9f6;
	--hb-card: #ffffff;
	--hb-line: #e8e9eb;
	--hb-edge: #e3e4e4;
	--hb-chip: #e8edf4;
	--hb-soft: #f6f8fa;
	--hb-logo-ink: #22344e;
	--hb-font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--hb-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--hb-radius: 20px;
	--hb-wrap: 1048px;
	--hb-gap: 24px;
}

/* ---------------------------------------------------------------------------
 * Grundlag
 * ------------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--hb-bg);
	color: var(--hb-ink);
	font-family: var(--hb-font);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }
abbr[title] { text-decoration: none; }
:focus-visible { outline: 2px solid var(--hb-navy); outline-offset: 2px; border-radius: 4px; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.hb-skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--hb-ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.hb-skip:focus { left: 8px; }

.hb-wrap { width: 100%; max-width: calc(var(--hb-wrap) + 32px); margin: 0 auto; padding: 0 16px; }
.hb-main { flex: 1 0 auto; padding: 24px 0 80px; }
.hb-stack { display: flex; flex-direction: column; gap: var(--hb-gap); }
.hb-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--hb-gap); }

/* Kondenseret display-skrift (Archivo, smal bredde) */
.hb-brand-name, .hb-hero-title, .hb-title, .hb-card-title, .hb-rank-num, .hb-stats dd {
	font-stretch: 75%;
}

/* ---------------------------------------------------------------------------
 * Header
 * ------------------------------------------------------------------------ */

.hb-header {
	background: var(--hb-paper);
	border-bottom: 1px solid var(--hb-edge);
	position: relative;
	z-index: 10;
}
.hb-header-in {
	max-width: 1112px;
	height: 64px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}
.hb-brand { display: flex; align-items: center; gap: 10px; flex: none; }
.hb-brand:hover { text-decoration: none; }
.hb-brand-name {
	font-size: 21px;
	font-weight: 800;
	letter-spacing: 0;
	text-transform: uppercase;
	line-height: 1;
	color: var(--hb-ink);
}
.hb-nav { min-width: 0; }
.hb-nav ul { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.hb-nav ul::-webkit-scrollbar { display: none; }
.hb-nav a {
	display: block;
	padding: 6px 12px;
	border-radius: 999px;
	font-size: 14.4px;
	font-weight: 500;
	line-height: 20px;
	color: var(--hb-muted);
	white-space: nowrap;
}
.hb-nav a:hover { color: var(--hb-ink); text-decoration: none; background: rgba(18, 51, 91, .06); }
.hb-nav a.is-active { background: var(--hb-navy); color: #fff; }

/* ---------------------------------------------------------------------------
 * Kort
 * ------------------------------------------------------------------------ */

.hb-card {
	background: var(--hb-card);
	border: 1px solid var(--hb-line);
	border-radius: var(--hb-radius);
	overflow: hidden;
	min-width: 0;
}
.hb-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 0 16px;
	height: 49px;
	border-bottom: 1px solid var(--hb-line);
}
.hb-card-title {
	font-size: 17px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: 0;
	color: var(--hb-ink);
}
.hb-card-link { font-size: 12px; font-weight: 500; color: var(--hb-red); white-space: nowrap; }
.hb-empty { padding: 18px; color: var(--hb-muted); }
.hb-notice { padding: 18px; color: var(--hb-muted); }

/* ---------------------------------------------------------------------------
 * Hero
 * ------------------------------------------------------------------------ */

.hb-hero {
	position: relative;
	border-radius: var(--hb-radius);
	overflow: hidden;
	background: #0f1f34;
	color: #fff;
	min-height: 457px;
	display: flex;
	align-items: center;
}
.hb-hero-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}
/* Eget billede får en mørk overgang, så teksten kan læses (standardbilledet har den indbygget). */
.hb-hero.has-custom::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(15, 31, 52, .92) 0%, rgba(15, 31, 52, .7) 45%, rgba(15, 31, 52, .15) 100%);
}
.hb-hero-body {
	position: relative;
	z-index: 1;
	padding: 82px 40px 80px;
	max-width: 760px;
}
.hb-badge {
	display: flex;
	width: max-content;
	max-width: 100%;
	align-items: center;
	gap: 8px;
	height: 24.5px;
	padding: 0 12px;
	border-radius: 999px;
	background: var(--hb-yellow);
	color: var(--hb-ink);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	line-height: 1;
}
.hb-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--hb-ink); opacity: .7; }
.hb-hero-title {
	margin-top: 16.5px;
	font-size: 72px;
	font-weight: 900;
	font-stretch: 75%;
	line-height: 63px;
	letter-spacing: -0.025em;
}
.hb-hero-text {
	margin-top: 16px;
	max-width: 496px;
	font-size: 16px;
	line-height: 24px;
	color: rgba(255, 255, 255, .86);
}
.hb-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 24px;
	height: 40px;
	padding: 0 20px;
	border-radius: 999px;
	background: var(--hb-red);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
}
.hb-btn:hover { text-decoration: none; filter: brightness(1.06); }

/* ---------------------------------------------------------------------------
 * Næste runde (forside)
 * ------------------------------------------------------------------------ */

.hb-fixtures { display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); }
.hb-fixture { padding: 12px 16px; border-left: 1px solid var(--hb-line); min-width: 0; }
.hb-fixture:first-child { border-left: 0; }
.hb-fixture-meta { font-family: var(--hb-mono); font-size: 11px; line-height: 16px; color: var(--hb-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-fixture-teams { margin-top: 2px; font-size: 14px; line-height: 20px; font-weight: 700; color: var(--hb-ink); }
.hb-fixture-venue { margin-top: 4px; font-size: 12px; line-height: 16px; color: var(--hb-muted); }

/* ---------------------------------------------------------------------------
 * Tabeller
 * ------------------------------------------------------------------------ */

.hb-table-wrap { overflow-x: auto; }
.hb-table th {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--hb-muted);
	text-align: left;
	white-space: nowrap;
}
.hb-table td { white-space: nowrap; }

/* Stillinger (fuld tabel og kompakt top 5) */
.hb-standings { table-layout: fixed; }
.hb-standings th { height: 32px; padding: 0; border-bottom: 1px solid var(--hb-line); }
.hb-standings td { height: 41px; padding: 0; border-bottom: 1px solid var(--hb-line); font-size: 14px; }
.hb-standings tbody tr:last-child td { border-bottom: 0; height: 40px; }
.hb-standings .c-pos { width: 51px; padding-left: 19px; font-weight: 500; }
.hb-standings tr.has-zone td.c-pos { box-shadow: inset 4px 0 0 var(--zone); }
.hb-standings .c-move { width: 40.5px; }
.hb-standings .c-team { overflow: hidden; text-overflow: ellipsis; padding-right: 10px; }
.hb-standings .c-team .hb-code { margin-right: 10px; }
.hb-standings .hb-team { font-weight: 600; }
.hb-standings .c-num, .hb-standings .c-kvut, .hb-standings .c-goals { font-family: var(--hb-mono); color: var(--hb-muted); }
.hb-standings .c-num { width: 23.5px; }
.hb-standings th.c-num { font-family: var(--hb-font); }
.hb-standings .c-goals { width: 145px; text-align: right; }
.hb-standings .c-pts { width: 147.5px; padding-right: 16px; text-align: right; font-family: var(--hb-mono); font-weight: 700; color: var(--hb-ink); }
.hb-standings th.c-pts, .hb-standings th.c-goals { font-family: var(--hb-font); text-align: right; }
.hb-standings th.c-pts { font-weight: 600; color: var(--hb-muted); }
.hb-standings.is-compact .c-kvut { width: 64px; }
.hb-standings.is-compact .c-goals { width: 57.5px; }
.hb-standings.is-compact .c-pts { width: 73.5px; }
.hb-standings .c-kvut span, .hb-standings th.c-kvut abbr span { display: inline-block; width: 11.7px; }
.hb-standings th.c-kvut { font-family: var(--hb-font); }
.hb-standings.is-compact.is-wide .c-kvut { width: 104px; }
.hb-standings.is-wide .c-kvut span, .hb-standings.is-wide th.c-kvut abbr span { width: 18px; margin-right: 7px; text-align: center; }
.hb-standings.is-wide .c-kvut span:last-child, .hb-standings.is-wide th.c-kvut abbr span:last-child { margin-right: 0; }

.hb-code {
	display: inline-block;
	width: 36px;
	height: 18.5px;
	border-radius: 4px;
	background: var(--hb-chip);
	color: var(--hb-muted);
	font-family: var(--hb-mono);
	font-size: 10px;
	font-weight: 500;
	line-height: 18.5px;
	text-align: center;
	vertical-align: middle;
}

/* Klublogoer */
.hb-crest { display: inline-block; flex: none; object-fit: contain; vertical-align: middle; }
.hb-teamlogo { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 22px; margin-right: 10px; vertical-align: middle; }
.hb-teamlogo .hb-crest { width: 22px; height: 22px; }
.hb-crest-space { display: inline-block; flex: none; vertical-align: middle; }
.hb-fixture-teams { display: flex; align-items: center; gap: 6px; }
.hb-next-teams { display: flex; align-items: center; gap: 8px; }
.hb-games .c-opp .hb-crest, .hb-games .c-opp .hb-crest-space { margin-right: 8px; margin-top: -2px; }
.hb-club-id { display: flex; align-items: center; gap: 20px; min-width: 0; }
.hb-club-crest { width: 72px; height: 72px; }

.hb-move { display: inline-flex; align-items: center; gap: 1px; font-size: 12px; font-weight: 500; }
.hb-move .hb-ico { width: 11px; height: 11px; }
.hb-up { color: var(--hb-navy); }
.hb-down { color: var(--hb-red-2); }
.hb-same { color: var(--hb-muted-2); }

.hb-standings-card .hb-standings tbody tr:last-child td { height: 41px; border-bottom: 1px solid var(--hb-line); }
.hb-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; min-height: 40px; padding: 8px 16px; font-size: 12px; color: var(--hb-muted); }
.hb-legend li { display: flex; align-items: center; gap: 7px; }
.hb-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.hb-dot.is-red { background: var(--hb-red); }

/* Kamplister */
.hb-matches li {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 12px;
	height: 41px;
	padding: 0 16px;
	border-bottom: 1px solid var(--hb-line);
	font-size: 14px;
	font-weight: 600;
}
.hb-matches li:last-child { border-bottom: 0; height: 40px; }
.hb-home, .hb-away { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hb-home { justify-content: flex-end; text-align: right; }
.hb-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-pill {
	display: inline-block;
	padding: 0 8px;
	border-radius: 4px;
	background: var(--hb-chip);
	font-family: var(--hb-mono);
	font-size: 12px;
	line-height: 20px;
	text-align: center;
	white-space: nowrap;
}
.hb-pill.is-score { font-weight: 700; color: var(--hb-ink); }
.hb-pill.is-date { color: var(--hb-muted); font-weight: 400; }
.hb-pill.is-live { background: var(--hb-red); color: #fff; font-weight: 700; }

/* ---------------------------------------------------------------------------
 * Sidehoveder
 * ------------------------------------------------------------------------ */

.hb-page > * + * { margin-top: var(--hb-gap); }
.hb-kicker {
	font-size: 12px;
	font-weight: 700;
	line-height: 16px;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--hb-red);
}
.hb-title {
	margin-top: 4px;
	font-size: 48px;
	font-weight: 900;
	line-height: 1;
	letter-spacing: 0;
	color: var(--hb-ink);
}
.hb-lead { margin-top: 6.5px; font-size: 14px; line-height: 21px; color: var(--hb-muted); }

.hb-back { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; line-height: 26px; color: var(--hb-muted); }
.hb-back .hb-ico { width: 12px; height: 12px; }
.hb-back + * { margin-top: 9px; }

/* ---------------------------------------------------------------------------
 * Klubside
 * ------------------------------------------------------------------------ */

.hb-club-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.hb-club-meta { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; color: var(--hb-muted); }
.hb-club-meta .hb-code { height: 18px; line-height: 18px; }
.hb-club-head .hb-title { margin-top: 4.5px; font-size: 60px; line-height: 60px; letter-spacing: -0.01em; }
.hb-rank {
	flex: none;
	display: flex;
	flex-direction: column;
	padding: 11.5px 20px 13px;
	border-radius: 16px;
	background: var(--hb-navy);
	color: #fff;
}
.hb-rank-label { font-size: 11px; line-height: 16px; letter-spacing: .05em; text-transform: uppercase; color: #c2c8d0; }
.hb-rank-num { font-size: 36px; font-weight: 900; line-height: 40px; }

.hb-club-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--hb-gap); align-items: start; }

.hb-stats { display: grid; }
.hb-stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hb-stats-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hb-stats > div { padding: 11px 16px 12.5px; border-left: 1px solid var(--hb-line); min-width: 0; }
.hb-stats-4 > div:first-child, .hb-stats-2 > div:nth-child(odd) { border-left: 0; }
.hb-stats-2 > div:nth-child(n+3) { border-top: 1px solid var(--hb-line); }
.hb-stats dt { font-size: 10px; line-height: 16px; letter-spacing: .1em; text-transform: uppercase; color: var(--hb-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-stats dd { margin-top: 2px; font-family: var(--hb-mono); font-size: 24px; font-weight: 700; line-height: 32px; letter-spacing: -0.075em; color: var(--hb-ink); font-stretch: 100%; }

.hb-facts > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; height: 41px; padding: 0 16px; border-bottom: 1px solid var(--hb-line); }
.hb-facts > div:last-child { border-bottom: 0; height: 40px; }
.hb-facts dt { font-size: 14px; color: var(--hb-muted); }
.hb-facts dd { font-size: 14px; font-weight: 600; text-align: right; }

.hb-next { padding: 16px; }
.hb-next .hb-fixture-meta { line-height: 16px; }
.hb-next-teams { margin-top: 4px; font-size: 20px; font-weight: 800; line-height: 28px; }
.hb-next .hb-fixture-venue { margin-top: 4px; }

.hb-chart-wrap { padding: 16px; }
.hb-chart-legend { display: flex; gap: 17px; font-size: 12px; line-height: 16px; color: var(--hb-muted); }
.hb-chart-legend li { display: flex; align-items: center; gap: 7px; }
.hb-dash { width: 16px; height: 2px; background: var(--hb-navy); display: inline-block; }
.hb-chart { width: 100%; height: auto; margin-top: 7.5px; overflow: visible; }
.hb-chart .hb-grid { stroke: var(--hb-line); stroke-width: 1; }
.hb-chart .hb-axis { font-size: 12px; fill: var(--hb-muted); font-family: var(--hb-font); }
.hb-chart .hb-bar { fill: var(--hb-red); }
.hb-chart .hb-bar.is-zero { fill: #f0b3b2; }
.hb-chart .hb-line { fill: none; stroke: var(--hb-navy); stroke-width: 2; stroke-linejoin: round; }

.hb-games { table-layout: fixed; }
.hb-games td { height: 37px; padding: 0; border-bottom: 1px solid var(--hb-line); font-size: 14px; }
.hb-games tr:last-child td { border-bottom: 0; height: 36px; }
.hb-games tr.is-upcoming td { background: var(--hb-soft); }
.hb-games .c-round { padding-left: 16px; font-family: var(--hb-mono); font-size: 11px; color: var(--hb-muted); }
.hb-games .c-opp { overflow: hidden; text-overflow: ellipsis; }
.hb-games .col-round { width: 66px; }
.hb-games .col-opp { width: 365.5px; }
.hb-games .col-score { width: 136px; }
.hb-games .hb-team { font-weight: 600; }
.hb-ha { font-size: 12px; color: var(--hb-muted); }
.hb-games .c-score { text-align: right; padding-right: 16px; font-family: var(--hb-mono); }
.hb-games tr.is-upcoming .c-score { color: var(--hb-muted); }
.hb-res { font-weight: 800; font-size: 14px; }
.hb-res.is-v { color: var(--hb-navy); }
.hb-res.is-u { color: var(--hb-muted); }
.hb-res.is-t { color: var(--hb-red-2); }
.hb-res.is-next, .hb-res.is-live, .hb-res.is-post { color: var(--hb-red); font-size: 12px; font-weight: 700; }

.hb-history th { height: 32.5px; padding: 0; border-bottom: 1px solid var(--hb-line); text-align: right; }
.hb-history td { height: 37px; padding: 0; border-bottom: 1px solid var(--hb-line); text-align: right; font-family: var(--hb-mono); font-size: 14px; color: var(--hb-ink); }
.hb-history tr:last-child td { border-bottom: 0; height: 36px; }
.hb-history .c-season { text-align: left; padding-left: 16px; }
.hb-history th:last-child, .hb-history td:last-child { padding-right: 16px; width: 112px; }
.hb-history .c-place { width: 120px; font-family: var(--hb-font); font-weight: 800; }
.hb-history .c-games { width: 89px; }
.hb-history .c-wins { width: 82.5px; }
.hb-tag { display: inline-block; margin-left: 8px; padding: 0 8px; border-radius: 999px; background: var(--hb-yellow); color: var(--hb-ink); font-family: var(--hb-mono); font-size: 10px; font-weight: 700; line-height: 16px; text-transform: uppercase; vertical-align: 1px; }

.hb-prose { padding: 19px 16px 21px; font-size: 14px; line-height: 22.75px; color: var(--hb-ink); }
.hb-prose > * { max-width: 736px; }

/* SEO-tekst på forsiden: boksen er lige så smal som teksten. */
.hb-seo, .hb-league-about, .hb-tv-text, .hb-about { width: 100%; max-width: 768px; }
.hb-seo .hb-prose > *, .hb-league-about .hb-prose > *, .hb-tv-text .hb-prose > *, .hb-about .hb-prose > * { max-width: none; }
.hb-prose p + p { margin-top: 16px; }
.hb-prose a { color: var(--hb-red); text-decoration: underline; }
.hb-prose h2, .hb-prose h3, .hb-prose h4 { margin: 24px 0 6px; font-stretch: 75%; font-weight: 800; line-height: 1.2; color: var(--hb-ink); }
.hb-prose h2 { font-size: 22px; }
.hb-prose h3 { font-size: 18px; }
.hb-prose h4 { font-size: 15px; }
.hb-prose > :first-child { margin-top: 0; }
.hb-prose h2 + p, .hb-prose h3 + p, .hb-prose h4 + p { margin-top: 0; }
.hb-prose ul, .hb-prose ol { margin: 12px 0 0; padding-left: 22px; }
.hb-prose ul { list-style: disc; }
.hb-prose ol { list-style: decimal; }
.hb-prose li + li { margin-top: 4px; }
.hb-prose ul + p, .hb-prose ol + p, .hb-prose p + ul, .hb-prose p + ol { margin-top: 12px; }
.hb-prose strong { font-weight: 700; }
.hb-prose a:hover { color: var(--hb-ink); }
.hb-prose blockquote { margin: 16px 0 0; padding-left: 14px; border-left: 3px solid var(--hb-yellow); color: var(--hb-muted); }
.hb-prose img { height: auto; border-radius: 12px; margin-top: 12px; }
.hb-prose .alignleft { float: left; margin: 4px 16px 8px 0; }
.hb-prose .alignright { float: right; margin: 4px 0 8px 16px; }
.hb-prose .aligncenter { margin-left: auto; margin-right: auto; }
.hb-prose::after { content: ""; display: table; clear: both; }

/* ---------------------------------------------------------------------------
 * Klubside: form, nøgletal, hjemme/ude, tabeludsnit, restprogram
 * ------------------------------------------------------------------------ */

.hb-stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hb-stats-3 > div:nth-child(3n+1) { border-left: 0; }
.hb-stats-3 > div:nth-child(n+4) { border-top: 1px solid var(--hb-line); }
.hb-stats dd.hb-sub { margin-top: 1px; font-family: var(--hb-font); font-size: 12px; font-weight: 400; line-height: 16px; letter-spacing: 0; color: var(--hb-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-label { font-size: 10px; line-height: 16px; letter-spacing: .1em; text-transform: uppercase; color: var(--hb-muted); }

.hb-formrow { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 12px 16px 14px; border-bottom: 1px solid var(--hb-line); }
.hb-formrow .hb-form { margin-top: 6px; }
.hb-form { display: inline-flex; gap: 4px; vertical-align: middle; }
.hb-form-item { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 4px; font-size: 10px; font-weight: 800; line-height: 1; color: #fff; cursor: default; }
.hb-form.is-lg .hb-form-item { width: 30px; height: 30px; border-radius: 8px; font-size: 13px; }
.hb-form-item.is-v { background: var(--hb-navy); }
.hb-form-item.is-u { background: var(--hb-muted-2); }
.hb-form-item.is-t { background: var(--hb-red-2); }
.hb-streak { font-size: 14px; font-weight: 700; color: var(--hb-ink); padding: 4px 12px; border-radius: 999px; background: var(--hb-soft); box-shadow: inset 0 0 0 1px var(--hb-line); }
.hb-streak.is-v { background: #e9eef6; color: var(--hb-navy); box-shadow: none; }
.hb-streak.is-t { background: #fbe9e8; color: #b42320; box-shadow: none; }

.hb-split { table-layout: fixed; }
.hb-split th, .hb-split td { height: 37px; padding: 0 8px; border-bottom: 1px solid var(--hb-line); text-align: center; font-size: 14px; }
.hb-split thead th { height: 32.5px; font-size: 11px; font-weight: 600; color: var(--hb-muted); }
.hb-split td { font-family: var(--hb-mono); color: var(--hb-muted); }
.hb-split tbody tr:last-child th, .hb-split tbody tr:last-child td { border-bottom: 0; }
.hb-split .c-lbl { width: 34%; padding-left: 16px; text-align: left; font-family: var(--hb-font); font-size: 14px; font-weight: 600; color: var(--hb-ink); letter-spacing: 0; text-transform: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-split thead .c-lbl { font-size: 11px; }
.hb-split .c-goals { width: 15%; }
.hb-split .c-gpg { width: 19%; }
.hb-split .c-pts { width: 12%; padding-right: 16px; text-align: right; font-weight: 700; color: var(--hb-ink); }
.hb-split thead .c-pts { color: var(--hb-muted); }
.hb-split tr.is-total th, .hb-split tr.is-total td { background: var(--hb-soft); }
.hb-split .hb-ha { font-weight: 400; margin-left: 4px; }

.hb-nextcmp { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--hb-line); }
.hb-nextcmp > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 8px; padding: 12px 16px 14px; min-width: 0; }
.hb-nextcmp > div + div { border-left: 1px solid var(--hb-line); }
.hb-nextcmp dt { font-size: 13px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-nextpos { font-family: var(--hb-mono); font-size: 11px; color: var(--hb-muted); white-space: nowrap; }
.hb-nextform { grid-column: 1 / -1; }
.hb-nextform .hb-form { gap: 3px; }
.hb-h2h { margin: 0; padding: 10px 16px 14px; border-top: 1px solid var(--hb-line); font-size: 13px; color: var(--hb-muted); }
.hb-h2h strong { color: var(--hb-ink); font-family: var(--hb-mono); font-weight: 700; }

.hb-mini th { height: 32.5px; padding: 0 8px; border-bottom: 1px solid var(--hb-line); }
.hb-mini td { height: 37px; padding: 0 8px; border-bottom: 1px solid var(--hb-line); font-size: 14px; }
.hb-mini tr:last-child td { border-bottom: 0; }
.hb-mini .c-pos { width: 40px; padding-left: 16px; font-weight: 500; }
.hb-mini td.c-pos.has-zone { box-shadow: inset 4px 0 0 var(--zone); }
.hb-mini .c-team { display: flex; align-items: center; gap: 8px; height: 37px; font-weight: 600; overflow: hidden; }
.hb-mini .c-team > a, .hb-mini .c-team > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-mini .c-k { width: 32px; text-align: center; font-family: var(--hb-mono); color: var(--hb-muted); }
.hb-mini th.c-k { font-family: var(--hb-font); }
.hb-mini .c-pts { width: 56px; padding-right: 16px; text-align: right; font-family: var(--hb-mono); font-weight: 700; }
.hb-mini th.c-pts { font-family: var(--hb-font); }
.hb-mini tr.is-me td { background: #fff8e1; }

/* Tekstsider */
.hb-text-figure { margin: 0; }
.hb-text-figure img { display: block; width: 100%; height: auto; }
.hb-text-main .hb-pagelinks { padding-top: 0; font-weight: 600; }
.hb-side-note { margin: 0; padding: 9px 16px 11px; border-top: 1px solid var(--hb-line); font-size: 12px; color: var(--hb-muted); }

.hb-rest li { display: flex; align-items: center; gap: 10px; height: 37px; padding: 0 16px; border-bottom: 1px solid var(--hb-line); font-size: 14px; }
.hb-rest li:last-child { border-bottom: 0; }
.hb-rest-round { width: 30px; flex: none; font-family: var(--hb-mono); font-size: 11px; color: var(--hb-muted); }
.hb-rest-team { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.hb-rest-team a, .hb-rest-team > span:not(.hb-ha):not(.hb-crest-space) { overflow: hidden; text-overflow: ellipsis; }
.hb-rest-team .hb-ha { font-weight: 400; }
.hb-rest-pos { flex: none; font-family: var(--hb-mono); font-size: 12px; color: var(--hb-muted); }
.hb-rest-avg { margin: 0; padding: 10px 16px 14px; border-top: 1px solid var(--hb-line); font-size: 13px; color: var(--hb-muted); }
.hb-rest-avg strong { color: var(--hb-ink); font-family: var(--hb-mono); }

/* Håndbold i TV */
.hb-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.hb-section-title { font-size: 28px; font-weight: 900; font-stretch: 75%; line-height: 1.1; color: var(--hb-ink); }
.hb-section-head .hb-lead { margin-top: 4px; }
.hb-page > .hb-tv-list, .hb-page > .hb-tv-rights, .hb-page > .hb-tv-text { margin-top: 40px; }
.hb-tv-filter { display: flex; flex-wrap: wrap; gap: 6px; flex: none; }
.hb-tv-filter[hidden] { display: none; }
.hb-tv-filter button { height: 32px; padding: 0 14px; border: 1px solid var(--hb-line); border-radius: 999px; background: var(--hb-card); font: inherit; font-size: 13px; font-weight: 600; color: var(--hb-ink); cursor: pointer; }
.hb-tv-filter button:hover { border-color: var(--hb-navy); }
.hb-tv-filter button.is-active { background: var(--hb-navy); border-color: var(--hb-navy); color: #fff; }
.hb-tv-filter button:focus-visible { outline: 2px solid var(--hb-yellow); outline-offset: 2px; }
.hb-tv-day[hidden], .hb-tv-row[hidden] { display: none; }
.hb-tv-count { font-family: var(--hb-mono); font-size: 12px; color: var(--hb-muted); white-space: nowrap; }
.hb-tv-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 16px; min-height: 64px; padding: 10px 16px; border-bottom: 1px solid var(--hb-line); }
.hb-tv-row:last-child { border-bottom: 0; }
.hb-tv-row.is-live { background: #fff5f5; }
.hb-tv-time .hb-pill { min-width: 52px; }
.hb-tv-match { min-width: 0; }
.hb-tv-teams { display: flex; align-items: center; flex-wrap: wrap; gap: 0 8px; font-size: 15px; font-weight: 700; line-height: 22px; color: var(--hb-ink); }
.hb-tv-team { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.hb-tv-team a { color: inherit; }
.hb-tv-team a:hover { color: var(--hb-red); }
.hb-tv-vs { color: var(--hb-muted); font-weight: 400; }
.hb-tv-meta { display: block; margin-top: 2px; font-size: 12px; line-height: 16px; color: var(--hb-muted); }
.hb-tv-meta a { color: inherit; }
.hb-tv-meta a:hover { color: var(--hb-red); }
.hb-tv-live { color: var(--hb-red); font-weight: 700; }
.hb-tv-ch { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 320px; }
.hb-ch { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 6px; font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap; text-decoration: none; }
a.hb-ch:hover { filter: brightness(1.08); }
.hb-ch-red { background: var(--hb-red); color: #fff; }
.hb-ch-navy { background: var(--hb-navy); color: #fff; }
.hb-ch-dark { background: var(--hb-ink); color: #fff; }
.hb-ch-yellow { background: var(--hb-yellow); color: var(--hb-ink); }
.hb-ch-light { background: var(--hb-chip); color: var(--hb-ink); box-shadow: inset 0 0 0 1px #d5dce6; }
.hb-ch-blue { background: #1f5fbf; color: #fff; }
.hb-ch-green { background: #1d7a46; color: #fff; }

.hb-rights { table-layout: fixed; }
.hb-rights th, .hb-rights td { padding: 11px 16px; border-bottom: 1px solid var(--hb-line); font-size: 14px; line-height: 20px; text-align: left; vertical-align: top; white-space: normal; }
.hb-rights thead th { padding-top: 9px; padding-bottom: 9px; }
.hb-rights thead th:nth-child(1) { width: 36%; }
.hb-rights thead th:nth-child(2) { width: 24%; }
.hb-rights tbody th { font-size: 14px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--hb-ink); }
.hb-rights td { color: var(--hb-ink); }
.hb-rights td + td { color: var(--hb-muted); }
.hb-rights tbody tr:last-child th, .hb-rights tbody tr:last-child td { border-bottom: 0; }
.hb-rights tbody tr:nth-child(even) th, .hb-rights tbody tr:nth-child(even) td { background: var(--hb-soft); }

/* Kampprogram resten af sæsonen (ligaside) */
.hb-program { margin-top: 40px; }
.hb-program + .hb-league-about { margin-top: 40px; }
.hb-program-head { margin-bottom: 16px; }
.hb-program-title { font-size: 28px; font-weight: 900; font-stretch: 75%; line-height: 1.1; color: var(--hb-ink); }
.hb-program-head .hb-lead { margin-top: 4px; }
.hb-program .hb-grid-2 { align-items: start; }

/* ---------------------------------------------------------------------------
 * Rundesider
 * ------------------------------------------------------------------------ */

.hb-pager { display: flex; justify-content: space-between; gap: 12px; }
.hb-pager-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; background: var(--hb-card); border: 1px solid var(--hb-line); font-weight: 600; font-size: 15px; }
.hb-pager-link:hover { text-decoration: none; border-color: var(--hb-navy); }

.hb-list li { padding: 12px 18px; border-bottom: 1px solid var(--hb-line); }
.hb-list li:last-child { border-bottom: 0; }

/* ---------------------------------------------------------------------------
 * Footer
 * ------------------------------------------------------------------------ */

.hb-footer { background: var(--hb-paper); border-top: 1px solid var(--hb-edge); }
.hb-footer-in { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; padding-top: 32px; padding-bottom: 31px; flex-wrap: wrap; }
.hb-footer-brand { display: flex; align-items: center; gap: 12px; font-size: 12px; line-height: 16px; color: var(--hb-muted); }
.hb-footer-nav ul { display: flex; gap: 20px; flex-wrap: wrap; }
.hb-footer-nav a { font-size: 12px; line-height: 16px; color: var(--hb-muted); }

/* ---------------------------------------------------------------------------
 * Responsivt
 * ------------------------------------------------------------------------ */

@media (max-width: 960px) {
	.hb-club-grid { grid-template-columns: minmax(0, 1fr); }
	.hb-fixtures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hb-fixture { border-left: 0; border-top: 1px solid var(--hb-line); }
	.hb-fixture:nth-child(even) { border-left: 1px solid var(--hb-line); }
	.hb-fixture:nth-child(-n+2) { border-top: 0; }
	.hb-title { font-size: 52px; }
}

@media (max-width: 760px) {
	.hb-section-head { flex-direction: column; align-items: flex-start; }
	.hb-section-title { font-size: 24px; }
	.hb-tv-row { grid-template-columns: 52px minmax(0, 1fr); gap: 8px 10px; padding: 12px 14px; }
	.hb-tv-time .hb-pill { min-width: 48px; }
	.hb-tv-ch { grid-column: 2; justify-content: flex-start; max-width: none; gap: 4px; }
	.hb-tv-ch .hb-ch { height: 22px; padding: 0 6px; font-size: 11px; border-radius: 5px; }
	.hb-tv-teams { font-size: 14px; }
	.hb-rights thead { display: none; }
	.hb-rights, .hb-rights tbody, .hb-rights tr, .hb-rights th, .hb-rights td { display: block; width: auto; }
	.hb-rights tr { padding: 10px 16px 12px; border-bottom: 1px solid var(--hb-line); }
	.hb-rights tbody tr:last-child { border-bottom: 0; }
	.hb-rights th, .hb-rights td { padding: 0; border: 0; background: none !important; }
	.hb-rights tbody tr:nth-child(even) { background: var(--hb-soft); }
	.hb-rights td { margin-top: 2px; font-size: 13px; }
	.hb-rights td::before { content: attr(data-label) ": "; color: var(--hb-muted); font-weight: 600; }
	:root { --hb-gap: 16px; --hb-radius: 16px; }
	.hb-main { padding: 16px 0 48px; }
	.hb-grid-2 { grid-template-columns: minmax(0, 1fr); }
	.hb-header-in { height: auto; flex-wrap: wrap; gap: 6px 12px; padding-top: 12px; padding-bottom: 8px; }
	.hb-brand-name { font-size: 19px; }
	.hb-brand .hb-logo { width: 28px; height: 28px; }
	.hb-nav { width: calc(100% + 32px); margin: 0 -16px; }
	.hb-nav ul { padding: 0 12px; }
	.hb-nav a { padding: 6px 10px; font-size: 14px; }
	.hb-games col.col-opp { width: auto; }
	.hb-games col.col-round { width: 50px; }
	.hb-games col.col-score { width: 92px; }
	.hb-games .c-round { padding-left: 12px; }
	.hb-games .c-score { padding-right: 12px; }
	.hb-games col.col-res { width: 84px; }
	.hb-history .c-place, .hb-history .c-games, .hb-history .c-wins, .hb-history th:last-child, .hb-history td:last-child { width: auto; }
	.hb-history th { font-size: 10px; letter-spacing: 0; padding-left: 8px; }
	.hb-history .c-season { padding-left: 12px; }
	.hb-history th:last-child, .hb-history td:last-child { padding-right: 12px; }
	.hb-chart .hb-axis { font-size: 22px; }
	.hb-hero { min-height: 0; }
	.hb-hero-body { padding: 40px 20px 36px; }
	.hb-hero-title { font-size: 56px; line-height: 48px; }
	.hb-hero-text { font-size: 16px; line-height: 24px; }
	.hb-hero.has-custom::after, .hb-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15, 31, 52, .85), rgba(15, 31, 52, .5)); }
	.hb-title { font-size: 42px; }
	.hb-club-head { flex-direction: column; align-items: flex-start; }
	.hb-rank { flex-direction: row; align-items: baseline; gap: 10px; padding: 10px 16px; }
	.hb-stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hb-stats-4 > div:nth-child(3) { border-left: 0; }
	.hb-stats-4 > div:nth-child(n+3) { border-top: 1px solid var(--hb-line); }
	.hb-stats-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hb-stats-3 > div { border-left: 1px solid var(--hb-line); border-top: 0; }
	.hb-stats-3 > div:nth-child(odd) { border-left: 0; }
	.hb-stats-3 > div:nth-child(n+3) { border-top: 1px solid var(--hb-line); }
	.hb-split .c-gpg { display: none; }
	.hb-split th, .hb-split td { padding: 0 3px; }
	.hb-split .c-lbl { width: 28%; padding-left: 12px; }
	.hb-split .c-goals { width: 26%; }
	.hb-split .c-pts { width: 16%; padding-right: 12px; }
	.hb-split .hb-ha { display: none; }
	.hb-form.is-lg .hb-form-item { width: 26px; height: 26px; }
	.hb-standings .c-u, .hb-standings .c-t, .hb-standings th.c-u, .hb-standings th.c-t { display: none; }
	.hb-standings .c-team .hb-code { display: none; }
	.hb-standings .c-team .hb-teamlogo { width: 22px; margin-right: 8px; }
	.hb-standings.has-logos .c-team .hb-code { display: inline-block; visibility: hidden; width: 22px; min-width: 0; padding: 0; margin-right: 8px; }
	.hb-club-crest { width: 56px; height: 56px; }
	.hb-club-id { gap: 14px; }
	.hb-matches .hb-crest, .hb-matches .hb-crest-space { width: 18px !important; height: 18px !important; }
	.hb-standings .c-pos { padding-left: 12px; width: 38px; }
	.hb-standings .c-move { width: 34px; }
	.hb-standings .c-num { width: 22px; }
	.hb-standings .c-goals, .hb-standings.is-compact .c-goals { width: 72px; }
	.hb-standings .c-pts, .hb-standings.is-compact .c-pts { width: 54px; padding-right: 12px; }
	.hb-standings.is-compact .c-kvut { width: 58px; }
	.hb-standings.is-compact.is-wide .c-kvut { width: 92px; }
	.hb-standings.is-wide .c-kvut span, .hb-standings.is-wide th.c-kvut abbr span { width: 16px; margin-right: 7px; }
	.hb-standings th.c-pts { letter-spacing: 0; }
	.hb-matches li { padding: 0 12px; gap: 8px; font-size: 14px; }
	.hb-games .c-opp { white-space: normal; }
	.hb-games .hb-ha { display: none; }
	.hb-footer-in { flex-direction: column; align-items: flex-start; justify-content: center; padding-top: 28px; padding-bottom: 28px; }
}

@media (max-width: 420px) {
	.hb-fixtures { grid-template-columns: minmax(0, 1fr); }
	.hb-fixture:nth-child(even) { border-left: 0; }
	.hb-fixture:nth-child(2) { border-top: 1px solid var(--hb-line); }
	.hb-standings .c-goals, .hb-standings.is-compact .c-goals { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; transition: none !important; }
}
