/*
Theme Name:   4x4 Tire Review
Description:  Child theme of Hello Elementor for 4x4TireReview.com. Holds templates only; logic lives in the tr-core plugin.
Template:     hello-elementor
Version:      0.4.1
Requires PHP: 8.0
Text Domain:  tr-child
*/

/* Base page styles. Tokens and fonts come from tr-core.css. */
body {
	margin: 0;
	background: var(--tr-paper);
	color: var(--tr-ink);
	font: 400 17px/1.6 var(--tr-font-body);
	-webkit-font-smoothing: antialiased;
}
a { color: var(--tr-ink); }
a:hover { color: var(--tr-accent-ink); }
:focus-visible { outline: 2px solid var(--tr-accent); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--tr-font-display); font-weight: 700; color: var(--tr-ink); margin: 0 0 0.4em; }
h1 { font-size: 64px; line-height: 1.02; }
h2 { font-size: 40px; line-height: 1.05; }
h3 { font-size: 28px; line-height: 1.1; }
h4, h5, h6 { font-family: var(--tr-font-body); font-weight: 700; }
@media (max-width: 767px) {
	h1 { font-size: 40px; }
	h2 { font-size: 30px; }
	h3 { font-size: 24px; }
}

/* Layout */
.tr-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; box-sizing: border-box; }
/* Set on the column, not on p/li, so components inside (bands, disclosure, cards) keep their own sizes. */
.tr-article { max-width: 780px; font-size: 18px; line-height: 1.65; }
@media (max-width: 480px) { .tr-container { padding: 0 16px; } }

/* Elementor pages: content width and buttons follow the tokens (kit settings are not used).
   body[class*="elementor-kit-"] outranks Elementor's own .elementor-kit-N rule. */
body[class*="elementor-kit-"] { --container-max-width: 1200px; --widgets-spacing: 20px; }
.elementor-button {
	min-height: 44px;
	padding: 14px 22px;
	border-radius: var(--tr-radius-sm);
	background-color: var(--tr-accent);
	color: #fff;
	font: 600 15px/1.2 var(--tr-font-body);
}
.elementor-button:hover, .elementor-button:focus-visible { background-color: var(--tr-accent-ink); color: #fff; }

/* Form fields (Fluent Forms, comments, search) */
input[type="text"], input[type="email"], input[type="number"], input[type="search"], input[type="url"], input[type="tel"], select, textarea,
.fluentform .ff-el-form-control {
	font: 400 16px/1.3 var(--tr-font-body);
	padding: 12px;
	border: 1px solid var(--tr-field);
	border-radius: var(--tr-radius-sm);
	background: var(--tr-surface);
	color: var(--tr-ink);
	min-height: 44px;
	box-sizing: border-box;
}
input:focus, select:focus, textarea:focus, .fluentform .ff-el-form-control:focus { border-color: var(--tr-ink); outline: 2px solid var(--tr-accent); outline-offset: 1px; }
label, .fluentform .ff-el-input--label label { font: 600 14px/1.4 var(--tr-font-body); color: var(--tr-ink); }
.fluentform .ff-btn-submit, button[type="submit"] {
	min-height: 44px;
	padding: 12px 22px;
	border: 0;
	border-radius: var(--tr-radius-sm);
	background: var(--tr-accent);
	color: #fff;
	font: 600 15px/1.2 var(--tr-font-body);
	cursor: pointer;
}
.fluentform .ff-btn-submit:hover, button[type="submit"]:hover { background: var(--tr-accent-ink); }

/* ---------- Header ---------- */
.tr-skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--tr-ink); color: var(--tr-paper); padding: 12px 16px; }
.tr-skip:focus { left: 16px; top: 16px; color: var(--tr-paper); }
.tr-header { background: var(--tr-paper); border-bottom: 1px solid var(--tr-rule); }
.tr-header__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding-top: 16px; padding-bottom: 16px; }
.tr-logo { display: flex; align-items: center; text-decoration: none; color: var(--tr-ink); }
.tr-logo__img { display: block; width: auto; height: 56px; }
.tr-nav { display: flex; flex: 1 1 520px; align-items: center; justify-content: space-between; gap: 16px 24px; }
.tr-nav__list { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; padding: 0; list-style: none; font-size: 15px; font-weight: 500; }
.tr-nav__list a { display: inline-block; padding: 10px 0; text-decoration: none; color: var(--tr-ink); }
.tr-nav__list a:hover, .tr-nav__list .current-menu-item > a, .tr-nav__list .current-menu-ancestor > a { color: var(--tr-accent-ink); }
.tr-header__cta { white-space: nowrap; }
.tr-menu-toggle { display: none; margin-left: auto; align-items: center; gap: 10px; min-height: 44px; padding: 10px 14px; background: transparent; color: var(--tr-ink); border: 1.5px solid var(--tr-ink); border-radius: var(--tr-radius-sm); font: 600 15px/1 var(--tr-font-body); cursor: pointer; }
.tr-menu-toggle__bars, .tr-menu-toggle__bars::before, .tr-menu-toggle__bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
.tr-menu-toggle__bars::before, .tr-menu-toggle__bars::after { content: ""; position: absolute; left: 0; }
.tr-menu-toggle__bars::before { top: -6px; }
.tr-menu-toggle__bars::after { top: 6px; }
@media (max-width: 1024px) {
	.tr-menu-toggle { display: inline-flex; }
	.tr-nav { display: none; flex: 1 1 100%; flex-direction: column; align-items: stretch; gap: 8px; padding-top: 8px; border-top: 1px solid var(--tr-rule); }
	.tr-nav.is-open { display: flex; }
	.tr-nav__list { flex-direction: column; gap: 0; font-size: 17px; }
	.tr-nav__list a { display: block; padding: 12px 0; border-bottom: 1px solid var(--tr-rule); }
	.tr-header__cta { align-self: flex-start; margin: 8px 0 4px; }
}
@media (max-width: 480px) { .tr-logo__img { height: 44px; } }

/* ---------- Footer ---------- */
.tr-footer { background: var(--tr-ink); color: #D6D0C3; font-size: 15px; margin-top: 72px; }
.tr-footer__inner { display: flex; flex-wrap: wrap; gap: 32px 64px; padding-top: 48px; padding-bottom: 48px; }
.tr-footer__brand { flex: 1 1 320px; min-width: 0; }
.tr-footer__brand p { margin: 10px 0 0; }
.tr-footer__word { margin: 0 !important; line-height: 0; }
.tr-footer__logo { display: block; width: auto; height: 48px; }
.tr-footer__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; margin: 0; padding: 0; list-style: none; }
.tr-footer__list a { display: inline-block; padding: 8px 0; color: var(--tr-paper); text-decoration: none; }
.tr-footer__list a:hover { color: #F0B48F; text-decoration: underline; }

/* ---------- Page scaffolding ---------- */
.tr-main { display: block; }
.tr-page { padding-top: 32px; }
.tr-page__title { margin: 16px 0 0; }
.tr-lead { margin: 16px 0 0; font-size: 20px; line-height: 1.5; color: var(--tr-ink-2); max-width: 820px; }
.tr-section { margin-top: 40px; }
.tr-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--tr-muted); }
.tr-crumbs a { color: var(--tr-muted); }
.tr-crumbs .separator { color: var(--tr-muted); }

/* Meta row: byline, last verified, chips */
.tr-metarow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 24px; padding: 16px 0; border-top: 1px solid var(--tr-rule); border-bottom: 1px solid var(--tr-rule); font-size: 14px; }
.tr-metarow__by { display: inline-flex; align-items: center; gap: 10px; }
.tr-metarow__by a, .tr-metarow__link { font-weight: 600; }
.tr-metarow__avatar { border-radius: 50%; }
.tr-avatar--logo { border-radius: 0; object-fit: contain; }
.tr-metarow .tr-meta { font-size: 14px; color: var(--tr-ink); }
.tr-page .tr-disclosure { margin: 16px 0 0; }

/* Two columns: main + aside (aside drops below on tablet/mobile) */
.tr-cols { display: flex; flex-wrap: wrap; gap: 48px; }
.tr-cols__main { flex: 999 1 600px; min-width: 0; }
.tr-cols__aside { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.tr-cols--guide { padding-top: 40px; gap: 56px; }
.tr-cols--guide .tr-cols__main { flex: 999 1 640px; max-width: 780px; }
.tr-cols__aside--left { flex: 1 1 240px; }
.tr-toc, .tr-aside-card { background: var(--tr-surface); border: 1px solid var(--tr-rule); border-radius: var(--tr-radius); padding: 22px; font-size: 15px; }
.tr-toc { display: flex; flex-direction: column; gap: 8px; }
.tr-toc__title, .tr-aside-card__title { margin: 0 0 4px; font-weight: 700; font-size: 16px; }
.tr-aside-card p { margin: 0 0 10px; color: var(--tr-ink-2); }
.tr-aside-card a:not(.tr-btn) { font-weight: 600; }
.tr-aside-card--tint { background: var(--tr-accent-tint); border-color: var(--tr-accent-tint-rule); }
/* Once the columns stack, asides (including the guide's left TOC) drop below the main content. */
@media (max-width: 1024px) {
	.tr-cols__main { order: 1; }
	.tr-cols__aside { order: 2; }
}

/* Guide hero */
.tr-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--tr-rule); }
.tr-topo { position: absolute; inset: 0; width: 100%; height: 100%; }
.tr-hero__inner { position: relative; padding-top: 40px; padding-bottom: 48px; }
.tr-hero__title { max-width: 820px; }
.tr-hero__answer { margin-top: 24px; max-width: 820px; }
.tr-answer p:last-child { margin: 8px 0 0; }
.tr-hero .tr-metarow { border: 0; padding: 0; margin-top: 20px; }

/* Article content */
.tr-content > *:first-child { margin-top: 0; }
.tr-content h2 { margin: 48px 0 12px; font-size: 38px; scroll-margin-top: 16px; }
.tr-content h3 { margin: 28px 0 10px; }
.tr-content p, .tr-content ul, .tr-content ol { margin: 0 0 16px; }
/* Small inline links in meta rows and side cards: 44px tap height without moving the layout. */
.tr-metarow a, .tr-aside-card a:not(.tr-btn) { display: inline-block; padding-block: 11px; margin-block: -11px; }
/* Cards and tables inside articles: room above and below; the card's own gap spaces its children. */
.tr-content .tr-card, .tr-content .tr-table-wrap { margin: 24px 0 28px; }
.tr-content .tr-card { gap: 12px; }
.tr-content .tr-card > * { margin: 0; }
.tr-content img { max-width: 100%; height: auto; border-radius: 8px; }
.tr-content details { border-top: 1px solid var(--tr-rule); padding: 16px 0; }
.tr-content details:last-of-type { border-bottom: 1px solid var(--tr-rule); }
.tr-content summary { font-weight: 600; cursor: pointer; min-height: 24px; }
.tr-sources-section h2 { font-size: 30px; }
.tr-changelog { margin: 24px 0 0; padding: 0; list-style: none; }
@media (max-width: 767px) { .tr-content h2 { font-size: 30px; } .tr-lead { font-size: 18px; } }

/* Archive grid */
.tr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.tr-card--link { text-decoration: none; color: var(--tr-ink); }
.tr-card--link:hover { border-color: var(--tr-ink); color: var(--tr-ink); }

/* ---------- Home ---------- */
.tr-btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.tr-home-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--tr-rule); }
.tr-home-hero__inner { position: relative; display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 80px; }
.tr-home-hero__text { flex: 999 1 520px; min-width: 0; }
.tr-home-hero__text .tr-eyebrow { font-size: 14px; letter-spacing: 1.5px; margin-bottom: 16px; }
.tr-home-hero__text .tr-lead { margin-top: 24px; max-width: 600px; }
.tr-finder { flex: 1 1 340px; padding: 28px; gap: 16px; }
.tr-finder__choices { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tr-finder__choices legend { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.tr-finder__choice { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 1px solid var(--tr-rule); border-radius: var(--tr-radius-sm); font-size: 15px; cursor: pointer; }
.tr-finder__choice:has(input:checked) { border-color: var(--tr-ink); background: var(--tr-sand); }
.tr-finder__choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--tr-accent); flex: 0 0 auto; }
/* Finder landings (#pick-N) and other in-page targets: clear the header and mark the pick. */
.tr-pick { scroll-margin-top: 24px; }
.tr-pick:target { outline: 3px solid var(--tr-accent); outline-offset: 8px; border-radius: var(--tr-radius); }
.tr-finder .tr-btn { width: 100%; margin-top: 0; }
.tr-finder .tr-meta { margin: 0; font-size: 13px; }
.tr-legend { background: var(--tr-surface); border-bottom: 1px solid var(--tr-rule); }
.tr-legend__inner { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; padding-top: 28px; padding-bottom: 28px; font-size: 15px; }
.tr-legend__lead { margin: 0; font-weight: 600; }
.tr-legend__item { display: flex; align-items: center; gap: 10px; color: var(--tr-ink-2); }
.tr-home-section { padding-top: 56px; }
.tr-home-section h2 { margin: 0 0 24px; }
.tr-home-section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 28px; }
.tr-home-section__head h2 { margin: 0; }
.tr-home-section__head .tr-meta, .tr-home-section__sub { margin: 0; font-size: 15px; }
.tr-home-section__sub { margin: -16px 0 24px; }
.tr-card--link { padding: 28px; gap: 12px; }
.tr-card--link .tr-card__title { font-size: 30px; }
.tr-card--link > span:not(.tr-card__title):not(.tr-eyebrow):not(.tr-card__more) { color: var(--tr-ink-2); font-size: 16px; }
.tr-card__more { margin-top: auto; font-weight: 600; font-size: 15px; }
.tr-grid--tools { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.tr-grid--tools .tr-card--link { padding: 24px; gap: 8px; }
.tr-grid--tools .tr-card__title { font-size: 24px; }
.tr-study { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; padding: 48px; }
.tr-study__text { flex: 1 1 380px; min-width: 0; }
.tr-study h2 { color: var(--tr-paper); font-size: 44px; margin: 12px 0 0; }
.tr-study__text p:not(.tr-eyebrow) { margin: 20px 0 28px; color: #D6D0C3; }
.tr-study__chart { flex: 1 1 420px; min-width: 0; margin: 0; background: #2A2F35; border-radius: var(--tr-radius); padding: 28px; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.tr-study__chart figcaption { color: #D6D0C3; margin-bottom: 6px; }
.tr-study__bar { display: flex; align-items: center; gap: 12px; color: #E9E4D8; }
.tr-study__bar > span:first-child { flex: 0 0 110px; }
.tr-study__bar .tr-calc__bar { height: 14px; }
.tr-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.tr-tile { display: flex; align-items: center; min-height: 44px; padding: 18px; background: var(--tr-surface); border: 1px solid var(--tr-rule); border-radius: 8px; font-weight: 600; text-decoration: none; color: var(--tr-ink); }
.tr-tile:hover { border-color: var(--tr-ink); color: var(--tr-ink); }
.tr-tread { display: block; max-width: 1200px; margin: 56px auto 0; }
@media (max-width: 767px) {
	.tr-home-hero__inner { padding-top: 40px; padding-bottom: 48px; gap: 32px; }
	.tr-study { padding: 28px; }
	.tr-study h2 { font-size: 32px; }
}

/* ---------- Methodology (trust page content) ---------- */
.tr-evidence-list { display: flex; flex-direction: column; gap: 16px; }
.tr-evidence-item { display: flex; flex-wrap: wrap; gap: 12px 24px; background: var(--tr-surface); border: 1px solid var(--tr-rule); border-radius: var(--tr-radius); padding: 24px; }
.tr-evidence-item .tr-chip { align-self: flex-start; font-size: 14px; padding: 5px 12px; }
.tr-evidence-item > div { flex: 1 1 420px; min-width: 0; }
.tr-evidence-item p { margin: 0; font-size: 16px; color: var(--tr-ink-2); }
.tr-evidence-item p:first-child { font-weight: 700; color: var(--tr-ink); margin-bottom: 4px; }
.tr-steps { margin: 0; padding: 0; list-style: none; counter-reset: tr-step; }
.tr-steps li { display: flex; gap: 20px; padding: 18px 0; border-top: 1px solid var(--tr-rule); counter-increment: tr-step; font-size: 16px; color: var(--tr-ink-2); }
.tr-steps li::before { content: counter(tr-step); flex: 0 0 40px; height: 40px; border-radius: 50%; background: var(--tr-ink); color: var(--tr-paper); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.tr-steps strong { display: block; color: var(--tr-ink); }
.tr-two-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.tr-two-cards .tr-card h2 { margin: 0; font-size: 26px; }
.tr-two-cards .tr-card ul, .tr-two-cards .tr-card p { margin: 0; font-size: 16px; color: var(--tr-ink-2); }

/* ---------- Rate your tires ---------- */
.tr-survey { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.tr-survey__pitch { flex: 1 1 300px; min-width: 0; }
.tr-survey__pitch ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 16px; }
.tr-survey__pitch li::before { content: "\2713"; color: var(--tr-survey-ink); font-weight: 700; margin-right: 10px; }
.tr-stat { margin-top: 32px; background: var(--tr-survey-bg); border-radius: var(--tr-radius); padding: 20px; }
.tr-stat__num { margin: 0; font: 700 40px/1 var(--tr-font-display); color: var(--tr-ink); }
.tr-stat__label { margin: 4px 0 0; font-size: 15px; font-weight: 600; color: var(--tr-survey-ink); }
.tr-survey__form { flex: 2 1 520px; min-width: 0; background: var(--tr-surface); border: 1px solid var(--tr-rule); border-radius: var(--tr-radius-lg); padding: 32px; }
.tr-survey__form .ff-el-section-break .ff-el-section-title { font: 700 26px/1.1 var(--tr-font-display); margin: 8px 0 4px; }
.tr-survey__form .ff-el-section-break hr { display: none; }
.tr-survey__form .ff-el-form-check-label { font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.tr-survey__form .ff-el-form-check-input { width: 20px; height: 20px; }
/* Poor…Great ratings stay in one wrapping row on phones too (Fluent stacks them below 768px). */
.tr-survey__form .ff_list_inline .ff-el-input--content { display: flex; flex-wrap: wrap; gap: 0 16px; }
.tr-survey__form .ff_list_inline .ff-el-form-check { display: block; margin: 0; }
@media (max-width: 480px) { .tr-survey__form { padding: 20px; } }
