/* Automotive Glossary: an engineering reference. Navy for structure, orange for emphasis, neutral reading surfaces.
   Colours come from portal.css variables so light and dark themes both work. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.gl-body main { padding-bottom: 3rem; }
.gl-body a:focus-visible, .gl-body button:focus-visible, .gl-body summary:focus-visible, .gl-body input:focus-visible, .gl-body select:focus-visible, .gl-body textarea:focus-visible {
  outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
.gl-main a:not(.ph-btn):not(.gl-cat):not(.gl-tool), .gl-rail a, .gl-side .gl-contribute, .gl-policy a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.gl-main a:not(.ph-btn):not(.gl-cat):not(.gl-tool):hover, .gl-rail a:hover { text-decoration-thickness: 2px; }
.gl-small { font-size: .8125rem; color: var(--muted); }
.gl-eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); }
.gl-eyebrow a { color: inherit !important; text-decoration: none !important; }
.gl-h1 { font-size: 2rem; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; margin-top: .35rem; }
@media (min-width: 768px) { .gl-h1 { font-size: 2.5rem; } }
.gl-lead { margin-top: .75rem; font-size: 1.0625rem; line-height: 1.65; color: var(--muted); max-width: 52rem; }

/* top bar: breadcrumb, search, glossary navigation */
.gl-top { padding-top: 1rem; }
.gl-crumbs { display: flex; flex-wrap: wrap; gap: .25rem; font-size: .8125rem; color: var(--muted); list-style: none; padding: 0; margin: 0; }
.gl-crumbs li + li::before { content: "›"; margin: 0 .4rem; opacity: .6; }
.gl-crumbs a { color: inherit; text-decoration: none; }
.gl-crumbs a:hover { color: var(--fg); text-decoration: underline; }
.gl-crumbs [aria-current] { color: var(--fg); font-weight: 600; }
.gl-bar { margin-top: .9rem; max-width: 46rem; }
.gl-nav { margin-top: .9rem; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.gl-nav::-webkit-scrollbar { display: none; }
.gl-nav ul { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; white-space: nowrap; }
.gl-nav a { display: block; padding: .6rem 0; font-size: .875rem; font-weight: 500; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.gl-nav a:hover { color: var(--fg); }
.gl-nav a[aria-current="page"] { color: var(--fg); font-weight: 700; border-bottom-color: var(--orange); }

/* search box and suggestions */
.gl-search { position: relative; display: flex; align-items: center; gap: .5rem; background: var(--bg); border: 1px solid var(--border); border-radius: .75rem; padding: .3rem .35rem .3rem .75rem; }
.gl-search:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px color-mix(in srgb, var(--navy) 15%, transparent); }
html.svh-dark .gl-search:focus-within { border-color: #A5B4FC; }
.gl-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--fg); font-size: .9375rem; padding: .4rem 0; }
.gl-search input:focus, .gl-search input:focus-visible { outline: none; }
.gl-search-icon { color: var(--muted); flex-shrink: 0; }
.gl-search-big { padding: .45rem .5rem .45rem 1rem; border-radius: 1rem; margin-top: 1.5rem; max-width: 46rem; box-shadow: 0 4px 24px rgba(15, 13, 46, .08); }
.gl-search-big input { font-size: 1.0625rem; padding: .55rem 0; }
.gl-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; list-style: none; margin: 0; padding: .35rem; background: var(--bg); border: 1px solid var(--border); border-radius: .75rem; box-shadow: 0 12px 32px rgba(0, 0, 0, .14); max-height: 60vh; overflow-y: auto; }
.gl-suggest li { padding: .55rem .7rem; border-radius: .5rem; cursor: pointer; }
.gl-suggest li[aria-selected="true"], .gl-suggest li:hover { background: color-mix(in srgb, var(--navy) 8%, var(--bg)); }
html.svh-dark .gl-suggest li[aria-selected="true"], html.svh-dark .gl-suggest li:hover { background: #1E2333; }
.gl-suggest .gl-s-term { font-weight: 600; }
.gl-suggest .gl-s-def { display: block; font-size: .8125rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl-suggest .gl-s-all { font-size: .8125rem; font-weight: 600; color: var(--link); }

/* layout: categories | content | related (desktop); collapsible categories and stacked related (tablet, phone) */
.gl-layout { display: grid; gap: 2rem; padding-top: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) {
  .gl-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .gl-layout-3 { grid-template-columns: 220px minmax(0, 1fr) 280px; }
}
.gl-side { align-self: start; }
@media (min-width: 1024px) { .gl-side { position: sticky; top: 6rem; max-height: calc(100vh - 7rem); overflow-y: auto; } }
.gl-cats { border: 1px solid var(--border); border-radius: .75rem; background: var(--surface); }
.gl-cats summary { cursor: pointer; padding: .7rem .9rem; font-weight: 700; font-size: .875rem; }
@media (min-width: 1024px) { .gl-cats summary { pointer-events: none; list-style: none; } .gl-cats summary::-webkit-details-marker { display: none; } }
.gl-cats ul { list-style: none; margin: 0; padding: 0 .4rem .5rem; }
.gl-cats a { display: flex; justify-content: space-between; gap: .5rem; padding: .45rem .5rem; border-radius: .5rem; font-size: .875rem; color: var(--muted); text-decoration: none; }
.gl-cats a:hover { color: var(--fg); background: color-mix(in srgb, var(--navy) 6%, transparent); }
.gl-cats a[aria-current="page"] { color: var(--fg); font-weight: 700; background: color-mix(in srgb, var(--orange) 10%, transparent); }
.gl-count { font-variant-numeric: tabular-nums; font-size: .75rem; opacity: .8; }
.gl-contribute { display: none; margin-top: .9rem; font-size: .8125rem; padding: 0 .25rem; }
@media (min-width: 1024px) { .gl-contribute { display: block; } }
.gl-main { min-width: 0; }
.gl-rail { min-width: 0; display: flex; flex-direction: column; gap: 1rem; align-self: start; }
@media (min-width: 1024px) { .gl-rail { position: sticky; top: 6rem; max-height: calc(100vh - 7rem); overflow-y: auto; } }

/* home */
.gl-hero { background: linear-gradient(180deg, color-mix(in srgb, var(--navy) 7%, var(--bg)) 0%, var(--bg) 100%); padding: 1.25rem 0 1.5rem; }
html.svh-dark .gl-hero { background: linear-gradient(180deg, #141633 0%, var(--bg) 100%); }
.gl-hero .gl-eyebrow { margin-top: 1.25rem; }
.gl-hero-h1 { font-size: 2.5rem; }
@media (min-width: 768px) { .gl-hero-h1 { font-size: 3.25rem; } }
.gl-stats { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 1rem; font-size: .875rem; color: var(--muted); }
.gl-stats strong { color: var(--fg); font-variant-numeric: tabular-nums; }
.gl-home { margin-top: .5rem; }
.gl-home .gl-sec { margin-top: 2.25rem; }
.gl-sec h2, .gl-panel h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
.gl-panel h2 { font-size: 1rem; }
.gl-cat-grid { display: grid; gap: .9rem; margin: 1rem 0 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.gl-cat { display: flex; flex-direction: column; gap: .3rem; height: 100%; padding: 1rem 1.1rem; border: 1px solid var(--border); border-radius: .875rem; background: var(--surface); text-decoration: none; transition: border-color .15s, transform .15s; }
.gl-cat:hover { border-color: var(--orange); }
.gl-cat-short { font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--orange); }
.gl-cat-name { font-weight: 700; }
.gl-cat-desc { font-size: .8125rem; color: var(--muted); line-height: 1.5; flex: 1; }
.gl-two { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
@media (min-width: 900px) { .gl-two { grid-template-columns: 1fr 1fr; } }
.gl-tool-grid { display: grid; gap: .9rem; margin: 1rem 0 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.gl-tool { display: flex; flex-direction: column; gap: .3rem; height: 100%; text-decoration: none; }
.gl-tool:hover { border-color: var(--orange); }
.gl-more { font-weight: 600; }
.gl-policy p { margin-top: .6rem; line-height: 1.65; color: var(--muted); max-width: 60rem; }
.gl-results { margin-top: 1.5rem; }
.gl-results h2 { font-size: 1.25rem; font-weight: 700; }

/* term cards and lists */
.gl-cards { list-style: none; margin: .9rem 0 0; padding: 0; display: grid; gap: .7rem; }
.gl-card { border: 1px solid var(--border); border-radius: .75rem; padding: .85rem 1rem; background: var(--bg); }
.gl-card > a { font-weight: 700; text-decoration: none !important; color: var(--fg) !important; }
.gl-card > a:hover .gl-card-term { text-decoration: underline; }
.gl-card p { margin-top: .3rem; font-size: .875rem; line-height: 1.55; color: var(--muted); }
.gl-meta { display: flex; flex-wrap: wrap; gap: .25rem .75rem; font-size: .75rem; color: var(--muted); }
.gl-meta > span + span::before { content: "·"; margin-right: .75rem; opacity: .6; }
.gl-card .gl-meta { margin-top: .45rem; }
.gl-acr { display: inline-block; margin-left: .5rem; padding: 0 .4rem; border-radius: .3rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .75rem; font-weight: 700; border: 1px solid var(--border); color: var(--fg); background: var(--surface); vertical-align: middle; }
.gl-plain { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .45rem; font-size: .9rem; }
.gl-panel { border: 1px solid var(--border); border-radius: .875rem; padding: 1rem 1.1rem; background: var(--surface); }
.gl-panel p { margin-top: .5rem; font-size: .9rem; line-height: 1.55; color: var(--muted); }
details.gl-panel > summary { cursor: pointer; list-style: none; }
details.gl-panel > summary::-webkit-details-marker { display: none; }
details.gl-panel > summary h2 { display: inline; }
details.gl-panel > summary::after { content: "▾"; float: right; color: var(--muted); }
details.gl-panel:not([open]) > summary::after { content: "▸"; }
.gl-empty { margin-top: 1rem; color: var(--muted); }

/* category filters */
.gl-filters { display: grid; gap: .6rem; margin-top: 1.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .gl-filters { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); } }
.gl-letters { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .75rem; }
.gl-letters button { min-width: 2rem; padding: .25rem .5rem; border: 1px solid var(--border); border-radius: .4rem; font-size: .8125rem; font-weight: 600; color: var(--muted); background: var(--bg); }
.gl-letters button:hover { color: var(--fg); border-color: var(--muted); }
.gl-letters button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
html.svh-dark .gl-letters button[aria-pressed="true"] { background: #4F46E5; border-color: #4F46E5; }
[data-gl-count] { margin-top: .75rem; }

/* term page */
.gl-term-head h1 { font-size: 2rem; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; margin-top: .35rem; }
@media (min-width: 768px) { .gl-term-head h1 { font-size: 2.5rem; } }
.gl-h1-acr { display: inline-block; margin-left: .75rem; padding: .1rem .55rem; border-radius: .4rem; border: 1px solid var(--border); background: var(--surface); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1rem; font-weight: 700; vertical-align: middle; }
.gl-full { margin-top: .35rem; font-size: 1.0625rem; color: var(--muted); }
.gl-aka { margin-top: .5rem; font-size: .875rem; color: var(--muted); }
.gl-aka span { font-weight: 600; color: var(--fg); margin-right: .25rem; }
.gl-term-meta { margin-top: .85rem; align-items: center; gap: .35rem 1rem; }
.gl-term-meta > span + span::before { content: none; }
.gl-diff { font-weight: 700; color: var(--fg); }
.gl-review { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; }
.gl-review-pending { color: #B45309; }
.gl-review-ok { color: #15803D; }
html.svh-dark .gl-review-pending { color: #FCD34D; }
html.svh-dark .gl-review-ok { color: #86EFAC; }
.gl-banner { margin-top: 1rem; }
.gl-def { margin-top: 1.25rem; border-left: 4px solid var(--orange); background: var(--surface); border-radius: 0 .75rem .75rem 0; padding: 1rem 1.25rem; }
.gl-def p { font-size: 1.125rem; line-height: 1.6; font-weight: 500; }
.gl-sec { margin-top: 2rem; }
.gl-term .gl-sec h2 { font-size: 1.25rem; font-weight: 700; padding-bottom: .4rem; border-bottom: 1px solid var(--border); }
.gl-term .gl-sec p, .gl-term .gl-sec li { line-height: 1.7; }
.gl-term .gl-sec p { margin-top: .75rem; max-width: 46rem; }
.gl-term .gl-sec ul { margin-top: .75rem; padding-left: 1.25rem; list-style: disc; }
.gl-term .gl-sec ul li { margin-top: .3rem; }
.gl-example { border: 1px dashed var(--border); border-radius: .75rem; padding: .25rem 1rem .9rem; margin-top: .75rem; }
.gl-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .5rem 1.25rem; margin-top: .9rem; font-size: .9375rem; }
.gl-dl dt { font-weight: 600; color: var(--muted); }
.gl-refs { margin-top: .75rem; padding-left: 1.25rem; list-style: decimal; }
.gl-refs li { margin-top: .8rem; }
.gl-refs a { font-weight: 600; }
.gl-refs .gl-meta { margin-top: .2rem; }
.gl-refs blockquote { margin: .4rem 0 0; padding-left: .75rem; border-left: 3px solid var(--border); font-size: .875rem; color: var(--muted); font-style: italic; }
.gl-rel, .gl-tools, .gl-stds { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .65rem; }
.gl-rel a, .gl-tools a { font-weight: 600; font-size: .9rem; }
.gl-rel p, .gl-tools p { margin-top: .15rem !important; font-size: .8125rem !important; line-height: 1.45; }
.gl-stds li { font-size: .875rem; }
.gl-std { font-weight: 600; }

/* A–Z, tables */
.gl-az-nav { display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; margin: 1.25rem 0 0; padding: 0; }
.gl-az-nav a, .gl-az-nav span { display: inline-flex; justify-content: center; min-width: 2.1rem; padding: .3rem .45rem; border: 1px solid var(--border); border-radius: .4rem; font-size: .8125rem; font-weight: 700; text-decoration: none !important; }
.gl-az-nav span { opacity: .35; }
.gl-az-sec { margin-top: 2rem; scroll-margin-top: 6rem; }
.gl-az-sec h2 { font-size: 1.5rem; font-weight: 800; color: var(--orange); border-bottom: 1px solid var(--border); padding-bottom: .3rem; }
.gl-az { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .8rem; }
@media (min-width: 900px) { .gl-az { grid-template-columns: 1fr 1fr; gap: .9rem 2rem; } }
.gl-az a { font-weight: 600; }
.gl-az p { font-size: .8125rem; color: var(--muted); line-height: 1.5; margin-top: .1rem; }
.gl-az-see { font-size: .875rem; color: var(--muted); }
.gl-table-wrap { overflow-x: auto; margin-top: 1.25rem; border: 1px solid var(--border); border-radius: .75rem; }
.gl-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.gl-table th, .gl-table td { text-align: left; vertical-align: top; padding: .65rem .85rem; border-bottom: 1px solid var(--border); }
.gl-table thead th { background: var(--surface); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.gl-table tbody th { font-weight: 600; min-width: 11rem; }
.gl-table[data-gl-acr] tbody th { white-space: nowrap; min-width: 0; }
.gl-std-table td { min-width: 9rem; }
.gl-std-table td:last-child { min-width: 18rem; }
.gl-table tbody th .gl-small { display: block; font-weight: 400; white-space: normal; }
.gl-table tbody tr:last-child > * { border-bottom: 0; }
.gl-filter-one { display: block; max-width: 24rem; margin-top: 1.25rem; }

/* editorial */
.gl-ed-tabs { display: flex; gap: .5rem; margin-top: 1.25rem; border-bottom: 1px solid var(--border); }
.gl-ed-tabs button { padding: .55rem .25rem; margin-right: 1rem; font-weight: 600; font-size: .9rem; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.gl-ed-tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--orange); }
.gl-form { display: grid; gap: .9rem; margin-top: 1.25rem; }
.gl-form label { display: grid; gap: .3rem; font-size: .8125rem; font-weight: 600; color: var(--muted); }
.gl-form-grid { display: grid; gap: .9rem; }
@media (min-width: 700px) { .gl-form-grid { grid-template-columns: 1fr 1fr; } }
.gl-status { display: inline-block; padding: .05rem .45rem; border-radius: 9999px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; border: 1px solid var(--border); color: var(--muted); }
.gl-q-table td button { margin-right: .35rem; }
.gl-rel p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
