/* Kalendarz HYROX – korzysta z tokenów motywu Hybrid Athlete */
.hx { --hx-line: var(--line, #d9dcd3); --hx-ink: var(--ink, #17191c); --hx-muted: var(--muted, #59606b); --hx-acid: var(--acid, #d4f03c); --hx-acid-line: var(--acid-line, #a3c214); }
.hx > * + * { margin-top: 2.5rem !important; }

/* Najbliższy start */
.hx-next { position: relative; padding: clamp(1.4rem, 4vw, 2.2rem); background: var(--asphalt, #18191c); color: var(--on-dark, #eceee8); overflow: hidden; }
.hx-next::after { content: ""; position: absolute; right: -2.5rem; top: -2.5rem; width: 11rem; height: 11rem; border: 18px solid var(--hx-acid); opacity: .9; transform: rotate(12deg); pointer-events: none; }
.hx-next > * { position: relative; z-index: 1; margin: 0; }
.hx-next__label { font-weight: 700; font-size: .92rem; color: var(--hx-acid) !important; }
.hx-next__city { margin-top: .5rem !important; font: 400 clamp(2rem, 6vw, 3.4rem)/1 var(--f-display, sans-serif); letter-spacing: -.03em; color: #fff; max-width: 14ch; }
.hx-next__city a { color: inherit; text-decoration: none; }
.hx-next__city a:hover { text-decoration: underline; text-decoration-color: var(--hx-acid); text-decoration-thickness: 4px; }
.hx-next__meta { margin-top: .9rem !important; color: var(--on-dark-muted, #a7adb5) !important; font-size: 1.02rem; max-width: 44ch; }
.hx-next__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem !important; }
.hx-next__actions .btn--ghost { color: #fff; }
.hx-next__note { margin-top: .9rem !important; font-size: .88rem; color: var(--on-dark-muted, #a7adb5) !important; }

/* Filtr */
.hx-filter { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: none; }
.hx-filter[hidden] { display: none; }
.hx-filter button { flex: none; display: inline-flex; align-items: center; gap: .45rem; min-height: 2.6rem; padding: .35rem .95rem; border: 1px solid var(--hx-line); background: var(--surface, #fff); color: var(--hx-ink); font: 600 .95rem var(--f-body, sans-serif); cursor: pointer; }
.hx-filter button span { font-weight: 500; font-size: .85rem; color: var(--hx-muted); font-variant-numeric: tabular-nums; }
.hx-filter button:hover { border-color: var(--hx-ink); }
.hx-filter button[aria-pressed="true"] { background: var(--hx-ink); color: var(--bg, #f5f6f2); border-color: var(--hx-ink); }
.hx-filter button[aria-pressed="true"] span { color: inherit; opacity: .7; }

/* Miesiące */
.hx-month + .hx-month { margin-top: 2.25rem; }
.hx-month[hidden] { display: none; }
.hx-month__h { display: flex; align-items: baseline; gap: .6rem; margin: 0 0 .25rem !important; padding-bottom: .55rem; border-bottom: 3px solid var(--hx-ink); font: 400 clamp(1.25rem, 2.4vw, 1.55rem)/1.2 var(--f-display, sans-serif) !important; letter-spacing: -.01em; }
.hx-month__h span { font: 600 .85rem var(--f-body, sans-serif); color: var(--hx-muted); }
.hx-list { list-style: none; margin: 0 !important; padding: 0 !important; }

/* Wiersz zawodów */
.hx-race { display: grid; grid-template-columns: 5.2rem minmax(0, 1fr); gap: .35rem 1.1rem; align-items: start; margin: 0 !important; padding: 1.05rem 0; border-bottom: 1px solid var(--hx-line); }
.hx-race[hidden] { display: none; }
.hx-date { display: flex; flex-direction: column; align-items: flex-start; padding-top: .1rem; font-variant-numeric: tabular-nums; }
.hx-day { font: 400 1.35rem/1.05 var(--f-display, sans-serif); color: var(--hx-ink); letter-spacing: -.02em; white-space: nowrap; }
.hx-mon { margin-top: .2rem; font-size: .82rem; font-weight: 700; color: var(--hx-muted); }
.hx-city { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .55rem; margin: 0 !important; font-size: 1.15rem !important; line-height: 1.3; font-weight: 750; }
.hx-city a { text-decoration: none; }
.hx-city a:hover { text-decoration: underline; text-decoration-color: var(--hx-acid-line); text-decoration-thickness: 3px; }
.hx-meta { margin: .2rem 0 0 !important; font-size: .95rem; color: var(--hx-muted); line-height: 1.45; }
.hx-when { display: inline-block; margin-top: .45rem; padding: .12rem .5rem; font-size: .8rem; font-weight: 700; background: color-mix(in srgb, var(--hx-ink) 7%, transparent); color: var(--hx-ink); }
.hx-badge { display: inline-block; padding: .12rem .45rem; border: 1px solid var(--hx-line); font-size: .74rem; font-weight: 700; line-height: 1.4; color: var(--hx-muted); }
.hx-badge--pl { background: var(--hx-acid); border-color: var(--hx-acid); color: #17191c; }
.is-pl { background: linear-gradient(90deg, color-mix(in srgb, var(--hx-acid) 18%, transparent), transparent 70%); margin-inline: -.75rem !important; padding-inline: .75rem; }

/* Link do klubów – przy każdym terminie */
.hx-prep { grid-column: 2; display: grid; grid-template-columns: 1.15rem 1fr; column-gap: .45rem; align-items: start; justify-self: start; margin-top: .35rem; padding: .45rem .75rem .45rem .6rem; border: 1px solid var(--hx-line); background: var(--surface, #fff); text-decoration: none !important; color: var(--hx-ink); line-height: 1.3; }
.hx-prep::before { content: ""; grid-row: span 2; width: 1rem; height: 1.15rem; margin-top: .05rem; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 20'%3E%3Cpath d='M8 0a7.5 7.5 0 0 0-7.5 7.5C.5 13 8 20 8 20s7.5-7 7.5-12.5A7.5 7.5 0 0 0 8 0Zm0 10.5a3 3 0 1 1 0-6 3 3 0 0 1 0 6Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 20'%3E%3Cpath d='M8 0a7.5 7.5 0 0 0-7.5 7.5C.5 13 8 20 8 20s7.5-7 7.5-12.5A7.5 7.5 0 0 0 8 0Zm0 10.5a3 3 0 1 1 0-6 3 3 0 0 1 0 6Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.hx-prep__t { font-weight: 700; font-size: .93rem; }
.hx-prep__n { font-size: .8rem; color: var(--hx-muted); }
.hx-prep:hover { border-color: var(--hx-ink); box-shadow: 3px 3px 0 var(--hx-acid); }
.hx-prep:focus-visible { outline: 3px solid var(--hx-acid-line); outline-offset: 2px; }
.is-pl .hx-prep { background: var(--hx-acid); border-color: var(--hx-acid); color: #17191c; }
.is-pl .hx-prep .hx-prep__n { color: #3b4200; }

@media (min-width: 820px) {
	.hx-race { grid-template-columns: 6.2rem minmax(0, 1fr) auto; align-items: center; gap: 0 1.5rem; }
	.hx-prep { grid-column: 3; grid-row: 1; margin-top: 0; justify-self: end; min-width: 15.5rem; }
	.hx-day { font-size: 1.5rem; }
}

/* Archiwum */
.hx-archive { border: 1px solid var(--hx-line); background: var(--surface, #fff); }
.hx-archive > summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.15rem; cursor: pointer; list-style: none; font-weight: 700; color: var(--hx-ink); }
.hx-archive > summary::-webkit-details-marker { display: none; }
.hx-archive > summary span { margin-left: .4rem; color: var(--hx-muted); font-weight: 500; }
.hx-archive > summary::after { content: "+"; flex: none; width: 1.75rem; height: 1.75rem; display: grid; place-items: center; border: 1.5px solid currentColor; font-weight: 400; }
.hx-archive[open] > summary::after { content: "–"; }
.hx-archive > .hx-month { padding: 0 1.15rem; }
.hx-archive > .hx-month:last-child { padding-bottom: 1rem; }
.hx-archive .hx-month__h { border-bottom-width: 1px; font-size: 1.1rem !important; margin-top: .75rem !important; }
.is-past .hx-day, .is-past .hx-city a { color: var(--hx-muted); }
.is-past .hx-prep { background: transparent; }

.hx-empty { padding: 1.1rem 1.2rem; border-left: 5px solid var(--hx-acid-line); background: var(--surface, #fff); }
.hx-empty[hidden] { display: none; }
.hx-source { font-size: .9rem; color: var(--hx-muted); }

/* CTA końcowe */
.hx-cta { padding: clamp(1.4rem, 4vw, 2rem); background: var(--surface, #fff); border: 1px solid var(--hx-line); border-top: 4px solid var(--hx-ink); }
.hx-cta h2 { margin: 0 !important; font: 400 clamp(1.4rem, 3vw, 1.9rem)/1.15 var(--f-display, sans-serif) !important; }
.hx-cta p { margin: .7rem 0 0 !important; }
.hx-cta__a { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.2rem !important; }
.hx-cta .btn--ghost, .hx-prepbox .btn--ghost { color: var(--hx-ink); }

/* Podstrony zawodów */
.hx-notice { padding: .9rem 1.1rem; border-left: 5px solid var(--hx-acid-line); background: var(--surface, #fff); font-weight: 600; }
.hx-prepbox { margin-top: 2.5rem !important; padding: 1.4rem 1.5rem; background: var(--surface, #fff); border: 1px solid var(--line, #d9dcd3); border-left: 6px solid var(--acid, #d4f03c); }
.hx-prepbox__h { margin: 0 !important; font: 400 1.35rem/1.2 var(--f-display, sans-serif); color: var(--ink, #17191c); }
.hx-prepbox p { margin: .55rem 0 0 !important; }
.hx-prepbox__a { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem !important; }

/* Szerzej na stronie kalendarza (motyw domyślnie trzyma 44rem dla tekstu) */
.page:has(.hx) .wrap--text { width: min(100% - 2 * var(--gutter, 1.25rem), 58rem); }

/* Telefon: dekoracja nie może nachodzić na tekst */
@media (max-width: 699.98px) {
	.hx-next::after { width: 6rem; height: 6rem; border-width: 12px; right: -2.6rem; top: -2.6rem; }
	.hx-next__label { padding-right: 3rem; }
}
.hx-archive > summary .hx-archive__t span { margin-left: .35rem; color: var(--hx-muted); font-weight: 500; }

/* Podstrony zawodów */
.hx-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); gap: 0; margin: 0 0 1.75rem !important; border-top: 3px solid var(--ink, #17191c); }
.hx-facts > div { padding: .8rem 1rem .8rem 0; border-bottom: 1px solid var(--line, #d9dcd3); }
.hx-facts dt { font-size: .85rem; font-weight: 700; color: var(--muted, #59606b); }
.hx-facts dd { margin: .2rem 0 0; font-weight: 700; color: var(--ink, #17191c); line-height: 1.35; }
@media (min-width: 700px) { .hx-facts > div + div { padding-left: 1rem; border-left: 1px solid var(--line, #d9dcd3); } }
.hx-btns { display: flex; flex-wrap: wrap; gap: .6rem; }
.hx-btns .btn { text-decoration: none; }
.hx-btns .btn--ghost { color: var(--ink, #17191c); }
.prose .hx-btns a.btn--ink:hover { color: var(--bg, #f5f6f2); }
.hx-tips { padding-left: 1.4em; }
.hx-tips li::marker { font-weight: 700; color: var(--ink, #17191c); }
.hx-hotel { margin-bottom: 0 !important; }
.hx-hotel + p { margin-top: .2rem !important; color: var(--muted, #59606b); }
.hx-nextlist { list-style: none; padding: 0 !important; border-top: 1px solid var(--line, #d9dcd3); }
.hx-nextlist li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem 1rem; margin: 0 !important; padding: .7rem 0; border-bottom: 1px solid var(--line, #d9dcd3); }
.hx-nextlist a { font-weight: 700; }
.hx-nextlist span { color: var(--muted, #59606b); font-size: .95rem; }
