/* Tarot card library — dark reading surface for the card pages.
   The theme is light; these pages are not, so the chrome is repainted here
   rather than fighting the theme's customiser. */

.tk-cards,
body.tk-cards-page {
	--tk-bg: #070d1a;
	--tk-panel: rgba(255, 255, 255, .04);
	--tk-line: rgba(255, 255, 255, .12);
	--tk-ink: #dff1f6;
	--tk-muted: rgba(223, 241, 246, .68);
	--tk-faint: rgba(223, 241, 246, .45);
	--tk-violet: 155 124 246;
	--tk-cyan: 125 211 252;
}

body.tk-cards-page {
	background: var(--tk-bg);
	color: var(--tk-ink);
}

/* Repaint the theme chrome so header and footer do not glare white. */
body.tk-cards-page #page,
body.tk-cards-page .site-content,
body.tk-cards-page .ast-container,
body.tk-cards-page .site-header,
body.tk-cards-page .site-footer,
body.tk-cards-page .ast-footer-overlay {
	background: var(--tk-bg);
}

body.tk-cards-page .site-header,
body.tk-cards-page .main-header-bar,
body.tk-cards-page .ast-primary-header-bar,
body.tk-cards-page .ast-inner-header-wrap,
body.tk-cards-page .site-footer,
body.tk-cards-page .ast-small-footer-wrap,
body.tk-cards-page .ast-footer-overlay {
	background-color: var(--tk-bg) !important;
	border-color: var(--tk-line) !important;
}

body.tk-cards-page .site-header *,
body.tk-cards-page .site-footer *,
body.tk-cards-page .site-title a,
body.tk-cards-page .ast-header-menu *,
body.tk-cards-page .ast-builder-menu * {
	color: var(--tk-ink);
}

body.tk-cards-page .site-footer a:hover,
body.tk-cards-page .site-header a:hover { color: rgb(var(--tk-violet)); }

/* Astra keeps a sidebar slot on pages, which squeezes the content into a
   narrow left column. The library needs the full width. */
body.tk-cards-page .site-content > .ast-container {
	max-width: none !important;
	width: 100% !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	/* Astra turns the container into a grid with a reserved sidebar column
	   even when the sidebar is empty — that column is what squeezed the grid. */
	grid-template-columns: minmax(0, 1fr) !important;
	display: grid !important;
	gap: 0 !important;
}

body.tk-cards-page .content-area,
body.tk-cards-page .site-main {
	width: 100%;
	float: none;
	margin: 0;
}

body.tk-cards-page #secondary,
body.tk-cards-page .widget-area,
body.tk-cards-page .site-description { display: none; }

.tk-cards {
	display: block;
	padding: clamp(28px, 5vw, 64px) 0 clamp(40px, 6vw, 80px);
	color: var(--tk-ink);
	font-size: 16px;
	line-height: 1.72;
}

.tk-cards__wrap {
	width: min(1140px, 100% - clamp(28px, 6vw, 72px));
	margin: 0 auto;
}

.tk-cards h1,
.tk-cards h2,
.tk-cards h3 {
	color: #fff;
	letter-spacing: -.01em;
}

.tk-cards p { color: var(--tk-muted); }

.tk-cards a { color: rgb(var(--tk-violet)); }
.tk-cards a:hover { color: rgb(var(--tk-cyan)); }


/* Astra styles menu links with a deep slate that vanishes on a night
   background; these need to win the cascade explicitly. */
body.tk-cards-page .main-header-menu .menu-link,
body.tk-cards-page .ast-builder-menu .menu-link,
body.tk-cards-page .ast-header-menu a,
body.tk-cards-page .main-header-menu a,
body.tk-cards-page .ast-nav-menu a {
	color: var(--tk-ink) !important;
	opacity: .82;
}

body.tk-cards-page .main-header-menu .menu-link:hover,
body.tk-cards-page .ast-builder-menu .menu-link:hover,
body.tk-cards-page .main-header-menu a:hover {
	color: rgb(var(--tk-violet)) !important;
	opacity: 1;
}

body.tk-cards-page .main-header-menu .current-menu-item > .menu-link,
body.tk-cards-page .main-header-menu .current_page_item > .menu-link {
	color: #fff !important;
	opacity: 1;
}

/* ------------------------------ breadcrumbs ------------------------------ */

.tk-cards__crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 26px;
	font-size: 12.5px;
	letter-spacing: .03em;
	color: var(--tk-faint);
}

.tk-cards__crumbs a { color: var(--tk-faint); text-decoration: none; }
.tk-cards__crumbs a:hover { color: rgb(var(--tk-violet)); }
.tk-cards__crumbs [aria-current] { color: var(--tk-ink); }

/* ------------------------------- archive --------------------------------- */

.tk-cards__head { max-width: 760px; margin-bottom: 38px; }

.tk-cards__eyebrow {
	margin: 0 0 10px;
	font-size: 12px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: rgb(var(--tk-violet));
}

.tk-cards__head h1 {
	margin: 0 0 14px;
	font-size: clamp(30px, 4.4vw, 46px);
	line-height: 1.12;
}

.tk-cards__lede { margin: 0; font-size: 16.5px; }

.tk-cards__tools { margin-top: 26px; }

/* Attribute selector on purpose: Astra sets input[type="text"] to pure white
   and out-specifies a bare class. */
.tk-cards__search[type="text"] {
	width: 100%;
	max-width: 520px;
	padding: 13px 20px;
	border: 1px solid var(--tk-line);
	border-radius: 999px;
	background: rgba(255, 255, 255, .05);
	color: var(--tk-ink);
	font: inherit;
	font-size: 15px;
}

.tk-cards__search[type="text"]::placeholder { color: var(--tk-faint); }
.tk-cards__search[type="text"]:focus {
	outline: none;
	border-color: rgb(var(--tk-violet) / .55);
	box-shadow: 0 0 24px rgb(var(--tk-violet) / .18);
	background: rgba(255, 255, 255, .07);
}

.tk-cards__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 14px;
}

.tk-cards__filters button {
	padding: 7px 16px;
	border: 1px solid var(--tk-line);
	border-radius: 999px;
	background: transparent;
	color: var(--tk-muted);
	font: inherit;
	font-size: 13px;
	cursor: pointer;
	transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.tk-cards__filters button:hover { border-color: rgba(255, 255, 255, .3); color: #fff; }

.tk-cards__filters button.is-active {
	border-color: rgb(var(--tk-violet) / .6);
	background: rgb(var(--tk-violet) / .14);
	color: #fff;
}

.tk-cards__group { margin: 0 0 44px; }
.tk-cards__group[hidden] { display: none; }

.tk-cards__group h2 {
	margin: 0 0 18px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--tk-line);
	font-size: 17px;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--tk-ink);
}

.tk-cards__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tk-cards__item[hidden] { display: none; }

.tk-cards__item > a {
	display: flex;
	flex-direction: column;
	gap: 9px;
	padding: 12px 12px 14px;
	height: 100%;
	border: 1px solid var(--tk-line);
	border-radius: 14px;
	background: var(--tk-panel);
	color: inherit;
	text-decoration: none;
	transition: transform .22s ease, border-color .22s ease, background .22s ease;
}

.tk-cards__item > a:hover {
	transform: translateY(-3px);
	border-color: rgb(var(--tk-violet) / .5);
	background: rgba(255, 255, 255, .07);
}

.tk-cards__thumb {
	display: block;
	aspect-ratio: 200 / 340;
	overflow: hidden;
	border-radius: 9px;
	background: #0d1426;
}

.tk-cards__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tk-cards__name {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	line-height: 1.35;
}

.tk-cards__name i {
	display: inline-block;
	margin-right: 6px;
	padding: 1px 6px;
	border-radius: 6px;
	background: rgb(var(--tk-violet) / .18);
	color: rgb(var(--tk-cyan));
	font-size: 10.5px;
	font-style: normal;
	letter-spacing: .04em;
}

.tk-cards__hint {
	display: block;
	font-size: 11.5px;
	line-height: 1.5;
	color: var(--tk-faint);
}

.tk-cards__none { margin: 24px 0; color: var(--tk-faint); }

/* -------------------------------- single -------------------------------- */

.tk-card {
	display: grid;
	grid-template-columns: minmax(220px, 340px) 1fr;
	gap: clamp(24px, 4vw, 52px);
	align-items: start;
}

.tk-card__art { position: sticky; top: 28px; }

.tk-card__art img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 14px;
	border: 1px solid var(--tk-line);
	background: #0d1426;
}

.tk-card__noart {
	display: grid;
	place-items: center;
	aspect-ratio: 380 / 646;
	border: 1px solid var(--tk-line);
	border-radius: 14px;
	background: #0d1426;
	color: var(--tk-faint);
	text-align: center;
	padding: 20px;
}

.tk-card__artcap {
	margin: 10px 0 0;
	font-size: 11px;
	letter-spacing: .04em;
	color: var(--tk-faint);
	text-align: center;
}

.tk-card__eyebrow {
	margin: 0 0 10px;
	font-size: 12px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: rgb(var(--tk-violet));
}

.tk-card__title {
	margin: 0 0 18px;
	font-size: clamp(28px, 3.6vw, 40px);
	line-height: 1.15;
}

.tk-card__kw {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 30px;
	padding: 0;
	list-style: none;
}

.tk-card__kw li {
	flex: 1 1 260px;
	padding: 12px 15px;
	border: 1px solid var(--tk-line);
	border-radius: 12px;
	background: var(--tk-panel);
	font-size: 13.5px;
	color: var(--tk-muted);
}

.tk-card__kw span {
	display: block;
	margin-bottom: 3px;
	font-size: 10.5px;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.tk-card__kw .is-up { color: rgb(var(--tk-cyan)); }
.tk-card__kw .is-rev { color: #f0a9b4; }

.tk-card__sec { margin: 0 0 30px; }

.tk-card__sec h2 {
	margin: 0 0 12px;
	font-size: 21px;
}

.tk-card__sec p { margin: 0; font-size: 16px; }

.tk-card__ctx h3 {
	margin: 22px 0 8px;
	font-size: 15.5px;
	letter-spacing: .02em;
	color: rgb(var(--tk-cyan));
}

.tk-card__cta {
	margin: 32px 0;
	padding: 24px;
	border: 1px solid rgb(var(--tk-violet) / .35);
	border-radius: 16px;
	background: linear-gradient(160deg, rgb(var(--tk-violet) / .14), rgba(255, 255, 255, .02));
}

.tk-card__cta p { margin: 0 0 16px; font-size: 15px; }

.tk-card__ctabtn {
	display: inline-block;
	padding: 12px 26px;
	border-radius: 999px;
	background: rgb(var(--tk-violet) / .9);
	color: #0a1226 !important;
	font-weight: 600;
	font-size: 14.5px;
	text-decoration: none;
	transition: transform .2s ease, background .2s ease;
}

.tk-card__ctabtn:hover { transform: translateY(-2px); background: rgb(var(--tk-violet)); }

.tk-card__prevnext {
	display: flex;
	justify-content: space-between;
	gap: 14px;
	margin: 0 0 36px;
	padding: 16px 0 0;
	border-top: 1px solid var(--tk-line);
	font-size: 14px;
}

.tk-card__prevnext a { text-decoration: none; }
.tk-card__prevnext .is-next { margin-left: auto; text-align: right; }

.tk-card__related h2 { margin: 0 0 16px; font-size: 17px; }

.tk-card__related ul {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tk-card__related a {
	display: flex;
	flex-direction: column;
	gap: 7px;
	font-size: 13px;
	text-decoration: none;
	color: var(--tk-ink);
}

.tk-card__related img {
	width: 100%;
	height: auto;
	border-radius: 9px;
	border: 1px solid var(--tk-line);
	transition: transform .2s ease;
}

.tk-card__related a:hover img { transform: translateY(-2px); }
.tk-card__related span { line-height: 1.35; }

/* -------------------------------- responsive ----------------------------- */

@media (max-width: 860px) {
	.tk-card {
		grid-template-columns: 1fr;
	}
	.tk-card__art {
		position: static;
		max-width: 280px;
		margin: 0 auto;
	}
}

@media (max-width: 600px) {
	.tk-cards__grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
	.tk-card__prevnext { flex-direction: column; }
	.tk-card__prevnext .is-next { text-align: left; margin-left: 0; }
}

/* Fallback surface for a slug with no data row. */
.tk-cards--plain .tk-cards__wrap { max-width: 760px; }
