/* =========================================================================
   MyAutoTriage — hand-written, dependency-free stylesheet.
   Mobile-first. No framework. No external font/icon requests.
   ========================================================================= */

:root {
	--mat-ink: #142b33;
	--mat-ink-soft: #3f5a63;
	--mat-bg: #ffffff;
	--mat-bg-alt: #f4f8f8;
	--mat-line: #e1e8e8;
	--mat-brand: #0f4c5c;
	--mat-brand-dark: #0a343e;
	--mat-brand-light: #e6f2f2;
	--mat-accent: #d97706;
	--mat-accent-dark: #b45309;
	--mat-success-bg: #eef7ee;
	--mat-success-text: #1e6b33;
	--mat-warn-bg: #fff7ea;
	--mat-warn-text: #92400e;
	--mat-radius: 12px;
	--mat-radius-sm: 8px;
	--mat-shadow: 0 1px 2px rgba(15, 76, 92, 0.06), 0 4px 16px rgba(15, 76, 92, 0.06);
	--mat-max: 1180px;
	--mat-narrow: 780px;
	--mat-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

/* ---- Reset --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--mat-font);
	color: var(--mat-ink);
	background: var(--mat-bg);
	line-height: 1.6;
	font-size: 17px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--mat-brand); text-decoration-thickness: 1px; }
a:hover { color: var(--mat-brand-dark); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; color: var(--mat-ink); font-weight: 700; }
h1 { font-size: clamp(1.8rem, 1.4rem + 1.8vw, 2.7rem); }
h2 { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
button, input, select, textarea { font-family: inherit; font-size: 1rem; }
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.mat-skip-link {
	position: absolute; left: -999px; top: 0; z-index: 999;
	background: var(--mat-brand); color: #fff; padding: .75em 1.2em; border-radius: 0 0 8px 0;
}
.mat-skip-link:focus { left: 0; }

/* ---- Layout ---------------------------------------------------------- */
.mat-container { max-width: var(--mat-max); margin: 0 auto; padding: 0 20px; }
.mat-narrow { max-width: var(--mat-narrow); }
.mat-section { padding: 56px 0; }
.mat-section--alt { background: var(--mat-bg-alt); }
.mat-section__title { text-align: center; margin-bottom: .3em; }
.mat-section__lead { text-align: center; color: var(--mat-ink-soft); max-width: 640px; margin: 0 auto 2em; }
.mat-section__header-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1em; flex-wrap: wrap; margin-bottom: 1.5em; }
.mat-section__header-row .mat-section__title { margin-bottom: 0; text-align: left; }
.mat-link { font-weight: 600; white-space: nowrap; }

/* ---- Buttons ----------------------------------------------------------- */
.mat-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	padding: .7em 1.3em; border-radius: 999px; font-weight: 600; text-decoration: none;
	border: 2px solid transparent; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease;
}
.mat-btn--primary { background: var(--mat-brand); color: #fff; }
.mat-btn--primary:hover { background: var(--mat-brand-dark); color: #fff; }
.mat-btn--ghost { background: transparent; border-color: var(--mat-brand); color: var(--mat-brand); }
.mat-btn--ghost:hover { background: var(--mat-brand-light); }
.mat-btn--accent { background: var(--mat-accent); color: #fff; }
.mat-btn--accent:hover { background: var(--mat-accent-dark); }
.mat-btn--lg { padding: .9em 1.8em; font-size: 1.05rem; }
.mat-btn--block { width: 100%; }
.mat-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---- Header / nav -------------------------------------------------- */
.mat-site-header { border-bottom: 1px solid var(--mat-line); position: sticky; top: 0; background: rgba(255,255,255,.96); backdrop-filter: saturate(180%) blur(6px); z-index: 50; }
.mat-site-header__inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; gap: 1rem; }
.mat-brand { display: flex; align-items: center; gap: .55em; text-decoration: none; }
.mat-brand__text { font-weight: 800; font-size: 1.15rem; color: var(--mat-ink); letter-spacing: -.01em; }
.mat-nav-toggle { display: inline-flex; flex-direction: column; gap: 4px; background: none; border: 0; padding: 8px; cursor: pointer; }
.mat-nav-toggle__bar { width: 22px; height: 2px; background: var(--mat-ink); border-radius: 2px; }
.mat-primary-nav { display: none; width: 100%; }
.mat-primary-nav.is-open { display: block; }
.mat-menu { list-style: none; margin: 0; padding: 16px 0 4px; display: flex; flex-direction: column; gap: 4px; }
.mat-menu li a { display: block; padding: .6em .2em; text-decoration: none; color: var(--mat-ink); font-weight: 600; border-bottom: 1px solid var(--mat-line); }
.mat-menu a[aria-current="page"] { color: var(--mat-brand); }
.mat-menu .sub-menu { list-style: none; padding-left: 1em; }

@media (min-width: 900px) {
	.mat-nav-toggle { display: none; }
	.mat-primary-nav { display: block; width: auto; }
	.mat-menu { flex-direction: row; gap: 1.6em; padding: 0; }
	.mat-menu li a { border-bottom: 0; padding: .4em 0; }
	.mat-site-header__inner { padding: 16px 20px; }
}

/* ---- Breadcrumbs ----------------------------------------------------- */
.mat-breadcrumbs { font-size: .88rem; color: var(--mat-ink-soft); padding: 14px 0 0; }
.mat-breadcrumbs a { color: var(--mat-ink-soft); text-decoration: none; }
.mat-breadcrumbs a:hover { text-decoration: underline; }

/* ---- Hero ------------------------------------------------------------ */
.mat-hero { padding: 64px 0 48px; background: linear-gradient(180deg, var(--mat-brand-light), #fff); text-align: center; }
.mat-hero__title { max-width: 820px; margin: 0 auto .4em; }
.mat-hero__subtitle { max-width: 680px; margin: 0 auto 1.6em; color: var(--mat-ink-soft); font-size: 1.08rem; }
.mat-hero__actions { display: flex; gap: 1em; justify-content: center; flex-wrap: wrap; margin-bottom: 1em; }
.mat-hero__trust { color: var(--mat-ink-soft); font-size: .9rem; }

/* ---- Tool cards -------------------------------------------------------- */
.mat-tool-card-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .mat-tool-card-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .mat-tool-card-grid { grid-template-columns: repeat(3, 1fr); } }

.mat-tool-card {
	display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: var(--mat-ink);
	background: #fff; border: 1px solid var(--mat-line); border-radius: var(--mat-radius); padding: 20px;
	box-shadow: var(--mat-shadow); transition: transform .15s ease, box-shadow .15s ease;
}
.mat-tool-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(15,76,92,.12); }
.mat-tool-card__icon { flex: none; width: 40px; height: 40px; color: var(--mat-brand); }
.mat-tool-card__icon svg { width: 100%; height: 100%; }
.mat-tool-card__title { display: block; font-weight: 700; margin-bottom: .25em; }
.mat-tool-card__excerpt { display: block; font-size: .92rem; color: var(--mat-ink-soft); }
.mat-tool-card__arrow { margin-left: auto; align-self: center; color: var(--mat-brand); font-size: 1.3em; flex: none; }

/* ---- Steps -------------------------------------------------------------- */
.mat-steps { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .mat-steps { grid-template-columns: repeat(3, 1fr); } }
.mat-step { text-align: center; }
.mat-step__number {
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; border-radius: 50%; background: var(--mat-brand); color: #fff;
	font-weight: 800; margin-bottom: .6em;
}

/* ---- Post grid / cards ---------------------------------------------- */
.mat-post-grid { display: grid; gap: 24px; grid-template-columns: 1fr; margin-bottom: 2em; }
@media (min-width: 640px) { .mat-post-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .mat-post-grid { grid-template-columns: repeat(3, 1fr); } }

.mat-post-card { background: #fff; border: 1px solid var(--mat-line); border-radius: var(--mat-radius); overflow: hidden; box-shadow: var(--mat-shadow); display: flex; flex-direction: column; }
.mat-post-card__thumb { display: block; aspect-ratio: 3/2; background: var(--mat-brand-light); overflow: hidden; }
.mat-post-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.mat-post-card__thumb-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--mat-brand); }
.mat-post-card__thumb-fallback svg { width: 44px; height: 44px; }
.mat-post-card__body { padding: 18px; display: flex; flex-direction: column; gap: .4em; flex: 1; }
.mat-post-card__cat { display: inline-block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--mat-brand); text-decoration: none; }
.mat-post-card__title { font-size: 1.08rem; margin: 0; }
.mat-post-card__title a { text-decoration: none; color: var(--mat-ink); }
.mat-post-card__title a:hover { color: var(--mat-brand); }
.mat-post-card__excerpt { color: var(--mat-ink-soft); font-size: .93rem; margin: 0; }
.mat-post-card__meta { margin-top: auto; font-size: .82rem; color: var(--mat-ink-soft); display: flex; gap: .4em; align-items: center; }

/* ---- Single post ------------------------------------------------------ */
.mat-single-post__header { text-align: center; margin: 2em auto 1.2em; }
.mat-single-post__meta { color: var(--mat-ink-soft); font-size: .9rem; display: flex; gap: .4em; justify-content: center; flex-wrap: wrap; }
.mat-single-post__thumb { margin: 0 auto 1.6em; border-radius: var(--mat-radius); overflow: hidden; }
.mat-single-post__content { font-size: 1.06rem; }
.mat-single-post__content h2 { margin-top: 1.6em; }
.mat-single-post__content h3 { margin-top: 1.3em; }
.mat-single-post__content ul, .mat-single-post__content ol { margin-bottom: 1.2em; }
.mat-single-post__content blockquote { margin: 1.4em 0; padding: .6em 1.2em; border-left: 4px solid var(--mat-brand); background: var(--mat-bg-alt); border-radius: 0 8px 8px 0; }
.mat-single-post__content figure { margin: 1.6em 0; }
.mat-single-post__content figcaption { font-size: .85rem; color: var(--mat-ink-soft); text-align: center; margin-top: .5em; }
.mat-single-post__footer { margin: 2em 0; }

/* ---- Related / archive ------------------------------------------------ */
.mat-related { margin: 3em 0; }
.mat-related__grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .mat-related__grid { grid-template-columns: repeat(3, 1fr); } }
.mat-related__card { display: block; text-decoration: none; color: var(--mat-ink); border: 1px solid var(--mat-line); border-radius: var(--mat-radius-sm); overflow: hidden; background: #fff; }
.mat-related__card img { aspect-ratio: 3/2; object-fit: cover; }
.mat-related__title { display: block; padding: 12px 14px; font-weight: 600; font-size: .95rem; }

.mat-archive__header { text-align: center; margin: 2.5em 0 1em; }
.mat-archive__description { color: var(--mat-ink-soft); }

.mat-empty-state { text-align: center; padding: 3em 0; }
.mat-empty-state .mat-search-form { max-width: 480px; margin: 1.5em auto 2.5em; }
.mat-search-form { display: flex; gap: .6em; }
.mat-search-form__field { flex: 1; padding: .7em 1em; border: 1px solid var(--mat-line); border-radius: 999px; }

/* pagination */
.pagination, .navigation.pagination { display: flex; gap: .5em; justify-content: center; margin: 2em 0; flex-wrap: wrap; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 .6em; border-radius: 8px; text-decoration: none; color: var(--mat-ink); border: 1px solid var(--mat-line); }
.pagination .page-numbers.current { background: var(--mat-brand); color: #fff; border-color: var(--mat-brand); }

/* ---- Disclaimer / callouts --------------------------------------------- */
.mat-disclaimer { background: var(--mat-warn-bg); color: var(--mat-warn-text); border: 1px solid #f1d9ab; border-radius: var(--mat-radius-sm); padding: 14px 16px; font-size: .9rem; margin: 1.4em 0; }
.mat-result-box { background: var(--mat-success-bg); color: var(--mat-success-text); border: 1px solid #bfe3c4; border-radius: var(--mat-radius-sm); padding: 18px; margin: 1.2em 0; }
.mat-result-box__figure { font-size: 1.8rem; font-weight: 800; margin: 0 0 .2em; }
.mat-cta { background: var(--mat-brand-light); border-radius: var(--mat-radius); padding: 18px 20px; margin: 1.6em 0; display: flex; gap: 1em; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.mat-cta__title { font-weight: 700; margin: 0; }

/* ---- FAQ ---------------------------------------------------------------- */
.mat-faq { margin: 2.5em 0; }
.mat-faq__item { border: 1px solid var(--mat-line); border-radius: var(--mat-radius-sm); padding: 14px 16px; margin-bottom: 10px; background: #fff; }
.mat-faq__item summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.mat-faq__item summary::-webkit-details-marker { display: none; }
.mat-faq__item summary::after { content: '+'; font-size: 1.3em; color: var(--mat-brand); margin-left: 1em; }
.mat-faq__item[open] summary::after { content: '\2212'; }
.mat-faq__answer p:last-child { margin-bottom: 0; }

/* ---- Forms / calculators ------------------------------------------------ */
.mat-tool { padding: 2.2em 0 4em; }
.mat-tool__intro { text-align: center; max-width: 720px; margin: 0 auto 2em; }
.mat-tool__intro p { color: var(--mat-ink-soft); }
.mat-tool-panel { background: #fff; border: 1px solid var(--mat-line); border-radius: var(--mat-radius); box-shadow: var(--mat-shadow); padding: 24px; margin-bottom: 2em; }
.mat-field { margin-bottom: 1.1em; }
.mat-field label { display: block; font-weight: 600; margin-bottom: .35em; }
.mat-field__hint { display: block; font-size: .82rem; color: var(--mat-ink-soft); margin-top: .3em; }
.mat-field input[type="text"], .mat-field input[type="number"], .mat-field input[type="email"], .mat-field input[type="date"], .mat-field select, .mat-field textarea {
	width: 100%; padding: .65em .8em; border: 1px solid var(--mat-line); border-radius: var(--mat-radius-sm); background: #fff; color: var(--mat-ink);
}
.mat-field textarea { min-height: 90px; resize: vertical; }
.mat-field-row { display: grid; gap: 1em; grid-template-columns: 1fr; }
@media (min-width: 640px) { .mat-field-row { grid-template-columns: 1fr 1fr; } }
.mat-radio-group { display: flex; gap: 1.4em; flex-wrap: wrap; }
.mat-radio-group label { display: inline-flex; align-items: center; gap: .4em; font-weight: 500; }
.mat-tool-actions { display: flex; gap: 1em; flex-wrap: wrap; align-items: center; margin-top: 1.4em; }

/* Letter preview / print */
.mat-letter-preview {
	background: #fff; border: 1px solid var(--mat-line); border-radius: var(--mat-radius);
	padding: 40px; max-width: 720px; margin: 0 auto; font-family: Georgia, 'Times New Roman', serif; line-height: 1.7; white-space: pre-wrap;
}
@media print {
	.mat-site-header, .mat-site-footer, .mat-breadcrumbs, .mat-tool-panel, .mat-tool__intro, .mat-disclaimer, .mat-tool-actions, .mat-cta, .mat-related, .mat-faq { display: none !important; }
	.mat-letter-preview { border: 0; box-shadow: none; padding: 0; }
	body { font-size: 12pt; }
}

/* ---- Data table (state lookups) ----------------------------------------- */
.mat-table-wrap { overflow-x: auto; margin: 1.4em 0; }
.mat-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.mat-table th, .mat-table td { text-align: left; padding: .6em .8em; border-bottom: 1px solid var(--mat-line); }
.mat-table th { background: var(--mat-bg-alt); font-weight: 700; }

/* ---- Footer -------------------------------------------------------------- */
.mat-site-footer { background: var(--mat-brand-dark); color: #d7e6e6; margin-top: 40px; }
.mat-site-footer a { color: #d7e6e6; }
.mat-site-footer a:hover { color: #fff; }
.mat-site-footer__grid { display: grid; gap: 28px; grid-template-columns: 1fr; padding: 48px 20px 24px; }
@media (min-width: 800px) { .mat-site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.mat-footer-col h2 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .8em; }
.mat-footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5em; }
.mat-footer-col p { color: #b9cdcd; font-size: .92rem; }
.mat-footer-col--brand .mat-brand__text { color: #fff; }
.mat-social { display: flex; gap: 1em; margin-top: 1em; flex-wrap: wrap; }
.mat-site-footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 20px 28px; font-size: .82rem; color: #9fb7b7; }
.mat-footer-disclaimer { max-width: 900px; }

/* ---- Comments (kept minimal) --------------------------------------------- */
.mat-comments { margin: 3em 0; }
.mat-comment-list { list-style: none; padding: 0; }
.mat-comment-list .comment-body { border: 1px solid var(--mat-line); border-radius: var(--mat-radius-sm); padding: 14px 16px; margin-bottom: 12px; }

/* ---- Utility -------------------------------------------------------------- */
.mat-nav-open { overflow: hidden; }
