/*
 * TireFitment API page ([tirefitment_api_docs]), 1.11.0: the light look of the API site pages
 * (sentence-case headings, monospace eyebrows, cards). Uses the theme's --tft-* tokens when the
 * TireFitment theme is active, with the same values as fallbacks.
 */
.tfa-docs {
	--tfa-ground: var(--tft-ground, #f7f6f3);
	--tfa-paper: var(--tft-paper, #fff);
	--tfa-ink: var(--tft-ink, #16191d);
	--tfa-text: var(--tft-text, #44474e);
	--tfa-muted: var(--tft-muted, #5b5e66);
	--tfa-line: var(--tft-line, #e4e1da);
	--tfa-line-2: var(--tft-line-2, #d6d2c9);
	--tfa-soft: var(--tft-soft, #fff1e8);
	--tfa-accent: var(--tft-accent, var(--tfp-accent, #c2410c));
	--tfa-link: #a3360a;
	--tfa-display: var(--tft-display, var(--tfp-display, "Barlow Condensed", "Arial Narrow", sans-serif));
	--tfa-mono: var(--tft-mono, var(--tfp-mono, "IBM Plex Mono", ui-monospace, Menlo, monospace));
	--tfa-radius: 14px;
	background: var(--tfa-ground);
	color: var(--tfa-ink);
	font-size: 17px;
	line-height: 1.55;
}
.tfa-docs *, .tfa-docs *::before, .tfa-docs *::after { box-sizing: border-box; }
.tfa-docs a { color: var(--tfa-link); }
.tfa-docs a:focus-visible, .tfa-docs button:focus-visible, .tfa-docs summary:focus-visible { outline: 3px solid var(--tfa-accent); outline-offset: 2px; }
.tfa-docs code { font-family: var(--tfa-mono); font-size: .88em; background: #efece6; color: var(--tfa-ink); padding: .1em .35em; border-radius: 4px; overflow-wrap: anywhere; }

/* Headings: sentence case in the site's display font (beats .tfp h1/h2 from SEO Pages). */
.tfp.tfa-docs h1, .tfp.tfa-docs h2, .tfp.tfa-docs h3 { font-family: var(--tfa-display); font-weight: 700; text-transform: none; letter-spacing: -0.005em; color: var(--tfa-ink); margin: 0 0 12px; }
.tfp.tfa-docs h1 { font-size: clamp(2.5rem, 5.5vw, 3.9rem); line-height: 1; }
.tfp.tfa-docs h2 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); line-height: 1.05; margin-bottom: 20px; }
.tfp.tfa-docs h3 { font-size: 1.4rem; line-height: 1.15; margin-bottom: 8px; }
.tfp.tfa-docs p { margin: 0 0 12px; color: var(--tfa-text); font-size: inherit; letter-spacing: normal; }
.tfp.tfa-docs p.tfa-eyebrow { font-family: var(--tfa-mono); font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--tfa-link); margin: 0 0 12px; }
.tfp.tfa-docs p.tfa-lead { font-size: 20px; max-width: 36em; margin: 18px 0 0; }
.tfp.tfa-docs p.tfa-text { font-size: 18px; max-width: 42em; }
.tfp.tfa-docs p.tfa-small, .tfp.tfa-docs .tfa-small { font-size: 15px; color: var(--tfa-muted); }
.tfp.tfa-docs p.tfa-note { font-size: 15px; color: var(--tfa-muted); margin: 18px 0 0; }

/* Layout: side menu + content */
.tfa-wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px 96px; display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.tfa-toc { flex: 1 1 200px; max-width: 220px; position: sticky; top: 24px; padding-top: 72px; }
.admin-bar .tfa-toc { top: 56px; }
.tfa-toc nav { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.tfp.tfa-docs .tfa-toc-title { font-family: var(--tfa-mono); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--tfa-muted); margin: 0 0 8px; }
.tfa-docs .tfa-toc a { color: var(--tfa-ink); text-decoration: none; padding: 6px 0 6px 12px; border-left: 2px solid var(--tfa-line); }
.tfa-docs .tfa-toc a:hover { color: var(--tfa-link); }
.tfa-docs .tfa-toc a[aria-current="true"] { color: var(--tfa-link); border-left-color: var(--tfa-accent); font-weight: 600; }
.tfa-docs .tfa-toc a.tfa-toc-status { display: flex; align-items: center; gap: 8px; color: var(--tfa-muted); margin-top: 10px; border-left-color: transparent; }
.tfa-toc-status span { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; flex: none; }
.tfa-main { flex: 999 1 640px; min-width: 0; padding-top: 72px; }

/* On phones and tablets the menu stacks above the content as a row of links. */
@media (max-width: 900px) {
	.tfa-wrap { gap: 0; }
	.tfa-toc { position: static; max-width: none; flex-basis: 100%; padding-top: 40px; }
	.tfa-toc nav { flex-direction: row; flex-wrap: wrap; gap: 8px; }
	.tfp.tfa-docs .tfa-toc-title { flex-basis: 100%; margin-bottom: 2px; }
	.tfa-docs .tfa-toc a { border: 1px solid var(--tfa-line); border-radius: 999px; padding: 6px 12px; background: var(--tfa-paper); font-size: 14px; }
	.tfa-docs .tfa-toc a.tfa-toc-status { margin-top: 0; border-color: var(--tfa-line); }
	.tfa-main { padding-top: 32px; }
}

/* Hero */
/* Database numbers as tiles (the plans with their Buy and trial buttons follow right under the hero). */
.tfa-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 28px 0 0; padding: 0; max-width: 760px; }
.tfa-stats div { display: flex; flex-direction: column; background: var(--tfa-paper); border: 1px solid var(--tfa-line); border-radius: 12px; padding: 16px 18px; min-width: 0; }
.tfa-stats dd { margin: 0; font-family: var(--tfa-display); font-weight: 700; font-size: clamp(1.6rem, 2.6vw, 2rem); line-height: 1.05; color: var(--tfa-ink); }
.tfa-stats dt { order: 2; margin: 4px 0 0; font-size: 14px; font-weight: 400; color: var(--tfa-muted); }
@media (max-width: 640px) { .tfa-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tfa-stats dd { font-size: 1.7rem; } }

/* Buttons */
.tfa-docs .tfa-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border-radius: 8px; font: inherit; font-size: 17px; font-weight: 600; line-height: 1.2; text-decoration: none; border: 1.5px solid transparent; text-align: center; cursor: pointer; }
.tfa-docs .tfa-btn--accent { background: var(--tfa-accent); color: #fff; }
.tfa-docs .tfa-btn--dark { background: var(--tfa-ink); color: #f7f6f3; }
.tfa-docs .tfa-btn--ghost { background: transparent; color: var(--tfa-ink); border-color: var(--tfa-ink); }
.tfa-docs .tfa-btn:hover { filter: brightness(.92); }

/* Sections */
.tfa-sec { padding-top: 72px; scroll-margin-top: 24px; }
.admin-bar .tfa-sec { scroll-margin-top: 56px; }

/* Plans */
.tfa-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.tfa-plan { background: var(--tfa-paper); border: 1px solid var(--tfa-line); border-radius: var(--tfa-radius); padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.tfa-plan--main { outline: 3px solid var(--tfa-accent); outline-offset: -3px; border-color: transparent; }
.tfa-plan-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tfp.tfa-docs .tfa-plan h3 { margin: 0; font-size: 1.6rem; }
.tfa-badge { font-size: 12px; font-weight: 600; color: #fff; background: var(--tfa-accent); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.tfp.tfa-docs .tfa-tagline { margin: -4px 0 0; font-size: 15px; color: var(--tfa-muted); }
.tfp.tfa-docs .tfa-price { margin: 0; color: var(--tfa-ink); display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.tfa-price strong { font-family: var(--tfa-display); font-weight: 700; font-size: 2.6rem; line-height: 1; }
.tfa-price span { color: var(--tfa-muted); }
.tfa-feat { margin: 0 0 8px; padding-left: 18px; flex: 1; }
.tfp.tfa-docs .tfa-feat li { font-size: 15px; color: var(--tfa-text); margin: 0 0 4px; }
.tfa-plan .tfa-btn { margin-top: auto; }
.tfa-docs .tfa-trial-link { text-align: center; font-size: 15px; font-weight: 600; text-decoration: none; }
.tfa-docs .tfa-trial-link:hover { text-decoration: underline; }
.tfa-sandbox { margin-top: 16px; background: var(--tfa-paper); border: 1px dashed #c9c4b9; border-radius: 12px; padding: 18px 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.tfa-sandbox > div { flex: 1 1 320px; }
.tfp.tfa-docs .tfa-sandbox p { margin: 0; font-size: 15px; }
.tfp.tfa-docs .tfa-sandbox .tfa-sandbox-title { font-weight: 600; color: var(--tfa-ink); font-size: 16px; }
.tfa-sandbox a { font-weight: 600; text-decoration: none; white-space: nowrap; }
.tfa-sandbox a:hover { text-decoration: underline; }
#tfa-plans .tfa-small { margin-top: 14px; }

/* Steps and cards */
.tfa-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 12px; }
.tfa-steps li { background: var(--tfa-paper); border: 1px solid var(--tfa-line); border-radius: 12px; padding: 20px; margin: 0; }
.tfa-step-num { display: block; font-family: var(--tfa-mono); font-weight: 500; font-size: 15px; color: var(--tfa-link); margin-bottom: 6px; }
.tfp.tfa-docs .tfa-steps h3 { font-family: inherit; font-size: 17px; font-weight: 600; margin: 0 0 4px; }
.tfp.tfa-docs .tfa-steps p { font-size: 15px; margin: 0; }
.tfa-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.tfa-card { background: var(--tfa-paper); border: 1px solid var(--tfa-line); border-radius: var(--tfa-radius); padding: 24px; }
.tfp.tfa-docs .tfa-card p { font-size: 16px; }
.tfp.tfa-docs .tfa-card p:last-child { margin-bottom: 0; }
.tfa-lookup, .tfa-sizes { margin-top: 20px; }

/* Request details */
.tfa-facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0 0 24px; font-size: 16px; }
.tfa-facts dt { font-weight: 600; color: var(--tfa-ink); }
.tfa-facts dd { margin: 0; color: var(--tfa-text); }
@media (max-width: 560px) { .tfa-facts { grid-template-columns: 1fr; gap: 2px; } .tfa-facts dd { margin-bottom: 10px; } }

.tfa-code { position: relative; margin: 0 0 12px; }
.tfa-code pre { margin: 0; background: var(--tfa-ink); color: #e7e5df; border-radius: 10px; padding: 16px 18px; overflow-x: auto; font-family: var(--tfa-mono); font-size: 13.5px; line-height: 1.6; tab-size: 2; }
.tfa-code pre code { background: none; padding: 0; color: inherit; font-size: inherit; overflow-wrap: normal; white-space: pre; }
.tfa-docs .tfa-copy { position: absolute; top: 8px; right: 8px; background: #2b3036; color: #e7e5df; border: 1px solid #444b53; border-radius: 6px; font: inherit; font-size: 12px; padding: 4px 10px; min-height: 28px; cursor: pointer; }
.tfa-docs .tfa-copy:hover { border-color: #fff; }

.tfa-tablist { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tfa-docs .tfa-tablist button { background: var(--tfa-paper); border: 1px solid var(--tfa-line-2); border-radius: 8px; padding: 8px 14px; min-height: 40px; font: inherit; font-size: 15px; cursor: pointer; color: var(--tfa-ink); }
.tfa-docs .tfa-tablist button[aria-selected="true"] { background: var(--tfa-ink); border-color: var(--tfa-ink); color: #f7f6f3; font-weight: 600; }
.tfa-tabs.is-ready .tfa-panel[hidden] { display: none; }

/* Methods */
.tfa-methods { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 8px; }
.tfa-method { background: var(--tfa-paper); border: 1px solid var(--tfa-line); border-radius: 10px; }
.tfa-method summary { cursor: pointer; padding: 12px 16px; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; list-style-position: inside; }
.tfa-method summary code { font-weight: 600; background: var(--tfa-ground); }
.tfa-method summary span { color: var(--tfa-text); font-size: 15px; }
.tfa-method[open] summary { border-bottom: 1px solid var(--tfa-line); }
.tfa-method-body { padding: 4px 16px 8px; }

/* Errors table */
.tfa-table-wrap { overflow-x: auto; background: var(--tfa-paper); border: 1px solid var(--tfa-line); border-radius: var(--tfa-radius); }
.tfa-table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 16px; margin: 0; border: 0; }
.tfa-table th, .tfa-table td { text-align: left; padding: 12px 18px; border: 0; border-bottom: 1px solid #eeebe5; vertical-align: top; }
.tfa-table tbody tr:last-child td { border-bottom: 0; }
.tfa-table th { font-family: var(--tfa-mono); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--tfa-muted); }
.tfa-table td:first-child { font-family: var(--tfa-mono); font-weight: 600; }

/* Rules */
.tfa-rules { margin: 0; padding-left: 1.2em; }
.tfp.tfa-docs .tfa-rules li { color: var(--tfa-text); margin: 0 0 6px; }

/* Questions */
.tfa-faq details { border-top: 1px solid var(--tfa-line); padding: 18px 0; margin: 0; }
.tfa-faq details:last-of-type { border-bottom: 1px solid var(--tfa-line); }
.tfa-faq summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.tfa-faq summary::-webkit-details-marker { display: none; }
.tfa-faq summary::marker { content: ""; }
.tfa-faq summary::after { content: "+"; flex: none; font-family: var(--tfa-mono); font-weight: 500; font-size: 22px; line-height: 1.1; color: var(--tfa-link); }
.tfa-faq details[open] > summary::after { content: "–"; }
.tfp.tfa-docs .tfa-faq details p { margin: 10px 0 0; }

.tfa-code, .tfa-tabs, .tfa-method, .tfa-panel { min-width: 0; max-width: 100%; }

@media (max-width: 600px) {
	.tfa-docs { font-size: 16px; }
	.tfa-sec { padding-top: 56px; }
	.tfa-main { padding-top: 24px; }
	.tfa-plan, .tfa-card { padding: 22px; }
}
@media (prefers-reduced-motion: no-preference) { html:has(.tfa-docs) { scroll-behavior: smooth; } }

/* 1.14.0: "See it working" live demo (SEO Pages finder inside a white card) */
.tfa-demo-card { background: var(--tfa-paper); border: 1px solid var(--tfa-line); border-radius: 18px; padding: 28px; margin-top: 24px; box-shadow: 0 18px 40px -28px rgba(22, 25, 29, .35); }
.tfa-demo-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.tfa-docs .tfa-demo-head h3 { margin: 0; font-size: 22px; }
.tfa-demo-badge { font-family: var(--tfa-mono); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #15803d; background: #ecfdf3; padding: 5px 10px; border-radius: 8px; white-space: nowrap; }
.tfa-demo-card .tfp-finder { margin: 0; }
.tfa-docs .tfa-demo p.tfa-demo-note { margin: 24px 0 0 !important; padding: 0 4px; font-size: 15px; color: var(--tfa-muted); }
@media (max-width: 600px) { .tfa-demo-card { padding: 20px; } }
