/**
 * EquityBankLoan presentation layer.
 *
 * A small site-owned design system that sits on top of GeneratePress rather
 * than replacing it. Everything here is chrome, rhythm and hierarchy. The
 * lender components, calculators and comparison surface keep their own
 * stylesheets and are only nudged for spacing.
 *
 * Palette is sampled from the approved logo artwork, not invented:
 *   navy  #001D49   the wordmark and the house
 *   blue  #0464D4   the "Bank" in the wordmark
 *   green #21AA45   the growth arrow, used sparingly as an accent only
 *
 * No third-party fonts, no framework, no gradients, no decorative shadows.
 */

:root {
	--ebl-navy: #001d49;
	--ebl-navy-700: #0b2a5c;
	--ebl-blue: #0464d4;
	--ebl-blue-dark: #0450ad;
	--ebl-green: #21aa45;

	--ebl-ink: #1b2230;
	--ebl-body: #333c4a;
	--ebl-muted: #5c6675;
	--ebl-line: #e0e5ec;
	--ebl-line-soft: #edf0f4;
	--ebl-surface: #ffffff;
	--ebl-surface-alt: #f6f8fa;
	--ebl-tint: #f0f5fc;

	--ebl-measure: 800px;
	--ebl-radius: 6px;
	--ebl-radius-lg: 10px;

	--ebl-step-0: 1.0625rem;
	--ebl-step-1: 1.1875rem;
	--ebl-step-2: 1.375rem;
	--ebl-step-3: 1.6875rem;
	--ebl-step-4: 2.0625rem;
	--ebl-step-5: 2.5rem;
}

/* ---------------------------------------------------------------- base */

body {
	color: var(--ebl-body);
	background: var(--ebl-surface-alt);
	font-size: var(--ebl-step-0);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

.site-content {
	padding-top: 0;
}

.inside-article,
.site-main > .page,
.site-main > article {
	background: var(--ebl-surface);
}

.entry-content a,
.site-info a,
.footer-widgets a {
	color: var(--ebl-navy);
	text-decoration: underline;
	text-decoration-color: rgba(4, 100, 212, 0.4);
	text-underline-offset: 2px;
	text-decoration-thickness: 1px;
}

.entry-content a:hover,
.entry-content a:focus-visible {
	color: var(--ebl-blue);
	text-decoration-color: currentColor;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 2px solid var(--ebl-blue);
	outline-offset: 2px;
	border-radius: 3px;
}

/* ------------------------------------------------------- reading measure */

/*
 * Ordinary editorial pages get a readable measure. Data-heavy pages keep the
 * full container, because a comparison table or a lender profile is not prose
 * and squeezing it helps nobody. The body class is set in PHP from what the
 * page actually renders, not from a hardcoded list of slugs.
 */
.ebl-doc .entry-content > *,
.ebl-doc .entry-header > * {
	max-width: var(--ebl-measure);
	margin-left: auto;
	margin-right: auto;
}

.ebl-doc .entry-content > .ebl-calc,
.ebl-doc .entry-content > .ebl-compare,
.ebl-doc .entry-content > .ebl-shock,
.ebl-doc .entry-content > table,
.ebl-doc .entry-content > .wp-block-table {
	max-width: none;
}

/* Data pages: let the components breathe, but never the prose. */
.ebl-wide .entry-content > p,
.ebl-wide .entry-content > ul,
.ebl-wide .entry-content > ol,
.ebl-wide .entry-content > h2,
.ebl-wide .entry-content > h3,
.ebl-wide .entry-content > h4,
.ebl-wide .entry-content > blockquote {
	max-width: var(--ebl-measure);
}

/* --------------------------------------------------------- typography */

.entry-content h1,
.entry-title,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
	color: var(--ebl-ink);
	line-height: 1.22;
	letter-spacing: -0.011em;
	font-weight: 650;
}

.entry-title {
	font-size: var(--ebl-step-5);
	margin-bottom: 0.6em;
}

.entry-content h2 {
	font-size: var(--ebl-step-4);
	margin-top: 2.2em;
	margin-bottom: 0.55em;
	padding-top: 1.6rem;
	border-top: 1px solid var(--ebl-line-soft);
}

.entry-content h2:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

.entry-content h3 {
	font-size: var(--ebl-step-3);
	margin-top: 1.9em;
	margin-bottom: 0.5em;
}

.entry-content h4 {
	font-size: var(--ebl-step-2);
	margin-top: 1.7em;
	margin-bottom: 0.45em;
}

.entry-content p {
	margin-bottom: 1.15em;
}

/* The opening paragraph of an editorial page carries the summary. */
.ebl-doc .entry-content > p:first-of-type {
	font-size: var(--ebl-step-2);
	line-height: 1.5;
	color: var(--ebl-ink);
}

.entry-content ul,
.entry-content ol {
	margin-bottom: 1.3em;
	padding-left: 1.35em;
}

.entry-content li {
	margin-bottom: 0.45em;
}

.entry-content strong {
	color: var(--ebl-ink);
	font-weight: 650;
}

.entry-content blockquote {
	border-left: 3px solid var(--ebl-line);
	padding: 0.15rem 0 0.15rem 1.15rem;
	margin-left: 0;
	color: var(--ebl-muted);
	font-style: normal;
}

/* ------------------------------------------------------------- header */

.site-header {
	background: var(--ebl-surface);
	border-bottom: 1px solid var(--ebl-line);
}

.site-header .inside-header {
	padding-top: 1.1rem;
	padding-bottom: 1.1rem;
	display: flex;
	align-items: center;
	gap: 2rem;
}

.site-logo {
	margin: 0;
	flex: 0 0 auto;
	line-height: 0;
}

/*
 * The header is sized around the logo rather than the logo squeezed into a
 * header. The artwork is a 5.3:1 lockup, so height drives it.
 */
.site-logo img,
.site-header .header-image {
	width: auto;
	height: 58px;
	max-height: 58px;
}

.main-navigation {
	margin-left: auto;
	background: transparent;
}

.main-navigation .inside-navigation {
	padding: 0;
}

/* ------------------------------------------------------------- navigation */

.main-navigation .main-nav > ul {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 0.15rem;
}

.main-navigation .main-nav ul li a {
	color: var(--ebl-ink);
	font-size: 0.975rem;
	font-weight: 550;
	line-height: 1.2;
	padding: 0.6rem 0.85rem;
	border-radius: var(--ebl-radius);
	white-space: nowrap;
	transition: background-color 0.12s ease, color 0.12s ease;
}

.main-navigation .main-nav > ul > li > a:hover,
.main-navigation .main-nav > ul > li:hover > a,
.main-navigation .main-nav > ul > li:focus-within > a {
	background: var(--ebl-tint);
	color: var(--ebl-navy);
}

.main-navigation .main-nav > ul > li.current-menu-item > a,
.main-navigation .main-nav > ul > li.current-menu-ancestor > a,
.main-navigation .main-nav > ul > li.current-menu-parent > a {
	background: var(--ebl-tint);
	color: var(--ebl-navy);
	box-shadow: inset 0 -2px 0 0 var(--ebl-blue);
}

/* Shallow dropdowns. One level, card styled, no mega menu. */
.main-navigation ul ul {
	background: var(--ebl-surface);
	border: 1px solid var(--ebl-line);
	border-radius: var(--ebl-radius-lg);
	box-shadow: 0 6px 20px rgba(0, 29, 73, 0.09);
	padding: 0.35rem;
	min-width: 232px;
	top: calc(100% + 2px);
}

.main-navigation ul ul li a {
	padding: 0.55rem 0.7rem;
	font-weight: 500;
	white-space: normal;
	line-height: 1.35;
}

.main-navigation ul ul li a:hover,
.main-navigation ul ul li:focus-within > a {
	background: var(--ebl-tint);
	color: var(--ebl-navy);
}

.main-navigation ul ul li.current-menu-item > a {
	color: var(--ebl-navy);
	box-shadow: inset 2px 0 0 0 var(--ebl-blue);
}

.main-navigation .dropdown-menu-toggle {
	padding-left: 0.3rem;
	padding-right: 0;
}

/* ------------------------------------------------------- mobile header */

.menu-toggle {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--ebl-ink);
	padding: 0.7rem 0.9rem;
	min-height: 44px;
}

@media (max-width: 768px) {
	.site-header .inside-header {
		padding-top: 0.75rem;
		padding-bottom: 0.75rem;
		gap: 0.75rem;
	}

	.site-logo img,
	.site-header .header-image {
		height: 42px;
		max-height: 42px;
	}

	.main-navigation .main-nav > ul {
		display: block;
	}

	.main-navigation .main-nav ul li {
		border-bottom: 1px solid var(--ebl-line-soft);
	}

	.main-navigation .main-nav ul li:last-child {
		border-bottom: 0;
	}

	.main-navigation .main-nav ul li a {
		padding: 0.95rem 1rem;
		min-height: 48px;
		display: flex;
		align-items: center;
		border-radius: 0;
		white-space: normal;
	}

	/* A tap target the size of a fingertip, not a chevron. */
	.main-navigation .dropdown-menu-toggle {
		padding: 0.95rem 1.1rem;
		min-width: 52px;
		min-height: 48px;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.main-navigation ul ul {
		box-shadow: none;
		border: 0;
		border-radius: 0;
		padding: 0;
		background: var(--ebl-surface-alt);
		min-width: 0;
	}

	.main-navigation ul ul li a {
		padding-left: 1.9rem;
	}

	.main-navigation .main-nav > ul > li.current-menu-item > a,
	.main-navigation .main-nav > ul > li.current-menu-ancestor > a {
		box-shadow: inset 3px 0 0 0 var(--ebl-blue);
	}
}

/* --------------------------------------------------------- content card */

.ebl-doc .site-main > .page,
.ebl-doc .site-main > article,
.ebl-wide .site-main > .page,
.ebl-wide .site-main > article {
	border: 1px solid var(--ebl-line);
	border-radius: var(--ebl-radius-lg);
}

.separate-containers .inside-article {
	padding: 2.6rem 2.2rem 2.8rem;
}

@media (max-width: 768px) {
	.separate-containers .inside-article {
		padding: 1.6rem 1.15rem 1.9rem;
	}
}

/* ---------------------------------------------------------- components */

/* Generic content tables. Component tables keep their own styling. */
.entry-content > table,
.entry-content > .wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.97rem;
}

.entry-content > .wp-block-table {
	overflow-x: auto;
}

.entry-content > table th,
.entry-content > .wp-block-table th {
	background: var(--ebl-surface-alt);
	color: var(--ebl-ink);
	font-weight: 620;
	text-align: left;
}

.entry-content > table th,
.entry-content > table td,
.entry-content > .wp-block-table th,
.entry-content > .wp-block-table td {
	border: 1px solid var(--ebl-line);
	padding: 0.6rem 0.75rem;
	vertical-align: top;
}

/* Disclosures. The site uses details/summary for progressive disclosure. */
.entry-content details,
.ebl-disclose {
	border: 1px solid var(--ebl-line);
	border-radius: var(--ebl-radius);
	background: var(--ebl-surface);
}

.entry-content summary,
.ebl-disclose__summary {
	cursor: pointer;
	font-weight: 580;
	color: var(--ebl-navy);
	min-height: 44px;
	display: flex;
	align-items: center;
}

.entry-content summary:hover,
.ebl-disclose__summary:hover {
	background: var(--ebl-tint);
}

/* Buttons, used sparingly. */
/*
 * Only real buttons. `.ebl-compare__submit` and `.ebl-shock__submit` are
 * wrappers with a button inside, so styling them as buttons paints a navy
 * band across the form. Found in review, on the payment shock page.
 */
.entry-content .wp-block-button__link,
button.ebl-calc__submit,
.ebl-compare__submit button,
.ebl-shock__submit button {
	background: var(--ebl-navy);
	color: #fff;
	border: 1px solid var(--ebl-navy);
	border-radius: var(--ebl-radius);
	font-weight: 600;
	padding: 0.7rem 1.15rem;
	min-height: 44px;
	text-decoration: none;
	cursor: pointer;
}

.entry-content .wp-block-button__link:hover,
button.ebl-calc__submit:hover,
.ebl-compare__submit button:hover,
.ebl-shock__submit button:hover {
	background: var(--ebl-navy-700);
	border-color: var(--ebl-navy-700);
	color: #fff;
}

/* Contact form. One plugin, styled to match the rest of the site. */

.entry-content .wpcf7 p {
	margin-bottom: 1.2rem;
}

.entry-content .wpcf7 label {
	display: block;
}

.entry-content .wpcf7 input[type="text"],
.entry-content .wpcf7 input[type="email"],
.entry-content .wpcf7 select {
	width: 100%;
	max-width: 26rem;
	margin-top: 0.35rem;
}

.entry-content .wpcf7 textarea {
	width: 100%;
	max-width: 40rem;
	margin-top: 0.35rem;
}

/*
 * The quiz label is the question itself, so it has to be visible and has to
 * read as a label. Hiding it left a box with no question above it.
 */
.entry-content .wpcf7-quiz-label {
	display: block;
	font-weight: 580;
	color: var(--ebl-ink);
	margin-bottom: 0.35rem;
}

.entry-content .wpcf7-submit {
	background: var(--ebl-navy);
	color: #fff;
	border: 1px solid var(--ebl-navy);
	border-radius: var(--ebl-radius);
	font-weight: 600;
	padding: 0.7rem 1.35rem;
	min-height: 44px;
	cursor: pointer;
	width: auto;
}

.entry-content .wpcf7-submit:hover {
	background: var(--ebl-navy-700);
	border-color: var(--ebl-navy-700);
}

.entry-content .wpcf7-response-output {
	border: 1px solid var(--ebl-line);
	border-left: 3px solid var(--ebl-blue);
	border-radius: var(--ebl-radius);
	padding: 0.85rem 1rem;
	margin: 1.2rem 0 0;
	max-width: 40rem;
}

.entry-content .wpcf7-not-valid-tip {
	color: #a3231d;
	font-size: 0.9rem;
}

/* Form controls across the calculators and the contact form. */
.entry-content input[type="text"],
.entry-content input[type="email"],
.entry-content input[type="number"],
.entry-content input[type="tel"],
.entry-content select,
.entry-content textarea {
	border: 1px solid #c8d0da;
	border-radius: var(--ebl-radius);
	padding: 0.6rem 0.7rem;
	font-size: 1rem;
	min-height: 44px;
	max-width: 100%;
	background: #fff;
	color: var(--ebl-ink);
}

.entry-content textarea {
	min-height: 8rem;
}

.entry-content label {
	font-weight: 580;
	color: var(--ebl-ink);
}

/*
 * Prose inside a data component still has to be readable. The table or the
 * form can use the whole container; the sentences explaining it cannot, or
 * they run to 140 characters a line, which measured at 1070px before this.
 */
.ebl-product > p,
.ebl-compare > p,
.ebl-compare__form > p,
.ebl-compare__intro,
.ebl-compare__privacy,
.ebl-compare__hint,
.ebl-compare__caveat,
.ebl-compare__ordering,
.ebl-compare__scenario,
.ebl-conditions,
.ebl-disclose__body > p,
.ebl-disclose__hint,
.ebl-disclose__foot,
.ebl-evidence > p,
.ebl-evidence__meta,
.ebl-datanote,
.ebl-calc__intro,
.ebl-calc__caption,
.ebl-calc__disclaimer,
.ebl-shock__intro,
.ebl-shock__assumptions,
.ebl-shock__assumptions li,
.ebl-shock__note,
.ebl-lender > p {
	max-width: var(--ebl-measure);
}

/* The lender directory, rendered from published records. */

.ebl-directory__list {
	list-style: none;
	margin: 1.4rem 0 0;
	padding: 0;
	border-top: 1px solid var(--ebl-line);
}

.ebl-directory__item {
	border-bottom: 1px solid var(--ebl-line);
	padding: 0.95rem 0;
	margin: 0;
}

.ebl-directory__name {
	display: block;
	font-size: var(--ebl-step-1);
	font-weight: 620;
}

.ebl-directory__facets {
	display: block;
	margin-top: 0.2rem;
	color: var(--ebl-muted);
	font-size: 0.94rem;
}

/* Component rhythm, spacing only. */
.ebl-calc,
.ebl-compare,
.ebl-shock,
.ebl-lender {
	margin-top: 1.8rem;
	margin-bottom: 1.8rem;
}

/* Attribution block reads as provenance, not as a byline banner. */
.ebl-attribution {
	border-top: 1px solid var(--ebl-line);
	padding-top: 1rem;
	margin-top: 2.2rem;
	color: var(--ebl-muted);
	font-size: 0.925rem;
}

/* Nothing on this site should scroll the page sideways. */
html,
body {
	overflow-x: clip;
}

.entry-content pre,
.entry-content table {
	max-width: 100%;
}

/* -------------------------------------------------------------- footer */

/*
 * GeneratePress paints the footer widget area separately from the footer
 * wrapper, so setting the wrapper alone left light grey text on white.
 */
.site-footer,
.site-footer .footer-widgets,
.site-footer .footer-widgets-container,
.site-footer .inside-footer-widgets {
	background: var(--ebl-navy);
	color: #c8d4e6;
}

.site-footer {
	margin-top: 3rem;
}

.site-footer .footer-widgets {
	padding-top: 2.6rem;
	padding-bottom: 1.8rem;
}

.site-footer .widget {
	color: #c8d4e6;
}

.site-footer .inside-footer-widgets {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 2fr);
	gap: 2.5rem;
}

.site-footer .widget-title,
.site-footer .wp-block-heading {
	color: #fff;
	font-size: 0.82rem;
	font-weight: 650;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	margin-bottom: 0.9rem;
}

.site-footer .footer-widget-1 .menu,
.site-footer .footer-widget-2 .menu {
	list-style: none;
	margin: 0;
	padding: 0;
	columns: 2;
	column-gap: 2rem;
}

.site-footer .menu li {
	margin-bottom: 0.55rem;
	break-inside: avoid;
}

.site-footer a {
	color: #dce5f2;
	text-decoration: none;
	font-size: 0.95rem;
}

.site-footer a:hover,
.site-footer a:focus-visible {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.site-footer p {
	font-size: 0.925rem;
	line-height: 1.6;
	color: #b6c4da;
}

.ebl-footer-brand img {
	height: 40px;
	width: auto;
	margin-bottom: 0.9rem;
	background: #fff;
	border-radius: var(--ebl-radius);
	padding: 0.35rem 0.5rem;
}

.site-info {
	background: var(--ebl-navy);
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	color: #93a4bd;
	font-size: 0.875rem;
}

.site-info .inside-site-info {
	padding-top: 1.1rem;
	padding-bottom: 1.1rem;
}

@media (max-width: 768px) {
	.site-footer .inside-footer-widgets {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.site-footer .footer-widget-1 .menu,
	.site-footer .footer-widget-2 .menu {
		columns: 1;
	}

	.site-footer .menu li {
		margin-bottom: 0.85rem;
	}

	.site-footer .menu li a {
		display: inline-block;
		padding: 0.15rem 0;
		min-height: 32px;
	}
}

/* ------------------------------------------------------ small screens */

@media (max-width: 480px) {
	:root {
		--ebl-step-4: 1.8125rem;
		--ebl-step-5: 2rem;
	}

	.ebl-doc .entry-content > p:first-of-type {
		font-size: 1.1875rem;
	}
}
