:root {
    color-scheme: light;
    --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Roboto", "Helvetica Neue", Arial, sans-serif;
    --bg: #f8fafc;
    --paper: #ffffff;
    --text: #161927;
    --muted: #667085;
    --line: #e2e8f0;
    --accent: #4f46e5;
    --accent-dark: #3730a3;
    --accent-warm: #f59e0b;
    --accent-cool: #0891b2;
    --soft: #f3f1ff;
    --soft-warm: #fff7ed;
    --shadow: 0 18px 44px rgba(30, 41, 59, 0.08);
    --shadow-strong: 0 22px 58px rgba(30, 41, 59, 0.14);
    --premium-gradient: linear-gradient(135deg, #4f46e5 0%, #2563eb 52%, #06b6d4 100%);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 18% -10%, rgba(79, 70, 229, 0.08), transparent 32%),
        radial-gradient(circle at 88% 8%, rgba(245, 158, 11, 0.08), transparent 28%),
        var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-wrap: break-word;
}

p {
    margin: 0 0 14px;
}

p:last-child {
    margin-bottom: 0;
}

strong,
b {
    font-weight: 800;
}

a {
    color: var(--accent);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--accent-warm);
}

:focus-visible {
    outline: 3px solid rgba(79, 70, 229, 0.28);
    outline-offset: 3px;
}

.site-header {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(18px);
}

.site-header-inner {
    max-width: 1040px;
    margin: 0 auto;
    padding: 16px 20px 14px;
    display: grid;
    gap: 14px;
}

.header-top {
    display: grid;
    grid-template-columns: minmax(180px, auto) minmax(260px, 420px);
    gap: 24px;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: block;
    flex: 0 0 auto;
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.2);
}

.brand-text {
    display: grid;
    gap: 1px;
    min-width: 92px;
}

.brand-text strong {
    color: var(--text);
    font-size: 22px;
    font-weight: 850;
    line-height: 1.05;
}

.brand-text small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
}

.nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 2px;
    font-size: 15px;
    font-weight: 650;
    scrollbar-width: thin;
}

.nav a {
    flex: 0 0 auto;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.nav a:hover {
    border-color: rgba(79, 70, 229, 0.18);
    background: var(--soft);
    color: var(--text);
}

.nav a.active {
    border-color: rgba(79, 70, 229, 0.2);
    background: var(--premium-gradient);
    color: #fff;
    font-weight: 850;
    box-shadow: 0 12px 28px rgba(79, 70, 229, 0.2);
}

.site-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
}

.site-search input,
.search-large input {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.site-search input:focus,
.search-large input:focus,
.contact-form input:focus,
.contact-form textarea:focus {
    border-color: rgba(79, 70, 229, 0.42);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    outline: 0;
}

.site-search button,
.search-large button {
    border: 0;
    border-radius: 8px;
    padding: 9px 12px;
    background: var(--premium-gradient);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    align-self: stretch;
}

.site-search button:hover,
.search-large button:hover,
.button:hover {
    background: linear-gradient(135deg, #4338ca 0%, #1d4ed8 52%, #0891b2 100%);
    color: #fff;
}

.page {
    max-width: 1040px;
    margin: 0 auto;
    padding: 16px 20px 48px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumbs a {
    color: var(--muted);
    text-decoration: none;
}

.breadcrumbs strong {
    color: var(--text);
    font-weight: 700;
}

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 24px;
}

.pager a {
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--accent-dark);
    font-weight: 700;
    text-decoration: none;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.85fr);
    gap: 28px;
    align-items: end;
    padding: 44px 0 36px;
    border-bottom: 1px solid var(--line);
}

.hero h1,
h1 {
    letter-spacing: 0;
}

.hero-copy p {
    max-width: 700px;
}

.home-search {
    max-width: 640px;
    margin-top: 24px;
}

.search-large label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-weight: 700;
}

.search-large div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.hero h1,
h1 {
    margin: 0 0 12px;
    font-size: clamp(36px, 5.4vw, 64px);
    font-weight: 850;
    line-height: 1.05;
}

h2 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.18;
}

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

.eyebrow {
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 750;
    line-height: 1.25;
}

.lead {
    max-width: 760px;
    font-size: 19px;
    line-height: 1.55;
}

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

.home-card-grid {
    margin-top: 28px;
}

.card {
    display: grid;
    grid-template-rows: auto 1fr auto;
    align-items: start;
    min-height: 188px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
    box-shadow: var(--shadow);
}

.card-body {
    display: grid;
    gap: 10px;
    align-content: start;
}

.today-panel {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(79, 70, 229, 0.16);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.96) 0%, rgba(243, 241, 255, 0.92) 62%, rgba(255, 247, 237, 0.86) 100%);
    box-shadow: var(--shadow-strong);
}

.today-panel div {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(79, 70, 229, 0.12);
}

.today-panel div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.today-panel span,
.stat-label {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    text-transform: uppercase;
}

.today-panel strong {
    display: block;
    margin-top: 3px;
    font-size: 18px;
    line-height: 1.25;
    color: var(--text);
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.75fr);
    gap: 22px;
    align-items: start;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

.page-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(240px, 0.7fr);
    gap: 22px;
    align-items: end;
    padding-bottom: 28px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

.page-hero .search-large {
    align-self: end;
}

.detail-hero .lead {
    max-width: 760px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.summary-stats div {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: var(--shadow);
}

.summary-stats > div:only-child {
    grid-column: 2;
}

.summary-stats dt {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    text-transform: uppercase;
}

.summary-stats dd {
    margin: 4px 0 0;
    color: var(--accent);
    font-size: 32px;
    font-weight: 850;
    line-height: 1;
}

.fact-grid {
    display: grid;
    gap: 10px;
    margin: 0;
}

.fact-grid div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.fact-grid dt {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    text-transform: uppercase;
}

.fact-grid dd {
    margin: 3px 0 0;
    font-size: 18px;
    font-weight: 800;
}

.text-block {
    max-width: 760px;
}

.card h2 {
    font-size: 22px;
}

.mini-link-grid {
    display: grid;
    gap: 8px;
}

.mini-link-grid a,
.feature-link-block {
    display: block;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.mini-link-grid a:hover,
.feature-link-block:hover {
    border-color: rgba(79, 70, 229, 0.24);
    background: var(--soft);
    color: var(--text);
    box-shadow: 0 12px 26px rgba(79, 70, 229, 0.1);
    transform: translateY(-1px);
}

.button {
    display: inline-block;
    margin-top: 10px;
    border: 0;
    padding: 10px 14px;
    border-radius: 6px;
    background: var(--premium-gradient);
    color: #fff;
    font: inherit;
    text-decoration: none;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(79, 70, 229, 0.18);
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.button.secondary {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent-dark);
    box-shadow: none;
}

.button.secondary:hover {
    border-color: var(--accent-dark);
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(79, 70, 229, 0.24);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.quick-grid a {
    display: block;
    min-height: 58px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
}

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

.name-card {
    display: grid;
    gap: 4px;
    min-height: 78px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.name-card span {
    font-weight: 850;
}

.name-card small {
    color: var(--muted);
    font-size: 13px;
}

.name-card:hover {
    border-color: rgba(79, 70, 229, 0.28);
    background: var(--soft);
    color: var(--text);
    box-shadow: 0 14px 34px rgba(79, 70, 229, 0.1);
    transform: translateY(-1px);
}

.name-card[hidden] {
    display: none;
}

.quick-grid a:hover,
.year-card:hover,
.related-grid a:hover,
.countdown-strip a:hover,
.pager a:hover {
    border-color: rgba(79, 70, 229, 0.28);
    background: var(--soft);
    color: var(--text);
    box-shadow: 0 14px 34px rgba(79, 70, 229, 0.1);
}

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

.year-card {
    display: grid;
    gap: 6px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--text);
    text-decoration: none;
}

.year-card strong {
    font-size: 28px;
}

.year-card span {
    color: var(--accent);
    font-weight: 800;
}

.year-card small {
    color: var(--muted);
}

.link-list {
    padding-left: 20px;
}

.rich-list {
    display: grid;
    gap: 10px;
    padding: 0;
    list-style: none;
}

.rich-list li {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.rich-list span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}

.index-card-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.index-card-list li {
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.index-card-list a {
    font-weight: 800;
    text-decoration: none;
}

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

.entity-card {
    display: grid;
    gap: 6px;
    min-height: 86px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.entity-card:hover {
    border-color: rgba(79, 70, 229, 0.28);
    background: var(--soft);
    color: var(--text);
    box-shadow: 0 14px 34px rgba(79, 70, 229, 0.1);
    transform: translateY(-1px);
}

.entity-card time {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.entity-card span {
    font-weight: 850;
}

.entity-card small {
    color: var(--muted);
    font-size: 13px;
}

.columns {
    columns: 3 180px;
}

.source-list {
    display: grid;
    gap: 14px;
}

.source {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.source h2 {
    font-size: 20px;
}

.source-mini-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.source-mini-list li {
    display: grid;
    gap: 2px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.source-mini-list span,
.source-mini-list small {
    color: var(--muted);
    font-size: 14px;
}

.static-hero {
    grid-template-columns: minmax(0, 1fr);
}

.static-content {
    display: grid;
    gap: 16px;
    max-width: 100%;
}

.static-section {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.static-section p:last-child {
    margin-bottom: 0;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 22px;
    align-items: start;
}

.contact-form,
.contact-aside article {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.contact-form {
    display: grid;
    gap: 16px;
}

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

.contact-form label {
    display: grid;
    gap: 7px;
    color: var(--text);
    font-weight: 800;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-weight: 400;
}

.contact-form .has-error input,
.contact-form .has-error textarea {
    border-color: rgba(225, 29, 72, 0.44);
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.08), 0 10px 24px rgba(225, 29, 72, 0.06);
}

.contact-form textarea {
    resize: vertical;
}

.form-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.notice {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-weight: 700;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.notice ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.notice.success {
    border-color: rgba(14, 165, 233, 0.22);
    background: linear-gradient(180deg, #ffffff 0%, #f3fbff 100%);
    color: #155e75;
}

.notice.error {
    border-color: rgba(225, 29, 72, 0.2);
    background: linear-gradient(180deg, #ffffff 0%, #fff7f8 100%);
    color: #9f1239;
}

.contact-aside {
    display: grid;
    gap: 14px;
}

.contact-aside h2 {
    font-size: 20px;
}

.newsletter-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    gap: 22px;
    align-items: start;
}

.newsletter-form .button {
    width: fit-content;
}

.newsletter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.newsletter-actions .button {
    margin-top: 0;
}

.newsletter-unsubscribe {
    margin-left: 0;
}

.newsletter-options {
    display: grid;
    gap: 12px;
}

.contact-form .newsletter-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    cursor: pointer;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.contact-form .newsletter-option:hover {
    border-color: rgba(79, 70, 229, 0.24);
    box-shadow: 0 12px 26px rgba(79, 70, 229, 0.08);
    transform: translateY(-1px);
}

.contact-form .newsletter-option input {
    width: 18px;
    height: 18px;
    margin: 4px 0 0;
    accent-color: var(--accent);
}

.contact-form .newsletter-option strong,
.contact-form .newsletter-option small {
    display: block;
}

.contact-form .newsletter-option small {
    margin-top: 4px;
    color: var(--muted);
    font-weight: 500;
}

.newsletter-preview {
    display: grid;
    gap: 14px;
}

.newsletter-preview article {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.newsletter-preview span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.newsletter-preview h2 {
    margin: 6px 0 8px;
    font-size: 24px;
}

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

.related-grid a {
    display: grid;
    gap: 6px;
    min-height: 86px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--text);
    text-decoration: none;
}

.related-grid span {
    color: var(--muted);
    font-size: 14px;
}

.today-agenda {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
}

.today-agenda > div {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.agenda-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

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

.agenda-card {
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.agenda-card:hover {
    border-color: rgba(79, 70, 229, 0.28);
    background: var(--soft);
    color: var(--text);
    box-shadow: 0 14px 34px rgba(79, 70, 229, 0.1);
    transform: translateY(-1px);
}

.agenda-card time {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.agenda-card span {
    font-weight: 900;
}

.agenda-list li {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 12px;
    align-items: baseline;
}

.agenda-list time,
.countdown-strip small {
    color: var(--muted);
    font-size: 14px;
}

.countdown-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.countdown-strip-wide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.countdown-strip a {
    display: grid;
    gap: 2px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    text-decoration: none;
}

.countdown-strip strong {
    color: var(--accent);
    font-size: 34px;
    line-height: 1;
}

.countdown-strip span {
    font-weight: 800;
}

.count-mini {
    color: var(--accent);
    font-size: 44px;
    line-height: 1;
}

.faq {
    display: grid;
    gap: 10px;
}

.faq details {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    padding: 12px 14px;
}

.faq details[open] {
    border-color: rgba(79, 70, 229, 0.28);
    background: var(--soft);
}

.faq summary {
    cursor: pointer;
    font-weight: 800;
}

.faq p {
    margin-bottom: 0;
}

.section {
    margin-top: 38px;
}

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

.section-heading h2 {
    margin-bottom: 2px;
}

.section-heading p {
    color: var(--muted);
}

.catalog-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 16px;
}

.catalog-toolbar label {
    display: grid;
    gap: 7px;
    color: var(--text);
    font-weight: 850;
}

.catalog-toolbar input {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.catalog-toolbar input:focus {
    border-color: rgba(79, 70, 229, 0.42);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    outline: 0;
}

.catalog-toolbar p {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
    min-height: 48px;
    display: flex;
    align-items: center;
}

.empty-state {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--muted);
    font-weight: 800;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.month-panel {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    box-shadow: var(--shadow);
}

.date-list,
.date-card-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.date-list li {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px;
}

.date-link {
    font-weight: 800;
    text-decoration: none;
}

.date-card {
    display: grid;
    gap: 5px;
    min-height: 72px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.date-card:hover {
    border-color: rgba(79, 70, 229, 0.28);
    background: var(--soft);
    color: var(--text);
    box-shadow: 0 14px 34px rgba(79, 70, 229, 0.1);
    transform: translateY(-1px);
}

.date-card time {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.date-card span {
    font-weight: 850;
}

.date-card small {
    color: var(--muted);
    font-size: 13px;
}

.name-date-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.meta {
    color: var(--muted);
    font-size: 14px;
}

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

.result {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.result h2 {
    margin-bottom: 4px;
    font-size: 22px;
}

table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

th {
    background: #eef2ff;
    color: #312e81;
    font-size: 14px;
}

tr:nth-child(even) td {
    background: #fafbfc;
}

.count {
    margin: 20px 0 0;
    color: var(--accent);
    font-size: clamp(64px, 16vw, 150px);
    font-weight: 850;
    line-height: 1;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(160px, 0.55fr) minmax(170px, 0.65fr);
    gap: 28px;
    max-width: 1040px;
    margin: 0 auto;
    padding: 30px 20px 22px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 20px;
    font-weight: 900;
    text-decoration: none;
}

.site-footer p {
    max-width: 420px;
    color: var(--muted);
}

.footer-newsletter {
    display: grid;
    gap: 8px;
    max-width: 420px;
    margin-top: 18px;
}

.footer-newsletter label {
    color: var(--text);
    font-size: 14px;
    font-weight: 850;
}

.footer-newsletter div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
}

.footer-newsletter input[type="email"] {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.footer-newsletter input[type="email"]:focus {
    border-color: rgba(79, 70, 229, 0.42);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    outline: 0;
}

.footer-newsletter button {
    border: 0;
    border-radius: 8px;
    padding: 10px 12px;
    background: var(--premium-gradient);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(79, 70, 229, 0.16);
}

.footer-newsletter button:hover {
    background: linear-gradient(135deg, #4338ca 0%, #1d4ed8 52%, #0891b2 100%);
}

.site-footer nav {
    display: grid;
    gap: 7px;
    align-content: start;
}

.site-footer h2 {
    margin: 0 0 4px;
    color: var(--text);
    font-size: 15px;
}

.site-footer nav a {
    color: var(--muted);
    text-decoration: none;
}

.footer-link-button {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.site-footer nav a:hover,
.footer-link-button:hover {
    color: var(--accent-dark);
}

.footer-bottom {
    border-top: 1px solid var(--line);
    font-size: 14px;
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    max-width: 1040px;
    margin: 0 auto;
    padding: 18px 20px 24px;
}

.footer-bottom-inner p {
    margin: 0;
}

.footer-bottom-inner p:last-child {
    text-align: right;
}

.footer-bottom a {
    color: var(--muted);
    font-weight: 800;
    text-decoration: none;
}

.footer-bottom a:hover {
    color: var(--accent-dark);
}

.cookie-banner {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 50;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    width: min(760px, calc(100vw - 36px));
    padding: 18px;
    border: 1px solid rgba(79, 70, 229, 0.18);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(30, 41, 59, 0.2);
}

.cookie-banner[hidden],
.cookie-panel[hidden] {
    display: none;
}

.cookie-banner h2,
.cookie-panel h2 {
    margin-bottom: 6px;
    font-size: 20px;
}

.cookie-banner p,
.cookie-panel p {
    margin: 0 0 8px;
    color: var(--muted);
}

.cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.cookie-actions .button {
    margin-top: 0;
    border: 1px solid var(--accent);
    cursor: pointer;
}

.cookie-panel {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(32, 37, 43, 0.42);
}

.cookie-panel-inner {
    display: grid;
    gap: 14px;
    width: min(560px, 100%);
    padding: 22px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 54px rgba(31, 41, 55, 0.24);
}

.cookie-choice {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.cookie-choice span {
    display: grid;
    gap: 3px;
}

.cookie-choice small {
    color: var(--muted);
}

.cookie-choice input {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
}

@media (max-width: 760px) {
    .site-header-inner {
        padding: 14px 16px;
    }

    .header-top {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .nav {
        margin: 0 -16px;
        padding: 2px 16px 8px;
    }

    .nav a {
        flex: 0 0 auto;
    }

    .site-search {
        width: 100%;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .site-search input {
        flex: 1;
    }

    .page {
        padding: 14px 16px 42px;
    }

    h1,
    .hero h1 {
        font-size: 38px;
    }

    .hero {
        padding-top: 28px;
    }

    .actions {
        align-items: stretch;
        flex-direction: column;
    }

    .actions .button {
        text-align: center;
    }

    .search-large div {
        grid-template-columns: 1fr;
    }

    .hero {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .detail-hero {
        grid-template-columns: 1fr;
    }

    .page-hero {
        grid-template-columns: 1fr;
    }

    .summary-stats {
        grid-template-columns: 1fr;
    }

    .summary-stats > div:only-child {
        grid-column: auto;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .quick-grid {
        grid-template-columns: 1fr;
    }

    .name-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .section-heading,
    .catalog-toolbar {
        align-items: stretch;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .section-heading .button {
        text-align: center;
    }

    .year-grid {
        grid-template-columns: 1fr;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .entity-card-grid {
        grid-template-columns: 1fr;
    }

    .name-date-cards {
        grid-template-columns: 1fr;
    }

    .index-card-list {
        grid-template-columns: 1fr;
    }

    .today-agenda {
        grid-template-columns: 1fr;
    }

    .agenda-list li {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .countdown-strip {
        grid-template-columns: 1fr;
    }

    .month-grid {
        grid-template-columns: 1fr;
    }

    .contact-layout,
    .newsletter-layout,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .newsletter-actions .button {
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 26px 16px 18px;
    }

    .footer-newsletter div {
        grid-template-columns: 1fr;
    }

    .footer-bottom-inner {
        flex-direction: column;
        gap: 8px;
        padding: 18px 16px 22px;
    }

    .footer-bottom-inner p:last-child {
        text-align: left;
    }

    .cookie-banner {
        right: 12px;
        bottom: 12px;
        grid-template-columns: 1fr;
        width: calc(100vw - 24px);
    }

    .cookie-actions {
        justify-content: stretch;
    }

    .cookie-actions .button {
        flex: 1 1 140px;
        text-align: center;
    }

    table {
        min-width: 0;
        border: 0;
        background: transparent;
    }

    table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    table tbody,
    table tr,
    table td {
        display: block;
        width: 100%;
    }

    table tr {
        margin-bottom: 12px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--paper);
        overflow: hidden;
    }

    table td {
        display: grid;
        grid-template-columns: minmax(96px, 0.35fr) minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        border-bottom: 1px solid var(--line);
        background: var(--paper);
        min-width: 0;
    }

    table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 13px;
        font-weight: 800;
        text-transform: uppercase;
    }

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

@media (max-width: 420px) {
    .site-search {
        display: grid;
        grid-template-columns: 1fr;
    }

    h1,
    .hero h1 {
        font-size: 34px;
    }

    .today-panel,
    .today-agenda > div,
    .card,
    .source,
    .month-panel {
        padding: 16px;
    }
}
