/* Quick Take Daily theme styles */

:root {
	--qt-bg: #FAFAF8;
	--qt-surface: #FFFFFF;
	--qt-text: #1D1D1F;
	--qt-muted: #5E5E62;
	--qt-line: #E4E3DE;
	--qt-accent: #1F5F5B;
	--qt-accent-hover: #163F3C;
	--qt-on-accent: #FFFFFF;
	--qt-accent-soft: #E4EEEC;
	--qt-mark: #1F5F5B;
	--qt-ph-0: #DCE6E3;
	--qt-ph-1: #E7E4DC;
	--qt-ph-2: #DEE3EA;
	--qt-ph-3: #EADFDC;
	--qt-sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--qt-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
	--qt-radius: 16px;
	color-scheme: light;
}

:root[data-theme="dark"] {
	--qt-bg: #111214;
	--qt-surface: #1A1B1E;
	--qt-text: #EDEDED;
	--qt-muted: #A8A8AD;
	--qt-line: #2A2B2F;
	--qt-accent: #6FBDB4;
	--qt-accent-hover: #93D2CA;
	--qt-on-accent: #0E1A19;
	--qt-accent-soft: #18292A;
	--qt-mark: #2E8078;
	--qt-ph-0: #22302E;
	--qt-ph-1: #2A2824;
	--qt-ph-2: #232831;
	--qt-ph-3: #2E2624;
	color-scheme: dark;
}

body {
	background: var(--qt-bg);
	color: var(--qt-text);
	font-family: var(--qt-sans);
	-webkit-font-smoothing: antialiased;
	margin: 0;
}

a { color: var(--qt-accent); }
a:hover { color: var(--qt-accent-hover); }
img { max-width: 100%; height: auto; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute; width: 1px; word-wrap: normal !important;
}

:focus-visible { outline: 2px solid var(--qt-accent); outline-offset: 2px; border-radius: 4px; }

.qt-container {
	box-sizing: border-box;
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 24px;
	padding-right: 24px;
	width: 100%;
}

/* Remove block-theme gaps between our full-width regions */
.wp-site-blocks > * + * { margin-block-start: 0; }
.wp-block-template-part { margin: 0; }

/* ---------- Buttons ---------- */
.qt-btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 44px; padding: 0 20px; border-radius: 999px;
	background: var(--qt-accent); color: var(--qt-on-accent);
	font-weight: 700; font-size: 15px; text-decoration: none; border: 1px solid var(--qt-accent);
	box-sizing: border-box; font-family: var(--qt-sans);
}
.qt-btn:hover { background: var(--qt-accent-hover); border-color: var(--qt-accent-hover); color: var(--qt-on-accent); }
.qt-btn-small { min-height: 40px; padding: 0 16px; font-size: 13px; }
.qt-btn-outline { background: transparent; color: var(--qt-accent); }
.qt-btn-outline:hover { background: var(--qt-accent-soft); color: var(--qt-accent); }
.qt-chip {
	display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px;
	border-radius: 999px; border: 1px solid var(--qt-line); background: transparent;
	color: var(--qt-text); font: 700 13px/1 var(--qt-sans); text-decoration: none; cursor: pointer;
}
.qt-chip:hover { border-color: var(--qt-accent); color: var(--qt-accent); }
.qt-icon-btn {
	width: 44px; height: 44px; border: 0; background: transparent; color: var(--qt-text);
	border-radius: 22px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.qt-icon-btn:hover { background: var(--qt-accent-soft); }
.qt-icon-sun { display: none; }
:root[data-theme="dark"] .qt-icon-sun { display: block; }
:root[data-theme="dark"] .qt-icon-moon { display: none; }

/* ---------- Header ---------- */
.qt-topbar { border-bottom: 1px solid var(--qt-line); font-size: 13px; color: var(--qt-muted); }
.qt-topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; flex-wrap: wrap; }
.qt-actions { display: flex; align-items: center; gap: 4px; }
.qt-searchbar { border-bottom: 1px solid var(--qt-line); padding: 14px 0; background: var(--qt-surface); }
.qt-searchbar[hidden] { display: none; }

.search-form, .wp-block-search__inside-wrapper { display: flex; gap: 8px; max-width: 560px; }
.search-form label { flex: 1; }
.search-form .search-field, .wp-block-search__input {
	width: 100%; box-sizing: border-box; min-height: 44px; padding: 0 16px; border-radius: 999px;
	border: 1px solid var(--qt-line); background: var(--qt-bg); color: var(--qt-text); font: 16px var(--qt-sans);
}
.search-form .search-submit, .wp-block-search__button {
	min-height: 44px; padding: 0 20px; border-radius: 999px; border: 0; cursor: pointer;
	background: var(--qt-accent); color: var(--qt-on-accent); font: 700 15px var(--qt-sans);
}

.qt-brand-wrap { padding-top: 28px; }
.qt-brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--qt-text); }
.qt-brand:hover { color: var(--qt-text); }
.qt-mark .qt-mark-bubble { fill: var(--qt-mark); }
.qt-brand-text { display: flex; flex-direction: column; }
.qt-brand-name { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; color: var(--qt-text); }
.qt-tagline { font-size: 14px; font-weight: 500; color: var(--qt-muted); }
.qt-brand-small { gap: 10px; }
.qt-brand-small .qt-brand-name { font-size: 18px; }

.qt-nav { margin-top: 22px; }
.qt-nav .qt-container > ul,
.qt-menu {
	list-style: none; margin: 0; padding: 4px 0; display: flex; gap: 4px;
	overflow-x: auto; white-space: nowrap; scrollbar-width: none;
	border-top: 1px solid var(--qt-line); border-bottom: 1px solid var(--qt-line);
}
.qt-menu::-webkit-scrollbar { display: none; }
.qt-menu li { margin: 0; }
.qt-menu a {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
	font-size: 15px; font-weight: 600; color: var(--qt-text); text-decoration: none; border-radius: 8px;
}
.qt-menu a:hover { color: var(--qt-accent); }
.qt-menu .current-menu-item > a, .qt-menu a[aria-current="page"] { color: var(--qt-accent); }

/* ---------- Shared story pieces ---------- */
.qt-main { padding-top: 32px; padding-bottom: 16px; display: flex; flex-direction: column; gap: 48px; }
.qt-h2 { margin: 0 0 16px; font-size: 22px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.25; color: var(--qt-text); }
.qt-kicker {
	display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 0.08em;
	text-transform: uppercase; color: var(--qt-accent); text-decoration: none;
}
.qt-meta { font-size: 13px; color: var(--qt-muted); margin: 0; }
.qt-dek { margin: 0; font-size: 16px; line-height: 1.55; color: var(--qt-muted); }
.qt-media { display: block; border-radius: 14px; overflow: hidden; background: var(--qt-ph-0); }
.qt-media .qt-img, .qt-row-media .qt-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.qt-ph { display: block; width: 100%; height: 100%; }
.qt-ph-0 { background: var(--qt-ph-0); }
.qt-ph-1 { background: var(--qt-ph-1); }
.qt-ph-2 { background: var(--qt-ph-2); }
.qt-ph-3 { background: var(--qt-ph-3); }

.qt-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.qt-card .qt-media { aspect-ratio: 3 / 2; }
.qt-card-title { margin: 0; font-size: 18px; line-height: 1.35; font-weight: 700; letter-spacing: -0.005em; }
.qt-card-title a, .qt-row-title a, .qt-lead-title a, .qt-sixty a, .qt-most-list a { color: var(--qt-text); text-decoration: none; }
.qt-card-title a:hover, .qt-row-title a:hover, .qt-lead-title a:hover, .qt-sixty a:hover, .qt-most-list a:hover { color: var(--qt-accent); text-decoration: underline; }
.qt-card-big .qt-media { aspect-ratio: 16 / 9; }
.qt-card-big .qt-card-title { font-size: 24px; line-height: 1.25; font-weight: 800; letter-spacing: -0.01em; }

.qt-row-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--qt-line); }
.qt-row-item:first-child { padding-top: 0; }
.qt-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.qt-row-title { margin: 0; font-size: 17px; line-height: 1.35; font-weight: 700; }
.qt-row-media { flex: none; width: 96px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--qt-ph-1); }

.qt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 28px 24px; }
.qt-grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ---------- Homepage ---------- */
.qt-top { display: flex; flex-wrap: wrap; gap: 32px; }
.qt-lead { flex: 2 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.qt-lead .qt-media { aspect-ratio: 16 / 9; border-radius: var(--qt-radius); }
.qt-lead-title { margin: 0; font-size: clamp(28px, 4vw, 40px); line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
.qt-lead .qt-dek { font-size: 18px; }
.qt-top-list { flex: 1 1 320px; min-width: 0; }

.qt-sixty { background: var(--qt-surface); border: 1px solid var(--qt-line); border-radius: 20px; padding: 24px 28px; }
.qt-sixty .qt-h2 { font-size: 20px; margin-bottom: 12px; }
.qt-sixty ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; font-size: 16px; line-height: 1.5; }

.qt-home-row { display: flex; flex-wrap: wrap; gap: 40px; }
.qt-home-row > .qt-editors { flex: 2 1 560px; min-width: 0; }
.qt-home-row > .qt-most { flex: 1 1 300px; min-width: 0; }

.qt-most-list { list-style: none; margin: 0; padding: 0; counter-reset: qt; }
.qt-most-list li { counter-increment: qt; display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--qt-line); font-size: 16px; font-weight: 600; line-height: 1.4; }
.qt-most-list li::before { content: counter(qt); font-size: 28px; font-weight: 800; color: var(--qt-accent); line-height: 1; min-width: 26px; }

.qt-section { border-top: 2px solid var(--qt-text); padding-top: 16px; }
.qt-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.qt-section-head .qt-h2 { margin: 0; font-size: 24px; }
.qt-see-all { font-size: 14px; font-weight: 700; text-decoration: none; }
.qt-section-body { display: flex; flex-wrap: wrap; gap: 32px; }
.qt-section-body > .qt-card-big { flex: 2 1 420px; }
.qt-section-list { flex: 1 1 300px; min-width: 0; }

.qt-newsletter {
	background: var(--qt-accent-soft); border-radius: 20px; padding: 32px;
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
}
.qt-newsletter-text { flex: 1 1 360px; }
.qt-newsletter-text .qt-h2 { font-size: 24px; margin-bottom: 6px; }
.qt-newsletter-text p { margin: 0; color: var(--qt-muted); }
.qt-newsletter-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.qt-placeholder {
	border: 1px dashed var(--qt-line); border-radius: 12px; padding: 16px 20px;
	font-size: 14px; color: var(--qt-muted); background: var(--qt-surface);
}

/* ---------- Article ---------- */
.qt-single-grid { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.qt-article { flex: 999 1 640px; min-width: 0; max-width: 760px; }
.qt-aside { flex: 1 1 280px; min-width: 0; position: sticky; top: 24px; }

.qt-crumbs { font-size: 13px; color: var(--qt-muted); margin-bottom: 18px; }
.qt-crumbs a { color: var(--qt-muted); text-decoration: none; }
.qt-crumbs a:hover { color: var(--qt-accent); }
.qt-article-title { margin: 10px 0 0; font-size: clamp(30px, 4.5vw, 44px); line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
.qt-article-dek { margin: 14px 0 0; font-size: 20px; line-height: 1.5; color: var(--qt-muted); }
.qt-byline-row {
	margin-top: 24px; padding: 16px 0; border-top: 1px solid var(--qt-line); border-bottom: 1px solid var(--qt-line);
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.qt-byline { display: flex; align-items: center; gap: 12px; }
.qt-avatar { border-radius: 50%; display: block; }
.qt-byline-name { font-size: 15px; font-weight: 700; }
.qt-byline-name a { color: var(--qt-text); text-decoration: none; }
.qt-share { display: flex; flex-wrap: wrap; gap: 8px; }
.qt-cover { margin: 28px 0 0; }
.qt-cover .qt-img { display: block; width: 100%; height: auto; border-radius: var(--qt-radius); }
.qt-cover figcaption { margin-top: 8px; font-size: 13px; color: var(--qt-muted); }

.qt-body { margin-top: 28px; font-family: var(--qt-serif); font-size: 19px; line-height: 1.75; color: var(--qt-text); }
.qt-body > * { max-width: 100%; }
.qt-body p { margin: 0 0 1.1em; }
.qt-body h2, .qt-body h3, .qt-body h4 { font-family: var(--qt-sans); font-weight: 800; letter-spacing: -0.01em; line-height: 1.3; margin: 1.8em 0 0.5em; }
.qt-body h2 { font-size: 26px; }
.qt-body h3 { font-size: 21px; }
.qt-body ul, .qt-body ol { padding-left: 1.3em; }
.qt-body li { margin-bottom: 0.4em; }
.qt-body a { text-decoration: underline; text-underline-offset: 2px; }
.qt-body blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--qt-accent); color: var(--qt-muted); font-style: italic; }
.qt-body figure { margin: 1.5em 0; }
.qt-body img { border-radius: 12px; }
.qt-body figcaption { font-family: var(--qt-sans); font-size: 13px; color: var(--qt-muted); }
.qt-body table { border-collapse: collapse; width: 100%; font-family: var(--qt-sans); font-size: 15px; }
.qt-body th, .qt-body td { border-bottom: 1px solid var(--qt-line); padding: 10px 8px; text-align: left; }

/* Key points and Tips boxes (Group block styles) */
.is-style-qt-key-points, .is-style-qt-tips {
	font-family: var(--qt-sans); font-size: 17px; line-height: 1.55;
	border-radius: var(--qt-radius); padding: 22px 26px !important; margin: 1.6em 0;
}
.is-style-qt-key-points { background: var(--qt-accent-soft); }
.is-style-qt-tips { background: var(--qt-surface); border: 1px solid var(--qt-line); }
.is-style-qt-key-points > :first-child, .is-style-qt-tips > :first-child { margin-top: 0; }
.is-style-qt-key-points > :last-child, .is-style-qt-tips > :last-child { margin-bottom: 0; }
.qt-body .is-style-qt-key-points h2, .qt-body .is-style-qt-key-points h3, .is-style-qt-key-points .qt-box-title {
	font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--qt-accent); margin: 0 0 10px;
}
.qt-body .is-style-qt-tips h2, .qt-body .is-style-qt-tips h3 { font-size: 20px; margin: 0 0 10px; }

.qt-article-foot { margin-top: 32px; }
.qt-disclosure { font-size: 14px; line-height: 1.6; color: var(--qt-muted); border-top: 1px solid var(--qt-line); padding-top: 18px; margin: 0; }
.qt-author-box {
	margin-top: 24px; display: flex; gap: 16px; align-items: flex-start; padding: 22px;
	border-radius: var(--qt-radius); background: var(--qt-surface); border: 1px solid var(--qt-line);
}
.qt-author-name { font-size: 17px; font-weight: 800; color: var(--qt-text); text-decoration: none; }
.qt-author-box p { margin: 4px 0 0; font-size: 15px; line-height: 1.55; color: var(--qt-muted); }

.qt-related { border-top: 2px solid var(--qt-text); padding-top: 16px; }

/* ---------- Archives, search, pages ---------- */
.qt-archive-head { margin-bottom: 8px; }
.qt-archive-title { margin: 0 0 8px; font-size: clamp(28px, 4vw, 38px); font-weight: 800; letter-spacing: -0.02em; }
.qt-archive-desc { color: var(--qt-muted); max-width: 720px; }
.qt-list .qt-card-title { font-size: 20px; }
.qt-empty { color: var(--qt-muted); }
.qt-pagination ul { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.qt-pagination a, .qt-pagination span {
	display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px;
	border-radius: 999px; border: 1px solid var(--qt-line); text-decoration: none; color: var(--qt-text); font-weight: 700; box-sizing: border-box;
}
.qt-pagination .current { background: var(--qt-accent); border-color: var(--qt-accent); color: var(--qt-on-accent); }

.qt-page { max-width: 760px; }
.qt-page .wp-block-post-title { font-size: clamp(30px, 4.5vw, 42px); margin: 0 0 24px; }
.qt-page .wp-block-post-content { font-family: var(--qt-sans); font-size: 17px; line-height: 1.7; }

/* ---------- Footer ---------- */
.qt-footer { margin-top: 64px; border-top: 1px solid var(--qt-line); background: var(--qt-surface); }
.qt-footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; padding-top: 40px; padding-bottom: 24px; }
.qt-footer-about { flex: 1 1 280px; }
.qt-footer-about p { margin: 12px 0 0; font-size: 14px; line-height: 1.55; color: var(--qt-muted); max-width: 380px; }
.qt-footer-nav { flex: 2 1 420px; }
.qt-footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 28px; }
.qt-footer-menu a { display: inline-flex; min-height: 40px; align-items: center; font-size: 14px; font-weight: 600; color: var(--qt-text); text-decoration: none; }
.qt-footer-menu a:hover { color: var(--qt-accent); }
.qt-copy { padding-bottom: 32px; font-size: 13px; color: var(--qt-muted); }

/* ---------- Phones ---------- */
@media (max-width: 640px) {
	.qt-container { padding-left: 16px; padding-right: 16px; }
	.qt-brand-wrap { padding-top: 18px; }
	.qt-brand .qt-mark { width: 40px; height: 40px; }
	.qt-brand-name { font-size: 24px; }
	.qt-nav { margin-top: 14px; }
	.qt-main { gap: 36px; padding-top: 20px; }
	.qt-sixty, .qt-newsletter { padding: 20px; }
	.qt-article-dek { font-size: 18px; }
	.qt-body { font-size: 18px; }
	.qt-aside { position: static; }
}

@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; transition: none !important; }
}

/* Our flex layouts control spacing, not the block "flow" margins */
.qt-main > *, .qt-home-row > *, .qt-single-grid > *, .qt-article > *, .qt-aside > * { margin-block-start: 0; margin-block-end: 0; }
.qt-article > .qt-body { margin-top: 28px; }
.qt-page > * + * { margin-block-start: 1.25rem; }
