@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&display=swap");

:root,
html[data-theme="light"],
html:not([data-theme]) {
    --pn-green: #111111;
    --pn-green-2: #404040;
    --pn-gold: #737373;
    --pn-bg: #ffffff;
    --pn-surface: #fafafa;
    --pn-text: #111111;
    --pn-muted: #737373;
    --pn-border: #e5e5e5;
    --pn-panel-bg: #ffffff;
    --pn-accent: #111111;
    --pn-accent-hover: #404040;
    --pn-font-weight-body: 300;
    --pn-font-weight-heading: 400;
    --pn-font-weight-strong: 500;
}

html[data-theme="dark"] {
    --pn-green: #f5f5f5;
    --pn-green-2: #d4d4d4;
    --pn-gold: #a3a3a3;
    --pn-bg: #0a0a0a;
    --pn-surface: #141414;
    --pn-text: #f5f5f5;
    --pn-muted: #a3a3a3;
    --pn-border: #2e2e2e;
    --pn-panel-bg: #111111;
    --pn-accent: #ffffff;
    --pn-accent-hover: #d4d4d4;
}

body {
    background: var(--pn-bg);
    color: var(--pn-text);
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: var(--pn-font-weight-body);
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    --ria-accent: #c41e3a;
    --pn-block-radius: 0.25rem;
    --pn-card-radius: 0.25rem;
}

html[data-theme="dark"] body {
    --ria-accent: #ff6b7f;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.section-title,
.display-5, .display-6 {
    font-weight: var(--pn-font-weight-heading);
    letter-spacing: -0.02em;
}

strong, b {
    font-weight: var(--pn-font-weight-strong);
}

.fw-bold {
    font-weight: var(--pn-font-weight-strong) !important;
}

.fw-semibold {
    font-weight: var(--pn-font-weight-heading) !important;
}

.lead {
    font-weight: var(--pn-font-weight-body);
}

.navbar-pn {
    background: var(--pn-bg);
    border-bottom: 1px solid var(--pn-border);
    box-shadow: none;
}

.navbar-pn .navbar-nav--service {
    border-top: 1px solid var(--pn-border);
    padding-top: 0.75rem;
    margin-top: 0.25rem;
}

@media (min-width: 992px) {
    .navbar-pn .navbar-collapse {
        justify-content: flex-end;
        align-items: center;
        gap: 0.25rem;
    }

    .navbar-pn .navbar-nav--primary {
        margin-left: auto !important;
    }

    .navbar-pn .navbar-nav--service {
        border-top: 0;
        border-left: 1px solid var(--pn-border);
        padding-top: 0;
        padding-left: 0.85rem;
        margin-top: 0;
        margin-left: 0.5rem;
    }
}

.navbar-pn .navbar-brand {
    font-weight: var(--pn-font-weight-heading);
    letter-spacing: 0.04em;
}

.navbar-pn .navbar-brand .site-brand-title {
    color: var(--pn-text);
    text-transform: uppercase;
}

.navbar-pn .navbar-brand .site-brand-subtitle {
    color: var(--pn-muted);
}

.navbar-pn .nav-link {
    color: var(--pn-muted);
    font-weight: var(--pn-font-weight-body);
}

.navbar-pn .nav-link:hover,
.navbar-pn .nav-link:focus-visible,
.navbar-pn .nav-link.show {
    color: var(--pn-text);
}

.navbar-pn .nav-link:not(.dropdown-toggle)::after,
.navbar-pn .nav-link.dropdown-toggle::before {
    background: var(--pn-accent);
}

.navbar-pn .nav-link.dropdown-toggle::after {
    border-top-color: var(--pn-muted);
}

.navbar-pn .nav-link.dropdown-toggle:hover::after,
.navbar-pn .nav-link.dropdown-toggle.show::after {
    border-top-color: var(--pn-text);
}

.navbar-pn .navbar-toggler {
    border-color: var(--pn-border);
}

.navbar-search-trigger,
.navbar-recent-trigger {
    border-color: var(--pn-border) !important;
    background: var(--pn-surface) !important;
    color: var(--pn-text) !important;
}

.navbar-search-trigger:hover,
.navbar-recent-trigger:hover {
    background: var(--pn-border) !important;
}

.theme-switch-navbar {
    border-color: var(--pn-border) !important;
    background: var(--pn-surface) !important;
    color: var(--pn-text) !important;
}

.theme-switch-navbar:hover {
    background: var(--pn-border) !important;
}

.btn-pn-primary {
    background: var(--pn-accent);
    border-color: var(--pn-accent);
    color: #fff;
    font-weight: var(--pn-font-weight-body);
}

.btn-pn-primary:hover,
.btn-pn-primary:focus-visible {
    background: var(--pn-accent-hover);
    border-color: var(--pn-accent-hover);
    color: #fff;
}

html[data-theme="dark"] .btn-pn-primary,
html[data-theme="dark"] .btn-pn-primary:hover,
html[data-theme="dark"] .btn-pn-primary:focus-visible {
    color: #111111;
}

.btn-pn-outline {
    border-color: var(--pn-border);
    color: var(--pn-text);
    font-weight: var(--pn-font-weight-body);
}

.btn-pn-outline:hover {
    background: var(--pn-surface);
    color: var(--pn-text);
}

.btn-outline-secondary {
    font-weight: var(--pn-font-weight-body);
    border-color: var(--pn-border);
    color: var(--pn-muted);
}

.badge-pn {
    background: var(--pn-surface);
    color: var(--pn-muted);
    border: 1px solid var(--pn-border);
    font-weight: var(--pn-font-weight-body);
}

.section-title {
    font-size: 1.65rem;
    font-weight: var(--pn-font-weight-heading);
}

.home-section {
    margin-bottom: 3.75rem;
}

.home-section .section-title {
    margin-bottom: 1.75rem;
}

@media (min-width: 992px) {
    .home-section {
        margin-bottom: 5.5rem;
    }

    .home-section .section-title {
        margin-bottom: 2.25rem;
    }
}

.home-section--last {
    margin-bottom: 0;
}

.card-soft {
    background: var(--pn-panel-bg);
    border: 1px solid var(--pn-border);
    box-shadow: none;
    border-radius: var(--pn-block-radius);
}

.home-hero {
    background: var(--pn-accent);
    color: #fff;
    border: 1px solid var(--pn-border);
    box-shadow: none;
}

.home-hero .badge-pn {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.18);
}

.home-hero .lead {
    color: rgba(255, 255, 255, 0.72);
}

.home-hero__step-num {
    width: 36px;
    height: 36px;
    background: var(--pn-surface);
    color: var(--pn-text);
    border: 1px solid var(--pn-border);
    font-weight: var(--pn-font-weight-body);
    font-size: 0.875rem;
}

.material-card-thumb {
    background: linear-gradient(135deg, #e5e5e5 0%, #fafafa 100%);
}

.image-with-ai-badge {
    position: relative;
}

.ratio > .ai-image-badge,
.image-with-ai-badge > .ai-image-badge,
.ai-image-badge {
    position: absolute;
    bottom: 0.5rem;
    left: auto;
    top: auto;
    right: 0.5rem;
    z-index: 2;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-top: 0.14rem;
    font-size: 0.6875rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    line-height: 1;
    background: rgba(17, 22, 19, 0.2);
    color: rgba(255, 255, 255, 0.42);
    pointer-events: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(2px);
}

.timeline-panel-card__thumb.image-with-ai-badge .ai-image-badge {
    bottom: 0.35rem;
    left: auto;
    top: auto;
    right: 0.35rem;
    padding-top: 0.12rem;
}

html[data-theme="dark"] .ai-image-badge {
    background: rgba(255, 255, 255, 0.22);
    color: rgba(17, 22, 19, 0.38);
}

.material-card-kind {
    font-weight: var(--pn-font-weight-body);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--pn-muted);
}

.material-card-actions__read {
    background-color: var(--pn-accent) !important;
    border-color: var(--pn-accent) !important;
    color: #fff !important;
    font-weight: var(--pn-font-weight-body) !important;
    flex: 0 0 auto;
}

html[data-theme="dark"] .material-card-actions__read,
html[data-theme="dark"] .material-card-actions__read:hover,
html[data-theme="dark"] .material-card-actions__read:focus-visible {
    color: #111111 !important;
}

.material-card-actions .material-card-actions__icon,
.material-card-actions .material-card-bookmark-btn,
.material-card-actions .material-card-download-btn,
.material-card-actions .material-card-bookmark-btn.is-bookmarked {
    -webkit-appearance: none;
    appearance: none;
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--pn-text) !important;
}

.material-card-actions .material-card-actions__icon:hover,
.material-card-actions .material-card-actions__icon:focus-visible,
.material-card-actions .material-card-bookmark-btn:hover,
.material-card-actions .material-card-bookmark-btn:focus-visible,
.material-card-actions .material-card-download-btn:hover,
.material-card-actions .material-card-download-btn:focus-visible,
.material-card-actions .material-card-bookmark-btn.is-bookmarked:hover,
.material-card-actions .material-card-bookmark-btn.is-bookmarked:focus-visible {
    background: none !important;
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--pn-accent-hover) !important;
}

.home-archive-card__shell {
    background: var(--pn-panel-bg);
    border: 1px solid var(--pn-border);
    box-shadow: none;
}

.home-archive-card__accent {
    background: var(--pn-accent);
}

.home-archive-card__icon {
    color: var(--pn-text);
    background: var(--pn-surface);
    box-shadow: inset 0 0 0 1px var(--pn-border);
}

.home-archive-card__eyebrow {
    color: var(--pn-muted);
    font-weight: var(--pn-font-weight-body);
}

.home-archive-card__title {
    font-weight: var(--pn-font-weight-heading);
}

.home-archive-year-tab.active,
.home-archive-year-tab[aria-selected="true"] {
    background: var(--pn-accent) !important;
    color: #fff !important;
}

.home-section-card__archive-link {
    color: var(--pn-muted);
    font-weight: var(--pn-font-weight-body);
}

.site-footer a {
    color: var(--pn-muted);
}

.site-footer a:hover {
    color: var(--pn-text);
}

html[data-theme="dark"] .site-footer a {
    color: #d4d4d4;
}

html[data-theme="dark"] .site-footer a:hover {
    color: #ffffff;
}

html[data-theme="dark"] .site-footer__more-link {
    color: #ffffff !important;
}

html[data-theme="dark"] .site-footer__more-link:hover {
    color: #d4d4d4 !important;
}

.site-footer__copyright {
    font-weight: 600;
    line-height: 1.5;
    max-width: 52rem;
}

.site-footer__contacts,
.site-footer__legal {
    line-height: 1.6;
    max-width: 52rem;
}

.site-footer__more-link {
    white-space: nowrap;
}

.site-footer__nav-list {
    font-size: 0.875rem;
}

.site-nav-links__item {
    color: var(--pn-muted);
    text-decoration: none;
}

.site-nav-links__item:hover {
    color: var(--pn-text);
}

html[data-theme="dark"] .site-nav-links__item {
    color: #d4d4d4;
}

html[data-theme="dark"] .site-nav-links__item:hover {
    color: #ffffff;
}

.scroll-top-btn {
    background: var(--pn-accent) !important;
    border-color: var(--pn-accent) !important;
    color: #ffffff;
}

html[data-theme="dark"] .scroll-top-btn {
    color: #111111;
}

.navbar-pn .dropdown-menu {
    border-color: var(--pn-border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.navbar-pn .dropdown-item {
    font-weight: var(--pn-font-weight-body);
    color: var(--pn-muted);
}

.navbar-pn .dropdown-item:hover,
.navbar-pn .dropdown-item:focus {
    background: var(--pn-surface);
    color: var(--pn-text);
}

html[data-theme="dark"] .home-hero {
    background: #141414;
}

html[data-theme="dark"] .material-card-thumb {
    background: linear-gradient(135deg, #1a1a1a 0%, #262626 100%);
}

.home-hero .btn-pn-outline {
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.home-hero .btn-pn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.detail-hero-placeholder {
    background: linear-gradient(135deg, #e5e5e5 0%, #fafafa 100%);
}

.detail-side-panel {
    background: var(--pn-surface);
}

.text-link-pn {
    color: var(--pn-text);
    text-decoration: none;
    font-weight: var(--pn-font-weight-body);
}

.text-link-pn:hover {
    color: var(--pn-muted);
}

html[data-theme="dark"] .detail-hero-placeholder {
    background: linear-gradient(135deg, #1a1a1a 0%, #262626 100%);
}

.rich-content {
    line-height: 1.75;
    color: var(--pn-text);
}

.rich-content > :first-child {
    margin-top: 0;
}

.rich-content > :last-child {
    margin-bottom: 0;
}

.rich-content h1,
.rich-content h2,
.rich-content h3,
.rich-content h4,
.rich-content h5,
.rich-content h6 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    line-height: 1.3;
}

.rich-content h1 {
    font-size: 1.75rem;
}

.rich-content h2 {
    font-size: 1.5rem;
}

.rich-content h3 {
    font-size: 1.25rem;
}

.rich-content h4 {
    font-size: 1.125rem;
}

.rich-content h5 {
    font-size: 1rem;
}

.rich-content h6 {
    font-size: 0.9375rem;
    color: var(--pn-muted);
}

.rich-content p {
    margin-bottom: 1rem;
}

.rich-content ul,
.rich-content ol {
    margin-bottom: 1rem;
    padding-left: 1.35rem;
}

.rich-content blockquote {
    margin: 1.25rem 0;
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--pn-green, #234b35);
    background: rgba(35, 75, 53, 0.06);
    border-radius: 0 0.5rem 0.5rem 0;
}

.rich-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

.rich-content a {
    color: #0d6efd;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.rich-content a:hover {
    color: #0a58ca;
}

html[data-theme="dark"] .rich-content a {
    color: #6ea8fe;
}

html[data-theme="dark"] .rich-content a:hover {
    color: #9ec5fe;
}

.rich-content--boxed {
    border: 1px solid var(--pn-border, #ccc);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1.3rem;
}

html[data-theme="dark"] .rich-content blockquote {
    background: rgba(255, 255, 255, 0.05);
}

.home-map-teaser {
    display: flex;
    flex-direction: column;
    color: inherit;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.home-map-teaser:hover {
    transform: translateY(-3px);
    box-shadow: 0 1.25rem 2.5rem rgba(17, 17, 17, 0.08);
    border-color: rgba(17, 17, 17, 0.12);
    color: inherit;
}

.home-map-teaser__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: rgba(17, 17, 17, 0.04);
}

.home-map-teaser__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.home-map-teaser:hover .home-map-teaser__image {
    transform: scale(1.03);
}

.home-map-teaser__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(17, 17, 17, 0.08) 0%, rgba(17, 17, 17, 0.72) 100%);
}

.home-map-teaser__pins {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.home-map-teaser__pin {
    position: absolute;
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 999px;
    background: #ffffff;
    border: 2px solid rgba(17, 17, 17, 0.85);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.28);
}

.home-map-teaser__pin--1 { top: 28%; left: 34%; }
.home-map-teaser__pin--2 { top: 42%; left: 58%; }
.home-map-teaser__pin--3 { top: 62%; left: 41%; }
.home-map-teaser__pin--4 { top: 51%; left: 72%; }

.home-map-teaser__hero-copy {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.25rem 1.35rem 1.35rem;
    color: #ffffff;
}

.home-map-teaser__eyebrow {
    display: inline-block;
    margin-bottom: 0.45rem;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.6875rem;
    font-weight: var(--pn-font-weight-strong);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.home-map-teaser__title {
    margin: 0 0 0.35rem;
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    color: #ffffff;
}

.home-map-teaser__lead {
    margin: 0;
    max-width: 34rem;
    font-size: 0.875rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.82);
}

.home-map-teaser__body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.25rem 1.25rem;
}

.home-map-teaser__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    flex: 1 1 auto;
}

.home-map-teaser__stat {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--pn-border);
    background: var(--pn-panel-bg);
    min-width: 0;
}

.home-map-teaser__stat--total {
    background: rgba(17, 17, 17, 0.04);
}

.home-map-teaser__stat-value {
    font-size: 0.875rem;
    font-weight: var(--pn-font-weight-strong);
    line-height: 1;
}

.home-map-teaser__stat-label {
    font-size: 0.75rem;
    color: var(--pn-muted);
    line-height: 1.2;
}

.home-map-teaser__stat--empty .home-map-teaser__stat-label {
    font-size: 0.8125rem;
}

.home-map-teaser__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex: 0 0 auto;
    pointer-events: none;
}

html[data-theme="dark"] .home-map-teaser:hover {
    box-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .home-map-teaser__stat--total {
    background: rgba(255, 255, 255, 0.05);
}

.home-partners__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

@media (min-width: 768px) {
    .home-partners__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.25rem;
    }
}

@media (min-width: 1200px) {
    .home-partners__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.home-partners__item {
    min-width: 0;
}

.home-partners__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    min-height: 112px;
    padding: 1rem 1.25rem;
    border: 1px solid var(--pn-border);
    border-radius: 1rem;
    background: var(--pn-surface, #fff);
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.home-partners__link:hover {
    border-color: rgba(35, 75, 53, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.home-partners__link--static {
    cursor: default;
}

.home-partners__link--static:hover {
    transform: none;
    box-shadow: none;
}

.home-partners__logo {
    display: block;
    max-width: 100%;
    max-height: 72px;
    width: auto;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.home-partners__text {
    width: 100%;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--pn-muted);
    text-align: center;
}

.home-partners__text p:last-child {
    margin-bottom: 0;
}

.home-partners__link:hover .home-partners__text {
    color: var(--pn-text);
}

.home-timeline__shell {
    border: 1px solid var(--pn-border);
    background: linear-gradient(180deg, rgba(35, 75, 53, 0.04) 0%, var(--pn-panel-bg) 120px);
}

.home-timeline__rail-wrap {
    overflow-x: auto;
    padding: 1.25rem 1.25rem 0.5rem;
    border-bottom: 1px solid var(--pn-border);
    background: rgba(35, 75, 53, 0.03);
}

.home-timeline__rail {
    display: flex;
    align-items: flex-start;
    gap: 0;
    min-width: max-content;
    position: relative;
    padding-bottom: 0.35rem;
}

.home-timeline__rail::before {
    content: "";
    position: absolute;
    left: 1.5rem;
    right: 1.5rem;
    top: 0.72rem;
    height: 2px;
    background: var(--pn-border);
    z-index: 0;
}

.home-timeline__point {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    min-width: 5.5rem;
    border: 0;
    background: transparent;
    color: var(--pn-muted);
    padding: 0 0.85rem 0.5rem;
    text-align: center;
    transition: color 0.2s ease;
}

.home-timeline__point-dot {
    display: block;
    width: 0.95rem;
    height: 0.95rem;
    margin: 0.25rem auto 0.55rem;
    border-radius: 50%;
    border: 2px solid var(--pn-border);
    background: var(--pn-panel-bg);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.home-timeline__point-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
}

.home-timeline__point:hover,
.home-timeline__point.is-active {
    color: var(--pn-accent);
}

.home-timeline__point:hover .home-timeline__point-dot,
.home-timeline__point.is-active .home-timeline__point-dot {
    border-color: var(--pn-accent);
    background: var(--pn-accent);
    transform: scale(1.08);
}

.home-timeline__panel {
    display: none;
    padding: 1.25rem 1.25rem 1.5rem;
}

.home-timeline__panel.is-active {
    display: block;
}

.home-timeline__epoch {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--pn-border);
}

.home-timeline__epoch-media {
    flex: 0 0 7.5rem;
    width: 7.5rem;
}

.home-timeline__epoch-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 0.85rem;
    border: 1px solid var(--pn-border);
}

.home-timeline__epoch-body {
    min-width: 0;
    flex: 1 1 auto;
}

.home-timeline__epoch-badge {
    margin-bottom: 0.65rem;
}

.home-timeline__epoch-title {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
}

.home-timeline__epoch-summary {
    color: var(--pn-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
}

.home-timeline__materials-label {
    letter-spacing: 0.04em;
}

.home-timeline__preview-list {
    --bs-gutter-x: 0.75rem;
    --bs-gutter-y: 0.75rem;
}

.timeline-panel-card__list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.timeline-panel-card {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    padding: 0.85rem;
    border: 1px solid var(--pn-border);
    border-radius: 1rem;
    background: var(--pn-panel-bg);
    color: inherit;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    height: 100%;
}

.timeline-panel-card--grid {
    flex-direction: row;
    gap: 0.75rem;
    padding: 0.75rem;
    align-items: stretch;
}

.timeline-panel-card--grid .timeline-panel-card__thumb {
    flex: 0 0 5.5rem;
    width: 5.5rem;
    height: 4rem;
    border-radius: 0.65rem;
}

.timeline-panel-card--grid .timeline-panel-card__body {
    justify-content: center;
    gap: 0.2rem;
}

.timeline-panel-card--grid .timeline-panel-card__meta {
    font-size: 0.625rem;
}

.timeline-panel-card--grid .timeline-panel-card__title {
    font-size: 0.8125rem;
    -webkit-line-clamp: 2;
}

.timeline-panel-card--grid .timeline-panel-card__summary {
    font-size: 0.75rem;
    line-height: 1.35;
    -webkit-line-clamp: 2;
}

.timeline-panel-card--grid .timeline-panel-card__date {
    font-size: 0.6875rem;
    margin-top: 0;
}

@media (max-width: 575.98px) {
    .timeline-panel-card--grid .timeline-panel-card__thumb {
        flex-basis: 4rem;
        width: 4rem;
        height: 3rem;
    }

    .timeline-panel-card--grid .timeline-panel-card__summary {
        -webkit-line-clamp: 1;
    }
}

.timeline-panel-card:hover {
    transform: translateY(-1px);
    border-color: rgba(35, 75, 53, 0.24);
    box-shadow: 0 10px 22px rgba(35, 75, 53, 0.1);
    color: inherit;
}

.timeline-panel-card__thumb {
    flex: 0 0 7.25rem;
    width: 7.25rem;
    height: 5.4rem;
    border-radius: 0.85rem;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(35, 75, 53, 0.92), rgba(184, 155, 74, 0.68));
}

.timeline-panel-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.timeline-panel-card__placeholder {
    display: block;
    width: 100%;
    height: 100%;
}

.timeline-panel-card__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem;
}

.timeline-panel-card__meta {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--pn-accent);
}

.timeline-panel-card__title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.timeline-panel-card__summary {
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--pn-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.timeline-panel-card__date {
    font-size: 0.8125rem;
    color: var(--pn-muted);
}

.home-timeline__materials-label {
    letter-spacing: 0.04em;
}

.history-period-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(18, 28, 22, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 1060;
}

.history-period-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(32rem, calc(100vw - 1rem));
    height: 100vh;
    height: 100dvh;
    background: var(--pn-panel-bg, #fff);
    border-left: 1px solid var(--pn-border);
    box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    transition: transform 0.28s ease;
    z-index: 1065;
    display: flex;
    flex-direction: column;
}

html.is-history-period-drawer-open .history-period-drawer-backdrop {
    opacity: 1;
    visibility: visible;
}

html.is-history-period-drawer-open .history-period-drawer {
    transform: translateX(0);
}

body.history-period-drawer-open {
    overflow: hidden;
}

.history-period-drawer__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid var(--pn-border);
}

.history-period-drawer__title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
}

.history-period-drawer__subtitle {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--pn-muted);
    line-height: 1.45;
}

.history-period-drawer__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--pn-border);
    border-radius: 999px;
    background: transparent;
    color: var(--pn-text);
    padding: 0;
    cursor: pointer;
    flex: 0 0 auto;
}

.history-period-drawer__close:hover {
    background: rgba(35, 75, 53, 0.06);
}

.history-period-drawer__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}

.history-period-drawer__list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-period-drawer__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid var(--pn-border);
}

html[data-theme="dark"] .history-period-drawer {
    background: var(--pn-panel-bg);
    box-shadow: -12px 0 32px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] .history-period-drawer__close {
    background: rgba(255, 255, 255, 0.04);
}

.home-timeline__empty {
    font-size: 0.92rem;
    padding: 0.5rem 0 0.25rem;
}

html[data-theme="dark"] .timeline-panel-card {
    background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .timeline-panel-card:hover {
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .home-timeline__shell {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, var(--pn-panel-bg) 120px);
}

html[data-theme="dark"] .home-timeline__rail-wrap {
    background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 575.98px) {
    .home-timeline__epoch {
        flex-direction: column;
    }

    .home-timeline__epoch-media {
        width: 100%;
        flex-basis: auto;
    }

    .home-timeline__epoch-image {
        max-height: 11rem;
    }
}

.home-hero-week__media {
    min-height: 280px;
    height: 100%;
    background: rgba(35, 75, 53, 0.06);
}

.home-hero-week__photo {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
}

.home-hero-week__media--empty {
    min-height: 280px;
}

html[data-theme="dark"] .home-partners__link {
    background: rgba(255, 255, 255, 0.04);
}

.material-card-summary {
    line-height: 1.55;
}

.material-card-source-inline {
    display: inline-block;
    margin-top: 2px;
    max-width: 100%;
    vertical-align: top;
}

.material-card-source-badge {
    display: inline-block;
    vertical-align: baseline;
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
    white-space: nowrap;
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-source__link {
    display: inline-block;
    max-width: min(100%, 28rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

.content-gallery__link {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    background: var(--pn-panel-bg);
}

.content-gallery__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.75rem 1.5rem rgba(35, 75, 53, 0.12) !important;
    border-color: rgba(35, 75, 53, 0.22) !important;
}

.content-gallery__thumb {
    background: rgba(35, 75, 53, 0.06);
}

html[data-theme="dark"] .content-gallery__thumb {
    background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 575.98px) {
    .news-source__link,
    .material-card-source-badge {
        max-width: 100%;
    }
}

.error-page {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.error-page__code {
    color: var(--pn-muted);
    letter-spacing: -0.04em;
    line-height: 1;
}

/* --- RIA-inspired content layout (header/footer/cards unchanged) --- */

.ria-page {
    --ria-accent: #c41e3a;
}

.ria-section-label {
    font-size: 0.8125rem;
    font-weight: var(--pn-font-weight-strong);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ria-accent, #c41e3a);
    margin-bottom: 0;
}

.list-page-header {
    margin-bottom: 1.5rem;
    padding: 0;
    border: 0;
    background: transparent;
}

.list-page-header__title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: var(--pn-font-weight-heading);
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}

.list-page-header__lead,
.list-page-header__note {
    color: var(--pn-muted);
    font-size: 0.9375rem;
    line-height: 1.55;
    max-width: 42rem;
}

.list-page-header__note {
    font-size: 0.875rem;
    margin-top: -0.5rem;
}

.list-page-header__archive {
    border-top: 1px solid var(--pn-border);
}

.list-filters .form-label {
    font-size: 0.8125rem;
    color: var(--pn-muted);
    margin-bottom: 0.35rem;
}

.list-filters .form-control,
.list-filters .form-select {
    border-radius: 999px;
    border-color: var(--pn-border);
    background: var(--pn-panel-bg);
    min-height: 2.375rem;
    padding-inline: 0.875rem;
}

.list-filters .form-control:focus,
.list-filters .form-select:focus {
    border-color: var(--ria-accent, #c41e3a);
    box-shadow: none;
}

.list-filters .form-select {
    padding-right: 2.25rem;
}

.ria-panel {
    background: var(--pn-panel-bg);
    border: 1px solid var(--pn-border);
    border-radius: var(--pn-block-radius);
}

/* Единое скругление блоков на публичной части (карточки материалов — отдельно). */
main .card-soft.rounded-4,
main .card.rounded-4,
main .detail-side-panel.rounded-4,
main .rounded-4,
.portal-archive-hub__shell,
.home-timeline__shell,
.recent-drawer,
.history-period-drawer {
    border-radius: var(--pn-block-radius) !important;
}

article.card.material-card,
main .card-soft.rounded-6,
main article.card.rounded-6 {
    border-radius: var(--pn-card-radius) !important;
    overflow: hidden;
}

.ria-hub {
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--pn-border);
}

.ria-hub__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ria-hub__more {
    font-size: 0.875rem;
    white-space: nowrap;
}

.ria-featured {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.ria-featured--empty {
    min-height: 12rem;
    border: 1px dashed var(--pn-border);
    border-radius: var(--pn-block-radius);
}

.ria-featured__media {
    display: block;
    overflow: hidden;
    border-radius: var(--pn-block-radius);
    background: var(--pn-surface);
}

.ria-featured__image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.ria-featured__time {
    display: block;
    font-size: 0.8125rem;
    color: var(--pn-muted);
    margin-bottom: 0.35rem;
}

.ria-featured__title {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    line-height: 1.25;
    margin-bottom: 0.5rem;
}

.ria-featured__title a {
    color: var(--pn-text);
}

.ria-featured__title a:hover {
    color: var(--ria-accent, #c41e3a);
}

.ria-featured__lead {
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--pn-muted);
}

.ria-headlines {
    border: 1px solid var(--pn-border);
    border-radius: var(--pn-block-radius);
    background: var(--pn-panel-bg);
    padding: 0.35rem 0;
}

.ria-headlines__list {
    display: flex;
    flex-direction: column;
}

.ria-headline {
    display: grid;
    grid-template-columns: 6.75rem 1fr;
    gap: 0.875rem;
    align-items: start;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--pn-border);
}

.ria-headline:last-child {
    border-bottom: 0;
}

.ria-headline__media {
    display: block;
    align-self: start;
}

.ria-headline__thumb {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
    border-radius: var(--pn-block-radius);
    background: var(--pn-surface);
}

.ria-headline__thumb--empty {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--pn-surface) 0%, var(--pn-border) 100%);
}

.ria-headline__body {
    min-width: 0;
}

.ria-headline__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.65rem;
    margin-bottom: 0.25rem;
}

.ria-headline__kind {
    font-size: 0.6875rem;
    font-weight: var(--pn-font-weight-strong);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ria-accent, #c41e3a);
}

.ria-headline__time {
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--pn-muted);
    font-variant-numeric: tabular-nums;
}

.ria-headline__link {
    display: block;
    color: var(--pn-text);
    text-decoration: none;
    font-size: 0.9375rem;
    line-height: 1.35;
    font-weight: var(--pn-font-weight-heading);
    margin-bottom: 0.2rem;
}

.ria-headline__link:hover {
    color: var(--ria-accent, #c41e3a);
}

.ria-headline__excerpt {
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--pn-muted);
}

.ria-section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    padding: 0.75rem 0 1.25rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--pn-border);
}

.ria-section-nav__link {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--pn-border);
    border-radius: 999px;
    color: var(--pn-text);
    text-decoration: none;
    font-size: 0.875rem;
    background: var(--pn-panel-bg);
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.ria-section-nav__link:hover {
    border-color: var(--ria-accent, #c41e3a);
    color: var(--ria-accent, #c41e3a);
}

main .btn:not(.material-card-actions__read):not(.scroll-top-btn),
.recent-drawer__footer .btn,
.history-period-drawer__footer .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--pn-border) !important;
    border-radius: 999px !important;
    color: var(--pn-text) !important;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: var(--pn-font-weight-body) !important;
    line-height: 1.35;
    background: var(--pn-panel-bg) !important;
    box-shadow: none !important;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

main .btn:not(.material-card-actions__read):not(.scroll-top-btn):hover,
main .btn:not(.material-card-actions__read):not(.scroll-top-btn):focus-visible,
.recent-drawer__footer .btn:hover,
.recent-drawer__footer .btn:focus-visible,
.history-period-drawer__footer .btn:hover,
.history-period-drawer__footer .btn:focus-visible {
    border-color: var(--ria-accent, #c41e3a) !important;
    color: var(--ria-accent, #c41e3a) !important;
    background: var(--pn-panel-bg) !important;
}

main .btn.btn-sm:not(.material-card-actions__read),
.recent-drawer__footer .btn.btn-sm,
.history-period-drawer__footer .btn.btn-sm {
    padding: 0.3rem 0.65rem;
    font-size: 0.8125rem;
}

main .btn.btn-lg:not(.material-card-actions__read) {
    padding: 0.45rem 0.95rem;
    font-size: 0.9375rem;
}

.ria-layout__sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ria-sidebar-block {
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--pn-border);
}

.ria-sidebar-block:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.ria-sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.ria-sidebar-links__item {
    display: block;
    padding: 0.55rem 0;
    color: var(--pn-text);
    text-decoration: none;
    font-size: 0.9375rem;
    border-bottom: 1px solid var(--pn-border);
}

.ria-sidebar-links__item:last-child {
    border-bottom: 0;
}

.ria-sidebar-links__item:hover {
    color: var(--ria-accent, #c41e3a);
}

html[data-theme="dark"] .ria-page {
    --ria-accent: #ff6b7f;
}

@media (max-width: 991.98px) {
    .ria-headline {
        grid-template-columns: 5.5rem 1fr;
        gap: 0.65rem;
        padding-inline: 0.75rem;
    }

    .ria-section-nav {
        gap: 0.35rem;
    }

    .ria-section-nav__link {
        font-size: 0.8125rem;
        padding: 0.3rem 0.65rem;
    }
}
