/* Trivia Everyday — main styles */

:root {
	--te-cream: #fff7e8;
	--te-ink: #1b1b1f;
	--te-muted: #4e4a42;
	--te-teal: #5ed3c3;
	--te-teal-soft: #bfede6;
	--te-teal-tint: #d6f4ef;
	--te-lemon: #ffe14d;
	--te-lemon-tint: #fff4bf;
	--te-coral: #ff7b7b;
	--te-white: #fff;
	--te-border: 3px solid var(--te-ink);
	--te-border-thin: 2px solid var(--te-ink);
	--te-shadow: 4px 4px 0 var(--te-ink);
	--te-shadow-lg: 8px 8px 0 var(--te-ink);
	--te-display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
	--te-body: "DM Sans", "Segoe UI", sans-serif;
	--te-max: 1200px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	background: var(--te-cream);
	color: var(--te-ink);
	font-family: var(--te-body);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--te-ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: #3f6f68; }

:focus-visible { outline: 3px solid #2457d6; outline-offset: 3px; }

h1, h2, h3, h4 { font-family: var(--te-display); line-height: 1.1; letter-spacing: -0.01em; }

.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;
}
.skip-link:focus {
	position: fixed !important; top: 8px; left: 8px; z-index: 1000;
	width: auto; height: auto; clip: auto; margin: 0;
	padding: 10px 16px; background: var(--te-white); border: var(--te-border); border-radius: 12px;
}

.te-container { max-width: var(--te-max); margin: 0 auto; padding: 0 24px; }

/* Ticker */
.te-ticker { background: var(--te-lemon); border-bottom: var(--te-border); overflow: hidden; padding: 9px 0; }
.te-ticker__track {
	display: flex; gap: 40px; width: max-content; white-space: nowrap;
	font-family: var(--te-display); font-weight: 600; font-size: 16px;
	animation: te-tick 32s linear infinite;
}
@keyframes te-tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .te-ticker__track { animation: none; } }

/* Header */
.te-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.te-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.te-logo__mark {
	width: 46px; height: 46px; border-radius: 50%; flex: none;
	background: var(--te-teal); border: var(--te-border); box-shadow: 3px 3px 0 var(--te-ink);
	display: flex; align-items: center; justify-content: center;
	font-family: var(--te-display); font-weight: 800; font-size: 24px;
}
.te-logo__name { font-family: var(--te-display); font-weight: 800; font-size: 28px; letter-spacing: -0.02em; }
.te-logo img { display: block; height: 60px; width: auto; }
.custom-logo { max-height: 56px; width: auto; }

.te-nav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 22px; font-weight: 700; }
.te-nav__list a { text-decoration: none; }
.te-nav__list a:hover { text-decoration: underline; }
.te-nav__list .te-btn:hover { text-decoration: none; }

.te-menu-toggle {
	display: none; width: 46px; height: 46px; border: var(--te-border); border-radius: 14px;
	background: var(--te-lemon); color: var(--te-ink); cursor: pointer; align-items: center; justify-content: center;
}
.te-menu-toggle .te-icon { width: 20px; height: 20px; }

/* Buttons */
.te-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 48px; padding: 0 22px; border: var(--te-border); border-radius: 999px;
	font-family: var(--te-display); font-weight: 600; font-size: 18px; line-height: 1;
	color: var(--te-ink); background: var(--te-white); text-decoration: none; cursor: pointer;
	transition: transform .12s, box-shadow .12s;
}
.te-btn .te-icon { width: 20px; height: 20px; }
.te-btn:hover { color: var(--te-ink); transform: translate(-1px, -1px); }
.te-btn--small { min-height: 44px; padding: 0 18px; font-size: 16px; box-shadow: 3px 3px 0 var(--te-ink); }
.te-btn--lemon { background: var(--te-lemon); box-shadow: 3px 3px 0 var(--te-ink); }
.te-btn--outline { background: var(--te-cream); font-family: var(--te-body); font-weight: 800; font-size: 16px; }
.te-btn--dark { background: var(--te-ink); color: var(--te-cream); box-shadow: 5px 5px 0 var(--te-lemon); }
.te-btn--dark:hover { color: var(--te-cream); }
.te-btn--big { min-height: 60px; padding: 0 30px; font-size: 21px; }

/* Ads */
.te-ad { display: flex; flex-direction: column; align-items: center; margin: 8px auto 28px; width: 100%; max-width: 100%; overflow: hidden; }
.te-ad__label { margin: 0 0 6px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #6b6658; }
.te-ad ins { width: 100%; }
.te-ad--header { max-width: 970px; min-height: 90px; margin-top: 4px; }
.te-ad--incontent { margin: 8px auto; min-height: 280px; }
.te-ad--sidebar { min-height: 600px; }
.te-ad--feed { margin: 0; }
.te-ad-placeholder {
	width: 100%; height: 100%; min-height: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center;
	border: 2px dashed #8a8578; border-radius: 14px; color: #5e5a50; font-weight: 700; font-size: 13px; text-align: center; padding: 12px;
	background: repeating-linear-gradient(135deg, #f3ecdd 0 12px, #ede4d1 12px 24px);
}
.te-ad--header .te-ad-placeholder { max-width: 728px; min-height: 90px; }
.te-ad--incontent .te-ad-placeholder { max-width: 336px; min-height: 280px; }
.te-ad--sidebar .te-ad-placeholder { max-width: 300px; min-height: 600px; }
.te-ad--feed .te-ad-placeholder { min-height: 170px; border-radius: 22px; }

/* Layout */
.te-site-content { padding-bottom: 56px; }
.te-layout { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; padding-top: 12px; }
.te-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.te-sidebar { flex: 1 1 300px; max-width: 336px; display: flex; flex-direction: column; gap: 28px; }

/* Question card */
.te-card {
	background: var(--te-white); border: var(--te-border); border-radius: 28px; box-shadow: var(--te-shadow-lg);
	padding: 36px; display: flex; flex-direction: column; gap: 24px; scroll-margin-top: 16px;
}
.te-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.te-meta__text { font-weight: 700; font-size: 15px; color: var(--te-muted); }
.te-question-title { margin: 0; font-size: clamp(30px, 4.2vw, 46px); font-weight: 800; }

.te-pill {
	display: inline-block; margin: 0; padding: 4px 14px; border: var(--te-border-thin); border-radius: 999px;
	font-family: var(--te-body); font-weight: 800; font-size: 14px; line-height: 1.4; background: var(--te-white);
}
.te-pill--teal { background: var(--te-teal); }
.te-pill--teal-soft { background: var(--te-teal-soft); }
.te-pill--lemon { background: var(--te-lemon); }
.te-pill--lemon-tint { background: var(--te-lemon-tint); }
.te-pill--white { background: var(--te-white); }

.te-answers { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.te-answer {
	display: flex; align-items: center; gap: 16px; min-height: 76px; padding: 12px 18px;
	border: var(--te-border); border-radius: 20px; background: var(--te-cream); box-shadow: var(--te-shadow);
	font-family: var(--te-display); font-weight: 600; font-size: 21px; line-height: 1.2; color: var(--te-ink); text-decoration: none;
	transition: transform .12s, box-shadow .12s;
}
a.te-answer:hover { color: var(--te-ink); transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--te-ink); }
.te-answer__badge {
	flex: none; width: 44px; height: 44px; border-radius: 50%; border: var(--te-border); background: var(--te-white);
	display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 19px;
}
.te-answer__badge .te-icon { width: 22px; height: 22px; }
.te-answer__tag { margin-left: auto; font-family: var(--te-body); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.te-answer--correct { background: var(--te-teal); }
.te-answer--wrong { background: var(--te-coral); box-shadow: none; }
.te-answer--dim { opacity: .45; box-shadow: none; }

.te-prompt { margin: 0; font-weight: 700; color: var(--te-muted); }

.te-result {
	display: flex; align-items: center; gap: 18px;
	border: var(--te-border); border-radius: 22px; padding: 20px 24px;
}
.te-result--right { background: var(--te-teal); }
.te-result--wrong { background: var(--te-coral); }
.te-result__icon {
	flex: none; width: 62px; height: 62px; border-radius: 50%; background: var(--te-white); border: var(--te-border);
	display: flex; align-items: center; justify-content: center;
}
.te-result__icon .te-icon { width: 32px; height: 32px; }
.te-result__title { margin: 0; font-family: var(--te-display); font-weight: 800; font-size: 36px; line-height: 1; }
.te-result__text { margin: 6px 0 0; font-weight: 700; font-size: 18px; }

/* Explanation */
.te-explain h2, .te-section__title { margin: 0 0 14px; font-size: 32px; font-weight: 800; }
.te-section__title--page { font-size: clamp(32px, 4vw, 42px); }
.te-prose { font-size: 19px; line-height: 1.7; }
.te-prose > :first-child { margin-top: 0; }
.te-prose > :last-child { margin-bottom: 0; }
.te-prose h2 { font-size: 28px; margin: 1.6em 0 .5em; }
.te-prose h3 { font-size: 22px; margin: 1.4em 0 .4em; }
.te-prose blockquote { margin: 1.4em 0; padding: 16px 22px; background: var(--te-lemon-tint); border: var(--te-border-thin); border-radius: 18px; }

.te-reveal { border: var(--te-border-thin); border-radius: 22px; background: var(--te-white); }
.te-reveal summary {
	cursor: pointer; padding: 18px 22px; min-height: 44px;
	font-family: var(--te-display); font-weight: 600; font-size: 20px;
}
.te-reveal__body { padding: 0 22px 22px; }
.te-reveal__answer { font-size: 19px; margin-top: 0; }

/* Facts */
.te-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.te-fact { border: var(--te-border-thin); border-radius: 22px; padding: 22px; background: var(--te-white); }
.te-fact:nth-child(3n+1) { background: var(--te-lemon-tint); }
.te-fact:nth-child(3n+3) { background: var(--te-teal-tint); }
.te-fact__big { margin: 0 0 8px; font-family: var(--te-display); font-weight: 800; font-size: 38px; line-height: 1; }
.te-fact__text { margin: 0; font-weight: 500; font-size: 16px; line-height: 1.5; }

/* Share */
.te-share {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
	background: var(--te-white); border: var(--te-border); border-radius: 24px; padding: 20px 24px;
}
.te-share__title { margin: 0; font-family: var(--te-display); font-weight: 600; font-size: 22px; }
.te-share__buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.te-main > .te-btn--big { align-self: flex-start; }

/* Cards */
.te-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.te-qcard {
	display: flex; flex-direction: column; gap: 14px; min-height: 170px; padding: 20px;
	background: var(--te-white); border: var(--te-border-thin); border-radius: 22px; box-shadow: 3px 3px 0 var(--te-ink);
	text-decoration: none; color: var(--te-ink); transition: transform .12s, box-shadow .12s;
}
.te-qcard:hover { color: var(--te-ink); transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--te-ink); }
.te-qcard .te-pill { align-self: flex-start; font-size: 13px; padding: 3px 12px; }
.te-qcard__title { flex: 1; font-family: var(--te-display); font-weight: 600; font-size: 21px; line-height: 1.2; }
.te-qcard__play { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 15px; }
.te-qcard__play .te-icon { width: 16px; height: 16px; }

/* Hero */
.te-hero {
	display: flex; flex-wrap: wrap; align-items: center; gap: 36px; margin: 16px 0 28px; padding: 44px;
	background: var(--te-teal); border: var(--te-border); border-radius: 32px; box-shadow: var(--te-shadow-lg);
}
.te-hero__text { flex: 3 1 420px; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.te-hero__title { margin: 0; font-size: clamp(34px, 5vw, 54px); font-weight: 800; }
.te-hero__mark {
	flex: 1 1 200px; max-width: 220px; aspect-ratio: 1; margin: 0 auto; border-radius: 50%;
	background: var(--te-cream); border: var(--te-border); box-shadow: 6px 6px 0 var(--te-ink);
	display: flex; align-items: center; justify-content: center;
	font-family: var(--te-display); font-weight: 800; font-size: 130px; line-height: 1; transform: rotate(-8deg);
}

.te-section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.te-section-head .te-section__title { margin: 0; }
.te-archive-intro { font-size: 17px; }

/* Search */
.te-search { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; }
.te-search input {
	min-height: 46px; width: 230px; max-width: 60vw; padding: 0 16px; border: var(--te-border); border-radius: 999px;
	font: inherit; font-weight: 500; background: var(--te-white); color: var(--te-ink);
}

/* Chips */
.te-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.te-chip {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
	border: var(--te-border); border-radius: 999px; background: var(--te-white);
	font-weight: 800; font-size: 15px; text-decoration: none;
}
.te-chip--active, .te-chip--active:hover { background: var(--te-ink); color: var(--te-cream); }

/* Pagination */
.te-pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.te-pagination .page-numbers {
	min-width: 46px; height: 46px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center;
	border: var(--te-border); border-radius: 999px; background: var(--te-white); font-weight: 800; text-decoration: none;
}
.te-pagination .page-numbers.current { background: var(--te-ink); color: var(--te-cream); }
.te-pagination .prev, .te-pagination .next { background: var(--te-lemon); }

/* Signup */
.te-signup {
	background: var(--te-ink); color: var(--te-cream); border: var(--te-border); border-radius: 24px;
	padding: 24px; display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 16px;
}
.te-signup__title { margin: 0; font-size: 26px; font-weight: 800; }
.te-signup__text { margin: 0; font-size: 15px; }
.te-signup__form { display: flex; flex-direction: column; gap: 10px; }
.te-signup__form label { font-weight: 800; font-size: 14px; }
.te-signup__form input {
	min-height: 48px; padding: 0 16px; border: var(--te-border); border-radius: 14px;
	font: inherit; background: var(--te-white); color: var(--te-ink);
}
.te-signup--setup { background: var(--te-lemon-tint); color: var(--te-ink); border-style: dashed; font-size: 14px; }
.te-signup--setup p { margin: 0; }

/* Fact of the Day */
.te-fotd {
	background: var(--te-lemon-tint); border: var(--te-border); border-radius: 24px;
	padding: 22px; display: flex; flex-direction: column; gap: 12px;
}
.te-fotd__head { display: flex; align-items: center; gap: 12px; }
.te-fotd__icon {
	flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--te-lemon); border: var(--te-border);
	display: flex; align-items: center; justify-content: center;
}
.te-fotd__icon .te-icon { width: 24px; height: 24px; stroke-width: 2.4; }
.te-fotd__title { margin: 0; font-size: 22px; font-weight: 800; }
.te-fotd__date { margin: 2px 0 0; font-size: 14px; font-weight: 700; color: var(--te-muted); }
.te-fotd__cat { align-self: flex-start; font-size: 13px; padding: 2px 12px; }
.te-fotd__text { margin: 0; font-size: 18px; line-height: 1.5; font-weight: 500; }
.te-fotd__more { margin: 0; font-size: 13px; font-weight: 700; color: var(--te-muted); }

/* Widgets */
.te-widget { background: var(--te-white); border: var(--te-border-thin); border-radius: 22px; padding: 20px; }
.te-widget__title { margin: 0 0 10px; font-size: 22px; }
.te-widget ul { margin: 0; padding-left: 18px; }
.te-widget .wp-block-search__inside-wrapper { display: flex; gap: 8px; }
.te-widget .wp-block-search__input { min-height: 44px; padding: 0 14px; border: var(--te-border-thin); border-radius: 999px; font: inherit; }
.te-widget .wp-block-search__button { min-height: 44px; padding: 0 16px; border: var(--te-border-thin); border-radius: 999px; background: var(--te-lemon); color: var(--te-ink); font: inherit; font-weight: 800; cursor: pointer; }

/* Pages */
.te-page { max-width: 780px; margin: 24px auto 0; background: var(--te-white); border: var(--te-border); border-radius: 28px; padding: 44px; }
.te-page__title { margin: 0 0 22px; font-size: clamp(32px, 4.5vw, 46px); font-weight: 800; }
.te-page .te-prose { font-size: 17px; }
.te-404 { text-align: center; }
.te-404 .te-search { justify-content: center; margin: 22px 0; }
.te-404__mark { margin: 0; font-family: var(--te-display); font-size: 110px; font-weight: 800; line-height: 1; }
.te-article { display: flex; flex-direction: column; gap: 18px; }
.te-article__image { border: var(--te-border); border-radius: 22px; }

/* Contact form */
.te-form { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.te-form__field { display: flex; flex-direction: column; gap: 6px; }
.te-form label { font-weight: 800; font-size: 15px; }
.te-form input, .te-form textarea {
	min-height: 48px; padding: 10px 16px; border: var(--te-border); border-radius: 14px;
	font: inherit; background: var(--te-cream); color: var(--te-ink);
}
.te-form textarea { min-height: 160px; resize: vertical; }
.te-form .te-btn { align-self: flex-start; }
.te-form__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.te-notice { padding: 14px 18px; border: var(--te-border-thin); border-radius: 16px; font-weight: 700; }
.te-notice--success { background: var(--te-teal-tint); }
.te-notice--error { background: #ffe1e1; }

/* Footer */
.te-footer { background: var(--te-ink); color: var(--te-cream); }
.te-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; padding-top: 36px; padding-bottom: 36px; }
.te-footer__name { display: inline-block; }
.te-footer__name img { display: block; height: 44px; width: auto; }
.te-footer__copy { margin: 4px 0 0; font-size: 14px; color: #d9d2c3; }
.te-footer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 22px; font-weight: 700; font-size: 15px; }
.te-footer a { color: var(--te-cream); }
.te-footer a:hover { color: var(--te-lemon); }

/* Phones */
@media (max-width: 767px) {
	body { font-size: 16px; }
	.te-container { padding: 0 16px; }
	.te-ticker { padding: 5px 0; }
	.te-ticker__track { font-size: 13px; }
	.te-header__inner { padding-top: 12px; padding-bottom: 12px; }
	.te-logo img { height: 40px; }
	.te-menu-toggle { display: inline-flex; }
	.te-nav { display: none; flex-basis: 100%; }
	.te-nav.is-open { display: block; }
	.te-nav__list { flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px 0; }
	.te-nav__list a { display: inline-flex; align-items: center; min-height: 44px; }

	/* Email visitors should see their result first: no ad above the question on phones.
	   Only the responsive ad container is hidden, as Google allows for responsive units. */
	.te-ad--header { display: none; }

	.te-card { padding: 20px; border-radius: 24px; box-shadow: 6px 6px 0 var(--te-ink); gap: 16px; }
	.te-answers { grid-template-columns: 1fr; gap: 10px; }
	.te-answer { min-height: 56px; font-size: 18px; padding: 8px 14px; gap: 12px; border-radius: 16px; box-shadow: 3px 3px 0 var(--te-ink); }
	.te-answer--wrong, .te-answer--dim { box-shadow: none; }
	.te-answer__badge { width: 34px; height: 34px; font-size: 16px; }
	.te-result { padding: 14px 16px; gap: 12px; border-radius: 18px; }
	.te-result__icon { width: 46px; height: 46px; }
	.te-result__icon .te-icon { width: 22px; height: 22px; }
	.te-result__title { font-size: 27px; }
	.te-result__text { font-size: 15px; }
	.te-explain h2, .te-section__title { font-size: 25px; }
	.te-prose { font-size: 17px; }
	.te-hero { padding: 26px; gap: 20px; border-radius: 24px; }
	.te-hero__mark { display: none; }
	.te-sidebar { max-width: none; }
	.te-ad--sidebar { min-height: 250px; }
	.te-page { padding: 24px; border-radius: 22px; }
	.te-search input { width: 100%; }
	.te-search { flex: 1 1 100%; }
	.te-main > .te-btn--big { align-self: stretch; }
}
