/*
 * TrailTrack shared visual system.
 * The map is intentionally excluded: its full-screen controls have their own UI system.
 */

body.page-site-redesign {
    --tt-shell-bg: #f3f5f7;
    --tt-shell-surface: #fff;
    --tt-shell-surface-soft: #f7f8fa;
    --tt-shell-ink: #101827;
    --tt-shell-copy: #526071;
    --tt-shell-muted: #8995a5;
    --tt-shell-line: #dde3e9;
    --tt-shell-line-soft: #e9edf1;
    --tt-shell-dark: #0b1724;
    --tt-shell-dark-soft: #142333;
    --tt-shell-accent: #ff6a1a;
    --tt-shell-accent-hover: #ed590d;
    --tt-shell-success: #22a45a;
    --tt-shell-radius: 8px;
    --tt-shell-shadow: 0 14px 36px rgba(15, 24, 39, .075);
    --tt-shell-shadow-hover: 0 22px 48px rgba(15, 24, 39, .12);
    color: var(--tt-shell-ink);
}

body.page-site-redesign:not(.page-home-redesign) {
    min-height: 100vh;
    background: var(--tt-shell-bg) !important;
}

body.page-site-redesign:not(.page-home-redesign) .site-ambient {
    opacity: .42;
}

body.page-site-redesign:not(.page-home-redesign) .site-ambient__wash {
    opacity: .2;
}

body.page-site-redesign:not(.page-home-redesign) .site-main-offset {
    min-height: 58vh;
}

body.page-site-redesign:not(.page-home-redesign) :where(h1, h2, h3, h4) {
    color: var(--tt-shell-ink);
    letter-spacing: 0 !important;
    text-wrap: balance;
}

body.page-site-redesign:not(.page-home-redesign) :where(p, li, dd, figcaption) {
    text-wrap: pretty;
}

body.page-site-redesign:not(.page-home-redesign) :where(
    button,
    input,
    select,
    textarea
) {
    font: inherit;
}

body.page-site-redesign:not(.page-home-redesign) :where(
    a,
    button,
    input,
    select,
    textarea
):focus-visible {
    outline: 3px solid rgba(255, 106, 26, .25);
    outline-offset: 2px;
}

/* Shared navigation */
body.page-site-redesign:not(.page-home-redesign) > .site-topbar {
    position: sticky !important;
    top: 10px;
    z-index: 220;
    width: min(1200px, calc(100% - 28px));
    height: 58px !important;
    margin: 10px auto 0;
    padding: 0 14px 0 18px !important;
    border: 1px solid rgba(255, 255, 255, .11) !important;
    border-radius: var(--tt-shell-radius) !important;
    background: rgba(11, 23, 36, .94) !important;
    box-shadow: 0 16px 38px rgba(7, 16, 29, .18) !important;
    backdrop-filter: blur(18px) saturate(1.08);
    -webkit-backdrop-filter: blur(18px) saturate(1.08);
}

body.page-site-redesign:not(.page-home-redesign) > .site-topbar .site-logo-icon {
    width: 30px !important;
    height: 30px !important;
}

body.page-site-redesign:not(.page-home-redesign) > .site-topbar .site-logo-mark {
    width: 146px !important;
    max-width: 146px !important;
}

body.page-site-redesign:not(.page-home-redesign) > .site-topbar .site-logo-img {
    width: 146px !important;
    max-width: 146px !important;
}

body.page-site-redesign:not(.page-home-redesign) > .site-topbar .site-primary-tabs {
    gap: 2px !important;
    border-color: rgba(255, 255, 255, .08) !important;
    border-radius: 7px !important;
    background: rgba(255, 255, 255, .07) !important;
    padding: 3px !important;
}

body.page-site-redesign:not(.page-home-redesign) > .site-topbar .site-primary-tabs a {
    min-height: 36px;
    border-radius: 5px !important;
    padding: 0 14px !important;
    color: #d9e1e9 !important;
    font-size: 12px !important;
    font-weight: 650 !important;
    line-height: 36px;
}

body.page-site-redesign:not(.page-home-redesign) > .site-topbar .site-primary-tabs a:hover {
    background: rgba(255, 255, 255, .08) !important;
    color: #fff !important;
}

body.page-site-redesign:not(.page-home-redesign) > .site-topbar .site-primary-tabs a.bg-white {
    background: #fff !important;
    color: var(--tt-shell-accent) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .15) !important;
}

body.page-site-redesign:not(.page-home-redesign) > .site-topbar :where(
    .site-action-button,
    .site-profile-button
) {
    border-color: rgba(255, 255, 255, .12) !important;
    background: rgba(255, 255, 255, .07) !important;
    color: #e8eef5 !important;
}

body.page-site-redesign:not(.page-home-redesign) > .site-topbar :where(
    .site-action-button,
    .site-profile-button
):hover {
    border-color: rgba(255, 106, 26, .5) !important;
    background: rgba(255, 106, 26, .13) !important;
    color: #ff9b63 !important;
}

body.page-site-redesign:not(.page-home-redesign) > .site-topbar .site-create-button {
    height: 40px !important;
    border-radius: 6px !important;
    background: var(--tt-shell-accent) !important;
    box-shadow: 0 10px 24px rgba(255, 106, 26, .25) !important;
    text-transform: none !important;
}

body.page-site-redesign:not(.page-home-redesign) > .site-topbar .site-create-button:hover {
    background: var(--tt-shell-accent-hover) !important;
}

/* Shared page widths */
body.page-site-redesign:not(.page-home-redesign) :where(
    .route-catalog-page,
    .journal-feed-page,
    .route-collections-page,
    .profile-page,
    .post-detail-layout,
    .articles-archive-page,
    .search-results-page,
    .all-albums-page,
    .album-detail-page,
    .official-routes-page,
    .seo-landing-page,
    .legal-document-page,
    .moderation-board-page,
    .community-page,
    .community-detail-page,
    .community-settings-page,
    .discovery-page
) {
    width: min(1200px, calc(100% - 28px));
    max-width: 1200px !important;
    margin-right: auto !important;
    margin-left: auto !important;
}

body.page-site-redesign.page-regions-index #main-content > main,
body.page-site-redesign.page-region-detail #main-content > main {
    width: min(1200px, calc(100% - 28px));
    max-width: 1200px !important;
    margin-right: auto !important;
    margin-left: auto !important;
}

body.page-site-redesign:not(.page-home-redesign) :where(
    .route-catalog-page,
    .journal-feed-page,
    .route-collections-page,
    .articles-archive-page,
    .search-results-page
) {
    padding-top: 22px !important;
}

/* Shared hero language */
body.page-site-redesign:not(.page-home-redesign) :where(
    .catalog-light-hero,
    .journal-hero,
    .articles-archive-page > section:first-child,
    .search-results-card
) {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .09) !important;
    border-radius: var(--tt-shell-radius) !important;
    background-color: var(--tt-shell-dark) !important;
    box-shadow: 0 18px 44px rgba(7, 16, 29, .14) !important;
}

body.page-site-redesign:not(.page-home-redesign) :where(
    .catalog-light-hero,
    .journal-hero
) {
    min-height: 270px;
}

body.page-site-redesign:not(.page-home-redesign) :where(
    .catalog-light-hero__title,
    .journal-hero h1,
    .articles-archive-page > section:first-child h1
) {
    color: #fff !important;
    font-size: clamp(34px, 5vw, 58px) !important;
    font-weight: 850 !important;
    line-height: 1.02 !important;
}

body.page-site-redesign:not(.page-home-redesign) :where(
    .catalog-light-hero__eyebrow,
    .route-collections-eyebrow,
    .articles-archive-page > section:first-child > p:first-child
) {
    color: #ff9a61 !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: .12em !important;
}

body.page-site-redesign:not(.page-home-redesign) :where(
    .catalog-light-hero__description,
    .journal-hero__copy > p,
    .articles-archive-page > section:first-child > p:not(:first-child)
) {
    max-width: 720px;
    color: #bdc9d5 !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1.7 !important;
}

body.page-site-redesign:not(.page-home-redesign) .catalog-light-hero::before {
    background:
        linear-gradient(90deg, rgba(11, 23, 36, .98) 0%, rgba(11, 23, 36, .82) 54%, rgba(11, 23, 36, .32) 100%) !important;
}

body.page-site-redesign:not(.page-home-redesign) .catalog-light-hero::after {
    opacity: .3 !important;
}

body.page-site-redesign:not(.page-home-redesign) :where(
    .catalog-light-hero__button,
    .route-collections-button,
    .journal-button
) {
    min-height: 42px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 750 !important;
}

body.page-site-redesign:not(.page-home-redesign) :where(
    .catalog-light-hero__button--primary,
    .route-collections-button--primary,
    .journal-button--primary
) {
    border-color: var(--tt-shell-accent) !important;
    background: var(--tt-shell-accent) !important;
    color: #fff !important;
    box-shadow: 0 12px 26px rgba(255, 106, 26, .23) !important;
}

/* Surfaces and cards */
body.page-site-redesign:not(.page-home-redesign) :where(
    .route-catalog-intro,
    .route-catalog-filter,
    .journal-toolbar,
    .search-results-card,
    .search-result-card,
    .search-route-card,
    .search-publication-card,
    .profile-tabs-bar,
    .profile-sidebar-card,
    .profile-content-layout > aside > div,
    .route-collections-section,
    .articles-archive-page > section:not(:first-child) > div,
    .legal-document,
    .legal-card
) {
    border-color: var(--tt-shell-line) !important;
    border-radius: var(--tt-shell-radius) !important;
    background: var(--tt-shell-surface) !important;
    box-shadow: var(--tt-shell-shadow) !important;
}

body.page-site-redesign:not(.page-home-redesign) :where(
    .route-catalog-results-grid > *,
    .regions-index-grid > article,
    .route-collection-card,
    .journal-card,
    .profile-route-card,
    [data-feed-card]
) {
    border-color: var(--tt-shell-line) !important;
    border-radius: var(--tt-shell-radius) !important;
    box-shadow: var(--tt-shell-shadow) !important;
}

body.page-site-redesign:not(.page-home-redesign) :where(
    .route-catalog-results-grid > *,
    .regions-index-grid > article,
    .route-collection-card,
    .journal-card,
    .profile-route-card,
    [data-feed-card]
):hover {
    border-color: rgba(255, 106, 26, .35) !important;
    box-shadow: var(--tt-shell-shadow-hover) !important;
    transform: translateY(-3px);
}

body.page-site-redesign:not(.page-home-redesign) .regions-index-grid > article :where(
    .rounded-2xl,
    .rounded-3xl
) {
    border-radius: 6px !important;
}

body.page-site-redesign:not(.page-home-redesign) .route-collection-card {
    min-height: 300px;
}

body.page-site-redesign:not(.page-home-redesign) .journal-card__media {
    aspect-ratio: 16 / 9;
}

body.page-site-redesign:not(.page-home-redesign) .journal-card__body {
    padding: 18px !important;
}

body.page-site-redesign:not(.page-home-redesign) .journal-card__title {
    font-size: clamp(20px, 2.2vw, 27px) !important;
    line-height: 1.12 !important;
}

/* Form controls */
body.page-site-redesign:not(.page-home-redesign) :where(
    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea
) {
    border-color: var(--tt-shell-line) !important;
    border-radius: 6px !important;
    background: var(--tt-shell-surface) !important;
    color: var(--tt-shell-ink) !important;
    box-shadow: none !important;
}

body.page-site-redesign:not(.page-home-redesign) :where(
    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea
):focus {
    border-color: rgba(255, 106, 26, .65) !important;
    box-shadow: 0 0 0 3px rgba(255, 106, 26, .12) !important;
}

body.page-site-redesign:not(.page-home-redesign) :where(
    .route-catalog-filter button,
    .search-results-form button,
    .journal-sort select
) {
    border-radius: 6px !important;
}

body.page-site-redesign:not(.page-home-redesign) .route-catalog-filter {
    padding: 18px !important;
}

body.page-site-redesign:not(.page-home-redesign) .route-catalog-results-summary {
    padding: 0 2px;
}

/* Pagination and compact commands */
body.page-site-redesign:not(.page-home-redesign) :where(
    .journal-page-link,
    nav[aria-label*="Пагинац"] > a,
    nav[aria-label*="Pagination"] > a,
    nav[aria-label*="Пагинац"] > span,
    nav[aria-label*="Pagination"] > span
) {
    border-radius: 6px !important;
}

body.page-site-redesign:not(.page-home-redesign) :where(
    .journal-page-link.is-active,
    nav[aria-label*="Пагинац"] > span.bg-gray-950,
    nav[aria-label*="Pagination"] > span.bg-gray-950
) {
    background: var(--tt-shell-dark) !important;
    color: #fff !important;
}

/* Page families */
body.page-site-redesign:not(.page-home-redesign) :where(
    .catalog-light-hero__stats,
    .route-collections-hero__stats
) {
    align-self: stretch;
}

body.page-site-redesign:not(.page-home-redesign) :where(
    .catalog-light-hero__stat,
    .route-collections-hero__stats span
) {
    border: 1px solid rgba(255, 255, 255, .12) !important;
    border-radius: 6px !important;
    background: rgba(255, 255, 255, .07) !important;
    color: #9fb0c1 !important;
    backdrop-filter: blur(12px);
}

body.page-site-redesign:not(.page-home-redesign) :where(
    .catalog-light-hero__stat strong,
    .route-collections-hero__stats strong
) {
    color: #fff !important;
}

body.page-site-redesign.page-routes-index .route-catalog-intro {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .98)) !important;
}

body.page-site-redesign.page-routes-index .route-catalog-intro .bg-orange-50\/70 {
    border: 1px solid rgba(255, 106, 26, .14);
    border-radius: 6px !important;
    background: #fff7f1 !important;
}

body.page-site-redesign.page-routes-index .route-showcase-card,
body.page-site-redesign.page-routes-index .route-showcase-card__shell {
    border-radius: var(--tt-shell-radius) !important;
}

body.page-site-redesign.page-routes-index .route-showcase-card__media {
    aspect-ratio: 4 / 3;
    border-radius: 7px 7px 0 0 !important;
}

body.page-site-redesign.page-routes-index .route-showcase-card__body {
    min-height: 232px;
    padding: 17px 17px 13px;
}

body.page-site-redesign.page-routes-index .route-showcase-card__title {
    font-size: clamp(18px, 1.65vw, 22px);
    line-height: 1.15;
}

body.page-site-redesign.page-routes-index .route-showcase-card__more {
    min-height: 38px;
    border-radius: 6px;
}

body.page-site-redesign.page-routes-index .route-showcase-card__tags span,
body.page-site-redesign.page-routes-index .route-showcase-card__activity,
body.page-site-redesign.page-routes-index .route-showcase-card__metric {
    letter-spacing: 0;
}

body.page-site-redesign.page-regions-index .regions-index-grid > article {
    overflow: hidden;
    background: var(--tt-shell-surface);
}

body.page-site-redesign.page-regions-index .regions-index-grid > article > a > div:first-child {
    height: auto !important;
    aspect-ratio: 16 / 9;
}

body.page-site-redesign.page-regions-index .regions-index-grid > article > a > div:last-child {
    padding: 18px !important;
}

body.page-site-redesign.page-regions-index .regions-index-grid > article h3 {
    font-size: clamp(21px, 2vw, 27px) !important;
    line-height: 1.08 !important;
}

body.page-site-redesign.page-regions-index .regions-index-grid > article h4 {
    font-size: 17px !important;
    line-height: 1.25 !important;
}

body.page-site-redesign.page-regions-index .regions-index-grid > article > div:last-child {
    padding: 12px !important;
}

body.page-site-redesign.page-regions-index .regions-index-grid > article > div:last-child a {
    min-height: 40px;
    border-radius: 6px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

body.page-site-redesign.page-journal-index .journal-hero {
    background:
        linear-gradient(122deg, rgba(11, 23, 36, .98), rgba(17, 36, 53, .94)) !important;
}

body.page-site-redesign.page-journal-index .journal-hero::before {
    opacity: .28;
    mask-image: linear-gradient(90deg, transparent 0, #000 36%, #000 100%);
}

body.page-site-redesign.page-journal-index .journal-hero__copy {
    padding: 34px 0 34px 34px;
}

body.page-site-redesign.page-journal-index .journal-hero__shot {
    border-width: 2px;
    border-radius: 7px;
    box-shadow: 0 22px 48px rgba(0, 0, 0, .28);
}

body.page-site-redesign.page-journal-index .journal-toolbar {
    border-radius: 0 0 var(--tt-shell-radius) var(--tt-shell-radius) !important;
    box-shadow: 0 14px 34px rgba(15, 24, 39, .055) !important;
}

body.page-site-redesign.page-journal-index .journal-filter,
body.page-site-redesign.page-journal-index .journal-sort select {
    border-radius: 6px !important;
}

body.page-site-redesign.page-journal-index .journal-card {
    border-radius: var(--tt-shell-radius) !important;
}

body.page-site-redesign.page-journal-index .journal-card__badge,
body.page-site-redesign.page-journal-index .journal-card__save {
    border-radius: 6px !important;
}

body.page-site-redesign.page-journal-index .journal-card__body {
    min-height: 248px;
}

body.page-site-redesign.page-route-collections .route-collections-grid {
    gap: 14px;
}

body.page-site-redesign.page-route-collections .route-collection-card {
    min-height: 280px;
    border-radius: var(--tt-shell-radius) !important;
}

body.page-site-redesign.page-route-collections .route-collection-card::before {
    background: linear-gradient(180deg, rgba(5, 11, 18, .06), rgba(5, 11, 18, .82)) !important;
}

body.page-site-redesign.page-route-collections .route-collection-card__label {
    border-radius: 5px !important;
    letter-spacing: 0;
}

body.page-site-redesign.page-route-collections .route-collection-card__content strong {
    font-size: clamp(22px, 2vw, 28px);
    line-height: 1.08;
}

body.page-site-redesign.page-search .search-results-card {
    border-color: rgba(255, 255, 255, .09) !important;
    background:
        radial-gradient(circle at 88% 18%, rgba(255, 106, 26, .18), transparent 28%),
        var(--tt-shell-dark) !important;
}

body.page-site-redesign.page-search .search-results-card h1,
body.page-site-redesign.page-search .search-results-card p {
    color: #fff !important;
}

body.page-site-redesign.page-search .search-results-form {
    max-width: 700px !important;
}

body.page-site-redesign.page-search .search-results-form input {
    min-height: 54px;
    border: 1px solid rgba(255, 255, 255, .14) !important;
    background: rgba(255, 255, 255, .09) !important;
    color: #fff !important;
}

body.page-site-redesign.page-search .search-results-form button {
    min-height: 40px;
    border-radius: 5px !important;
}

body.page-site-redesign.page-search .search-tab-btn,
body.page-site-redesign.page-search .search-result-card,
body.page-site-redesign.page-search .search-route-card,
body.page-site-redesign.page-search .search-publication-card {
    border-radius: 6px !important;
}

body.page-site-redesign.page-articles-index .articles-archive-page > section:first-child {
    padding: clamp(28px, 5vw, 54px) !important;
    background:
        radial-gradient(circle at 88% 18%, rgba(255, 106, 26, .18), transparent 25%),
        var(--tt-shell-dark) !important;
}

body.page-site-redesign.page-articles-index .articles-archive-page > section:first-child a {
    min-height: 42px;
    border-radius: 6px !important;
}

body.page-site-redesign .all-albums-page .album-card,
body.page-site-redesign .album-detail-page .photo-grid-item {
    border-radius: var(--tt-shell-radius) !important;
}

body.page-site-redesign .all-albums-page h1,
body.page-site-redesign .album-detail-page h1,
body.page-site-redesign .all-albums-page .album-card h4 {
    font-style: normal !important;
    text-transform: none !important;
}

body.page-site-redesign .official-routes-page {
    width: min(1200px, calc(100% - 28px));
    max-width: 1200px !important;
}

body.page-site-redesign .official-routes-page > div:first-child {
    border-color: var(--tt-shell-line) !important;
    border-radius: var(--tt-shell-radius) !important;
    background: var(--tt-shell-surface) !important;
    box-shadow: var(--tt-shell-shadow) !important;
}

body.page-site-redesign .official-routes-page > div:first-child > div:first-child {
    padding: clamp(24px, 4vw, 42px) !important;
    background:
        radial-gradient(circle at 90% 8%, rgba(255, 106, 26, .2), transparent 27%),
        var(--tt-shell-dark);
}

body.page-site-redesign .official-routes-page > div:first-child > div:first-child :where(h1, p) {
    color: #fff !important;
}

body.page-site-redesign .official-routes-page > div:first-child > div:first-child p {
    color: #bdc9d5 !important;
}

body.page-site-redesign .official-routes-page :where(
    [data-route-card-url],
    #official-filters-panel-content
) {
    border-color: var(--tt-shell-line) !important;
    border-radius: var(--tt-shell-radius) !important;
    background: var(--tt-shell-surface) !important;
    box-shadow: var(--tt-shell-shadow) !important;
}

body.page-site-redesign .seo-landing-page {
    width: min(1200px, calc(100% - 28px));
    max-width: 1200px !important;
}

body.page-site-redesign .seo-landing-page > section:first-child {
    min-height: 330px !important;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: var(--tt-shell-radius) !important;
    box-shadow: 0 18px 44px rgba(7, 16, 29, .14);
}

body.page-site-redesign .seo-landing-page > section:first-child h1 {
    max-width: 900px;
    font-size: clamp(36px, 5.5vw, 64px) !important;
    line-height: 1.02 !important;
}

body.page-site-redesign .seo-landing-page > section:first-child :where(
    nav a,
    nav span,
    .rounded-3xl
) {
    border-radius: 6px !important;
}

body.page-site-redesign .seo-landing-page > section:not(:first-child) :where(
    .rounded-3xl,
    article
) {
    border-color: var(--tt-shell-line) !important;
    border-radius: var(--tt-shell-radius) !important;
    background: var(--tt-shell-surface) !important;
    box-shadow: var(--tt-shell-shadow) !important;
}

body.page-site-redesign .legal-document-page {
    width: min(960px, calc(100% - 28px));
}

body.page-site-redesign .legal-document-page > article {
    border-color: var(--tt-shell-line) !important;
    border-radius: var(--tt-shell-radius) !important;
    background: var(--tt-shell-surface) !important;
    box-shadow: var(--tt-shell-shadow) !important;
}

body.page-site-redesign .legal-document-page nav a {
    border-radius: 6px !important;
    letter-spacing: .04em !important;
}

body.page-site-redesign .moderation-board-page > div:first-child {
    border-color: var(--tt-shell-line) !important;
    border-radius: var(--tt-shell-radius) !important;
    background: var(--tt-shell-surface) !important;
    box-shadow: var(--tt-shell-shadow) !important;
}

body.page-site-redesign .moderation-board-page :where(
    article,
    button,
    #ai-batch-status
) {
    border-radius: 6px !important;
}

body.page-site-redesign .discovery-header {
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: var(--tt-shell-radius);
    background:
        radial-gradient(circle at 90% 10%, rgba(255, 106, 26, .18), transparent 26%),
        var(--tt-shell-dark);
    box-shadow: 0 18px 44px rgba(7, 16, 29, .14);
}

body.page-site-redesign .discovery-header :where(
    .discovery-kicker,
    .discovery-title,
    .discovery-subtitle
) {
    color: #fff;
}

body.page-site-redesign .discovery-subtitle {
    color: #bdc9d5 !important;
}

body.page-site-redesign .discovery-chip {
    border-color: rgba(255, 255, 255, .12);
    border-radius: 6px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

body.page-site-redesign .community-intro,
body.page-site-redesign .community-hero-card,
body.page-site-redesign .community-settings-page > div:not(.flex) {
    border-color: var(--tt-shell-line) !important;
    border-radius: var(--tt-shell-radius) !important;
    background-color: var(--tt-shell-surface) !important;
    box-shadow: var(--tt-shell-shadow) !important;
}

body.page-site-redesign.page-profile .profile-page > section:first-child {
    overflow: hidden;
    border-radius: var(--tt-shell-radius) !important;
}

body.page-site-redesign.page-profile .profile-tabs-bar {
    border-radius: var(--tt-shell-radius) var(--tt-shell-radius) 0 0 !important;
}

body.page-site-redesign.page-profile :where(
    .profile-route-experience,
    .profile-route-map__shell,
    .profile-route-card,
    .profile-sidebar-card,
    .profile-content-layout > aside > div
) {
    border-radius: var(--tt-shell-radius) !important;
}

body.page-site-redesign.page-route-detail .route-detail-page {
    margin-top: 22px;
    padding-top: 14px !important;
}

body.page-site-redesign.page-route-detail :where(
    .route-detail-card,
    .route-guide-card,
    .route-detail-map-card,
    .route-detail-section,
    .route-comments,
    .route-related
) {
    border-color: var(--tt-shell-line) !important;
    box-shadow: 0 12px 32px rgba(15, 24, 39, .055) !important;
}

body.page-site-redesign.page-post-detail .post-detail-layout {
    margin-top: 22px !important;
}

body.page-site-redesign.page-post-detail :where(
    .post-article-shell,
    .article-content-card,
    .article-route-info-card
) {
    border-color: var(--tt-shell-line) !important;
    border-radius: var(--tt-shell-radius) !important;
    box-shadow: 0 12px 32px rgba(15, 24, 39, .06) !important;
}

body.page-site-redesign .legal-document-body {
    max-width: 860px;
    color: var(--tt-shell-copy) !important;
}

body.page-site-redesign .legal-document-body :where(
    .legal-doc-title,
    .legal-doc-section-title,
    .legal-doc-subtitle
) {
    color: var(--tt-shell-ink) !important;
}

body.page-site-redesign .legal-document-body .legal-doc-list li {
    border-left-color: var(--tt-shell-accent) !important;
}

body.page-site-redesign #main-content > main > :where(article, section).bg-white {
    border-radius: var(--tt-shell-radius) !important;
}

/* Profile and detail pages retain their information architecture, but use the shared shell. */
body.page-site-redesign.page-profile .profile-page {
    padding-top: 18px !important;
}

body.page-site-redesign.page-profile .profile-page > section:first-child,
body.page-site-redesign.page-route-detail .route-detail-page,
body.page-site-redesign.page-post-detail .post-detail-layout {
    border-color: var(--tt-shell-line) !important;
    border-radius: var(--tt-shell-radius) !important;
    box-shadow: var(--tt-shell-shadow) !important;
}

body.page-site-redesign.page-route-detail :where(
    .route-detail-card,
    .route-guide-card,
    .route-detail-map-card,
    .route-detail-section,
    .route-comments,
    .route-related
),
body.page-site-redesign.page-post-detail :where(
    .article-hero-card,
    .article-content-card,
    .article-section,
    .article-route-info-card
) {
    border-radius: var(--tt-shell-radius) !important;
}

body.page-site-redesign.page-route-detail .route-detail-page,
body.page-site-redesign.page-post-detail .post-detail-layout {
    overflow: clip;
    background: var(--tt-shell-surface);
}

/* Footer follows the dark product shell used by the homepage. */
body.page-site-redesign:not(.page-home-redesign) .site-footer {
    margin-top: 54px;
    padding-right: 14px;
    padding-left: 14px;
}

body.page-site-redesign:not(.page-home-redesign) .site-footer__inner {
    width: min(1200px, 100%);
    border-color: rgba(255, 255, 255, .08);
    border-radius: var(--tt-shell-radius);
    background: var(--tt-shell-dark);
    color: #fff;
    box-shadow: 0 24px 56px rgba(7, 16, 29, .18);
}

body.page-site-redesign:not(.page-home-redesign) .site-footer__brand {
    padding: 30px;
}

body.page-site-redesign:not(.page-home-redesign) .site-footer__logo img:last-child {
    filter: brightness(0) invert(1);
}

body.page-site-redesign:not(.page-home-redesign) .site-footer__brand h2,
body.page-site-redesign:not(.page-home-redesign) .site-footer__nav h3 {
    color: #fff;
}

body.page-site-redesign:not(.page-home-redesign) .site-footer__brand h2 {
    max-width: 760px;
    font-size: clamp(26px, 3.6vw, 42px);
}

body.page-site-redesign:not(.page-home-redesign) .site-footer__brand p,
body.page-site-redesign:not(.page-home-redesign) .site-footer__nav a {
    color: #9eafc1;
}

body.page-site-redesign:not(.page-home-redesign) .site-footer__nav,
body.page-site-redesign:not(.page-home-redesign) .site-footer__bottom {
    border-color: rgba(255, 255, 255, .09);
}

body.page-site-redesign:not(.page-home-redesign) .site-footer__primary-link,
body.page-site-redesign:not(.page-home-redesign) .site-footer__ghost-link {
    border-radius: 6px;
}

body.page-site-redesign:not(.page-home-redesign) .site-footer__ghost-link {
    border-color: rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

body.page-site-redesign:not(.page-home-redesign) .site-footer__bottom {
    color: #74869a;
}

/* Dark theme */
html[data-theme="dark"] body.page-site-redesign {
    --tt-shell-bg: #07111d;
    --tt-shell-surface: #0e1a28;
    --tt-shell-surface-soft: #132130;
    --tt-shell-ink: #edf3f8;
    --tt-shell-copy: #aebdca;
    --tt-shell-muted: #78899b;
    --tt-shell-line: #263647;
    --tt-shell-line-soft: #1d2b3b;
    --tt-shell-dark: #08131f;
    --tt-shell-dark-soft: #132333;
    --tt-shell-shadow: 0 16px 40px rgba(0, 0, 0, .24);
    --tt-shell-shadow-hover: 0 24px 54px rgba(0, 0, 0, .34);
}

html[data-theme="dark"] body.page-site-redesign:not(.page-home-redesign) {
    background: var(--tt-shell-bg) !important;
}

html[data-theme="dark"] body.page-site-redesign:not(.page-home-redesign) :where(
    .route-catalog-intro,
    .route-catalog-filter,
    .journal-toolbar,
    .search-results-card,
    .search-result-card,
    .search-route-card,
    .search-publication-card,
    .route-collections-section,
    .profile-tabs-bar,
    .profile-sidebar-card,
    .profile-content-layout > aside > div
) {
    background: var(--tt-shell-surface) !important;
}

html[data-theme="dark"] body.page-site-redesign:not(.page-home-redesign) :where(
    .regions-index-grid > article,
    .journal-card,
    .route-showcase-card,
    .route-showcase-card__shell,
    .official-routes-page > div:first-child,
    .seo-landing-page > section:not(:first-child) > div,
    .legal-document-page > article,
    .moderation-board-page > div:first-child,
    .community-intro,
    .community-hero-card
) {
    border-color: var(--tt-shell-line) !important;
    background-color: var(--tt-shell-surface) !important;
}

html[data-theme="dark"] body.page-site-redesign:not(.page-home-redesign) :where(
    .route-showcase-card__title,
    .regions-index-grid h4,
    .search-section h2,
    .search-result-card h3,
    .search-route-card h3,
    .search-publication-card h3,
    .legal-document-page h1
) {
    color: var(--tt-shell-ink) !important;
}

html[data-theme="dark"] body.page-site-redesign:not(.page-home-redesign) :where(
    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea
) {
    background: var(--tt-shell-surface-soft) !important;
    color: var(--tt-shell-ink) !important;
}

html[data-theme="dark"] body.page-site-redesign:not(.page-home-redesign) .site-footer__inner {
    border-color: rgba(255, 255, 255, .08);
    background: #050d17;
}

/* Responsive shell */
@media (max-width: 1023px) {
    body.page-site-redesign:not(.page-home-redesign) > .site-topbar {
        width: calc(100% - 20px);
        padding-right: 10px !important;
        padding-left: 12px !important;
    }

    body.page-site-redesign:not(.page-home-redesign) :where(
        .route-catalog-page,
        .journal-feed-page,
        .route-collections-page,
        .profile-page,
        .post-detail-layout,
        .articles-archive-page,
        .search-results-page,
        .all-albums-page,
        .album-detail-page,
        .official-routes-page,
        .seo-landing-page,
        .legal-document-page,
        .moderation-board-page,
        .community-page,
        .community-detail-page,
        .community-settings-page,
        .discovery-page
    ) {
        width: calc(100% - 20px);
    }

    body.page-site-redesign.page-regions-index #main-content > main,
    body.page-site-redesign.page-region-detail #main-content > main {
        width: calc(100% - 20px);
    }
}

@media (max-width: 767px) {
    body.page-site-redesign:not(.page-home-redesign) {
        padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    }

    body.page-site-redesign:not(.page-home-redesign):not(.page-mobile-no-topbar) > .site-topbar {
        top: 6px;
        height: 54px !important;
        margin-top: 6px;
    }

    body.page-site-redesign:not(.page-home-redesign) > .site-topbar .site-logo-icon {
        width: 26px !important;
        height: 26px !important;
    }

    body.page-site-redesign:not(.page-home-redesign) > .site-topbar .site-logo-mark,
    body.page-site-redesign:not(.page-home-redesign) > .site-topbar .site-logo-img {
        width: 126px !important;
        max-width: 126px !important;
    }

    body.page-site-redesign:not(.page-home-redesign) :where(
        .route-catalog-page,
        .journal-feed-page,
        .route-collections-page,
        .profile-page,
        .post-detail-layout,
        .articles-archive-page,
        .search-results-page,
        .all-albums-page,
        .album-detail-page,
        .official-routes-page,
        .seo-landing-page,
        .legal-document-page,
        .moderation-board-page,
        .community-page,
        .community-detail-page,
        .community-settings-page,
        .discovery-page
    ) {
        width: calc(100% - 12px);
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    body.page-site-redesign.page-regions-index #main-content > main,
    body.page-site-redesign.page-region-detail #main-content > main {
        width: calc(100% - 12px);
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    body.page-site-redesign:not(.page-home-redesign) :where(
        .catalog-light-hero,
        .journal-hero
    ) {
        min-height: 0;
        padding: 24px 20px !important;
    }

    body.page-site-redesign:not(.page-home-redesign) :where(
        .catalog-light-hero__title,
        .journal-hero h1,
        .articles-archive-page > section:first-child h1
    ) {
        font-size: clamp(30px, 10vw, 42px) !important;
    }

    body.page-site-redesign:not(.page-home-redesign) .journal-hero {
        display: block;
    }

    body.page-site-redesign:not(.page-home-redesign) .journal-hero__visual {
        display: none;
    }

    body.page-site-redesign:not(.page-home-redesign) .journal-toolbar {
        padding: 8px !important;
    }

    body.page-site-redesign:not(.page-home-redesign) .journal-filter-list {
        gap: 5px;
    }

    body.page-site-redesign:not(.page-home-redesign) .journal-filter {
        min-height: 38px;
        padding: 0 12px;
        border-radius: 5px;
    }

    body.page-site-redesign:not(.page-home-redesign) .route-catalog-filter {
        padding: 12px !important;
    }

    body.page-site-redesign.page-routes-index .route-showcase-card__media {
        aspect-ratio: 16 / 10;
    }

    body.page-site-redesign.page-routes-index .route-showcase-card__body,
    body.page-site-redesign.page-journal-index .journal-card__body {
        min-height: 0;
        padding: 16px !important;
    }

    body.page-site-redesign.page-journal-index .journal-hero__copy {
        padding: 0;
    }

    body.page-site-redesign .seo-landing-page > section:first-child {
        min-height: 0 !important;
        padding: 28px 20px !important;
    }

    body.page-site-redesign .seo-landing-page > section:first-child h1 {
        font-size: clamp(32px, 10vw, 44px) !important;
    }

    body.page-site-redesign .official-routes-page > div:first-child > div:first-child,
    body.page-site-redesign .discovery-header {
        padding: 22px !important;
    }

    body.page-site-redesign .legal-document-page {
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    body.page-site-redesign .legal-document-page > article {
        padding: 22px !important;
    }

    body.page-site-redesign:not(.page-home-redesign) #mobile-bottom-nav {
        right: 8px !important;
        bottom: 8px !important;
        left: 8px !important;
    }

    body.page-site-redesign:not(.page-home-redesign) #mobile-bottom-nav > div {
        height: 58px !important;
        border-color: rgba(255, 255, 255, .1) !important;
        border-radius: 8px !important;
        background: rgba(11, 23, 36, .95) !important;
        box-shadow: 0 16px 36px rgba(0, 0, 0, .25) !important;
    }

    body.page-site-redesign:not(.page-home-redesign) #mobile-bottom-nav :where(
        .nav-icon-bg,
        span:last-child
    ) {
        color: #d8e0e8 !important;
    }

    body.page-site-redesign:not(.page-home-redesign) #mobile-bottom-nav .nav-item-active .nav-icon-bg {
        background: var(--tt-shell-accent) !important;
        color: #fff !important;
    }

    body.page-site-redesign:not(.page-home-redesign) #mobile-bottom-nav .nav-item-active span:last-child {
        color: #ff9c64 !important;
    }

    body.page-site-redesign:not(.page-home-redesign) .site-footer {
        margin-top: 34px;
        padding-right: 6px;
        padding-left: 6px;
    }

    body.page-site-redesign:not(.page-home-redesign) .site-footer__brand,
    body.page-site-redesign:not(.page-home-redesign) .site-footer__nav,
    body.page-site-redesign:not(.page-home-redesign) .site-footer__bottom {
        padding-right: 20px;
        padding-left: 20px;
    }

    body.page-site-redesign:not(.page-home-redesign) .site-footer__nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.page-site-redesign:not(.page-home-redesign) .site-footer__bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    body.page-site-redesign:not(.page-home-redesign) .site-footer__bottom span:last-child {
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.page-site-redesign:not(.page-home-redesign) :where(
        .route-catalog-results-grid > *,
        .regions-index-grid > article,
        .route-collection-card,
        .journal-card,
        .profile-route-card,
        [data-feed-card]
    ) {
        transition: none !important;
    }
}
