/**
 * Main Line Defense: theme stylesheet.
 * Colors and type come from theme.json presets (var(--wp--preset--...)).
 * This file only adds what core blocks can't express on their own.
 */

/* ---------- Page frame ---------- */
.wp-site-blocks > * + * { margin-block-start: 0; }
.ml-main > .alignfull,
.ml-post-content > .alignfull { margin-block-start: 0 !important; }
.ml-post-content:not(:has(> .alignfull:last-child)) { padding-bottom: var(--wp--preset--spacing--60); }
.ml-post-content:not(:has(> .alignfull:first-child)) { padding-top: var(--wp--preset--spacing--40); }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { height: auto; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, .wp-element-button:focus-visible {
	outline: 2px solid var(--wp--preset--color--ivy);
	outline-offset: 2px;
}
.has-ivy-background-color a:focus-visible,
.has-ivy-deep-background-color a:focus-visible,
.has-ivy-background-color .wp-element-button:focus-visible { outline-color: var(--wp--preset--color--parchment); }

/* ---------- Typography helpers ---------- */
.is-style-eyebrow,
p.is-style-eyebrow {
	font-size: var(--wp--preset--font-size--x-small) !important;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	line-height: 1.4;
	color: var(--wp--preset--color--ink-muted);
}
.is-style-eyebrow::after {
	content: "";
	display: block;
	width: 24px;
	height: 1px;
	margin-top: 8px;
	background: var(--wp--preset--color--brass);
}
.is-style-eyebrow.ml-no-rule::after { display: none; }
.has-ivy-background-color .is-style-eyebrow,
.has-ivy-deep-background-color .is-style-eyebrow { color: var(--wp--preset--color--ivy-tint); }

.ml-numeral {
	font-family: var(--wp--preset--font-family--display);
	font-size: 2.75rem !important;
	line-height: 1;
	color: var(--wp--preset--color--ivy);
}
.ml-numeral-lg { font-size: 3.5rem !important; }
.has-ivy-background-color .ml-numeral { color: var(--wp--preset--color--parchment); }

.ml-lead { font-size: var(--wp--preset--font-size--large); line-height: 1.6; }
.ml-muted { color: var(--wp--preset--color--ink-muted); }
.ml-small { font-size: var(--wp--preset--font-size--small); }
.ml-caption { font-size: var(--wp--preset--font-size--x-small); color: var(--wp--preset--color--ink-muted); }
.has-ivy-background-color .ml-muted { color: var(--wp--preset--color--on-ivy-muted); }

.ml-breadcrumb { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--ink-muted); }
.ml-breadcrumb a { color: var(--wp--preset--color--ivy); }

.ml-rule-top { border-top: 1px solid var(--wp--preset--color--brass); padding-top: 24px; }
.ml-rule-top-ivy { border-top: 3px solid var(--wp--preset--color--ivy); padding-top: 16px; }

/* Heading row: big heading left, short note right */
.ml-split-head { align-items: flex-end; }
.ml-split-head > .wp-block-heading { max-width: 640px; margin: 0; }
.ml-split-head > p { max-width: 440px; margin: 0; }

/* ---------- Header ---------- */
.ml-topbar p { margin: 0; letter-spacing: .03em; }
.ml-masthead { border-bottom: 1px solid var(--wp--preset--color--fieldstone); }
.ml-brand { gap: 4px !important; }
.ml-brand .wp-block-site-title { margin: 0; }
.ml-brand .is-style-eyebrow { font-size: 0.75rem !important; margin: 0; }
.ml-brand .is-style-eyebrow::after { display: none; }
.ml-masthead .wp-block-navigation__submenu-container {
	background: var(--wp--preset--color--parchment) !important;
	border: 1px solid var(--wp--preset--color--fieldstone) !important;
	padding: 8px 0;
	min-width: 260px !important;
}
.ml-masthead .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 8px 16px !important; }
.ml-masthead .wp-block-navigation .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--ivy); }
.ml-masthead .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--parchment);
	color: var(--wp--preset--color--ink);
	padding: 32px 24px;
}
.ml-masthead .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { font-size: 1.25rem; }

/* ---------- Buttons ---------- */
.wp-block-button .wp-block-button__link { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }
.wp-block-button.is-style-ghost .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--ivy);
	box-shadow: inset 0 0 0 1.5px var(--wp--preset--color--ivy);
}
.wp-block-button.is-style-ghost .wp-block-button__link:hover {
	background: var(--wp--preset--color--ivy);
	color: var(--wp--preset--color--parchment);
}
.wp-block-button.is-style-on-ivy .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--parchment);
	box-shadow: inset 0 0 0 1.5px var(--wp--preset--color--parchment);
}
.wp-block-button.is-style-on-ivy .wp-block-button__link:hover {
	background: var(--wp--preset--color--parchment);
	color: var(--wp--preset--color--ivy);
}
.ml-btn-block .wp-block-button,
.ml-btn-block .wp-block-button__link { width: 100%; }

/* ---------- Hero ---------- */
.ml-stats { border-top: 1px solid var(--wp--preset--color--brass); padding-top: 24px; }
.ml-stats p { margin: 0; font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--on-ivy-muted); }
.ml-stats strong {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 400;
	font-size: 1.75rem;
	color: var(--wp--preset--color--parchment);
	margin-right: 6px;
}
.ml-fill { margin: 0; height: 100%; }
.ml-fill img { width: 100%; height: 100%; min-height: 360px; object-fit: cover; display: block; }

/* ---------- Ruled charge list (two-line items with arrow) ---------- */
.ml-charge-list { list-style: none; margin: 0; padding: 0; }
.ml-charge-list li {
	position: relative;
	border-top: 1px solid var(--wp--preset--color--fieldstone);
	padding: 18px 32px 18px 0;
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
	color: var(--wp--preset--color--ink-muted);
}
.ml-charge-list li:last-child { border-bottom: 1px solid var(--wp--preset--color--fieldstone); }
.ml-charge-list li a {
	display: block;
	font-family: var(--wp--preset--font-family--serif);
	font-weight: 700;
	font-size: 1.3125rem;
	line-height: 1.3;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}
.ml-charge-list li a::after {
	content: "\2192";
	position: absolute;
	right: 0;
	top: 18px;
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 400;
	color: var(--wp--preset--color--ivy);
}
.ml-charge-list li a:hover { color: var(--wp--preset--color--ivy); text-decoration: underline; }

/* Simple ruled list (brass on ivy, fieldstone on light) */
.ml-ruled { list-style: none; margin: 0; padding: 0; }
.ml-ruled li { border-top: 1px solid var(--wp--preset--color--fieldstone); padding: 12px 0; margin: 0; }
.ml-ruled li:last-child { border-bottom: 1px solid var(--wp--preset--color--fieldstone); }
.has-ivy-background-color .ml-ruled li { border-color: var(--wp--preset--color--brass); }

/* Table of contents */
.ml-toc { list-style: none; margin: 0; padding: 0; font-size: var(--wp--preset--font-size--small); }
.ml-toc li { border-top: 1px solid var(--wp--preset--color--fieldstone); padding: 10px 0; margin: 0; }
.ml-toc li:last-child { border-bottom: 1px solid var(--wp--preset--color--fieldstone); }
.ml-toc a { text-decoration: none; }
.ml-toc a:hover { text-decoration: underline; }
@media (min-width: 782px) { .ml-sticky { position: sticky; top: 24px; } }

/* Pills */
.ml-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.ml-chips a {
	display: inline-block;
	padding: 8px 16px;
	border: 1.5px solid var(--wp--preset--color--ivy);
	border-radius: 999px;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	text-decoration: none;
}
.ml-chips a:hover { background: var(--wp--preset--color--ivy); color: var(--wp--preset--color--parchment); }

/* ---------- Cards ---------- */
.is-style-card,
.ml-card {
	background: var(--wp--preset--color--card);
	border: 1px solid var(--wp--preset--color--fieldstone);
	border-radius: 2px;
	padding: 28px;
}
.ml-card-ivy { border-top: 4px solid var(--wp--preset--color--ivy); }
.ml-outcome {
	font-family: var(--wp--preset--font-family--display);
	font-size: 2.125rem !important;
	line-height: 1.1;
	color: var(--wp--preset--color--ivy);
}
.ml-meta {
	border-top: 1px solid var(--wp--preset--color--fieldstone);
	padding-top: 8px;
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--ink-muted);
}

/* Label / value rows (jurisdiction, attorney facts) */
.ml-facts table { border-collapse: collapse; width: 100%; font-size: var(--wp--preset--font-size--small); }
.ml-facts td { border: 0; border-top: 1px solid var(--wp--preset--color--fieldstone); padding: 10px 0; vertical-align: top; }
.ml-facts td:first-child { color: var(--wp--preset--color--ink-muted); width: 34%; padding-right: 16px; }
.ml-facts tr:last-child td { border-bottom: 1px solid var(--wp--preset--color--fieldstone); }
.ml-facts { margin: 0; }

/* Standard data tables */
.wp-block-table:not(.ml-facts) table { border-collapse: collapse; width: 100%; background: var(--wp--preset--color--card); font-size: var(--wp--preset--font-size--small); }
.wp-block-table:not(.ml-facts) th { background: var(--wp--preset--color--limestone); text-align: left; font-weight: 600; padding: 12px 14px; border: 1px solid var(--wp--preset--color--fieldstone); }
.wp-block-table:not(.ml-facts) td { padding: 12px 14px; border: 1px solid var(--wp--preset--color--fieldstone); vertical-align: top; }
.wp-block-table { overflow-x: auto; }
.wp-block-table thead { border-bottom: 0; }

/* ---------- Quote ---------- */
.wp-block-quote.ml-quote {
	border: 0;
	border-top: 1px solid var(--wp--preset--color--brass);
	padding: 48px 0 0;
}
.wp-block-quote.ml-quote > p { max-width: 880px; }
.wp-block-quote.ml-quote p {
	font-family: var(--wp--preset--font-family--serif);
	font-style: italic;
	font-size: clamp(1.5rem, 2.6vw, 1.875rem);
	line-height: 1.4;
}
.wp-block-quote.ml-quote cite {
	display: block;
	margin-top: 16px;
	font-style: normal;
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--ink-muted);
}
.wp-block-quote.ml-pull { border: 0; padding: 0; margin: 8px 0; }
.wp-block-quote.ml-pull p {
	font-family: var(--wp--preset--font-family--serif);
	font-style: italic;
	font-size: 1.625rem;
	line-height: 1.4;
	color: var(--wp--preset--color--ivy);
}

/* ---------- Separator ---------- */
.wp-block-separator { border: 0; border-top: 1px solid var(--wp--preset--color--brass); opacity: 1; background: none; }

/* ---------- FAQ (details) ---------- */
.wp-block-details { border-top: 1px solid var(--wp--preset--color--fieldstone); padding: 16px 0; margin: 0 !important; }
.wp-block-details + .wp-block-details { border-top: 1px solid var(--wp--preset--color--fieldstone); }
.wp-block-details:last-of-type { border-bottom: 1px solid var(--wp--preset--color--fieldstone); }
.wp-block-details summary { font-weight: 600; cursor: pointer; }
.wp-block-details > *:not(summary) { margin-top: 8px; }

/* ---------- Station line ---------- */
.ml-line { padding-top: 8px; }
.ml-line__stops { list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-between; position: relative; }
.ml-line__stops::before {
	content: "";
	position: absolute;
	left: 7px; right: 7px; top: 6px;
	height: 3px;
	background: var(--wp--preset--color--ivy-tint);
}
.ml-line__stops li { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; position: relative; margin: 0; }
.ml-line__stops li::before {
	content: "";
	width: 15px; height: 15px;
	border-radius: 999px;
	background: var(--wp--preset--color--parchment);
	border: 3px solid var(--wp--preset--color--ivy);
	box-sizing: border-box;
	position: relative;
}
.ml-line__stops a,
.ml-line__stops span {
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	white-space: nowrap;
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}
.ml-line__stops a:hover { color: var(--wp--preset--color--ivy); text-decoration: underline; }
.ml-line__stops li.is-current::before {
	width: 18px; height: 18px;
	margin-top: -1.5px;
	background: var(--wp--preset--color--claret);
	border-color: var(--wp--preset--color--claret);
	box-shadow: 0 0 0 4px var(--wp--preset--color--parchment);
}
.ml-line__stops li.is-current a,
.ml-line__stops li.is-current span { color: var(--wp--preset--color--claret); font-weight: 700; }
@media (max-width: 781px) {
	.ml-line__stops { flex-direction: column; gap: 10px; }
	.ml-line__stops::before { left: 6px; right: auto; top: 6px; bottom: 6px; width: 3px; height: auto; }
	.ml-line__stops li { flex-direction: row; gap: 14px; min-height: 32px; }
	.ml-line__stops li.is-current::before { margin-top: 0; margin-left: -1.5px; }
	.ml-line__stops a, .ml-line__stops span { writing-mode: horizontal-tb; transform: none; font-size: 1rem; }
}

/* ---------- Consultation form ---------- */
.ml-form { display: grid; gap: 16px; }
.ml-form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.ml-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.875rem; font-weight: 600; color: var(--wp--preset--color--ink); }
.ml-form label .ml-req { color: var(--wp--preset--color--claret); }
.ml-form input[type="text"],
.ml-form input[type="tel"],
.ml-form input[type="email"],
.ml-form select,
.ml-form textarea {
	width: 100%;
	box-sizing: border-box;
	font: inherit;
	font-size: 1rem;
	font-weight: 400;
	padding: 12px 14px;
	border: 1.5px solid var(--wp--preset--color--ink-muted);
	border-radius: 2px;
	background: var(--wp--preset--color--card);
	color: var(--wp--preset--color--ink);
}
.ml-form textarea { min-height: 120px; resize: vertical; }
.ml-form__note { margin: 0; font-size: 0.8125rem; color: var(--wp--preset--color--ink-muted); }
.ml-form__submit {
	min-height: 52px;
	width: 100%;
	border: 0;
	border-radius: 2px;
	background: var(--wp--preset--color--claret);
	color: #fff;
	font: inherit;
	font-weight: 600;
	font-size: 1rem;
	cursor: pointer;
}
.ml-form__submit:hover { background: var(--wp--preset--color--claret-deep); }
.ml-form__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.ml-form__status { margin: 0 0 4px; padding: 14px 16px; border-radius: 2px; font-weight: 600; }
.ml-form__status--ok { background: #E3EFE6; color: #1E4D2B; border: 1px solid #2F6B3F; }
.ml-form__status--error { background: #F8E5E2; color: #7A1E15; border: 1px solid #A3261B; }
.ml-form-card { color: var(--wp--preset--color--ink); }

/* ---------- Footer ---------- */
.ml-footer a { color: var(--wp--preset--color--parchment); }
.ml-footer a:hover { color: var(--wp--preset--color--ivy-tint); }
.ml-footer .ml-label {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ivy-tint);
	margin: 0 0 4px;
}
.ml-footer ul { list-style: none; padding: 0; margin: 0; }
.ml-footer li { margin: 0 0 8px; }
.ml-footer .ml-fine { color: var(--wp--preset--color--ivy-tint); font-size: var(--wp--preset--font-size--x-small); }
.ml-footer .ml-fine a { color: var(--wp--preset--color--ivy-tint); }

/* ---------- Blog ---------- */
.ml-post-card .wp-block-post-featured-image img { aspect-ratio: 3 / 2; object-fit: cover; }
.ml-post-card .wp-block-post-title a { text-decoration: none; }
.ml-post-card .wp-block-post-title a:hover { text-decoration: underline; }
.wp-block-query-pagination a { text-decoration: none; }

/* ---------- Mobile call bar ---------- */
.ml-callbar { display: none; }
@media (max-width: 781px) {
	.ml-callbar {
		display: flex;
		position: fixed;
		left: 0; right: 0; bottom: 0;
		z-index: 99;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		min-height: 64px;
		box-sizing: border-box;
		padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
		background: var(--wp--preset--color--claret);
		color: #fff !important;
		text-decoration: none !important;
		font-weight: 600;
		font-size: 1rem;
		line-height: 1.25;
	}
	.ml-callbar small { display: block; font-weight: 400; font-size: 0.8125rem; }
	body { padding-bottom: 64px; }
	.ml-hide-mobile { display: none !important; }
	.ml-fill img { min-height: 0; height: 320px; }
	.ml-hero-copy { padding-top: 48px !important; padding-bottom: 40px !important; }
	.ml-form-card { padding: 22px !important; }
	.ml-ivy-card { padding: 22px !important; }
}
@media (min-width: 782px) {
	.ml-hide-desktop { display: none !important; }
}


/* ---------- Small pieces ---------- */
.ml-measure { max-width: 680px; }
.ml-more a { font-weight: 600; }
.ml-step-title { font-size: 1.125rem; margin-top: 8px; }
.ml-court-area { font-family: var(--wp--preset--font-family--serif); font-weight: 700; font-size: 1.375rem; line-height: 1.3; }
.ml-aside-title { font-family: var(--wp--preset--font-family--serif); font-size: 1.375rem; line-height: 1.3; margin: 0; }
.ml-ivy-card .ml-aside-title { max-width: 440px; }
.ml-hairline-bottom { border-bottom: 1px solid var(--wp--preset--color--fieldstone); }
.ml-prevnext { margin: 0; line-height: 1.3; }
.ml-prevnext a { font-family: var(--wp--preset--font-family--serif); font-size: 1.75rem; text-decoration: none; color: var(--wp--preset--color--ink); }
.ml-prevnext a:hover { color: var(--wp--preset--color--ivy); text-decoration: underline; }
.ml-prevnext-next { text-align: right; margin-left: auto; }
.ml-pn-label { font-size: 0.8125rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--wp--preset--color--ink-muted); }
.ml-callpanel { gap: 0 !important; border-radius: 2px; }
.ml-callpanel p { margin: 0; }
.ml-callpanel-label { font-size: 0.8125rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.ml-callpanel-number { font-family: var(--wp--preset--font-family--display); font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.15; }
.ml-callpanel-number a { text-decoration: none; }
.wp-block-quote.ml-quote.ml-quote-sm { padding-top: 24px; }
.wp-block-quote.ml-quote.ml-quote-sm p { font-size: 1.25rem; line-height: 1.5; }
.ml-byline { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--ink-muted); border-top: 1px solid var(--wp--preset--color--brass); border-bottom: 1px solid var(--wp--preset--color--brass); padding: 12px 0; }
.ml-byline .wp-block-post-author-name { font-weight: 600; color: var(--wp--preset--color--ink); }
.ml-search { max-width: 560px; }
.ml-search .wp-block-search__input { border: 1.5px solid var(--wp--preset--color--ink-muted); border-radius: 2px; padding: 12px 14px; font-size: 1rem; background: var(--wp--preset--color--card); }
.ml-search .wp-block-search__button { background: var(--wp--preset--color--ivy); color: var(--wp--preset--color--parchment); border: 0; border-radius: 2px; padding: 0 20px; margin-left: 8px; }
.ml-footer-name { font-family: var(--wp--preset--font-family--display); font-size: 1.75rem; line-height: 1.1; }
.ml-footer-phone { font-size: 1.25rem; font-weight: 700; }
.ml-footer-phone a { text-decoration: none; }
.ml-footer .ml-label-spaced { margin-top: 16px !important; }
.ml-town-links { line-height: 1.9; }
.ml-header-row { row-gap: 12px; }
.ml-stats { row-gap: 8px !important; }

/* Hero columns: photo column runs edge to edge of the band */
.ml-hero .wp-block-columns { margin-bottom: 0; }

@media (max-width: 781px) {
	.ml-split-head { align-items: flex-start; }
	.ml-prevnext a { font-size: 1.375rem; }
	.ml-sticky { position: static; }
}

/* Breathing room above headings that follow other content in a column */
.wp-block-column > .wp-block-heading:not(:first-child),
.ml-post-body > .wp-block-heading:not(:first-child) { margin-top: 2.75rem; }
.wp-block-column > .wp-block-quote.ml-pull { margin-top: 1.5rem; margin-bottom: 0.5rem; }

/* Charge page sources list */
.ml-sources { font-size: var(--wp--preset--font-size--small); padding-left: 1.2em; margin: 0; }
.ml-sources li { margin: 0 0 6px; }
.ml-sources a { overflow-wrap: anywhere; }
.ml-article .wp-block-table td, .ml-article .wp-block-table th { vertical-align: top; }
