:root {
	--qh-bg: #ffffff;
	--qh-text: #1a1a2e;
	--qh-muted: #9a9aad;
	--qh-border: #e6e9f2;
	--qh-card-bg: #ffffff;
}

body.qh-dark {
	--qh-bg: #14141f;
	--qh-text: #f1f1f6;
	--qh-muted: #8a8aa0;
	--qh-border: #2a2a3d;
	--qh-card-bg: #1c1c2b;
}

.qh-site-header,
.qh-site-footer,
.qh-wrap,
.qh-breadcrumb,
.qh-related {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	color: var(--qh-text);
}

/* ---------- Site-wide header ---------- */

.qh-site-header {
	background: var(--qh-bg);
	border-bottom: 1px solid var(--qh-border);
}

.qh-topnav {
	max-width: 1100px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	gap: 16px;
}

.qh-topnav-logo {
	font-weight: 800;
	font-size: 17px;
	color: var(--qh-text) !important;
	text-decoration: none !important;
	white-space: nowrap;
}

.qh-topnav-links {
	display: flex;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
}

.qh-topnav-links > a {
	color: var(--qh-text);
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
}

.qh-topnav-links > a:hover {
	color: #3b6fed;
}

.qh-dropdown {
	position: relative;
}

.qh-dropdown-toggle {
	background: none;
	border: none;
	font: inherit;
	color: var(--qh-text);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	padding: 0;
}

.qh-dropdown-toggle:hover {
	color: #3b6fed;
}

.qh-dropdown-menu {
	display: none;
	position: absolute;
	top: 28px;
	left: 0;
	min-width: 220px;
	max-height: 340px;
	overflow-y: auto;
	background: var(--qh-card-bg);
	border: 1px solid var(--qh-border);
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	padding: 8px;
	z-index: 100;
}

.qh-dropdown.qh-dropdown-open .qh-dropdown-menu {
	display: block;
}

.qh-dropdown-menu a {
	display: block;
	padding: 8px 10px;
	font-size: 13px;
	font-weight: 500;
	color: var(--qh-text);
	text-decoration: none;
	border-radius: 6px;
	white-space: nowrap;
}

.qh-dropdown-menu a:hover {
	background: var(--qh-border);
}

.qh-theme-toggle {
	background: none;
	border: 1px solid var(--qh-border);
	border-radius: 999px;
	width: 34px;
	height: 34px;
	cursor: pointer;
	font-size: 15px;
	flex-shrink: 0;
}

/* ---------- Breadcrumb / back button (auto on every tool page) ---------- */

.qh-breadcrumb {
	max-width: 900px;
	margin: 16px auto 0;
	padding: 0 16px;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 13px;
	color: var(--qh-muted);
}

.qh-breadcrumb a {
	color: var(--qh-muted);
	text-decoration: none;
}

.qh-breadcrumb a:hover {
	color: #3b6fed;
}

.qh-breadcrumb-current {
	color: var(--qh-text);
	font-weight: 600;
}

.qh-back-btn {
	margin-left: auto;
	background: var(--qh-card-bg);
	border: 1px solid var(--qh-border);
	padding: 5px 12px;
	border-radius: 999px;
	font-weight: 600;
	color: var(--qh-text) !important;
}

.qh-back-btn:hover {
	color: #3b6fed !important;
}

/* ---------- Homepage wrapper ---------- */

.qh-wrap {
	max-width: 1100px;
	margin: 0 auto;
	padding: 10px 16px 40px;
	background: var(--qh-bg);
}

.qh-admin-notice {
	background: #fff3cd;
	border: 1px solid #ffe58f;
	color: #7a5c00;
	padding: 12px 16px;
	border-radius: 8px;
	margin-bottom: 16px;
	font-size: 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
}

.qh-admin-notice-btn {
	background: #7a5c00;
	color: #fff !important;
	padding: 6px 14px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none !important;
	white-space: nowrap;
}

.qh-related {
	max-width: 900px;
	margin: 30px auto;
	padding: 20px 16px 0;
	border-top: 1px solid var(--qh-border);
}

.qh-related-title {
	font-size: 17px;
	font-weight: 700;
	margin: 0 0 14px;
	color: var(--qh-text);
}

.qh-section-title {
	font-size: 19px;
	font-weight: 700;
	margin: 30px 0 14px;
	color: var(--qh-text);
}

.qh-hero {
	background: linear-gradient(135deg, #7c3aed, #2563eb, #06b6d4);
	border-radius: 16px;
	padding: 40px 24px;
	text-align: center;
	color: #fff;
	margin-bottom: 24px;
}

.qh-hero-title {
	font-size: 32px;
	font-weight: 800;
	margin: 0 0 8px;
}

.qh-hero-sub {
	font-size: 16px;
	opacity: 0.95;
	margin: 0 0 20px;
}

.qh-badges {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}

.qh-badge {
	background: rgba(255, 255, 255, 0.18);
	padding: 6px 14px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
}

.qh-search {
	width: 100%;
	max-width: 500px;
	display: block;
	margin: 0 auto 32px;
	padding: 14px 18px;
	font-size: 15px;
	border: 2px solid var(--qh-border);
	border-radius: 999px;
	outline: none;
	background: var(--qh-card-bg);
	color: var(--qh-text);
}

.qh-search:focus {
	border-color: #3b6fed;
}

.qh-imei-section {
	margin-bottom: 30px;
}

.qh-imei-card {
	max-width: 480px;
	margin: 0 auto;
	border: 1px solid var(--qh-border);
	border-radius: 14px;
	overflow: hidden;
	background: var(--qh-card-bg);
}

.qh-imei-card-header {
	background: linear-gradient(135deg, #7c3aed, #2563eb, #06b6d4);
	color: #fff;
	text-align: center;
	padding: 28px 20px;
}

.qh-imei-icon {
	font-size: 30px;
	margin-bottom: 6px;
}

.qh-imei-title {
	font-size: 20px;
	font-weight: 800;
}

.qh-imei-subtitle {
	font-size: 13px;
	opacity: 0.9;
	margin-top: 4px;
}

.qh-imei-card-body {
	padding: 20px;
}

.qh-imei-card-body .qcalc-wrap {
	border: none;
	padding: 0;
	background: transparent;
}

/* ---------- Site-wide footer ---------- */

.qh-site-footer {
	background: var(--qh-bg);
	border-top: 1px solid var(--qh-border);
}

.qh-footer {
	max-width: 1100px;
	margin: 0 auto;
	padding: 20px 16px;
	text-align: center;
	font-size: 13px;
	color: var(--qh-muted);
}

.qh-footer-links a {
	color: var(--qh-muted);
	text-decoration: none;
}

.qh-footer-links a:hover {
	color: #3b6fed;
}

.qh-footer-social {
	margin: 8px 0 0;
}

.qh-footer-social a {
	color: var(--qh-muted);
	text-decoration: none;
}

.qh-footer-social a:hover {
	color: #3b6fed;
}

.qh-category {
	margin-bottom: 30px;
	scroll-margin-top: 90px;
}

.qh-category-title {
	line-height: 1.3; /* now an H3 — keep the theme's H3 line-height from leaking in */
	font-size: 19px;
	font-weight: 700;
	color: var(--qh-text);
	margin: 0 0 14px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--qh-border);
	display: flex;
	align-items: center;
	gap: 8px;
}

.qh-count {
	background: #eef2fd;
	color: #3b6fed;
	font-size: 12px;
	font-weight: 700;
	padding: 2px 9px;
	border-radius: 999px;
}

.qh-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 14px;
}

.qh-card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px;
	border: 1px solid var(--qh-border);
	border-radius: 10px;
	background: var(--qh-card-bg);
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.qh-card:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
	transform: translateY(-1px);
}

.qh-card-icon {
	font-size: 26px;
	flex-shrink: 0;
}

.qh-card-body {
	flex: 1;
	min-width: 0;
}

.qh-card-name {
	font-size: 14px;
	font-weight: 700;
	color: var(--qh-text);
	line-height: 1.3;
}

.qh-card-slug {
	font-size: 11px;
	color: var(--qh-muted);
	margin-top: 2px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.qh-card-btn {
	flex-shrink: 0;
	background: #3b6fed;
	color: #fff !important;
	font-size: 13px;
	font-weight: 600;
	padding: 7px 14px;
	border-radius: 999px;
	text-decoration: none !important;
	white-space: nowrap;
}

.qh-card-btn:hover {
	background: #2f5bd0;
}

.qh-card.qh-hidden {
	display: none;
}

@media (max-width: 480px) {
	.qh-hero-title {
		font-size: 24px;
	}
	.qh-grid {
		grid-template-columns: 1fr;
	}
	.qh-topnav-links {
		gap: 12px;
	}
	.qh-topnav-links > a,
	.qh-dropdown-toggle {
		font-size: 12px;
	}
	.qh-topnav-logo {
		font-size: 14px;
	}
	.qh-back-btn {
		margin-left: 0;
	}
}

/* ---------- Ad layout: left/right sidebars + main column ---------- */
.ilt3-layout {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 12px;
}

.ilt3-main {
	flex: 1;
	min-width: 0;
}

.ilt3-sidebar {
	flex: 0 0 160px;
	position: sticky;
	top: 16px;
}

.ilt3-ad-slot {
	margin: 14px auto;
}

.ilt3-ad-placeholder {
	border: 1px dashed #c9c9d8;
	border-radius: 8px;
	text-align: center;
	color: #9a9aad;
	font-size: 12px;
	padding: 14px 8px;
	line-height: 1.5;
}

.ilt3-sidebar .ilt3-ad-placeholder {
	min-height: 500px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Below ~1100px there's no room for real side columns — stack the
   sidebar ads full-width above and below the main content instead of
   hiding them, so every page still shows all 5 ad positions. */
@media (max-width: 1100px) {
	.ilt3-layout {
		flex-direction: column;
	}
	.ilt3-sidebar {
		flex: none;
		width: 100%;
		position: static;
	}
	.ilt3-sidebar .ilt3-ad-placeholder {
		min-height: 0;
	}
}

/* ============================================================
   SEO / accessibility additions
   ============================================================ */

/* Visually-hidden label text — present for screen readers and for
   crawlers reading the form's structure, invisible on screen. Uses the
   clip-path technique rather than display:none, which would hide it from
   assistive tech too. */
.qh-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* The breadcrumb "Back" control is now a <button> instead of an
   <a href="#">. These rules make the button inherit the surrounding
   typography so it renders exactly as the link did. */
button.qh-back-btn {
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
	cursor: pointer;
}

/* The breadcrumb wrapper became a <nav>; it previously relied on the
   .qh-breadcrumb class on a <div>, and the class is unchanged, so this is
   only here to guarantee the flex layout regardless of the element's
   default display. */
nav.qh-breadcrumb {
	display: flex;
}

/* ---------- Homepage explanatory content ---------- */

.qh-about {
	max-width: 820px;
	margin: 44px auto 0;
	padding-top: 28px;
	border-top: 1px solid var(--qh-border);
	color: var(--qh-text);
	line-height: 1.7;
}

.qh-about h2 {
	font-size: 20px;
	font-weight: 700;
	margin: 26px 0 10px;
	color: var(--qh-text);
}

.qh-about h2:first-child {
	margin-top: 0;
}

.qh-about h3 {
	font-size: 16.5px;
	font-weight: 700;
	margin: 18px 0 6px;
	color: var(--qh-text);
	line-height: 1.4;
}

.qh-about p {
	margin: 0 0 14px;
	font-size: 15.5px;
	color: var(--qh-text);
}

@media (max-width: 600px) {
	.qh-about {
		margin-top: 32px;
	}

	.qh-about h2 {
		font-size: 18px;
	}

	.qh-about h3 {
		font-size: 16px;
	}

	.qh-about p {
		font-size: 15px;
	}
}
