:root {
    --theme-fg-color: #fff;
    --theme-body-color: #d7dfe6;
    --theme-main-color: #eef2f5;
    --theme-form-color: #fff;
    --theme-text-color: #233441;
    --theme-bg-color: #5c6a75;
    --theme-bg-hover-color: #48545e;
    --theme-link-color: #2f628b;
    --theme-link-visited-color: #5c7086;
    --theme-link-hover-bg-color: rgba(98, 149, 180, 0.18);
    --theme-link-underline-color: rgba(47, 98, 139, 0.34);
    --theme-link-underline-visited-color: rgba(92, 112, 134, 0.28);
    --theme-preview-hover-bg-color: rgba(98, 149, 180, 0.45);
}

body {
    background: linear-gradient(180deg, #d3dbe2 0, #c5d0d9 220px, #bcc7d0 100%);
    color: var(--theme-text-color);
}

a,
a[href="#"]:visited,
a.no-read:visited {
    color: var(--theme-link-color);
}

a:visited {
    color: var(--theme-link-visited-color);
}

.tmain {
    max-width: 1440px;
    margin: 0 auto;
    background: #d6e0e8;
    box-shadow: 0 8px 28px rgba(34, 51, 66, 0.18);
}

.main,
#pmain,
#adframe {
    background-color: #eef2f5;
}

.main {
    padding-bottom: 18px;
}

.mm-bar,
.mm-bar ul,
#title,
#title-small {
    background: #050505 !important;
}

.mm-bar {
    border-bottom: solid 1px #1a1a1a;
    box-shadow: none;
}

.mm li:hover,
.mm li:hover,
#title-small:hover,
a#title:hover {
    background-color: #141414 !important;
}

.mm ul li {
    border-top: solid 1px #181818;
}

.mm-item,
a.mm-item:visited,
a.mm-item:hover,
a.mm-item:visited:hover {
    color: #f4f4f4;
    font-size: 16px;
    letter-spacing: 0.1px;
    text-shadow: none;
}

.mm-lang-switch > div > ul {
    right: 0;
    left: auto;
}

.mm-lang-switch > .mm-item {
    gap: 6px;
}

.mm-lang-switch > .mm-item > .mm-label {
    min-width: 2ch;
    text-align: center;
    letter-spacing: 0.12em;
}

#title {
    min-height: 74px;
    height: 74px;
    padding: 8px 18px;
    box-shadow: none;
}

#title img {
    width: 60px;
    margin: 0 14px 0 -3px;
    filter: none;
}

#title-small img {
    filter: none;
}

#title span,
#title-small span {
    margin-bottom: 0;
    text-shadow: none;
}

#title.site-wordmark,
#title-small.site-wordmark {
    gap: 0;
}

#title.site-wordmark img {
    width: auto !important;
    height: 48px !important;
    max-width: min(100%, 780px);
    margin: 0;
}

#title-small.site-wordmark img {
    width: auto !important;
    height: 20px !important;
    max-width: 260px;
    margin-right: 0;
}

#title.site-wordmark span:empty,
#title-small.site-wordmark span:empty {
    display: none;
}

h1,
h2,
h3,
h4 {
    color: #2e546d;
}

h1 {
    font-size: 34px;
}

h4 {
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

h4 a:not(:hover),
h3 a:not(:hover),
h2 a:not(:hover) {
    color: inherit;
}

.ps,
th,
.th {
    background: #d8e1e8 !important;
    color: #233441 !important;
    text-shadow: none;
}

.p20,
.p20a,
.p20p,
.p20i,
.p20w,
.p20k,
.p0,
.pg,
.std-form,
.horlines,
.fav-item,
.new_vehicle,
#vlist,
.show-all-vdata,
#idx-regions-list,
#pfm {
    background-color: #fdfefe;
    border-color: #cad4dc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.p5g,
#idx-regions-list,
.show-all-vdata {
    background-color: #edf2f5;
}

.footer {
    background: #dce5ec;
    border-top: solid 1px #c1ced7;
    color: #5a6f81;
    line-height: 1.55;
}

.footer a,
.footer a:visited {
    color: #335f86;
}

.footer a:hover,
.footer a:visited:hover {
    color: #264b69;
    background: transparent;
}

.footer-nav {
    font-family: var(--narrow-font);
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 4px;
}

.footer-copy {
    font-size: 12px;
}

.footer-meta {
    font-size: 11px;
    color: #6f8292;
    margin-top: 4px;
}

.ix-photos {
    background-color: #acbbc7;
    border: solid 1px #97a9b6;
}

.ix-popular-spacer,
.ix-news-item,
.ci-update-item,
.horlines td,
table.wlist td {
    border-color: #cfd9e1;
}

.ix-news-item {
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.prw-wrapper {
    background-color: #fdfefe;
    color: #233441;
    box-shadow: 0 3px 12px rgba(39, 58, 75, 0.24);
}

.prw-animate,
.pop-prw:before,
.f {
    box-shadow: 0 0 16px rgba(24, 37, 48, 0.26) inset;
}

.hpshade,
.hdshade {
    background: linear-gradient(to top, rgba(26, 40, 52, 0.68), rgba(26, 40, 52, 0));
}

#contestNotify {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 1px 2px rgba(39, 58, 75, 0.08);
}

#contestNotify h4,
#contestNotify b[style],
#contestNotify #textContest {
    color: #2e546d !important;
}

#contestNotify a[style] {
    color: #fff !important;
}

.progress-container {
    background: #050505 !important;
}

.progress-bard {
    background: #666 !important;
    background-image: none !important;
    animation: none !important;
}

@media screen and (max-width: 980px) {
    .tmain {
        box-shadow: none;
    }

    #title {
        height: auto;
        min-height: 66px;
        padding: 8px 12px;
    }

    #title span {
        font-size: 30px;
        line-height: 1.05;
        white-space: normal;
    }

    #title.site-wordmark img {
        height: 34px !important;
        max-width: calc(100vw - 24px);
    }

    .main,
    #pmain {
        padding-left: 12px;
        padding-right: 12px;
    }

    #idx-main,
    #idx-main > tbody,
    #idx-main > tbody > tr,
    #idx-main > tbody > tr > td {
        display: block;
        width: 100% !important;
    }

    #idx-main > tbody > tr > td {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-bottom: 20px;
    }
}

.model-page__breadcrumbs {
    margin: -4px 0 14px;
    font-size: 13px;
}

.model-rail-page,
.models-rail-page {
    max-width: 1120px;
}

.model-rail-page__section-title {
    margin-bottom: 4px;
    color: #333;
    font-size: 28px;
    line-height: 1.1;
}

.model-rail-page__title {
    margin: 0 0 14px;
    color: #2f2f2f;
    font-size: 44px;
    line-height: 1.05;
    font-weight: normal;
}

.model-rail-page__backlink,
.model-rail-page__sort {
    margin-bottom: 12px;
    font-size: 15px;
    color: #444;
}

.model-rail-page__backlink a,
.model-rail-page__sort a,
.model-rail-page__table a,
.models-rail-page__item a {
    color: #b64646 !important;
}

.model-rail-page__sort-current {
    color: #444;
}

.model-rail-page__table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    font-size: 14px;
}

.model-rail-page__table th,
.model-rail-page__table td {
    padding: 4px 8px 4px 0;
    border: 0;
    background: transparent !important;
    text-align: left;
    vertical-align: top;
    color: #2f2f2f;
    font-weight: normal;
}

.model-rail-page__table thead th {
    padding-bottom: 6px;
    color: #333;
    font-size: 13px;
    white-space: nowrap;
}

.model-rail-page__unit a {
    font-weight: bold;
}

.model-rail-page__status,
.model-rail-page__photos,
.model-rail-page__latest,
.model-rail-page__note {
    color: #2f2f2f;
}

.model-rail-page__muted,
.models-rail-page__count {
    color: #666;
}

.model-rail-page__empty-message {
    margin-top: 8px;
    color: #444;
    font-size: 16px;
}

.models-rail-page__list {
    display: block;
    columns: 1;
}

.models-rail-page__item {
    margin-bottom: 5px;
    font-size: 16px;
}

.models-rail-page__count {
    margin-left: 6px;
    font-size: 12px;
}

@media screen and (max-width: 980px) {
    .model-rail-page__section-title {
        font-size: 22px;
    }

    .model-rail-page__title {
        font-size: 34px;
    }

    .model-rail-page__table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

.news-page {
    max-width: 980px;
}

.news-page__intro {
    color: #5d6975;
    margin: 0 0 16px;
}

.news-page__item {
    padding: 12px 14px;
}

.news-page__date {
    font-weight: 700;
    margin-bottom: 6px;
}

.news-page__empty {
    padding: 18px 20px;
    border: 1px solid #d1d7dd;
    background: #f3f6f9;
}

.railroad-page {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.railroad-country-box {
    background: #232323;
    color: #f2f2f2;
    padding: 14px 16px;
}

.railroad-country-box__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 31px;
    line-height: 1;
    margin-bottom: 14px;
}

.railroad-country-box__flag {
    font-size: 18px;
}

.railroad-country-box__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.railroad-country-box__list li {
    margin: 0 0 6px;
    color: #ff7f7f;
    line-height: 1.15;
}

.railroad-country-box__current {
    color: #f7c8c8;
    font-style: italic;
}

.railroad-page__content {
    background: #232323;
    color: #f2f2f2;
    padding: 14px 16px 20px;
}

.railroad-page__title {
    color: #f4f4f4;
    font: 400 31px/1.1 "PT Sans Narrow", sans-serif;
    margin: 0 0 12px;
}

.railroad-page__meta,
.railroad-page__comments-link {
    margin-bottom: 14px;
    color: #f39a9a;
}

.railroad-page__meta a,
.railroad-page__comments-link a,
.railroad-section__stats a {
    color: #f39a9a;
    text-decoration: none;
    font-weight: 700;
}

.railroad-page__editor-role {
    color: #c8c8c8;
    font-size: 12px;
}

.railroad-page__muted,
.railroad-section__muted {
    color: #c8c8c8;
}

.railroad-section {
    margin-top: 18px;
}

.railroad-section__header {
    background: #3c3c3c;
    color: #ff8f8f;
    font-weight: 700;
    padding: 12px 16px;
}

.railroad-section__table {
    width: 100%;
    border-collapse: collapse;
}

.railroad-section__table tr:nth-child(odd) {
    background: #444;
}

.railroad-section__table tr:nth-child(even) {
    background: #3a3a3a;
}

.railroad-section__table td {
    padding: 10px 12px;
    vertical-align: top;
    border-bottom: 1px solid #2d2d2d;
}

.railroad-section__marker {
    width: 18px;
    color: #efefef;
    text-align: center;
}

.railroad-section__name {
    color: #ff7f7f;
    font-weight: 700;
}

.railroad-section__subnote {
    color: #f0f0f0;
    margin-top: 4px;
}

.railroad-section__stats {
    width: 180px;
    text-align: right;
}

.railroad-info {
    margin-top: 22px;
}

.railroad-info h3 {
    color: #f4f4f4;
    margin-bottom: 8px;
}

.railroad-info ul {
    margin: 0;
    padding-left: 20px;
}

.railroad-info li {
    margin-bottom: 6px;
}

@media (max-width: 900px) {
    .railroad-page {
        grid-template-columns: 1fr;
    }
}
