:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --ink: #18212b;
    --muted: #64717d;
    --blue: #0057d9;
    --blue-dark: #003f9e;
    --lime: #c9f43d;
    --paper: #f3f6f8;
    --line: #dce3e8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: inherit; }

.site-header { position: relative; z-index: 30; background: #fff; border-bottom: 1px solid var(--line); }
.header-primary { min-height: 76px; padding: 0 max(24px, calc((100vw - 1180px) / 2)); display: grid; grid-template-columns: auto minmax(260px, 470px) auto; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; background: var(--blue); color: #fff; font-weight: 900; letter-spacing: -.06em; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 18px; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.site-header nav a { text-decoration: none; }
.header-search { display: grid; grid-template-columns: 1fr auto; }
.header-search input { min-height: 42px; border: 1px solid var(--line); border-radius: 8px 0 0 8px; background: #f7f9fb; }
.header-search button { width: auto; min-height: 42px; border-radius: 0 8px 8px 0; background: var(--blue); color: #fff; }
.header-account { display: flex; align-items: center; gap: 15px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.compare-status { color: var(--blue); }
.compare-status > span { display: inline-grid; min-width: 23px; height: 23px; place-items: center; border-radius: 20px; background: #eaf2ff; }
.site-header .test-main-navigation { min-height: 48px; padding: 0 max(24px, calc((100vw - 1180px) / 2)); display: flex; justify-content: center; gap: 48px; border-top: 1px solid #edf0f3; font-size: 14px; font-weight: 800; }
.main-navigation details { position: relative; }
.main-navigation summary { height: 48px; display: flex; align-items: center; cursor: pointer; list-style: none; }
.main-navigation summary::-webkit-details-marker { display: none; }
.main-navigation summary::after { content: "⌄"; margin-left: 7px; color: var(--blue); }
.nav-panel { position: absolute; left: 50%; top: 44px; width: min(620px, 90vw); padding: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; transform: translateX(-50%); border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 20px 50px #13283f25; }
.nav-panel a { padding: 12px; border-radius: 8px; }
.nav-panel a:hover { background: #f2f7ff; }
.nav-panel strong, .nav-panel small { display: block; }
.nav-panel small { margin-top: 3px; color: var(--muted); font-weight: 500; }
.test-mobile-navigation { display: none; position: relative; }
.test-mobile-navigation summary { cursor: pointer; color: var(--blue); font-weight: 850; }
.mobile-menu { position: absolute; z-index: 20; top: 44px; right: 0; width: min(380px, calc(100vw - 30px)); padding: 14px; display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 14px 35px #19324d25; }
.mobile-menu > a { padding: 11px 8px; border-radius: 7px; text-decoration: none; font-weight: 750; }
.mobile-menu > a:hover { background: #f3f7ff; }

main { max-width: 1180px; margin: 0 auto; padding: 44px 24px 70px; }
.hero { min-height: 390px; padding: 54px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; border-radius: 26px; background: linear-gradient(135deg, #071d3e, #0057d9); color: #fff; overflow: hidden; position: relative; }
.hero::after { content: ""; position: absolute; width: 360px; height: 360px; right: -110px; top: -130px; border: 70px solid #ffffff12; border-radius: 50%; }
.eyebrow { color: #4d6680; font-size: 12px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.hero .eyebrow { color: var(--lime); }
.hero h1 { margin: 13px 0 18px; font-size: clamp(43px, 5vw, 68px); line-height: .98; letter-spacing: -.055em; }
.hero-copy p { max-width: 540px; color: #dce9fb; font-size: 18px; line-height: 1.6; }
.vehicle-picker { position: relative; z-index: 1; padding: 28px; border: 1px solid #ffffff2e; border-radius: 18px; background: #ffffff14; backdrop-filter: blur(10px); }
.vehicle-picker label { display: block; margin-bottom: 11px; font-size: 13px; font-weight: 800; }
.picker-row { display: grid; gap: 11px; }
select, button, input { width: 100%; min-height: 52px; border: 0; border-radius: 10px; font: inherit; }
select, input { padding: 0 14px; color: var(--ink); background: #fff; }
button { padding: 0 18px; background: var(--lime); color: #183000; font-weight: 900; cursor: pointer; }
button:hover { background: #dcff6c; }
.vehicle-picker p { margin: 13px 0 0; color: #dce9fb; font-size: 12px; }
.search-row { display: grid; grid-template-columns: 1.45fr .55fr; gap: 10px; }
.hero-catalog { min-height: 410px; }

.catalog-panel { margin-top: 36px; padding: 32px; border-radius: 22px; background: #fff; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.section-heading h2 { margin: 7px 0 0; font-size: 32px; letter-spacing: -.035em; }
.catalog-count { color: var(--muted); font-size: 14px; }
.catalog-filters { margin-top: 24px; display: grid; grid-template-columns: 1fr 1.4fr .65fr; gap: 12px; align-items: end; }
.catalog-filters label { color: var(--muted); font-size: 12px; font-weight: 800; }
.catalog-filters select { margin-top: 7px; border: 1px solid var(--line); }
.vehicle-results { margin-top: 25px; border-top: 1px solid var(--line); }
.vehicle-row { padding: 16px 5px; display: flex; align-items: center; justify-content: space-between; gap: 25px; border-bottom: 1px solid var(--line); text-decoration: none; }
.vehicle-row:hover, .vehicle-row.active { padding-left: 12px; padding-right: 12px; background: #f3f7ff; }
.vehicle-row strong, .vehicle-row small, .row-cost small { display: block; }
.vehicle-row small { margin-top: 4px; color: var(--muted); }
.row-cost { color: var(--blue); font-size: 18px; font-weight: 850; text-align: right; white-space: nowrap; }
.row-cost small { color: var(--muted); font-size: 11px; font-weight: 500; }
.empty-state { margin-top: 24px; padding: 30px; border: 1px dashed #bdc9d3; border-radius: 14px; color: var(--muted); text-align: center; }
.pagination { margin-top: 20px; display: flex; align-items: center; justify-content: center; gap: 24px; }
.pagination a { color: var(--blue); font-weight: 800; }

.scenario-form { margin-top: 18px; padding: 18px; display: grid; grid-template-columns: 150px minmax(150px, 1fr) 150px minmax(150px, 1fr); gap: 12px; align-items: center; border-radius: 14px; background: #eaf2ff; }
.scenario-form label { font-size: 13px; font-weight: 800; }
.scenario-form input { min-height: 44px; border: 1px solid #c5d7f0; }
.scenario-form button { width: auto; min-height: 44px; background: var(--blue); color: #fff; }
.scenario-form span { color: var(--muted); font-size: 11px; text-align: right; }
.scenario-form select { min-height: 44px; border: 1px solid #c5d7f0; }
.profile-form button { grid-column: 3; }
.input-suffix { position: relative; }
.input-suffix span { position: absolute; right: 13px; top: 15px; font-weight: 800; }
.input-suffix input { padding-right: 35px; }
.notice.warning { border-color: #d98c00; background: #fff7df; }
.context-status { padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; }
.match-status { padding: 10px 12px; border-radius: 8px; font-weight: 800; }
.match-status.match { color: #08783e; background: #e5f7ed; }
.match-status.mismatch { color: #a61b1b; background: #ffeded; }

.vehicle-heading { margin-top: 42px; display: flex; justify-content: space-between; align-items: end; gap: 30px; }
.vehicle-heading h2, .details h2 { margin: 8px 0; font-size: clamp(30px, 4vw, 46px); letter-spacing: -.035em; }
.vehicle-heading p { margin: 0; color: var(--muted); }
.total-cost { min-width: 235px; padding: 22px 26px; border-radius: 18px; background: #fff; box-shadow: 0 12px 35px #19324d12; }
.total-cost span, .total-cost small { display: block; color: var(--muted); font-size: 12px; }
.total-cost strong { display: block; margin: 5px 0 1px; color: var(--blue); font-size: 35px; letter-spacing: -.04em; }

.cost-grid { margin-top: 22px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.cost-grid article { min-height: 205px; padding: 23px; display: flex; flex-direction: column; border-radius: 18px; background: #fff; border: 1px solid #e4e9ed; }
.cost-grid .icon { width: 38px; height: 38px; margin-bottom: 26px; display: grid; place-items: center; border-radius: 10px; color: var(--blue); background: #eaf2ff; font-weight: 900; }
.cost-grid small { color: var(--muted); }
.cost-grid strong { margin-top: 7px; font-size: 25px; letter-spacing: -.03em; }
.cost-grid p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.details { margin-top: 48px; padding: 42px; display: grid; grid-template-columns: .85fr 1.15fr; gap: 55px; border-radius: 22px; background: #fff; }
.details p { color: var(--muted); line-height: 1.7; }
dl { margin: 0; }
dl div { padding: 15px 0; display: flex; justify-content: space-between; gap: 22px; border-bottom: 1px solid var(--line); }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 800; text-align: right; }
.notice { margin-top: 20px; padding: 18px 22px; border-left: 4px solid var(--blue); background: #e9f2ff; line-height: 1.55; }
.notice.error { border-color: #b52222; background: #ffeded; }
.site-footer { padding: 48px max(24px, calc((100vw - 1180px) / 2)) 22px; display: block; background: #071d3e; color: #b9c9dc; font-size: 13px; }
.footer-grid { display: grid; grid-template-columns: 1.25fr repeat(3, 1fr); gap: 44px; }
.footer-grid section p { max-width: 310px; line-height: 1.65; }
.footer-brand { color: #fff; font-size: 21px; font-weight: 900; text-decoration: none; }
.footer-grid nav { display: grid; align-content: start; gap: 10px; }
.footer-grid nav strong { margin-bottom: 5px; color: #fff; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { color: #fff; }
.footer-meta { margin-top: 38px; padding-top: 18px; display: flex; flex-wrap: wrap; gap: 18px; border-top: 1px solid #ffffff1c; }
.footer-meta span { margin-right: auto; }
.footer-meta button { width: auto; min-height: 0; padding: 0; border: 0; background: transparent; color: inherit; font-size: inherit; font-weight: 500; }
.compare-tray { position: fixed; z-index: 60; right: 20px; bottom: 20px; width: min(440px, calc(100vw - 30px)); padding: 14px 16px; align-items: center; gap: 13px; border: 1px solid #b9c9d5; border-radius: 12px; background: #fff; box-shadow: 0 18px 46px #152b4633; }
.compare-tray:not([hidden]) { display: flex; }
.compare-tray div { display: grid; margin-right: auto; }
.compare-tray div span { color: var(--muted); font-size: 12px; }
.button-link { display: inline-flex; min-height: 42px; padding: 9px 14px; align-items: center; justify-content: center; border-radius: 8px; background: var(--blue); color: #fff; font-weight: 850; text-decoration: none; }
.button-quiet { width: auto; min-height: 42px; padding: 7px 10px; background: #edf2f6; color: var(--ink); }

@media (max-width: 850px) {
    .site-header > .test-main-navigation { display: none; }
    .site-header > .test-mobile-navigation { display: block; }
    .header-primary { grid-template-columns: 1fr auto; gap: 10px; }
    .header-primary > .header-search, .header-account { display: none; }
    .test-mobile-navigation { position: absolute; right: 20px; top: 27px; }
    .hero { padding: 36px 28px; grid-template-columns: 1fr; gap: 28px; }
    .cost-grid { grid-template-columns: repeat(2, 1fr); }
    .details { grid-template-columns: 1fr; gap: 20px; }
    .catalog-filters { grid-template-columns: 1fr; }
    .scenario-form { grid-template-columns: 1fr 1fr; }
    .profile-form button { grid-column: auto; }
    .scenario-form span { text-align: left; }
}
@media (max-width: 560px) {
    main { padding: 22px 15px 50px; }
    .header-primary { min-height: 70px; padding: 0 15px; }
    .hero { border-radius: 18px; }
    .vehicle-heading { align-items: stretch; flex-direction: column; }
    .total-cost { width: 100%; }
    .cost-grid { grid-template-columns: 1fr; }
    .cost-grid article { min-height: 170px; }
    .details { padding: 28px 22px; }
    dl div { flex-direction: column; gap: 5px; }
    dd { text-align: left; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-meta span { width: 100%; }
    .compare-tray { right: 15px; bottom: 15px; flex-wrap: wrap; }
    .search-row { grid-template-columns: 1fr; }
    .catalog-panel { padding: 24px 18px; }
    .section-heading { align-items: start; flex-direction: column; }
    .vehicle-row { align-items: flex-start; }
    .scenario-form { grid-template-columns: 1fr; }
}
