/*!
 * US Web theme — minimal, mobile-first.
 * Colour variables can be changed in Appearance → Customize → US Web.
 */

:root {
	--usw-primary: #2563eb;
	--usw-accent: #e11d48;
	--usw-desk: #f4f1ea;
	--usw-ink: #1d2433;
	--usw-muted: #5d6779;
	--usw-paper: #fffdf7;
	--usw-line: #e7e2d6;
	--usw-shadow: 0 1px 2px rgba(29, 36, 51, 0.06), 0 6px 18px -6px rgba(29, 36, 51, 0.18);
	--usw-max: 1180px;
	--usw-gutter: 16px;
	--usw-tabbar-h: 64px;
	--usw-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }

body {
	margin: 0;
	background-color: var(--usw-desk);
	background-image: radial-gradient(rgba(29, 36, 51, 0.07) 1px, transparent 1px);
	background-size: 18px 18px;
	color: var(--usw-ink);
	font-family: var(--usw-font);
	font-size: 17px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

a { color: var(--usw-primary); text-underline-offset: 0.15em; }
a:hover { color: color-mix(in srgb, var(--usw-primary) 75%, black); }

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; color: var(--usw-ink); }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--usw-primary) 55%, white); outline-offset: 2px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.skip-link:focus {
	position: fixed !important;
	top: 8px;
	left: 8px;
	z-index: 100000;
	width: auto;
	height: auto;
	clip: auto;
	padding: 10px 16px;
	border-radius: 999px;
	background: #fff;
	box-shadow: var(--usw-shadow);
}

/* Buttons (also styled by the plugin; kept here so the theme stands alone) */
.usw-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4em;
	min-height: 46px;
	padding: 0.65em 1.2em;
	border: 2px solid var(--usw-primary);
	border-radius: 999px;
	background: var(--usw-primary);
	color: #fff !important;
	font: inherit;
	font-weight: 700;
	text-decoration: none !important;
	cursor: pointer;
}
.usw-btn--ghost { background: transparent; color: var(--usw-primary) !important; }

/* ---------- Header ---------- */
.usw-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: color-mix(in srgb, var(--usw-desk) 82%, transparent);
	-webkit-backdrop-filter: saturate(1.4) blur(12px);
	backdrop-filter: saturate(1.4) blur(12px);
	border-bottom: 1px solid rgba(29, 36, 51, 0.08);
}
.admin-bar .usw-header { top: 46px; }
@media (min-width: 783px) { .admin-bar .usw-header { top: 32px; } }
@media (max-width: 600px) { .admin-bar .usw-header { top: 0; } }

.usw-header__in {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	max-width: var(--usw-max);
	margin: 0 auto;
	padding: 8px var(--usw-gutter);
	min-height: 60px;
}
.usw-brand {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	color: var(--usw-ink) !important;
	text-decoration: none !important;
	font-weight: 900;
	font-size: 1.3rem;
	letter-spacing: -0.03em;
}
.usw-brand__mark {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 11px;
	background: linear-gradient(135deg, var(--usw-accent) 0 50%, var(--usw-primary) 50% 100%);
	color: #fff;
	font-size: 1.05rem;
	box-shadow: var(--usw-shadow);
	transform: rotate(-6deg);
}
.custom-logo-link img { max-height: 44px; width: auto; display: block; }

.usw-header__tools { display: flex; gap: 6px; }
.usw-iconbtn {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 14px;
	background: #fff;
	color: var(--usw-ink);
	box-shadow: var(--usw-shadow);
	cursor: pointer;
}
.usw-iconbtn[aria-expanded="true"] { background: var(--usw-ink); color: #fff; }

.usw-searchbar,
.usw-drawer {
	max-width: var(--usw-max);
	margin: 0 auto;
	padding: 0 var(--usw-gutter) 14px;
}
.usw-searchbar form {
	display: flex;
	gap: 8px;
	padding: 6px 6px 6px 16px;
	border-radius: 999px;
	background: #fff;
	box-shadow: var(--usw-shadow);
}
.usw-searchbar input {
	flex: 1;
	min-width: 0;
	border: 0;
	outline: 0;
	font: inherit;
	font-size: 16px;
	background: transparent;
}
.usw-searchbar button,
.usw-homesearch button {
	border: 0;
	border-radius: 999px;
	padding: 0 18px;
	min-height: 44px;
	background: var(--usw-ink);
	color: #fff;
	font: inherit;
	font-weight: 800;
	cursor: pointer;
}

.usw-drawer { animation: usw-drop 0.18s ease-out; }
@keyframes usw-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.usw-menu { list-style: none; margin: 0; padding: 6px; border-radius: 20px; background: #fff; box-shadow: var(--usw-shadow); }
.usw-menu li { margin: 0; }
.usw-menu a {
	display: block;
	padding: 13px 14px;
	border-radius: 14px;
	color: var(--usw-ink);
	font-weight: 800;
	font-size: 1.05rem;
	text-decoration: none;
}
.usw-menu a:hover,
.usw-menu .current-menu-item > a { background: var(--usw-desk); }
.usw-menu .sub-menu { list-style: none; margin: 0 0 6px 12px; padding: 0; }
.usw-menu .sub-menu a { font-weight: 600; font-size: 0.98rem; padding: 9px 14px; }
.usw-drawer__acct { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }

/* ---------- Layout ---------- */
.usw-site-content { min-height: 60vh; }
.usw-main,
.usw-page {
	max-width: var(--usw-max);
	margin: 0 auto;
	padding: 16px var(--usw-gutter) 40px;
}
.usw-main--bleed { max-width: none; padding: 0; }
.usw-elementor .usw-main--bleed { padding-bottom: 0; }

.usw-pagehead { margin: 8px 0 16px; }
.usw-pagehead__k { margin: 0 0 4px; color: var(--usw-muted); font-weight: 700; font-size: 0.85rem; }
.usw-pagehead__t { margin: 0; font-size: clamp(1.8rem, 7vw, 2.6rem); font-weight: 900; letter-spacing: -0.03em; }
.usw-pagehead__d { color: var(--usw-muted); }

.usw-page-plain,
.usw-article { max-width: 760px; margin: 0 auto; }
.usw-entry { overflow-wrap: break-word; }
.usw-entry > *:first-child { margin-top: 0; }
.usw-entry p,
.usw-entry li { line-height: 1.65; }
.usw-entry .alignwide { max-width: 1000px; }
.usw-entry .alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; }
.usw-entry img { border-radius: 14px; }
.usw-article__img { margin: 0 0 16px; }
.usw-article__img img { width: 100%; border-radius: 22px; box-shadow: var(--usw-shadow); }

/* Pages whose content is the plugin's directory/join/dashboard need width */
.usw-page-plain:has(.usw-directory),
.usw-page-plain:has(.usw-states),
.usw-page-plain:has(.usw-plans),
.usw-page-plain:has(.usw-dash) { max-width: none; }

/* Posts as index cards */
.usw-postlist { display: grid; gap: 14px; }
@media (min-width: 700px) { .usw-postlist { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .usw-postlist { grid-template-columns: repeat(3, 1fr); } }
.usw-postcard__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	border-radius: 18px;
	overflow: hidden;
	background: var(--usw-paper);
	box-shadow: var(--usw-shadow);
	color: var(--usw-ink) !important;
	text-decoration: none !important;
	border-top: 6px solid var(--usw-primary);
	transition: transform 0.15s ease;
}
.usw-postcard__link:hover { transform: translateY(-3px); }
.usw-postcard__img img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.usw-postcard__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 14px 16px 16px;
	background-image: repeating-linear-gradient(to bottom, transparent 0 27px, rgba(37, 99, 235, 0.075) 27px 28px);
}
.usw-postcard__date { color: var(--usw-muted); font-size: 0.82rem; font-weight: 700; }
.usw-postcard__title { font-weight: 900; font-size: 1.15rem; line-height: 1.2; }
.usw-postcard__ex { color: var(--usw-muted); font-size: 0.95rem; }

/* Generic forms (search, comments, login widgets) */
.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1; }
input[type="search"],
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea,
select {
	max-width: 100%;
	font: inherit;
	font-size: 16px;
}
.search-field,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	min-height: 46px;
	padding: 10px 14px;
	border: 2px solid var(--usw-line);
	border-radius: 14px;
	background: #fff;
}
.search-submit,
.comment-form .submit {
	min-height: 46px;
	padding: 0 18px;
	border: 0;
	border-radius: 999px;
	background: var(--usw-primary);
	color: #fff;
	font: inherit;
	font-weight: 800;
	cursor: pointer;
}

.usw-comments { max-width: 760px; margin: 2rem auto 0; }
.usw-comment-list { list-style: none; padding: 0; }
.usw-comment-list .comment-body { padding: 14px; margin-bottom: 10px; border-radius: 16px; background: #fff; box-shadow: var(--usw-shadow); }
.usw-comment-list .avatar { border-radius: 50%; float: left; margin-right: 10px; }

.post-navigation .nav-links { display: grid; gap: 8px; margin: 2rem auto; max-width: 760px; }
.post-navigation a { display: block; padding: 12px 16px; border-radius: 16px; background: #fff; box-shadow: var(--usw-shadow); font-weight: 800; text-decoration: none; }

/* Pagination (posts) */
.usw-pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 1.5rem 0; }
.usw-pagination .page-numbers { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 10px; border-radius: 12px; background: #fff; box-shadow: var(--usw-shadow); font-weight: 800; text-decoration: none; color: var(--usw-ink); }
.usw-pagination .page-numbers.current { background: var(--usw-ink); color: #fff; }

/* ---------- Home ---------- */
.usw-homehero {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 18px;
	margin: 4px 0 8px;
	padding: 24px 18px;
	border-radius: 28px;
	background:
		radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--usw-primary) 22%, transparent), transparent 60%),
		radial-gradient(90% 80% at 0% 100%, color-mix(in srgb, var(--usw-accent) 16%, transparent), transparent 60%),
		var(--usw-paper);
	box-shadow: var(--usw-shadow);
	overflow: hidden;
}
@media (min-width: 860px) {
	.usw-homehero { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: center; padding: 44px 40px; }
	.usw-stats { grid-column: 1 / -1; }
}
.usw-homehero__k { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 800; font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--usw-muted); }
.usw-flagdots { display: inline-flex; gap: 3px; }
.usw-flagdots i { width: 9px; height: 9px; border-radius: 50%; background: var(--usw-accent); }
.usw-flagdots i:nth-child(2) { background: #fff; box-shadow: inset 0 0 0 1.5px var(--usw-line); }
.usw-flagdots i:nth-child(3) { background: var(--usw-primary); }
.usw-homehero__t { margin: 8px 0 10px; font-size: clamp(2.1rem, 9.4vw, 4rem); overflow-wrap: break-word; text-wrap: balance; font-weight: 900; letter-spacing: -0.045em; line-height: 0.98; }
.usw-homehero__d { margin: 0 0 16px; max-width: 46ch; font-size: 1.05rem; color: #3b4456; }

.usw-homesearch {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 6px 6px 14px;
	border-radius: 999px;
	background: #fff;
	box-shadow: var(--usw-shadow), inset 0 0 0 2px var(--usw-line);
	color: var(--usw-muted);
	max-width: 560px;
}
.usw-homesearch:focus-within { box-shadow: var(--usw-shadow), inset 0 0 0 2px var(--usw-primary); }
.usw-homesearch input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: var(--usw-ink); }

.usw-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.usw-quick a {
	padding: 8px 14px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--a) 12%, white);
	color: color-mix(in srgb, var(--a) 80%, black);
	font-weight: 800;
	font-size: 0.92rem;
	text-decoration: none;
	box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--a) 25%, white);
}

.usw-fan { position: relative; height: 190px; margin: 4px auto 0; width: min(300px, 80vw); }
@media (min-width: 860px) { .usw-fan { height: 260px; width: 340px; } }
.usw-fan__card {
	position: absolute;
	inset: 18px 10px auto;
	height: 150px;
	border-radius: 18px;
	background:
		linear-gradient(var(--a), color-mix(in srgb, var(--a) 70%, #ffb703)) top / 100% 44px no-repeat,
		repeating-linear-gradient(to bottom, transparent 0 21px, rgba(37, 99, 235, 0.09) 21px 22px) 0 52px / 100% 100% no-repeat,
		var(--usw-paper);
	box-shadow: 0 2px 4px rgba(29, 36, 51, 0.08), 0 18px 34px -12px rgba(29, 36, 51, 0.35);
	transform: translateX(var(--x)) rotate(var(--r));
	animation: usw-float 6s ease-in-out infinite;
}
@media (min-width: 860px) { .usw-fan__card { height: 200px; inset: 26px 0 auto; } }
.usw-fan__card:nth-child(2) { animation-delay: -2s; top: 34px; }
.usw-fan__card:nth-child(3) { animation-delay: -4s; top: 52px; }
.usw-fan__card b { position: absolute; left: 16px; top: 54px; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: color-mix(in srgb, var(--a) 15%, white); font-size: 1.4rem; box-shadow: 0 0 0 3px #fff; }
.usw-fan__card i { position: absolute; left: 74px; right: 18px; height: 10px; border-radius: 5px; background: rgba(29, 36, 51, 0.12); top: 60px; }
.usw-fan__card i + i { top: 80px; right: 60px; background: rgba(29, 36, 51, 0.07); }
@keyframes usw-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@media (prefers-reduced-motion: reduce) { .usw-fan__card { animation: none; } }

.usw-homehero__copy { min-width: 0; }
.usw-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.usw-stats div { padding: 10px; border-radius: 16px; background: #fff; box-shadow: var(--usw-shadow); text-align: center; }
.usw-stats dt { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--usw-muted); }
.usw-stats dd { margin: 0; font-size: 1.5rem; font-weight: 900; }

.usw-home__block { margin-top: 8px; }
.usw-why { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 700px) { .usw-why { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .usw-why { grid-template-columns: repeat(4, 1fr); } }
.usw-why li {
	padding: 16px;
	border-radius: 18px;
	background: var(--usw-paper);
	box-shadow: var(--usw-shadow);
	border-top: 6px solid var(--a);
	color: var(--usw-muted);
	line-height: 1.45;
}
.usw-why b { display: block; margin-bottom: 4px; color: var(--usw-ink); font-size: 1.05rem; }
.usw-home__cta { text-align: center; margin: 18px 0 0; }

/* 404 */
.usw-404 { text-align: center; padding: 3rem 0; }
.usw-404__card {
	display: inline-block;
	margin: 0 0 1rem;
	padding: 26px 40px;
	border-radius: 18px;
	background: var(--usw-paper);
	box-shadow: var(--usw-shadow);
	border-top: 10px solid var(--usw-accent);
	font-size: 3.4rem;
	font-weight: 900;
	transform: rotate(-4deg);
}

/* ---------- Footer ---------- */
.usw-footer { margin-top: 40px; background: var(--usw-ink); color: #c9d1e1; }
.usw-footer__in { max-width: var(--usw-max); margin: 0 auto; padding: 28px var(--usw-gutter) 30px; text-align: center; }
.usw-footer a { color: #fff; }
.usw-footer__menu ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; list-style: none; margin: 0 0 14px; padding: 0; }
.usw-footer__menu a { font-weight: 700; text-decoration: none; }
.usw-footer__stripe { display: flex; justify-content: center; gap: 4px; margin: 0 0 12px; }
.usw-footer__stripe span { width: 34px; height: 6px; border-radius: 3px; background: var(--usw-accent); }
.usw-footer__stripe span:nth-child(2) { background: #fff; }
.usw-footer__stripe span:nth-child(3) { background: var(--usw-primary); }
.usw-footer__text { margin: 0 0 6px; }
.usw-footer__copy { margin: 0; font-size: 0.85rem; opacity: 0.7; }
.usw-footer__widgets { display: grid; gap: 18px; margin-bottom: 18px; text-align: left; }
@media (min-width: 760px) { .usw-footer__widgets { grid-template-columns: repeat(3, 1fr); } }
.usw-footer .widget-title,
.usw-footer .wp-block-heading { color: #fff; font-size: 1rem; margin: 0 0 6px; }
.usw-footer__widgets ul { list-style: none; margin: 0; padding: 0; }
.usw-footer__widgets li { padding: 3px 0; }

/* ---------- Bottom tab bar (phones) ---------- */
.usw-tabbar { display: none; }
@media (max-width: 899px) {
	body { padding-bottom: calc(var(--usw-tabbar-h) + env(safe-area-inset-bottom)); }
	.usw-tabbar {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 60;
		display: flex;
		justify-content: space-around;
		padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
		background: rgba(255, 255, 255, 0.94);
		-webkit-backdrop-filter: saturate(1.4) blur(14px);
		backdrop-filter: saturate(1.4) blur(14px);
		box-shadow: 0 -1px 0 rgba(29, 36, 51, 0.08), 0 -10px 30px -12px rgba(29, 36, 51, 0.25);
	}
	.usw-tabbar a {
		flex: 1;
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 2px;
		padding: 6px 2px;
		border-radius: 14px;
		color: var(--usw-muted);
		font-size: 0.7rem;
		font-weight: 800;
		text-decoration: none;
		-webkit-tap-highlight-color: transparent;
	}
	.usw-tabbar a.is-on { color: var(--usw-primary); background: color-mix(in srgb, var(--usw-primary) 10%, white); }
	.usw-tabbar svg { width: 24px; height: 24px; }
}
@media print {
	.usw-header, .usw-footer, .usw-tabbar { display: none !important; }
	body { background: #fff; padding: 0; }
}
