:root {
    --surface: #f6fafe;
    --surface-low: #f0f4f8;
    --surface-card: #ffffff;
    --surface-high: #e4e9ed;
    --text: #171c1f;
    --muted: #45474a;
    --outline: #c6c6ca;
    --dark: #121417;
    --orange: #f97316;
    --blue: #2563eb;
    --max: 1280px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--surface);
    color: var(--text);
    font-family: Inter, Arial, sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid #e2e8f0;
    backdrop-filter: blur(12px);
}

.topbar__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 72px;
}

.brand {
    font-weight: 800;
    font-size: 22px;
    letter-spacing: 0;
}

.nav {
    display: flex;
    gap: 24px;
    margin-left: auto;
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
}

.nav a:hover,
.text-link:hover {
    color: var(--orange);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 0;
    border-radius: 4px;
    padding: 0 18px;
    background: var(--orange);
    color: white;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: pointer;
}

.button--dark {
    background: var(--dark);
}

.hero {
    padding: 72px 0 56px;
    background: linear-gradient(180deg, #ffffff 0%, var(--surface) 100%);
}

.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr);
    gap: 40px;
    align-items: center;
}

.eyebrow,
.label,
th {
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 820px;
    margin-bottom: 18px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 20px;
    font-size: 32px;
    line-height: 1.2;
    letter-spacing: 0;
}

h3 {
    font-size: 22px;
    letter-spacing: 0;
}

.lead {
    max-width: 720px;
    color: var(--muted);
    font-size: 18px;
}

.searchbox {
    position: relative;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    max-width: 820px;
    margin-top: 28px;
    padding: 10px;
    background: white;
    border: 1px solid var(--outline);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .05);
}

.searchbox--wide {
    max-width: 900px;
}

.searchbox input {
    width: 100%;
    border: 0;
    outline: 0;
    font: inherit;
    font-size: 17px;
}

.searchbox:focus-within {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, .18);
}

.suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    display: none;
    overflow: hidden;
    background: white;
    border: 1px solid var(--outline);
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .14);
}

.suggestions.is-open {
    display: block;
}

.suggestions a {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 13px 16px;
    border-bottom: 1px solid #edf2f7;
}

.suggestions a:hover {
    background: var(--surface-low);
}

.hero__panel,
.info-panel {
    background: var(--dark);
    color: white;
    border-radius: 8px;
    padding: 24px;
}

.metric-grid,
.spec-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.spec-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 24px;
}

.fitment-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.fitment-grid--wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fitment-card {
    min-height: 118px;
    padding: 16px;
    background: white;
    border: 1px solid var(--outline);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .04);
}

.fitment-card > span {
    display: block;
    margin-bottom: 12px;
    color: var(--muted);
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.fitment-card div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fitment-card .material-symbols-outlined {
    color: var(--orange);
    font-size: 28px;
}

.fitment-card strong {
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 28px;
    line-height: 1.15;
}

.spec-card {
    min-height: 104px;
    padding: 16px;
    background: white;
    border: 1px solid var(--outline);
    border-radius: 8px;
}

.hero__panel .spec-card {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .18);
}

.spec-card span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.hero__panel .spec-card span {
    color: #cbd5e1;
}

.hero-data-card {
    display: grid;
    gap: 18px;
}

.hero-data-card h2 {
    margin: 0;
    color: white;
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.05;
}

.hero-data-card p {
    margin: 0;
    color: #cbd5e1;
    font-size: 16px;
    line-height: 1.6;
}

.hero-data-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.hero-data-metrics div {
    min-height: 118px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
}

.hero-data-metrics strong,
.hero-data-metrics span {
    display: block;
}

.hero-data-metrics strong {
    color: var(--orange);
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 44px;
    line-height: 1;
}

.hero-data-metrics span {
    margin-top: 10px;
    color: #cbd5e1;
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.spec-card strong {
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 28px;
}

.spec-card--large {
    min-height: 150px;
    margin-bottom: 12px;
}

.spec-card--large strong {
    font-size: 72px;
    line-height: 1;
}

.section {
    padding: 52px 0;
}

.section--dim {
    background: var(--surface-low);
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.page-head {
    padding: 56px 0 32px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.split-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.brand-grid,
.pattern-list,
.article-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.brand-tile,
.pattern-chip,
.article-card,
.result-row {
    display: block;
    background: white;
    border: 1px solid var(--outline);
    border-radius: 8px;
    padding: 16px;
}

.brand-tile:hover,
.pattern-chip:hover,
.article-card:hover,
.result-row:hover {
    border-color: var(--orange);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .05);
}

.brand-tile span,
.pattern-chip span,
.result-row span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 14px;
}

.pattern-chip strong {
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 20px;
}

.article-card {
    min-height: 168px;
    color: inherit;
    text-decoration: none;
}

.article-card strong {
    display: block;
    margin-top: 8px;
    font-size: 20px;
    line-height: 1.2;
}

.article-card p {
    margin: 10px 0 0;
    color: var(--muted);
}

.article-link-list {
    display: grid;
    gap: 10px;
}

.article-link-list a {
    color: var(--dark);
    font-weight: 700;
}

.article-body {
    color: var(--text);
    line-height: 1.7;
}

.admin-form {
    display: grid;
    gap: 16px;
    max-width: 900px;
    padding: 20px;
    background: white;
    border: 1px solid var(--outline);
    border-radius: 8px;
}

.admin-form label {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--outline);
    border-radius: 6px;
    font: inherit;
}

.admin-form__actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pattern-list--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
    align-items: start;
}

.info-panel {
    position: sticky;
    top: 96px;
}

.info-panel--static {
    position: static;
    max-width: 760px;
    background: white;
    color: var(--text);
    border: 1px solid var(--outline);
}

.info-panel--static p {
    color: var(--muted);
}

.info-panel .eyebrow,
.info-panel p {
    color: #cbd5e1;
}

.table-wrap {
    overflow-x: auto;
    background: white;
    border: 1px solid var(--outline);
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    padding: 13px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background: var(--surface-low);
}

tr:last-child td {
    border-bottom: 0;
}

.mono {
    font-family: "Space Grotesk", Inter, sans-serif;
}

.table-link,
.text-link {
    color: var(--blue);
    font-weight: 700;
}

.filterbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    padding: 14px;
    background: white;
    border: 1px solid var(--outline);
    border-radius: 8px;
}

.filterbar select {
    min-height: 42px;
    border: 1px solid var(--outline);
    border-radius: 4px;
    padding: 0 12px;
    font: inherit;
}

.data-section + .data-section {
    margin-top: 42px;
}

.dimension-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
    padding: 12px;
    background: white;
    border: 1px solid var(--outline);
    border-radius: 8px;
}

.dimension-strip span {
    color: var(--muted);
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.dimension-strip strong {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    background: var(--dark);
    color: white;
    border-radius: 999px;
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 14px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.product-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    overflow: hidden;
    background: white;
    border: 1px solid var(--outline);
    border-radius: 8px;
}

.product-card:hover {
    border-color: var(--orange);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .05);
}

.product-card__media {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 178px;
    background: var(--surface-low);
    border-bottom: 1px solid #e5e7eb;
}

.product-card__media img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 142px;
    object-fit: contain;
    padding: 16px;
}

.product-card__media .material-symbols-outlined {
    color: var(--muted);
    font-size: 54px;
}

.product-card__body {
    flex: 1;
    padding: 14px;
}

.product-card__brand {
    display: block;
    margin-bottom: 6px;
    color: var(--orange);
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.product-card h3 {
    margin-bottom: 12px;
    font-size: 17px;
    line-height: 1.25;
}

.product-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.product-specs span {
    padding: 5px 8px;
    background: var(--surface-low);
    border-radius: 999px;
    color: var(--muted);
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 13px;
}

.product-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid #e5e7eb;
}

.product-card__foot strong,
.product-card__foot span {
    display: block;
}

.product-card__foot strong {
    font-size: 18px;
}

.product-card__foot span {
    color: var(--muted);
    font-size: 12px;
}

.package-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.package-card {
    overflow: hidden;
    background: white;
    border: 1px solid var(--outline);
    border-radius: 8px;
}

.package-card__visual {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 170px;
    background: linear-gradient(180deg, #f8fafc, #e2e8f0);
    border-bottom: 1px solid #e5e7eb;
}

.package-card__visual img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 132px;
    object-fit: contain;
    padding: 16px;
}

.package-card__body {
    padding: 14px;
}

.empty-state {
    padding: 18px;
    background: white;
    border: 1px dashed var(--outline);
    border-radius: 8px;
}

.empty-state strong,
.empty-state p {
    display: block;
    margin: 0;
}

.empty-state p {
    margin-top: 6px;
    color: var(--muted);
}

.technical-guide {
    padding: 56px 0;
    background: var(--dark);
    color: white;
}

.technical-guide h2 {
    color: var(--orange);
}

.technical-guide .lead {
    color: #cbd5e1;
}

.technical-guide__inner {
    max-width: 980px;
}

.guide-layout {
    display: grid;
    grid-template-columns: minmax(300px, .85fr) minmax(0, 1fr);
    gap: 34px;
    align-items: start;
    margin-top: 30px;
}

.fitment-visual {
    display: grid;
    gap: 18px;
}

.wheel-diagram,
.bolt-diagram {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 8px;
}

.wheel-diagram {
    aspect-ratio: 1;
    padding: 18px;
}

.wheel-diagram svg {
    width: 100%;
    height: 100%;
}

.diagram-rim,
.diagram-pcd,
.diagram-hub,
.diagram-bolt {
    fill: none;
    vector-effect: non-scaling-stroke;
}

.diagram-rim {
    stroke: #64748b;
    stroke-width: 3;
}

.diagram-pcd {
    stroke: var(--orange);
    stroke-width: 2;
    stroke-dasharray: 7 7;
}

.diagram-hub {
    stroke: #e2e8f0;
    stroke-width: 3;
    fill: rgba(226, 232, 240, .08);
}

.diagram-bolt {
    stroke: #f8fafc;
    stroke-width: 3;
    fill: rgba(249, 115, 22, .24);
}

.diagram-measure {
    stroke: var(--orange);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.diagram-measure--hub {
    stroke: #e2e8f0;
}

.diagram-label,
.diagram-center {
    fill: #f8fafc;
    font-family: "Space Grotesk", Inter, sans-serif;
    font-weight: 700;
}

.diagram-label {
    font-size: 15px;
}

.diagram-center {
    font-size: 22px;
}

.bolt-diagram {
    padding: 18px;
}

.bolt-diagram--thread {
    display: grid;
    gap: 14px;
}

.thread-visual {
    display: grid;
    grid-template-columns: 64px minmax(120px, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.thread-symbol {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border: 2px solid rgba(249, 115, 22, .9);
    border-radius: 50%;
    background: rgba(249, 115, 22, .16);
    color: white;
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 30px;
    font-weight: 800;
}

.thread-body {
    position: relative;
    height: 34px;
    border-radius: 999px;
    background:
        repeating-linear-gradient(135deg, rgba(15, 23, 42, .42) 0 6px, transparent 6px 13px),
        linear-gradient(90deg, #94a3b8, #f8fafc 45%, #94a3b8);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .34);
}

.thread-body span {
    position: absolute;
    top: -8px;
    bottom: -8px;
    width: 2px;
    background: rgba(249, 115, 22, .68);
    transform: rotate(28deg);
}

.thread-body span:nth-child(1) { left: 16%; }
.thread-body span:nth-child(2) { left: 32%; }
.thread-body span:nth-child(3) { left: 48%; }
.thread-body span:nth-child(4) { left: 64%; }
.thread-body span:nth-child(5) { left: 80%; }

.thread-dimension {
    min-width: 92px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
    color: white;
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 20px;
    font-weight: 800;
    text-align: center;
}

.bolt-shaft {
    position: relative;
    height: 70px;
    margin-bottom: 16px;
}

.bolt-shaft--with-symbol {
    padding-left: 46px;
}

.bolt-shaft--with-symbol .thread-symbol {
    position: absolute;
    top: 50%;
    left: 0;
    z-index: 2;
    transform: translateY(-50%);
}

.bolt-shaft--with-symbol .bolt-head {
    left: 46px;
}

.bolt-shaft--with-symbol .bolt-thread {
    left: 116px;
}

.bolt-shaft--with-symbol .thread-dimension {
    position: absolute;
    right: 0;
    bottom: -8px;
    z-index: 2;
}

.bolt-head,
.bolt-thread {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: block;
}

.bolt-head {
    left: 0;
    width: 78px;
    height: 48px;
    background: linear-gradient(90deg, #cbd5e1, #f8fafc 48%, #94a3b8);
    clip-path: polygon(16% 0, 84% 0, 100% 50%, 84% 100%, 16% 100%, 0 50%);
}

.bolt-thread {
    left: 70px;
    right: 0;
    height: 26px;
    border-radius: 999px;
    background:
        repeating-linear-gradient(135deg, rgba(15, 23, 42, .35) 0 6px, transparent 6px 13px),
        linear-gradient(90deg, #94a3b8, #f8fafc 35%, #94a3b8);
}

.bolt-thread::after {
    content: "";
    position: absolute;
    inset: -14px 12px auto auto;
    width: 58%;
    border-top: 2px solid var(--orange);
}

.bolt-callouts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.bolt-callouts span {
    min-height: 58px;
    padding: 10px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 6px;
    color: #f8fafc;
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 18px;
    font-weight: 700;
}

.bolt-callouts strong {
    display: block;
    margin-bottom: 4px;
    color: #cbd5e1;
    font-family: Inter, sans-serif;
    font-size: 11px;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.guide-list {
    display: grid;
    gap: 18px;
}

.guide-list article {
    padding-left: 18px;
    border-left: 2px solid var(--orange);
}

.guide-list h3 {
    margin-bottom: 6px;
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.guide-list p,
.source-note {
    margin: 0;
    color: #cbd5e1;
}

.source-note {
    margin-top: 24px;
    font-size: 13px;
}

.count-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--surface-high);
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 13px;
    font-weight: 700;
}

.breadcrumbs,
.muted {
    color: var(--muted);
}

.result-list {
    display: grid;
    gap: 10px;
}

.result-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
}

.result-row__type {
    margin: 0;
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.footer {
    padding: 36px 0;
    background: var(--dark);
    color: white;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.footer p,
.footer .label {
    color: #cbd5e1;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin-top: 8px;
}

.footer-links a {
    color: white;
    font-weight: 700;
}

@media (max-width: 900px) {
    .hero__grid,
    .content-grid,
    .guide-layout,
    .footer__grid {
        grid-template-columns: 1fr;
    }

    .brand-grid,
    .pattern-list,
    .article-grid,
    .product-grid,
    .package-grid,
    .spec-grid,
    .fitment-grid,
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nav {
        display: none;
    }

    .topbar__inner {
        min-height: 64px;
    }

    .button--dark {
        display: none;
    }
}

@media (max-width: 620px) {
    .searchbox {
        grid-template-columns: 24px 1fr;
    }

    .searchbox .button {
        grid-column: 1 / -1;
    }

    .brand-grid,
    .pattern-list,
    .article-grid,
    .product-grid,
    .package-grid,
    .spec-grid,
    .fitment-grid,
    .hero-data-metrics,
    .metric-grid {
        grid-template-columns: 1fr;
    }

    .split-heading,
    .result-row {
        display: block;
    }
}
