/* ==========================================================================
   Eishockey-Magazin — main stylesheet
   ========================================================================== */

@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/barlow-condensed-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/barlow-condensed-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 800; font-display: swap; src: url(../fonts/barlow-condensed-800-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 700; font-display: swap; src: url(../fonts/barlow-condensed-700-italic.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/inter-400-700-normal.woff2) format("woff2"); }

/* ---------- Tokens ---------- */
:root {
	--ink: #0b1526;
	--ink-2: #3a475c;
	--ink-3: #6a778b;
	--bg: #f3f5f8;
	--surface: #ffffff;
	--surface-2: #eef1f5;
	--line: #dde3ea;
	--brand: #0a1a33;          /* deep ice navy */
	--brand-2: #13294d;
	--accent: #e4002b;         /* goal-light red */
	--accent-ink: #ffffff;
	--ice: #3fa9f5;
	--win: #12a150;
	--loss: #d63b3b;
	--po: #1d6fe0;
	--ppo: #9aa9bd;
	--shadow: 0 1px 2px rgb(11 21 38 / 6%), 0 4px 16px rgb(11 21 38 / 6%);
	--shadow-lg: 0 10px 40px rgb(11 21 38 / 18%);
	--radius: 14px;
	--radius-sm: 8px;
	--wrap: 1280px;
	--gutter: clamp(16px, 3vw, 32px);
	--head: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
	--body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--ink: #e8eef7; --ink-2: #b4c0d2; --ink-3: #7d8ba1;
		--bg: #070d18; --surface: #0f1829; --surface-2: #16223a; --line: #223150;
		--brand: #050b16; --brand-2: #0d1a31;
		--shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 6px 20px rgb(0 0 0 / 25%);
		--ppo: #5d6d86;
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--ink: #e8eef7; --ink-2: #b4c0d2; --ink-3: #7d8ba1;
	--bg: #070d18; --surface: #0f1829; --surface-2: #16223a; --line: #223150;
	--brand: #050b16; --brand-2: #0d1a31;
	--shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 6px 20px rgb(0 0 0 / 25%);
	--ppo: #5d6d86;
	color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
	margin: 0; background: var(--bg); color: var(--ink);
	font: 400 16px/1.6 var(--body);
	-webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
	overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--ice); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 700; line-height: 1.05; letter-spacing: .005em; margin: 0 0 .4em; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; cursor: pointer; }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; word-wrap: normal !important; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 1000; clip: auto; width: auto; height: auto; padding: 10px 16px; background: var(--surface); color: var(--ink); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Ticker ---------- */
.ticker-bar { background: var(--brand); color: #dfe8f5; border-bottom: 1px solid rgb(255 255 255 / 8%); }
.ticker-bar .wrap { display: flex; align-items: stretch; gap: 0; padding-right: 0; }
.ticker-bar__label {
	flex: none; display: flex; align-items: center; gap: 8px; padding: 0 14px 0 0; margin-right: 4px;
	font: 700 13px/1 var(--head); letter-spacing: .12em; text-transform: uppercase; color: #fff;
	border-right: 1px solid rgb(255 255 255 / 10%);
}
.ticker-bar__label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgb(228 0 43 / 25%); }
.ehm-ticker { position: relative; flex: 1; min-width: 0; }
.ehm-ticker__track { display: flex; gap: 2px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 6px 4px; }
.ehm-ticker__track::-webkit-scrollbar { display: none; }
.ehm-tick { flex: none; width: 168px; padding: 6px 10px; border-radius: 8px; scroll-snap-align: start; font-size: 13px; line-height: 1.25; }
.ehm-tick:hover { background: rgb(255 255 255 / 6%); }
.ehm-tick__meta { display: flex; justify-content: space-between; gap: 6px; font-size: 11px; color: #8fa3bf; margin-bottom: 3px; text-transform: uppercase; letter-spacing: .04em; }
.ehm-tick__league { font-weight: 700; color: #c9d6e8; }
.ehm-tick__team { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 7px; padding: 1px 0; color: #c3cfdf; }
.ehm-tick__team.is-win { color: #fff; font-weight: 700; }
.ehm-tick__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.ehm-tick__score { font: 700 15px/1 var(--head); min-width: 1ch; text-align: right; }
.ehm-tick--live { background: rgb(228 0 43 / 12%); }
.ehm-ticker__nav { position: absolute; top: 0; bottom: 0; width: 40px; border: 0; background: linear-gradient(90deg, var(--brand) 40%, transparent); color: #fff; font-size: 22px; display: none; }
.ehm-ticker__nav--next { right: 0; background: linear-gradient(270deg, var(--brand) 40%, transparent); }
.ehm-ticker__nav--prev { left: 0; }
@media (hover: hover) and (min-width: 900px) { .ehm-ticker.has-overflow .ehm-ticker__nav { display: block; } }

.ehm-live { display: inline-flex; align-items: center; gap: 5px; font: 700 11px/1 var(--body); text-transform: uppercase; letter-spacing: .08em; color: #fff; background: var(--accent); padding: 3px 6px 3px 5px; border-radius: 4px; }
.ehm-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .ehm-live::before { animation: none; } }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--brand-2); color: #fff; box-shadow: 0 1px 0 rgb(255 255 255 / 6%), 0 8px 24px rgb(0 0 0 / 20%); }
.site-header__inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; flex: none; }
.brand:hover { color: #fff; }
.brand__mark { width: 38px; height: 38px; }
.brand__word { font: 800 25px/0.86 var(--head); letter-spacing: .01em; text-transform: uppercase; }
.brand__word span { display: block; color: var(--ice); font-size: .72em; letter-spacing: .26em; font-weight: 700; }
.primary-nav { flex: 1; min-width: 0; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.primary-nav > ul > li { position: relative; }
.primary-nav a { display: block; padding: 10px 12px; font: 700 17px/1 var(--head); letter-spacing: .04em; text-transform: uppercase; color: #dbe5f3; border-radius: 6px; white-space: nowrap; }
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current-menu-ancestor > a, .primary-nav .current-category-ancestor > a { color: #fff; background: rgb(255 255 255 / 8%); }
.primary-nav .sub-menu { position: absolute; top: 100%; left: 0; min-width: 240px; padding: 8px; background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); display: none; flex-direction: column; z-index: 60; }
.primary-nav .sub-menu a { color: var(--ink); font: 600 15px/1.2 var(--body); text-transform: none; letter-spacing: 0; padding: 9px 12px; }
.primary-nav .sub-menu a:hover { background: var(--surface-2); color: var(--accent); }
.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu { display: flex; }
.primary-nav .has-clubs > .sub-menu { grid-template-columns: repeat(2, minmax(200px, 1fr)); min-width: 460px; }
.primary-nav li.has-clubs:hover > .sub-menu, .primary-nav li.has-clubs:focus-within > .sub-menu { display: grid; }
.header-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: rgb(255 255 255 / 7%); color: #fff; }
.icon-btn:hover { background: rgb(255 255 255 / 14%); color: #fff; }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
	:root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}
.menu-toggle { display: none; }

.subnav { background: var(--surface); border-bottom: 1px solid var(--line); }
.subnav .wrap { display: flex; align-items: center; gap: 10px; height: 50px; overflow-x: auto; scrollbar-width: none; }
.subnav .wrap::-webkit-scrollbar { display: none; }
.subnav__label { font: 700 13px/1 var(--head); text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); flex: none; }
.pill { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font: 600 13.5px/1 var(--body); white-space: nowrap; border: 1px solid transparent; }
.pill:hover { color: var(--ink); border-color: var(--line); }
.pill--strong { background: var(--accent); color: #fff; }
.pill--strong:hover { color: #fff; filter: brightness(1.08); }
.subnav__sep { width: 1px; height: 22px; background: var(--line); flex: none; }

.search-panel { display: none; background: var(--brand-2); padding: 0 0 16px; }
.search-panel.is-open { display: block; }
.search-form { display: flex; gap: 8px; }
.search-form input { flex: 1; min-width: 0; height: 48px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 400 16px var(--body); }
.search-form button { height: 48px; padding: 0 20px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font: 700 16px/1 var(--head); text-transform: uppercase; letter-spacing: .06em; }

@media (max-width: 1080px) {
	.primary-nav { position: fixed; inset: 0 0 0 auto; width: min(380px, 88vw); background: var(--brand-2); padding: 80px 16px 24px; transform: translateX(100%); transition: transform .25s ease; overflow-y: auto; z-index: 70; }
	.primary-nav.is-open { transform: none; box-shadow: -20px 0 60px rgb(0 0 0 / 40%); }
	.primary-nav ul { flex-direction: column; }
	.primary-nav a { font-size: 21px; padding: 13px 12px; }
	.primary-nav .sub-menu, .primary-nav .has-clubs > .sub-menu { position: static; display: grid; grid-template-columns: 1fr 1fr; min-width: 0; background: transparent; box-shadow: none; padding: 0 0 10px 8px; }
	.primary-nav .sub-menu a { color: #b8c6da; font-size: 14px; line-height: 1.25; padding: 7px 8px; white-space: normal; }
	.menu-toggle { display: inline-grid; position: relative; z-index: 80; }
	.menu-toggle .i-close, .menu-toggle[aria-expanded="true"] .i-menu { display: none; }
	.menu-toggle[aria-expanded="true"] .i-close { display: block; }
	/* The sticky header is its own stacking context (z-index 50), so the drawer inside it can never
	   rise above a sibling at 60. The scrim sits below the header instead and dims only the page. */
	.nav-scrim { position: fixed; inset: 0; background: rgb(3 8 18 / 55%); z-index: 45; opacity: 0; pointer-events: none; transition: opacity .25s; }
	.nav-scrim.is-open { opacity: 1; pointer-events: auto; }
}
@media (max-width: 520px) {
	.site-header__inner { height: 60px; gap: 12px; }
	.brand__mark { width: 32px; height: 32px; }
	.brand__word { font-size: 21px; }
}

/* ---------- Layout ---------- */
.site-main { padding: 28px 0 64px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.layout > aside { position: sticky; top: 92px; display: grid; gap: 24px; }
/* minmax(0, …): a plain 1fr track grows to its widest child (game strips, tables) and overflows phones. */
@media (max-width: 1080px) { .layout { grid-template-columns: minmax(0, 1fr); } .layout > aside { position: static; } }
.section { margin-top: 44px; }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 3px solid var(--ink); }
.section__title { margin: 0; font: 800 clamp(26px, 3vw, 34px)/1 var(--head); text-transform: uppercase; letter-spacing: .01em; display: flex; align-items: center; gap: 10px; }
.section__title::before { content: ""; width: 6px; height: .8em; background: var(--sec, var(--accent)); border-radius: 2px; transform: skewX(-12deg); }
.section__more { font: 700 14px/1 var(--head); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); white-space: nowrap; }
.section__more::after { content: " →"; }

.box { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.box__title { font: 800 22px/1 var(--head); text-transform: uppercase; margin: 0 0 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.box__title a { font: 700 13px/1 var(--head); letter-spacing: .08em; color: var(--ink-3); }
.box__title a::after { content: " →"; }

/* ---------- Cards ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 8px; border-radius: 5px; background: var(--club, var(--accent)); color: #fff; font: 700 12.5px/1 var(--head); text-transform: uppercase; letter-spacing: .08em; }
.chip:hover { color: #fff; filter: brightness(1.1); }
.chip--ghost { background: rgb(255 255 255 / 14%); backdrop-filter: blur(6px); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--ink-3); font-size: 13px; }
.meta > * + *::before { content: "·"; margin-right: 12px; color: var(--line); }

.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card__media { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--brand-2), var(--brand)); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card__media img { transform: scale(1.04); }
.card__media .chip { position: absolute; left: 12px; bottom: 12px; }
.card__body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 18px; flex: 1; }
.card__title { font: 700 22px/1.08 var(--head); margin: 0; }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card__excerpt { color: var(--ink-2); font-size: 14.5px; line-height: 1.5; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { margin-top: auto; padding-top: 4px; }
.card--row { flex-direction: row; align-items: stretch; }
.card--row .card__media { width: 38%; aspect-ratio: auto; min-height: 100%; flex: none; }
.card--row .card__title { font-size: 19px; }
.card--mini { flex-direction: row; gap: 12px; padding: 10px; align-items: center; box-shadow: none; background: transparent; border-radius: var(--radius-sm); }
.card--mini:hover { transform: none; box-shadow: none; background: var(--surface-2); }
.card--mini .card__media { width: 96px; aspect-ratio: 4/3; border-radius: 8px; flex: none; }
.card--mini .card__body { padding: 0; gap: 4px; }
.card--mini .card__title { font-size: 17px; }

.grid { display: grid; gap: 20px; }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1080px) { .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
	.grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; }
	.rail-mobile { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 12px; scrollbar-width: none; }
	.rail-mobile::-webkit-scrollbar { display: none; }
	.rail-mobile > .card { flex: none; width: 78%; scroll-snap-align: start; }
}

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 20px; }
.hero__lead { position: relative; min-height: 520px; border-radius: var(--radius); overflow: hidden; color: #fff; display: flex; align-items: flex-end; background: var(--brand); box-shadow: var(--shadow-lg); isolation: isolate; }
.hero__lead img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .8s ease; }
.hero__lead:hover img { transform: scale(1.03); }
.hero__lead::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(5 11 22 / 0) 30%, rgb(5 11 22 / 55%) 55%, rgb(5 11 22 / 95%) 100%); }
.hero__lead-body { padding: clamp(20px, 3vw, 36px); max-width: 820px; }
.hero__lead h2 { font: 800 clamp(32px, 4.2vw, 58px)/.98 var(--head); margin: 12px 0 10px; text-wrap: balance; }
.hero__lead h2 a::after { content: ""; position: absolute; inset: 0; }
.hero__lead h2 a:hover { color: #fff; }
.hero__lead p { color: #d5deeb; font-size: 17px; max-width: 640px; margin: 0 0 12px; }
.hero__lead .meta { color: #a9b8cc; }
.hero__side { display: grid; grid-template-rows: auto 1fr; gap: 14px; }
.hero__side-title { font: 800 15px/1 var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: 4px 0 0; }
.hero__list { display: grid; gap: 4px; align-content: start; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; }
@media (max-width: 1080px) { .hero { grid-template-columns: 1fr; } .hero__lead { min-height: 440px; } }
@media (max-width: 520px) { .hero__lead { min-height: 400px; } .hero__lead p { display: none; } }

/* ---------- Game strip (Spieltag) ---------- */
.gamestrip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
.gamecard { scroll-snap-align: start; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; display: grid; gap: 8px; min-height: 132px; position: relative; overflow: hidden; }
.gamecard::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(var(--c1, var(--ink-3)) 50%, var(--c2, var(--ink-3)) 50%); }
.gamecard__when { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.gamecard__team { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.gamecard__team .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gamecard__team .s { font: 800 26px/1 var(--head); }
.gamecard__team.is-loss { color: var(--ink-3); }
.gamecard--live { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }

/* ---------- Data components (ehm-data plugin markup) ---------- */
.ehm-crest { flex: none; object-fit: contain; }
.ehm-crest--initials { display: inline-grid; place-items: center; border-radius: 50%; background: var(--club); color: #fff; font: 700 10px/1 var(--body); letter-spacing: .02em; }
.ehm-table-wrap { overflow-x: auto; }
.ehm-table { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.ehm-table th { text-align: center; font: 700 12px/1 var(--body); color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; padding: 10px 6px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.ehm-table td { text-align: center; padding: 9px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ehm-table .c-pos { width: 36px; font-weight: 700; color: var(--ink-2); position: relative; }
.ehm-table .c-team { text-align: left; }
.ehm-table td.c-team { display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 190px; }
.ehm-table .c-pts { font-size: 15.5px; }
.ehm-table .is-pos { color: var(--win); }
.ehm-table .is-neg { color: var(--loss); }
.ehm-table tr.z-po td.c-pos { box-shadow: inset 3px 0 0 var(--po); }
.ehm-table tr.z-ppo td.c-pos { box-shadow: inset 3px 0 0 var(--ppo); }
.ehm-table tbody tr:hover { background: var(--surface-2); }
.ehm-table tr.is-hl { background: color-mix(in srgb, var(--club, var(--accent)) 12%, transparent); }
.ehm-table tr.is-hl td { font-weight: 700; }
.is-compact .ehm-table { font-size: 13.5px; }
.is-compact .ehm-table td.c-team { min-width: 0; }
.is-compact .ehm-table td { padding: 7px 4px; }
.ehm-table__title { font: 800 18px/1 var(--head); text-transform: uppercase; margin: 6px 0 8px; }
.ehm-form { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; margin: 0 1px; color: #fff; font: 700 11px/1 var(--body); }
.ehm-form--w { background: var(--win); }
.ehm-form--l { background: var(--loss); }
.ehm-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--ink-3); margin: 10px 0 0; }
.ehm-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.ehm-legend__po::before { background: var(--po); }
.ehm-legend__ppo::before { background: var(--ppo); }
.ehm-source { font-size: 12px; color: var(--ink-3); margin: 8px 0 0; }
.ehm-source a { text-decoration: underline; text-underline-offset: 2px; }
.ehm-empty { color: var(--ink-3); font-style: italic; }

.ehm-games__day { font: 700 14px/1 var(--body); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 18px 0 8px; }
.ehm-games__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ehm-game { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.ehm-game.is-hl { border-color: var(--club, var(--accent)); box-shadow: inset 4px 0 0 var(--club, var(--accent)); }
.ehm-game__team { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; }
.ehm-game__team--h { justify-content: flex-end; text-align: right; }
.ehm-game__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ehm-game__periods { grid-column: 1 / -1; text-align: center; font-size: 12px; color: var(--ink-3); margin-top: -4px; }
.ehm-score { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 84px; font: 800 22px/1 var(--head); }
.ehm-score--final, .ehm-score--live { background: var(--brand-2); color: #fff; border-radius: 8px; padding: 7px 10px; }
:root[data-theme="dark"] .ehm-score--final { background: var(--surface-2); }
.ehm-score__sep { opacity: .5; }
.ehm-score__dec { font: 700 11px/1 var(--body); opacity: .75; }
.ehm-score--scheduled { font-size: 20px; color: var(--ink-2); }
.ehm-score--pending { font: 600 12px/1.2 var(--body); color: var(--ink-3); }
.ehm-score--live { background: var(--accent); }
@media (max-width: 560px) {
	.ehm-game { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; padding: 10px 8px; font-size: 14px; }
	/* Crest above the name on both sides (home markup is name→crest, away is crest→name). */
	.ehm-game__team { gap: 4px; text-align: center; }
	.ehm-game__team--h { flex-direction: column-reverse; }
	.ehm-game__team--a { flex-direction: column; }
	.ehm-game__name { white-space: normal; font-size: 13px; line-height: 1.2; }
	.ehm-score { min-width: 70px; font-size: 20px; }
}
/* Game lists in narrow boxes (sidebars) use the stacked layout, whatever the viewport. */
.box { container-type: inline-size; }
@container (max-width: 420px) {
	.ehm-game { gap: 8px; padding: 10px 8px; font-size: 13.5px; }
	.ehm-game__team, .ehm-game__team--h, .ehm-game__team--a { flex-direction: column; gap: 4px; text-align: center; }
	.ehm-game__team--h { flex-direction: column-reverse; }
	.ehm-game__name { white-space: normal; line-height: 1.15; font-size: 12.5px; }
	.ehm-score { min-width: 64px; font-size: 19px; }
}
.ehm-round__head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.ehm-round__title { font: 800 24px/1 var(--head); text-transform: uppercase; margin: 0; }
.ehm-round__nav { display: flex; gap: 14px; font: 700 14px/1 var(--head); text-transform: uppercase; letter-spacing: .06em; }
.ehm-round__nav a { color: var(--ink-2); }

.ehm-club { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.ehm-club__stat { background: var(--surface); padding: 16px 18px; display: grid; gap: 6px; align-content: start; }
.ehm-club__k { font: 700 12px/1 var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.ehm-club__v { font: 800 30px/1 var(--head); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ehm-club__v small { font: 700 13px/1 var(--body); color: var(--ink-3); }
.ehm-club__s { font-size: 13px; color: var(--ink-2); }
.ehm-club__form { gap: 3px; }
.ehm-club__form .ehm-form { width: 22px; height: 22px; font-size: 11.5px; margin: 0; }
@media (max-width: 760px) { .ehm-club { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.ehm-nhl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 900px) { .ehm-nhl-grid { grid-template-columns: 1fr; } }
.ehm-nhl-grid td.c-team span { overflow: hidden; text-overflow: ellipsis; }

.ehm-germans { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ehm-german { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.ehm-german:last-child { border: 0; }
.ehm-german__body { display: grid; min-width: 0; }
.ehm-german__name { font-weight: 700; }
.ehm-german__team { font-size: 12.5px; color: var(--ink-3); }
.ehm-german__line { font-size: 12.5px; color: var(--ink-2); }
.ehm-german__pts { font: 800 26px/1 var(--head); text-align: right; display: grid; }
.ehm-german__pts small { font: 700 10px/1 var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }

/* ---------- Club grid ---------- */
.clubgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.clubtile { display: grid; justify-items: center; gap: 10px; padding: 18px 10px 14px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; font: 700 16px/1.05 var(--head); text-transform: uppercase; position: relative; overflow: hidden; transition: transform .2s; }
.clubtile::after { content: ""; position: absolute; inset: auto 0 0; height: 4px; background: var(--club); }
.clubtile:hover { transform: translateY(-3px); color: var(--ink); }
.clubtile .ehm-crest { width: 52px; height: 52px; }

/* ---------- Archive / club hub header ---------- */
.hub-head { position: relative; color: #fff; background: radial-gradient(1200px 400px at 85% -20%, color-mix(in srgb, var(--club, var(--ice)) 55%, transparent), transparent 60%), linear-gradient(120deg, var(--brand) 0%, var(--brand-2) 60%, color-mix(in srgb, var(--club, var(--brand-2)) 45%, var(--brand-2)) 100%); padding: 36px 0 40px; overflow: hidden; }
.hub-head::after { content: ""; position: absolute; right: -60px; top: -60px; width: 340px; height: 340px; border-radius: 50%; border: 22px solid rgb(255 255 255 / 5%); }
.hub-head__inner { display: flex; align-items: center; gap: 24px; position: relative; z-index: 1; }
.hub-head__crest { width: 96px; height: 96px; display: grid; place-items: center; background: #fff; border-radius: 24px; padding: 12px; box-shadow: 0 10px 30px rgb(0 0 0 / 30%); flex: none; }
.hub-head__crest .ehm-crest { width: 72px; height: 72px; }
.hub-head h1 { font: 800 clamp(36px, 5vw, 64px)/.95 var(--head); text-transform: uppercase; margin: 6px 0 8px; }
.hub-head__desc { color: #c9d6e8; max-width: 760px; margin: 0; }
.hub-head__desc p { margin: 0; }
.crumbs { font-size: 13px; color: #9fb1c9; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a:hover { color: #fff; }
.crumbs span[aria-hidden] { opacity: .5; }
.hub-tabs { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.hub-tabs .pill { background: rgb(255 255 255 / 10%); color: #fff; }
.hub-tabs .pill:hover { background: rgb(255 255 255 / 18%); color: #fff; }
@media (max-width: 600px) { .hub-head__inner { flex-direction: column; align-items: flex-start; gap: 14px; } .hub-head__crest { width: 72px; height: 72px; border-radius: 18px; } .hub-head__crest .ehm-crest { width: 52px; height: 52px; } }

.subcats { display: flex; flex-wrap: wrap; gap: 8px; }

.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 36px; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); font: 700 17px/1 var(--head); }
.pagination .current { background: var(--accent); color: #fff; }

/* ---------- Single ---------- */
.article-head { padding: 28px 0 8px; }
.article-head .crumbs { color: var(--ink-3); }
.article-head .crumbs a:hover { color: var(--accent); }
.article-head h1 { font: 800 clamp(34px, 4.6vw, 60px)/1 var(--head); margin: 14px 0 14px; max-width: 980px; text-wrap: balance; }
.article-dek { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--ink-2); max-width: 820px; margin: 0 0 18px; }
.byline { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.byline__avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--brand-2); color: #fff; display: grid; place-items: center; font: 800 18px/1 var(--head); flex: none; overflow: hidden; }
.byline__name { font-weight: 700; }
.byline .meta { margin-top: 2px; }
.share { margin-left: auto; display: flex; gap: 6px; }
.share a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); }
.share a:hover { background: var(--accent); color: #fff; }
.share svg { width: 17px; height: 17px; }
.article-figure { margin: 0 0 28px; }
.article-figure img { width: 100%; border-radius: var(--radius); aspect-ratio: 16/9; object-fit: cover; }
.article-figure figcaption { font-size: 13px; color: var(--ink-3); margin-top: 8px; }
.prose { font-size: 18px; line-height: 1.72; max-width: 760px; }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; }
.prose h2 { font: 800 32px/1.05 var(--head); margin-top: 1.6em; }
.prose h3 { font: 700 25px/1.1 var(--head); margin-top: 1.4em; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--accent); font: 600 italic 24px/1.3 var(--head); color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose img { border-radius: var(--radius-sm); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; }
.prose .ehm-table td, .prose .ehm-table th { text-align: center; }
.prose .ehm-table td.c-team { text-align: left; }
.prose .ehm-source a { color: inherit; }
/* Data components inside article/page copy keep their own link style. */
.prose .ehm-table a, .prose .ehm-game a, .prose .ehm-german a { color: inherit; text-decoration: none; }
.prose .ehm-table a:hover, .prose .ehm-game a:hover { color: var(--accent); }
.prose .ehm-games__list, .prose .ehm-germans { padding-left: 0; }
.prose .ehm-games__list li + li, .prose .ehm-germans li + li { margin-top: 0; }
.factbox { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; border-top: 4px solid var(--club, var(--accent)); font-size: 16px; }
.factbox h2, .factbox h3 { margin-top: 0 !important; font-size: 22px !important; text-transform: uppercase; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.page-full .prose { max-width: none; }
.page-full .prose > p, .page-full .prose > h2, .page-full .prose > h3, .page-full .prose > ul { max-width: 820px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand); color: #b8c6da; padding: 48px 0 28px; margin-top: 40px; }
.footer-clubs { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 18px; padding-bottom: 32px; margin-bottom: 32px; border-bottom: 1px solid rgb(255 255 255 / 8%); }
.footer-clubs a { opacity: .7; transition: opacity .2s, transform .2s; }
.footer-clubs a:hover { opacity: 1; transform: scale(1.1); }
.footer-clubs .ehm-crest { width: 34px; height: 34px; }
.footer-cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer-cols h2 { font: 800 16px/1 var(--head); letter-spacing: .12em; text-transform: uppercase; color: #fff; margin: 0 0 14px; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14.5px; }
.footer-cols a:hover { color: #fff; }
.footer-about p { font-size: 14.5px; max-width: 360px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 36px; padding-top: 20px; border-top: 1px solid rgb(255 255 255 / 8%); font-size: 13px; color: #8193ab; }
.footer-bottom a:hover { color: #fff; }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 16px; }
@media (max-width: 900px) { .footer-cols { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }

/* ---------- Misc ---------- */
.notfound { text-align: center; padding: 60px 0; }
.notfound__code { font: 800 clamp(120px, 20vw, 220px)/.85 var(--head); color: transparent; -webkit-text-stroke: 2px var(--line); margin: 0; }
.notfound h1 { font-size: 40px; text-transform: uppercase; }
.notfound .search-form { max-width: 520px; margin: 24px auto 0; }
.alignwide { max-width: none; }
.wp-block-image figcaption { font-size: 13px; color: var(--ink-3); }
@media print { .ticker-bar, .site-header, .subnav, .layout > aside, .site-footer, .share { display: none !important; } }
