/*!
 * TECHi Puzzle — styles for nav, answer reveal card, hints/strategy,
 * and related content blocks on all six puzzle games. Loaded only on
 * singular puzzle posts via inc/puzzle/assets-enqueue.php.
 *
 * Design tokens come from each game's registry entry:
 *   --puzzle-accent       primary accent color (nav underline, reveal pill, tab active)
 *   --puzzle-accent-alt   secondary accent (stat line, hint highlights)
 */

/* ============================================================
 * 1. Puzzle top nav (Today / Yesterday / How to Play)
 * ------------------------------------------------------------
 * Single horizontal row on desktop: brand pinned left,
 * tab pills grouped right, all vertically centered. Wraps to
 * a centered two-row layout on narrow screens so the brand
 * sits on top and tabs on a clean second row.
 * ============================================================ */
.techi-puzzle-nav {
	background: #0A1628;
	color: #fff !important;
	border-radius: 12px;
	padding: 14px 20px;
	margin: 0 0 24px;
	box-shadow: 0 2px 12px rgba(10,22,40,.08);
	position: relative;
	overflow: hidden;
}
.techi-puzzle-nav:before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 3px;
	background: var(--puzzle-accent, #2ABFBF);
}
.techi-puzzle-nav__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	min-height: 36px;
}
.techi-puzzle-nav__brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-weight: 700;
	font-size: 15px;
	letter-spacing: .01em;
	color: #fff !important;
	line-height: 1;
	flex: 0 0 auto;
}
.techi-puzzle-nav__emoji {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	font-size: 18px;
	line-height: 1;
	border-radius: 8px;
	background: rgba(255,255,255,.06);
}
.techi-puzzle-nav__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 4px;
	border-radius: 8px;
	background: rgba(255,255,255,.12);
}
.techi-puzzle-nav__icon svg,
.techi-puzzle-nav__icon .igame-sidebar-gicon,
.techi-puzzle-nav__icon .igame-sidebar-gicon svg {
	width: 100%;
	height: 100%;
	display: block;
}
.techi-puzzle-nav__tabs {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}
.techi-puzzle-nav__tab {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}
.techi-puzzle-nav__tab:before { content: none !important; }
.techi-puzzle-nav__tab a {
	display: inline-flex;
	align-items: center;
	padding: 7px 14px;
	border-radius: 999px;
	color: rgba(255,255,255,.85) !important;
	text-decoration: none !important;
	font-weight: 600;
	font-size: 14px;
	line-height: 1.2;
	transition: background .15s ease, color .15s ease;
	background: rgba(255,255,255,.06);
	border: 1px solid rgba(255,255,255,.08);
}
.techi-puzzle-nav__tab a:hover,
.techi-puzzle-nav__tab a:focus-visible {
	color: #fff !important;
	background: rgba(255,255,255,.14);
	border-color: rgba(255,255,255,.18);
	outline: none;
}
.techi-puzzle-nav__tab.is-active a {
	background: var(--puzzle-accent, #2ABFBF) !important;
	color: #0A1628 !important;
	border-color: transparent;
	box-shadow: 0 2px 10px -4px rgba(42,191,191,.55);
}
.techi-puzzle-nav__tab.is-active a:hover {
	background: var(--puzzle-accent, #2ABFBF) !important;
	filter: brightness(.96);
}

@media (max-width: 720px) {
	.techi-puzzle-nav { padding: 12px 14px; }
	.techi-puzzle-nav__inner {
		flex-direction: column;
		align-items: center;
		gap: 10px;
	}
	.techi-puzzle-nav__brand { font-size: 14px; }
	.techi-puzzle-nav__tabs {
		width: 100%;
		justify-content: center;
	}
	.techi-puzzle-nav__tab a {
		padding: 7px 12px;
		font-size: 13px;
	}
}

/* ============================================================
 * 2. Answer reveal card — immediately after the lead paragraph
 * ------------------------------------------------------------
 * The card sits inside .entry-content / .post-content. Those
 * wrappers push dark text colors onto every child via descendant
 * selectors, which flashes the card title as black-on-navy.
 * Every text rule below uses !important specifically to beat
 * that inherited post-content coloring — do not remove.
 * ============================================================ */
.techi-answer-card {
	background: linear-gradient(135deg, #0A1628 0%, #132040 100%) !important;
	color: #fff !important;
	border-radius: 16px;
	padding: 28px 32px 32px;
	margin: 28px 0 32px;
	position: relative;
	overflow: hidden;
	box-shadow: 0 14px 34px -14px rgba(10,22,40,.28);
}
.techi-answer-card:before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 4px;
	background: linear-gradient(90deg, var(--puzzle-accent, #2ABFBF), var(--puzzle-accent-alt, #7E5BEF));
}
.techi-answer-card .techi-answer-card__eyebrow,
.techi-answer-card__eyebrow {
	display: inline-block;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--puzzle-accent, #2ABFBF) !important;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(255,255,255,.08);
}
.techi-answer-card h2.techi-answer-card__title,
.techi-answer-card .techi-answer-card__title,
.techi-answer-card__title {
	font-size: 26px;
	font-weight: 800;
	margin: 12px 0 4px !important;
	line-height: 1.2;
	color: #fff !important;
}
.techi-answer-card p.techi-answer-card__meta,
.techi-answer-card .techi-answer-card__meta,
.techi-answer-card__meta {
	font-size: 14px;
	color: rgba(255,255,255,.78) !important;
	margin: 0 0 20px !important;
}
.techi-answer-card .techi-answer-card__list,
.techi-answer-card__list {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 12px;
}
.techi-answer-card .techi-answer-card__item,
.techi-answer-card__item {
	background: rgba(255,255,255,.08) !important;
	border: 1px solid rgba(255,255,255,.14);
	border-radius: 10px;
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-height: 72px;
	margin: 0 !important;
	list-style: none !important;
}
.techi-answer-card .techi-answer-card__item:before { content: none !important; }
.techi-answer-card .techi-answer-card__label,
.techi-answer-card__label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: rgba(255,255,255,.7) !important;
}
.techi-answer-card .techi-answer-card__word,
.techi-answer-card__word {
	font-size: 28px;
	font-weight: 800;
	letter-spacing: .04em;
	color: #fff !important;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
	text-transform: uppercase;
}
.techi-answer-card .techi-answer-card__actions,
.techi-answer-card__actions {
	margin: 22px 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.techi-answer-card .techi-answer-card__btn,
.techi-answer-card__btn {
	appearance: none;
	border: 0;
	cursor: pointer;
	font: inherit;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: 9px 16px;
	border-radius: 8px;
	background: var(--puzzle-accent, #2ABFBF) !important;
	color: #0A1628 !important;
	text-decoration: none !important;
	transition: transform .1s ease, filter .15s ease;
}
.techi-answer-card .techi-answer-card__btn--ghost,
.techi-answer-card__btn--ghost {
	background: transparent !important;
	color: #fff !important;
	border: 1px solid rgba(255,255,255,.3);
}
.techi-answer-card__btn:hover,
.techi-answer-card__btn:focus-visible {
	filter: brightness(1.06);
	transform: translateY(-1px);
	outline: none;
}
.techi-answer-card__btn--ghost:hover { background: rgba(255,255,255,.08) !important; }

@media (max-width: 600px) {
	.techi-answer-card { padding: 22px 20px 24px; }
	.techi-answer-card__title { font-size: 22px; }
	.techi-answer-card__word { font-size: 24px; }
}

/* Blur / reveal spoiler state. When `.is-hidden` is present on the
 * card, the answers and labels are masked. JS toggles it. If the user
 * has JS disabled the answers are visible by default. */
.techi-answer-card.is-hidden .techi-answer-card__word {
	filter: blur(10px);
	user-select: none;
}
.techi-answer-card.is-hidden .techi-answer-card__label {
	opacity: .4;
}

/* ============================================================
 * 3. Hints block (below the reveal, for solvers coming back)
 * ============================================================ */
.techi-hints {
	border-left: 4px solid var(--puzzle-accent, #2ABFBF);
	background: #f5f9fb;
	border-radius: 0 10px 10px 0;
	padding: 18px 22px;
	margin: 24px 0;
}
.techi-hints__title {
	font-size: 15px;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: #0A1628;
	margin: 0 0 10px;
}
.techi-hints ul,
.techi-hints__list { margin: 0 !important; padding-left: 0 !important; list-style: none !important; }
.techi-hints__list li,
.techi-hints li { margin: 10px 0; color: #233045; list-style: none !important; padding-left: 0 !important; }
.techi-hints__list li:before { content: none !important; }
.techi-hints strong { color: #0A1628; }

/* ============================================================
 * 3b. Badges — used in hints (board) and strategy (board/word).
 * Pill shape, color-coded per board so a solver can instantly
 * see which grid a hint or step targets. `--word` is used for
 * opener words (ADIEU, TRAMP) so they read as a played tile.
 * ============================================================ */
.techi-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 999px;
	margin-right: 10px;
	vertical-align: 2px;
	line-height: 1.2;
	white-space: nowrap;
	color: #0A1628;
	background: #e6edf2;
}
.techi-badge--b1 { background: #fde8a6; color: #6b4e00; }
.techi-badge--b2 { background: #c9e6ff; color: #0b3a66; }
.techi-badge--b3 { background: #cff3d9; color: #13542a; }
.techi-badge--b4 { background: #ffd7d7; color: #7a1a1a; }
.techi-badge--word {
	background: #0A1628;
	color: var(--puzzle-accent, #2ABFBF);
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	letter-spacing: .12em;
}

/* ============================================================
 * 3c. Strategy ordered list (badges + step numbers)
 * ============================================================ */
.techi-strategy {
	counter-reset: techi-strategy;
	list-style: none !important;
	margin: 16px 0 24px !important;
	padding: 0 !important;
}
.techi-strategy li {
	counter-increment: techi-strategy;
	position: relative;
	margin: 0 0 10px !important;
	padding: 10px 14px 10px 46px !important;
	background: #f5f9fb;
	border-radius: 8px;
	color: #233045;
	list-style: none !important;
	line-height: 1.5;
}
.techi-strategy li:before {
	content: counter(techi-strategy);
	position: absolute;
	left: 12px;
	top: 10px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--puzzle-accent, #2ABFBF);
	color: #0A1628;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 800;
}

@media (max-width: 600px) {
	.techi-badge { display: inline-block; margin: 0 8px 4px 0; }
}

/* ============================================================
 * 4. "Try the puzzle first" card — sits where the answer card
 * used to sit, encourages readers to attempt the puzzle before
 * scrolling to the spoiler at the bottom of the article.
 * ============================================================ */
.techi-try-card {
	background: #f5f9fb;
	border: 1px solid #e3ecf2;
	border-left: 4px solid var(--puzzle-accent, #2ABFBF);
	border-radius: 12px;
	padding: 22px 26px 24px;
	margin: 24px 0 28px;
	color: #0A1628;
}
.techi-try-card__eyebrow {
	display: inline-block;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--puzzle-accent, #2ABFBF);
	padding: 3px 10px;
	border-radius: 999px;
	background: rgba(42,191,191,.1);
}
.techi-try-card__title {
	font-size: 22px;
	font-weight: 800;
	line-height: 1.25;
	margin: 10px 0 4px;
	color: #0A1628;
}
.techi-try-card__meta {
	font-size: 13px;
	color: #58697d;
	margin: 0 0 10px;
}
.techi-try-card__body {
	font-size: 15px;
	line-height: 1.55;
	color: #233045;
	margin: 0 0 16px;
}
.techi-try-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.techi-try-card__btn {
	display: inline-block;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: 9px 16px;
	border-radius: 8px;
	background: var(--puzzle-accent, #2ABFBF);
	color: #0A1628;
	text-decoration: none;
	transition: transform .1s ease, filter .15s ease;
}
.techi-try-card__btn--ghost {
	background: transparent;
	color: #0A1628;
	border: 1px solid rgba(10,22,40,.18);
}
.techi-try-card__btn:hover,
.techi-try-card__btn:focus-visible {
	filter: brightness(1.05);
	transform: translateY(-1px);
	outline: none;
}
.techi-try-card__btn--ghost:hover { background: rgba(10,22,40,.04); }

@media (max-width: 600px) {
	.techi-try-card { padding: 18px 18px 20px; }
	.techi-try-card__title { font-size: 19px; }
}

/* ============================================================
 * 5. Yesterday's answer link — small pill under past-answers
 * heading, points readers to the yesterday permalink.
 * ============================================================ */
.techi-yesterday-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 8px 0 18px;
	padding: 8px 14px;
	border-radius: 999px;
	background: rgba(10,22,40,.06);
	color: #0A1628;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	transition: background .15s ease;
}
.techi-yesterday-link:hover,
.techi-yesterday-link:focus-visible {
	background: rgba(10,22,40,.12);
	outline: none;
}
.techi-yesterday-link__arrow { font-size: 15px; line-height: 1; }

/* ============================================================
 * 6. Sidebar overrides (v2 puzzle pages only)
 * ------------------------------------------------------------
 * - Replace the emoji identity badge with a real inline SVG
 *   so each game looks distinct (no generic blue circle).
 * - Force numbered list markers on How to Play — the theme's
 *   global list-reset strips them otherwise.
 * - Simplify More Daily Puzzles: short label + icon per game.
 * ============================================================ */

/* Identity badge — v2 uses a dark navy card with inline SVG */
.igame-sidebar-badge.igame-sidebar-badge--v2 {
	background: linear-gradient(135deg, #0A1628 0%, #132040 100%) !important;
	color: #fff !important;
	padding: 14px 16px !important;
	border-radius: 14px !important;
	box-shadow: 0 6px 22px -10px rgba(10,22,40,.35) !important;
}
.igame-sidebar-badge--v2 strong {
	color: #fff !important;
	font-size: 1.05rem !important;
}
.igame-sidebar-badge--v2 small {
	color: rgba(255,255,255,.78) !important;
	font-size: 0.78rem !important;
}
.igame-sidebar-gicon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 6px;
	background: rgba(255,255,255,.08);
	border-radius: 10px;
	flex-shrink: 0;
}
.igame-sidebar-gicon svg {
	width: 100%;
	height: 100%;
	display: block;
}
/* Tagline immediately below identity — darken for contrast on light card */
body .igame-sidebar-tagline {
	color: #334155 !important;
	font-weight: 500;
}

/* How to Play — force numbered markers (theme zeroes them globally) */
.igame-sidebar-rules {
	list-style: decimal !important;
	list-style-position: outside !important;
	padding-left: 22px !important;
	margin: 0 !important;
}
.igame-sidebar-rules li {
	list-style: decimal !important;
	padding-left: 4px !important;
	margin-bottom: 4px !important;
}
.igame-sidebar-rules li::marker {
	color: var(--puzzle-accent, #2ABFBF);
	font-weight: 800;
}
/* Did You Know — keep bullets showing as small dots */
.igame-sidebar-facts {
	list-style: none !important;
	padding-left: 0 !important;
}
.igame-sidebar-facts li {
	position: relative;
	padding-left: 16px !important;
	margin-bottom: 4px !important;
	font-size: .86rem;
	line-height: 1.5;
	color: #334155;
}
.igame-sidebar-facts li:before {
	content: "";
	position: absolute;
	left: 4px;
	top: 9px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--puzzle-accent, #2ABFBF);
}

/* More Daily Puzzles — v2 short-label + icon rows */
.igame-sidebar-links--v2 {
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
}
.igame-sidebar-links--v2 li {
	list-style: none !important;
	border-bottom: 1px solid rgba(10,22,40,.06);
	padding: 0 !important;
	margin: 0 !important;
}
.igame-sidebar-links--v2 li:last-child { border-bottom: none; }
.igame-sidebar-links--v2 a {
	display: flex !important;
	align-items: center;
	gap: 12px;
	padding: 10px 4px !important;
	text-decoration: none !important;
	color: #0A1628 !important;
	font-weight: 600;
	font-size: .92rem;
	transition: color .15s ease, transform .1s ease;
}
.igame-sidebar-links--v2 a:before { content: none !important; }
.igame-sidebar-links--v2 a:hover,
.igame-sidebar-links--v2 a:focus-visible {
	color: #0d6e6e !important;
	transform: translateX(2px);
	outline: none;
}
.igame-sidebar-links--v2 .igame-sidebar-gicon {
	width: 34px;
	height: 28px;
	padding: 3px 5px;
	background: #f1f5f9;
	border-radius: 8px;
}
.igame-sidebar-link-label {
	flex: 1 1 auto;
	line-height: 1.25;
}

/* ============================================================
 * 7. Try-card button — contrast fix
 * ------------------------------------------------------------
 * The theme's global rule
 *   .post-content.entry-content a:not(.btn):not(.wp-block-button__link)
 * force-colors every content link teal (#0d7377) with
 * text-decoration: underline !important. Specificity is (0,4,1),
 * so a single-class rule can't override it.
 *
 * We match that specificity by nesting under .post-content and
 * .entry-content — plus kill the underline. Results: navy
 * button, white text, no underline, consistent on every game.
 * ============================================================ */
.post-content.entry-content a.techi-try-card__btn,
.techi-try-card__btn {
	background: #0A1628 !important;
	color: #fff !important;
	text-decoration: none !important;
	border: 0 !important;
}
.post-content.entry-content a.techi-try-card__btn:hover,
.post-content.entry-content a.techi-try-card__btn:focus-visible,
.techi-try-card__btn:hover,
.techi-try-card__btn:focus-visible {
	background: #132040 !important;
	color: #fff !important;
	text-decoration: none !important;
}
.post-content.entry-content a.techi-try-card__btn--ghost,
.techi-try-card__btn--ghost {
	background: transparent !important;
	color: #0A1628 !important;
	border: 1px solid rgba(10,22,40,.22) !important;
	text-decoration: none !important;
}
.post-content.entry-content a.techi-try-card__btn--ghost:hover,
.techi-try-card__btn--ghost:hover {
	background: rgba(10,22,40,.06) !important;
	color: #0A1628 !important;
	text-decoration: none !important;
}

/* Yesterday link + answer-card buttons also live inside post-content,
 * so inherit the same high-specificity override to avoid teal+underline. */
.post-content.entry-content a.techi-yesterday-link,
.techi-yesterday-link {
	text-decoration: none !important;
	color: #0A1628 !important;
}
.post-content.entry-content button.techi-answer-card__btn { text-decoration: none !important; }

/* ----------------------------------------------------------------------
 * Section 8 — Sticky "More Daily Puzzles" sidebar block
 * The block sits near the bottom of the sidebar and is the most
 * useful cross-linking element — pin it so it stays visible while
 * the reader scrolls the long answer page.
 * -------------------------------------------------------------------- */
/*
 * Sticky "More Daily Puzzles" block.
 * position:sticky sticks to the viewport only WHILE its parent is in
 * view. The last child of .igame-sidebar had no vertical travel room
 * because the parent auto-sized to its children's total height.
 * Fix: fill the parent to the article height and push the block to
 * the bottom via margin-top:auto so it has scroll travel.
 */
.single-intellect-main aside.one-third-lg {
	position: static !important;
	max-height: none !important;
	overflow: visible !important;
	align-self: stretch !important;
}
.igame-sidebar {
	position: static !important;
	align-self: stretch !important;
	height: 100% !important;
	min-height: 100%;
}
.igame-sidebar-section--more {
	position: sticky;
	top: 20px;
	align-self: stretch;
	width: 100%;
	z-index: 2;
}
@media (max-width: 991px) {
	.igame-sidebar-section--more { position: static; }
	.igame-sidebar { height: auto !important; min-height: 0; }
}
