/* ══════════════════════════════════════════════════════════════
   Модуль «Токаев» — AV DS 4 production pass
   Palette: AV DS 4 blue + institutional neutral surfaces
   Fonts: IBM Plex Sans / IBM Plex Mono with Inter fallback
   ══════════════════════════════════════════════════════════════ */

:root {
    /* ── Reestr identity / AV DS 4 institutional variant ── */
    --bg: #F7FBFF;
    --surface: #FFFFFF;
    --surface-alt: #F1F6FB;
    --surface-warm: #FBFDFF;
    --border: #D6E6F6;
    --border-light: #E6EEF7;

    /* ── Text ── */
    --text: #13263C;
    --text-secondary: #48617C;
    --text-muted: #6B7E95;
    --text-faint: #9AAAC0;

    /* ── Accent ── */
    --accent: #1F5FAE;
    --accent-hover: #174C8D;
    --accent-light: #EAF4FF;
    --accent-subtle: #CFE0F5;
    --accent-strong: #0D2B4D;

    /* ── Brand support ── */
    --gold: #C79D57;
    --gold-light: #F3E5C8;

    /* ── Fonts: AV DS 4 stock stack ── */
    --serif: 'IBM Plex Sans', 'Inter', -apple-system, 'Segoe UI', sans-serif;
    --sans: 'IBM Plex Sans', 'Inter', -apple-system, 'Segoe UI', sans-serif;
    --mono: 'IBM Plex Mono', 'JetBrains Mono', 'SFMono-Regular', 'Consolas', monospace;

    /* ── Radius: this registry uses a squared AV DS 4 variant ── */
    --radius: 0;
    --radius-lg: 0;

    /* ── Shadows ── */
    --shadow-sm: none;
    --shadow: none;
    --shadow-lg: none;
    --shadow-hover: none;

    /* ── Transition ── */
    --transition: 0.15s ease;
    --mobile-nav-offset: 96px;

    /* ── AV DS 4 primitive token aliases ── */
    --surface-base: var(--surface);
    --surface-muted: var(--surface-alt);
    --surface-emphasis: var(--surface-warm);
    --color-text-primary: var(--text);
    --color-text-secondary: var(--text-secondary);
    --color-text-muted: var(--text-muted);
    --color-text-faint: var(--text-faint);
    --color-text-on-accent: #FFFFFF;
    --color-border-subtle: var(--border-light);
    --color-border-default: var(--border);
    --color-accent-primary: var(--accent);
    --color-accent-primary-hover: var(--accent-hover);
    --color-accent-primary-active: var(--accent-strong);
    --color-accent-primary-subtle: var(--accent-light);
    --color-success: #059669;
    --color-warning: #B45309;
    --color-danger: #B91C1C;
    --avds-radius-sm: var(--radius);
    --avds-radius-md: var(--radius);
    --avds-radius-lg: var(--radius-lg);
    --avds-shadow-sm: var(--shadow-sm);
    --avds-shadow-md: var(--shadow);
    --avds-transition-fast: var(--transition);
}

/* ── AV DS 4 stock primitive compatibility layer ───────────── */

.avds-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: var(--avds-radius-sm);
    font-family: var(--sans);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.045em;
    line-height: 1;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--avds-transition-fast), color var(--avds-transition-fast), border-color var(--avds-transition-fast);
}

.avds-btn--primary {
    background: var(--color-accent-primary);
    border-color: var(--color-accent-primary);
    color: var(--color-text-on-accent);
}

.avds-btn--primary:hover {
    background: var(--color-accent-primary-hover);
    border-color: var(--color-accent-primary-hover);
    color: var(--color-text-on-accent);
}

.avds-btn--secondary {
    background: transparent;
    border-color: var(--color-border-default);
    color: var(--color-text-primary);
}

.avds-btn--secondary:hover {
    background: transparent;
    border-color: var(--color-accent-primary);
    color: var(--color-accent-primary);
}

.avds-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border: 1px solid var(--color-border-default);
    border-radius: var(--avds-radius-sm);
    background: var(--surface-base);
    color: var(--color-text-secondary);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.avds-pill--accent {
    background: var(--color-accent-primary);
    border-color: var(--color-accent-primary);
    color: var(--color-text-on-accent);
}

.avds-pill--muted {
    background: var(--surface-muted);
    border-color: var(--color-border-subtle);
    color: var(--color-text-muted);
}

.avds-card {
    background: var(--surface-base);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--avds-radius-md);
    box-shadow: var(--avds-shadow-sm);
}

.avds-card--soft {
    background: var(--surface-muted);
}

.avds-card--interactive {
    transition: border-color var(--avds-transition-fast), background var(--avds-transition-fast);
}

.avds-card--interactive:hover {
    border-color: var(--color-accent-primary);
}

.avds-table-shell {
    width: 100%;
    overflow-x: auto;
    background: var(--surface-base);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--avds-radius-md);
    -webkit-overflow-scrolling: touch;
}

.avds-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--avds-radius-sm);
    background: var(--surface-muted);
    color: var(--color-text-secondary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}


/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.56;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 0.9375rem;
}

body.mobile-nav-open {
    overflow: hidden;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

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

/* ── Speaker Switcher ──────────────────────────────────────── */

.speaker-switcher {
    display: flex;
    gap: 0;
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0;
    width: fit-content;
    margin: 0 auto 4px;
    border-bottom: 1px solid var(--border-light);
}

.speaker-tab {
    display: inline-flex;
    align-items: center;
    padding: 6px 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
    border-radius: 0;
    transition: all var(--transition);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.speaker-tab:hover {
    color: var(--text-secondary);
}

.speaker-tab.active {
    background: transparent;
    color: var(--accent);
    box-shadow: none;
    border-bottom-color: var(--accent);
}

/* ── Header ────────────────────────────────────────────────── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.logo-image {
    display: block;
    width: 220px;
    max-width: 100%;
    height: auto;
}

.nav-links {
    display: flex;
    gap: 36px;
}

.nav-link {
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--text);
}

.nav-link.active {
    color: var(--text);
    border-bottom-color: var(--accent);
    font-weight: 700;
}

.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    position: relative;
    z-index: 101;
}

.nav-burger span {
    width: 20px;
    height: 1.5px;
    background: var(--text);
    border-radius: 0;
    transition: transform var(--transition), opacity var(--transition), background var(--transition);
    transform-origin: center;
}

.nav-burger.active span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.nav-burger.active span:nth-child(2) {
    opacity: 0;
}

.nav-burger.active span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ── Hero ──────────────────────────────────────────────────── */

.hero {
    padding: 28px 0 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 40%, var(--gold) 100%);
    opacity: 0.7;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: min(58vw, 760px) auto;
    opacity: 0;
    pointer-events: none;
}

.hero-content {
    text-align: left;
    max-width: 780px;
    margin: 0;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-family: var(--serif);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 10px;
    color: var(--text);
    letter-spacing: -0.015em;
    text-align: left;
    hyphens: none;
}

.hero-subtitle {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.7;
    max-width: 600px;
    font-weight: 400;
    text-align: left;
    hyphens: none;
}

.hero-grid,
.overview-hero,
.hero-main,
.hero-side {
    position: relative;
    z-index: 1;
}

.hero-stats {
    display: flex;
    gap: 0;
    margin-top: 12px;
    margin-bottom: 16px;
    border-left: 3px solid var(--accent);
    padding-left: 0;
}

.stat-card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 4px 32px;
    text-align: left;
    position: relative;
}

.stat-card + .stat-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 1px;
    background: var(--border);
}

.stat-num {
    display: block;
    font-family: var(--serif);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1.05;
    margin-bottom: 2px;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums lining-nums;
}

.stat-label {
    font-size: 0.75rem; /* 12px minimum */
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    line-height: 1.3;
}

.hero-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
    margin-bottom: 8px;
}

/* ── Buttons ───────────────────────────────────────────────── */

.btn,
.avds-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 20px;
    border-radius: var(--radius);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
    border: 1px solid transparent;
    font-family: var(--sans);
}

.btn-primary,
.avds-btn--primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.btn-primary:hover,
.avds-btn--primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
}

.btn-secondary,
.avds-btn--secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover,
.avds-btn--secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: transparent;
}

/* ── Sections ──────────────────────────────────────────────── */

.section {
    padding: 28px 0;
}

main section[id] {
    scroll-margin-top: 148px;
}

.section-alt {
    background: var(--bg);
    border-top: 1px solid var(--border-light);
    padding: 24px 0;
}

.section-title {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 4px;
    text-align: left;
    color: var(--text);
    letter-spacing: -0.01em;
    hyphens: none;
}

.section-desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    text-align: left;
    margin-bottom: 20px;
    font-weight: 400;
    hyphens: none;
}

.page-title {
    font-family: var(--serif);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
    letter-spacing: -0.01em;
}

.page-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-weight: 400;
}

/* ── Theme Grid ────────────────────────────────────────────── */

.theme-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
}

.theme-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 13px 16px;
    transition: border-color var(--transition), background var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 0;
}

.theme-card--with-links {
    display: grid;
    align-items: stretch;
    gap: 10px;
}

.theme-card-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.theme-card-ident {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 auto;
}

/* Left accent border instead of top */
.theme-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent-color, var(--accent));
}

.theme-card:hover {
    border-color: var(--accent-subtle);
    background: #fbfdff;
    color: var(--text);
}

.theme-code {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent-color, var(--accent));
    letter-spacing: 0.1em;
    margin-bottom: 0;
    text-transform: uppercase;
    font-family: var(--mono);
    flex-shrink: 0;
    width: 18px;
}

.theme-name {
    font-family: var(--serif);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    flex: 1;
    margin: 0;
    text-align: left;
    hyphens: none;
}

.theme-icon {
    font-size: 17px;
    color: var(--accent-color, var(--accent));
    margin-bottom: 10px;
    opacity: 0.8;
}

.theme-count {
    font-size: 11px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    white-space: nowrap;
    margin-left: auto;
    flex-shrink: 0;
}

.theme-card-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
}

.theme-card-links-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-faint);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.theme-card-link {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 8px;
    border: 1px solid var(--border-light);
    background: var(--surface-alt);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.theme-card-link:hover {
    color: var(--accent);
    border-color: var(--accent-subtle);
}

/* ── Document Cards ────────────────────────────────────────── */

.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
}

.doc-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 16px;
    transition: all var(--transition);
    display: grid;
    grid-template-rows: auto auto auto;
    color: var(--text);
    position: relative;
}

.doc-card:hover {
    border-color: var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.doc-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.doc-type {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    font-weight: 700;
    font-family: var(--mono);
}

.doc-date {
    font-size: 12px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.doc-title {
    font-family: var(--serif);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    color: var(--text);
    text-align: left;
    hyphens: none;
}

.doc-venue {
    font-size: 11px;
    color: var(--text-muted);
    text-align: left;
}

.doc-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 4px;
}

/* ── Quotes ────────────────────────────────────────────────── */

.quotes-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 760px;
    margin: 0 auto;
}

.quote-card {
    background: var(--surface);
    border-left: 3px solid var(--accent);
    border-radius: 0;
    padding: 28px 28px 24px;
    box-shadow: var(--shadow-sm);
}

.quote-text {
    font-family: var(--serif);
    font-size: 1.0625rem;
    font-style: normal;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 14px;
}

.quote-text::before { content: '\201C'; }
.quote-text::after { content: '\201D'; }

.quote-source {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
    font-variant: small-caps;
    letter-spacing: 0.03em;
    font-weight: 500;
}

.quote-year {
    font-weight: 700;
    color: var(--accent);
    font-variant: normal;
}

/* ── Filters ───────────────────────────────────────────────── */

.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 32px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.filter-chip:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.filter-chip.active {
    background: var(--accent-hover);
    color: #fff;
    border-color: var(--accent-hover);
    font-weight: 600;
}

/* ── Search ────────────────────────────────────────────────── */

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 28px;
}

.search-input {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text);
    font-family: var(--sans);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.search-input::placeholder { color: var(--text-faint); }
.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-light);
}

/* ── Timeline ──────────────────────────────────────────────── */

.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border);
}

.timeline-year {
    position: relative;
    margin: 36px 0 16px -40px;
    padding-left: 40px;
}

.year-badge {
    display: inline-block;
    background: transparent;
    color: var(--text);
    font-family: var(--serif);
    font-weight: 700;
    font-size: 1.5rem;
    padding: 0 0 0 10px;
    border-radius: 0;
    letter-spacing: -0.01em;
    border-left: 3px solid var(--accent);
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-dot {
    position: absolute;
    left: -29px;
    top: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
}

.timeline-content {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 16px 20px;
    transition: all var(--transition);
}

.timeline-content:hover {
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.timeline-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.doc-type-badge {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: var(--accent);
    font-family: var(--mono);
}

.timeline-date {
    font-size: 12px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.timeline-title {
    display: block;
    font-family: var(--serif);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.timeline-title:hover { color: var(--accent); }

.timeline-venue,
.timeline-source {
    font-size: 12px;
    color: var(--text-muted);
}

.timeline-source::before {
    content: '\00b7';
    margin: 0 6px;
}

/* ── Atom Cards ────────────────────────────────────────────── */

.atoms-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.atom-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 20px 24px;
    transition: all var(--transition);
}

.atom-card:hover {
    border-color: var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.atom-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.atom-block-badge {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: var(--radius);
    letter-spacing: 0.06em;
    text-decoration: none;
    color: inherit;
}

.atom-doc-info {
    font-size: 11px;
    color: var(--text-muted);
}

.atom-quote {
    font-family: var(--serif);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 12px;
    border-left: 2px solid var(--accent);
    padding-left: 16px;
}

.atom-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.atom-tag {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: var(--radius);
    background: var(--surface-alt);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    font-weight: 500;
    transition: all var(--transition);
}

.atom-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.atom-paraphrase {
    font-size: 12px;
    color: var(--accent);
    margin-top: 8px;
    line-height: 1.6;
    padding-left: 16px;
    border-left: 1px solid var(--accent-subtle);
}

/* ── Pagination ────────────────────────────────────────────── */

.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 36px;
    max-width: 100%;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    background: var(--surface);
    transition: all var(--transition);
    font-variant-numeric: tabular-nums;
}

.pagination a:hover,
.pagination .active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.pagination-ellipsis {
    border-color: transparent !important;
    background: transparent !important;
    color: var(--text-muted) !important;
}

/* ── Empty State ───────────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-muted);
    font-size: 1rem;
}

/* ── Footer (institutional) ─────────────────────────────────── */

footer.footer-institutional {
    background: var(--surface);
    border-top: 1px solid var(--border-light);
    margin-top: 48px;
}

/* ── Evolution Timeline ────────────────────────────────────── */

.evolution-timeline {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.evo-year-block {
    position: relative;
}

.evo-year-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    position: sticky;
    top: 56px;
    z-index: 10;
    background: var(--bg);
    padding: 10px 0;
}

.evo-atoms {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-left: 20px;
    border-left: 1px solid var(--border-light);
}

/* ── Language Tabs ──────────────────────────────────────────── */

.lang-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 28px;
}

.lang-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all var(--transition);
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: var(--sans);
}

.lang-tab:hover {
    color: var(--text-secondary);
}

.lang-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

.lang-tab .lang-badge {
    font-size: 9px;
    padding: 1px 6px;
    border-radius: var(--radius);
    font-weight: 600;
    letter-spacing: 0.04em;
}

.lang-badge--official {
    background: var(--accent-light);
    color: var(--accent);
}

.lang-badge--translation {
    background: var(--gold-light);
    color: var(--gold);
}

.lang-panel {
    display: none;
}

.lang-panel.active {
    display: block;
}

/* Language pills in cards */
.lang-pills {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.lang-pill {
    font-size: 9px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: var(--radius);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.lang-pill--official {
    background: var(--accent-light);
    color: var(--accent);
}

.lang-pill--translation {
    background: var(--gold-light);
    color: var(--gold);
}

/* ── Document Page Overrides ───────────────────────────────── */

.doc-full-text {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 40px;
    line-height: 1.85;
    font-size: 1rem;
}

.doc-full-text h2 {
    font-family: var(--sans);
    font-size: 0.6875rem;
    margin-bottom: 0;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-style: normal;
}

.doc-body p {
    margin-bottom: 1em;
    line-height: 1.85;
    text-align: left;
    hyphens: none;
}

.doc-body p:last-child {
    margin-bottom: 0;
}

/* ── Admin Overrides ───────────────────────────────────────── */

.admin-layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--surface); border-right: 1px solid var(--border-light); padding: 22px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-mobile-bar { display: none; }
.admin-sidebar .logo { padding: 0 18px; margin-bottom: 28px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 1px; }
.sidebar-link { display: flex; align-items: center; gap: 10px; padding: 9px 18px; font-size: 13px; font-weight: 500; color: var(--text-secondary); transition: all var(--transition); border-left: 2px solid transparent; }
.sidebar-link:hover, .sidebar-link.active { background: var(--accent-light); color: var(--accent); border-left-color: var(--accent); }
.sidebar-link .count { margin-left: auto; font-size: 10px; background: var(--surface-alt); padding: 2px 8px; border-radius: var(--radius); color: var(--text-muted); }
.admin-main { padding: 28px 32px; background: var(--bg); }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.admin-header h1 { font-family: var(--serif); font-size: 1.35rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 28px; }
.admin-card { background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius); padding: 20px; }
.admin-card .value { font-family: var(--serif); font-size: 1.8rem; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.admin-card .label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; font-weight: 600; }
.admin-table-shell,
.avds-table-shell {
    width: 100%;
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); padding: 10px 14px; border-bottom: 2px solid var(--border-light); font-weight: 600; }
td { padding: 10px 14px; border-bottom: 1px solid var(--border-light); font-size: 13px; color: var(--text-secondary); }
th, td { vertical-align: top; overflow-wrap: anywhere; }
tr:hover td { background: var(--surface-warm); }

/* ── Document type badge color variants ──────────────────────── */

:root {
    --badge-statement: #2563EB;  /* AV DS blue */
    --badge-article:   #059669;  /* emerald */
    --badge-interview: #B45309;  /* amber-700 */
    --badge-commentary:#7C3AED;  /* violet */
    --badge-address:   #0891B2;  /* cyan-600 */
}

/* ── Thematic grid balanced layout ───────────────────────────── */

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

.theme-card--cta {
    background: var(--accent-light);
    border-color: var(--accent-subtle);
}

.theme-card--cta .theme-code {
    color: var(--accent);
    font-size: 14px;
}

.theme-card--cta .theme-name {
    color: var(--accent);
}

.theme-card--cta:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.theme-card--cta:hover .theme-code,
.theme-card--cta:hover .theme-name {
    color: #fff;
}

/* ── Document page improvements ──────────────────────────────── */

.doc-fulltext-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding-top: 14px;
    border-top: 2px solid var(--accent);
}

.doc-fulltext-label {
    font-family: var(--sans);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0;
}

.doc-body {
    max-width: 680px;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 40px;
    height: 40px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, background 0.15s ease;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    background: var(--accent-hover);
}

/* ── Export toolbar ─────────────────────────────────────────── */

.export-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    justify-content: flex-end;
    padding: 8px 12px;
    background: var(--surface-warm);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
}

.export-btn {
    font-size: 12px;
    padding: 6px 14px;
}

/* ── Context toggle ─────────────────────────────────────────── */

.context-details {
    margin-top: 8px;
}

.context-summary {
    display: inline-block;
    font-size: 11px;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    background: transparent;
    transition: all var(--transition);
    user-select: none;
    list-style: none;
}

.context-summary::-webkit-details-marker { display: none; }

.context-summary::before {
    content: '\25B6\0020';
    font-size: 8px;
    vertical-align: 1px;
}

.context-details[open] .context-summary::before {
    content: '\25BC\0020';
}

.context-summary:hover {
    background: var(--surface-warm);
    border-color: var(--border);
    color: var(--text-secondary);
}

.context-body {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
    line-height: 1.65;
    padding: 10px 14px;
    background: var(--surface-warm);
    border-radius: var(--radius);
    border-left: 2px solid var(--border);
}

/* ── About page styles ──────────────────────────────────────── */

.about-section-sep {
    height: 1px;
    background: var(--border-light);
    margin: 24px 0 20px;
}

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

.about-usecase-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
}

.about-usecase-num {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: var(--radius);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--sans);
    font-variant-numeric: tabular-nums;
    margin-top: 1px;
}

.about-usecase-title {
    font-family: var(--serif);
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 5px;
    text-align: left;
    hyphens: none;
}

.about-usecase-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    text-align: left;
    hyphens: none;
}

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

@media (max-width: 768px) {
    .about-usecases { grid-template-columns: 1fr; }
    .about-sections-grid { grid-template-columns: 1fr; }
}

.about-section-title {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
    text-align: left;
}

.about-section-title--decorated::before {
    content: '\25AA\0020';
    color: var(--accent);
    font-size: 0.75em;
    vertical-align: 1px;
}

.about-person-card {
    padding: 18px 22px;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    border-left: 3px solid var(--accent);
    margin-bottom: 14px;
}

.about-numbered-list {
    padding-left: 0;
    list-style: none;
    counter-reset: about-counter;
    margin-bottom: 16px;
}

.about-numbered-list li {
    counter-increment: about-counter;
    padding: 8px 0 8px 36px;
    border-bottom: 1px solid var(--border-light);
    position: relative;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.55;
    text-align: left;
    hyphens: none;
}

.about-numbered-list li:last-child {
    border-bottom: none;
}

.about-numbered-list li::before {
    content: counter(about-counter);
    position: absolute;
    left: 0;
    top: 8px;
    width: 22px;
    height: 22px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: var(--radius);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--sans);
    font-variant-numeric: tabular-nums;
}

/* ── Logo shanyrak icon ─────────────────────────────────────── */

.logo-shanyrak {
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
    width: 24px;
    height: 24px;
}

.footer-nav {
    flex-wrap: wrap;
}

/* ── Mobile Nav ─────────────────────────────────────────────── */

.mobile-nav {
    display: none;
    position: fixed;
    top: var(--mobile-nav-offset);
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--mobile-nav-offset));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border-light);
    border-top: 1px solid rgba(214, 230, 246, 0.72);
    box-shadow: 0 18px 36px rgba(19, 38, 60, 0.08);
    z-index: 99;
    padding: 12px 20px 18px;
    flex-direction: column;
    gap: 2px;
}

.mobile-nav.open {
    display: flex;
}

.mobile-nav-backdrop {
    display: none;
    position: fixed;
    top: var(--mobile-nav-offset);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(19, 38, 60, 0.18);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 98;
}

.mobile-nav-backdrop.open {
    display: block;
}

.mobile-nav-switcher {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 10px;
    padding-bottom: 2px;
}

.mobile-nav-tab {
    padding: 6px 16px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-faint);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all var(--transition);
}

.mobile-nav-tab:hover {
    color: var(--text-secondary);
}

.mobile-nav-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.mobile-nav-link {
    display: block;
    padding: 9px 4px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
    transition: color var(--transition);
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--accent);
}

/* ── Hero Search ─────────────────────────────────────────────── */

.hero-search {
    display: flex;
    align-items: center;
    max-width: 560px;
    border: 1px solid var(--border);
    border-radius: 0;
    overflow: hidden;
    background: var(--surface);
    margin-top: 8px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.hero-search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-light);
}

.hero-search-input {
    flex: 1;
    height: 44px;
    padding: 0 16px;
    font-size: 15px;
    font-family: var(--sans);
    color: var(--text);
    background: transparent;
    border: none;
    outline: none;
    min-width: 0;
    text-align: left;
    hyphens: none;
}

.hero-search-input::placeholder {
    color: var(--text-faint);
}

.hero-search-btn {
    flex-shrink: 0;
    height: 44px;
    padding: 0 20px;
    background: var(--accent);
    color: #fff;
    border: none;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--sans);
    cursor: pointer;
    transition: background var(--transition);
    letter-spacing: 0.02em;
}

.hero-search-btn:hover {
    background: var(--accent-hover);
}

/* ── Responsive ────────────────────────────────────────────── */

/* ── Tablet (≤768px) ── */
@media (max-width: 768px) {
    .container { padding: 0 16px; }

    /* Nav */
    .nav-links { display: none; flex-direction: column; position: absolute; top: 56px; left: 0; right: 0; background: var(--surface); padding: 16px 20px; gap: 14px; border-bottom: 1px solid var(--border-light); box-shadow: var(--shadow); z-index: 99; }
    .nav-links.open { display: flex; }
    .nav-burger { display: flex; }
    .nav { height: 48px; }
    .logo { gap: 8px; min-width: 0; }
    .logo-image { width: 184px; }

    /* Speaker switcher */
    .speaker-switcher { margin-bottom: 4px; }
    .speaker-tab { padding: 4px 14px; font-size: 10px; }

    /* Hero — compact */
    .hero { padding: 32px 0 28px; }
    .hero::before { height: 2px; }
    .hero-title { font-size: 1.5rem; margin-bottom: 8px; letter-spacing: 0; }
    .hero-subtitle { font-size: 0.875rem; margin-bottom: 24px; }
    .hero-stats { flex-direction: row; flex-wrap: wrap; margin-bottom: 24px; border-left: 2px solid var(--accent); }
    .stat-card { padding: 4px 16px; flex: 1; min-width: 0; }
    .stat-num { font-size: 1.35rem; }
    .stat-label { font-size: 0.6875rem; letter-spacing: 0.05em; }
    .hero-actions { gap: 8px; }
    .hero-actions .btn { padding: 8px 18px; font-size: 12px; }

    /* Sections — tighter spacing */
    .section { padding: 40px 0; }
    .section-title { font-size: 1.25rem; margin-bottom: 4px; }
    .section-desc { font-size: 0.875rem; margin-bottom: 24px; }
    .page-title { font-size: 1.5rem; margin-bottom: 4px; }
    .page-desc { font-size: 0.875rem; margin-bottom: 16px; }

    /* Theme grid */
    .theme-grid { grid-template-columns: 1fr; gap: 4px; }
    .theme-grid--balanced { grid-template-columns: 1fr; }
    .theme-card { padding: 10px 14px; }
    .theme-card-main { align-items: flex-start; flex-direction: column; gap: 6px; }
    .theme-card-ident { width: 100%; }
    .theme-count { margin-left: 28px; }
    .theme-card-links { padding-top: 10px; }
    .theme-name { font-size: 0.8125rem; }

    /* Document cards */
    .docs-grid { grid-template-columns: 1fr; gap: 10px; }
    .doc-card { padding: 16px 18px; }
    .doc-title { font-size: 0.9375rem; }

    /* Quotes */
    .quotes-list { gap: 14px; }
    .quote-card { padding: 18px 20px; }
    .quote-text { font-size: 0.9375rem; line-height: 1.7; }

    /* Filters */
    .filters-bar { gap: 5px; margin-bottom: 16px; }
    .filter-chip { padding: 4px 10px; font-size: 11px; }

    /* Search */
    .search-bar { margin-bottom: 16px; }
    .search-input { padding: 8px 12px; font-size: 13px; }

    /* Timeline — compact */
    .timeline { padding-left: 28px; }
    .timeline::before { left: 10px; }
    .timeline-year { margin: 20px 0 12px -28px; padding-left: 28px; }
    .year-badge { font-size: 1.25rem; }
    .timeline-item { padding-bottom: 14px; }
    .timeline-dot { left: -22px; top: 7px; width: 5px; height: 5px; }
    .timeline-content { padding: 12px 16px; }
    .timeline-title { font-size: 0.875rem; }
    .timeline-meta { gap: 6px; margin-bottom: 4px; }

    /* Atom cards */
    .atom-card { padding: 14px 16px; }
    .atom-header { gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
    .atom-quote { font-size: 0.875rem; line-height: 1.7; padding-left: 12px; }
    .atom-paraphrase { font-size: 11px; padding-left: 12px; }
    .atom-doc-info { font-size: 10px; }

    /* Evolution */
    .evolution-timeline { gap: 32px; }
    .evo-year-header { top: 48px; padding: 6px 0; }
    .evo-atoms { padding-left: 14px; gap: 10px; }

    /* Document page */
    .doc-full-text { padding: 20px; font-size: 0.9375rem; line-height: 1.75; }
    .doc-body p { text-align: left; hyphens: none; line-height: 1.75; margin-bottom: 0.8em; }
    .lang-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .lang-tab { padding: 8px 14px; font-size: 12px; white-space: nowrap; }

    /* Footer */
    footer.footer-institutional { margin-top: 40px; }
    footer.footer-institutional .container { padding: 28px 16px !important; }
    .footer-nav { gap: 14px 18px !important; }

    /* Pagination */
    .pagination { gap: 4px; margin-top: 20px; }
    .pagination a, .pagination span { width: 30px; height: 30px; font-size: 12px; }

    /* Empty state */
    .empty-state { padding: 40px 16px; }

    /* Admin */
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { display: none; }
    .admin-mobile-bar {
        display: flex;
        flex-direction: column;
        gap: 14px;
        padding: 18px 16px 14px;
        background: var(--surface);
        border-bottom: 1px solid var(--border-light);
        position: sticky;
        top: 0;
        z-index: 40;
    }
    .admin-mobile-bar .logo { min-width: 0; }
    .admin-mobile-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .admin-mobile-nav .sidebar-link {
        justify-content: center;
        border: 1px solid var(--border-light);
        border-left-width: 1px;
        padding: 10px 12px;
        background: var(--surface-warm);
        text-align: center;
    }
    .admin-main {
        padding: 20px 16px 28px;
    }
    .admin-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }
    .admin-table-shell table { min-width: 720px; }
}

/* ── Small phones (≤480px) ── */
@media (max-width: 480px) {
    .container { padding: 0 14px; }
    .speaker-switcher { width: 100%; justify-content: center; }
    .speaker-tab { padding: 4px 10px; font-size: 9px; }
    .nav { gap: 10px; }
    .logo { gap: 7px; }
    .logo-image { width: 150px; }

    .hero { padding: 24px 0 20px; }
    .hero-title { font-size: 1.25rem; }
    .hero-subtitle { font-size: 0.8125rem; margin-bottom: 18px; }
    .hero-stats { flex-wrap: wrap; margin-bottom: 18px; }
    .stat-card { flex: 0 0 calc(50% - 1px); padding: 6px 12px; }
    .stat-card + .stat-card::before { display: none; }
    .stat-num { font-size: 1.15rem; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { width: 100%; justify-content: center; }

    .section { padding: 32px 0; }
    .page-title { font-size: 1.25rem; }

    .theme-grid { grid-template-columns: 1fr; gap: 4px; }
    .theme-card { padding: 9px 12px; }
    .theme-name { font-size: 0.75rem; }
    .theme-code { font-size: 9px; margin-bottom: 0; }

    .doc-card { padding: 14px; }
    .doc-title { font-size: 0.875rem; }

    .atom-card { padding: 12px 14px; }
    .atom-quote { font-size: 0.8125rem; }

    .quote-card { padding: 16px 18px; }
    .quote-text { font-size: 0.8125rem; }

    .doc-full-text { padding: 14px; }
    .doc-full-text h2 { font-size: 0.9375rem; }

    footer.footer-institutional { margin-top: 24px; }
    footer.footer-institutional .container { padding: 20px 14px !important; }
    .footer-nav { gap: 10px 14px !important; font-size: 0.75rem !important; }

    .search-bar { flex-direction: column; gap: 6px; }
    .search-bar .btn { width: 100%; justify-content: center; }
    .hero-search { max-width: 100%; }
    .hero-search-input { font-size: 14px; }
}

/* ══════════════════════════════════════════════════════════════
   AV DS 4 final visual pass
   Tight registry layout, squared controls, mobile-safe typography.
   ══════════════════════════════════════════════════════════════ */

html {
    background: var(--bg);
}

body {
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
}

a,
button,
input,
summary {
    -webkit-tap-highlight-color: transparent;
}

.site-header {
    background: #fff;
    border-bottom: 1px solid rgba(214, 230, 246, 0.88);
}

.site-header .container {
    position: relative;
}

.nav-shell {
    display: grid;
    gap: 10px;
    padding: 14px 0 12px;
}

.nav-brand-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.speaker-switcher {
    height: auto;
    align-items: center;
    border-bottom: 0;
    margin: 0;
    width: auto;
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: wrap;
}

.speaker-tab {
    height: 30px;
    padding: 0 16px;
    align-items: center;
    font-size: 10px;
    letter-spacing: 0.09em;
    color: var(--text-faint);
    font-weight: 700;
    border: 1px solid var(--border-light);
    background: var(--surface);
    margin-bottom: 0;
}

.nav {
    min-height: 0;
    height: auto;
    border-top: 1px solid var(--border-light);
    padding-top: 10px;
    align-items: flex-start;
    gap: 18px;
}

.logo {
    min-width: 196px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.logo--text:hover {
    color: var(--text);
}

.logo-title {
    font-size: 1.28rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-transform: none;
    line-height: 1;
}

.logo-subline {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    line-height: 1.25;
}

.nav-links {
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link {
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    white-space: nowrap;
    text-transform: uppercase;
    font-weight: 700;
}

.mobile-nav {
    box-shadow: 0 18px 36px rgba(19, 38, 60, 0.08);
}

.nav-links--global {
    justify-content: flex-end;
}

.nav-link--home {
    color: var(--accent-strong);
}

.corpus-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: wrap;
}

.corpus-nav--overview {
    justify-content: flex-end;
}

.corpus-nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.corpus-label {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.corpus-backlink {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 11px;
    border: 1px solid var(--border-light);
    color: var(--accent);
    background: var(--surface);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.corpus-backlink:hover {
    border-color: var(--accent-subtle);
}

.mobile-nav-group {
    display: grid;
    gap: 0;
    padding: 8px 0 4px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 8px;
}

.hero {
    padding: 24px 0 18px;
    background: var(--surface);
}

.hero::before {
    height: 2px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 64%, var(--gold) 64%, var(--gold) 100%);
    opacity: 1;
}

.hero-content {
    max-width: 760px;
}

.hero-title {
    max-width: 660px;
    font-size: clamp(1.7rem, 2.2vw, 2rem);
    line-height: 1.14;
    margin-bottom: 8px;
    letter-spacing: -0.012em;
}

.hero-subtitle {
    max-width: 620px;
    font-size: 0.98rem;
    line-height: 1.55;
    margin-bottom: 12px;
}

.hero-stats {
    width: fit-content;
    min-width: min(100%, 520px);
    margin: 8px 0 10px;
    padding-left: 0;
    border-left: 2px solid var(--accent);
    background: var(--surface-warm);
    border-top: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.stat-card {
    padding: 8px 24px;
    min-width: 132px;
}

.stat-card + .stat-card::before {
    top: 10px;
    bottom: 10px;
}

.stat-num {
    font-size: 1.5rem;
    color: var(--gold);
}

.stat-label {
    font-size: 0.66rem;
    letter-spacing: 0.075em;
}

.hero-actions {
    margin: 0 0 8px;
}

.btn,
.avds-btn,
.hero-search-btn {
    min-height: 38px;
    padding: 9px 18px;
    border-radius: 0;
    font-size: 0.78rem;
    line-height: 1;
}

.btn-secondary {
    background: var(--surface);
}

.hero-search,
.search-bar {
    max-width: 640px;
}

.hero-search {
    margin-top: 0;
    border-radius: 0;
}

.hero-search-input {
    height: 40px;
    font-size: 0.88rem;
}

.hero-search-btn {
    height: 40px;
}

.section {
    padding: 22px 0;
}

.section-alt {
    padding: 24px 0;
}

.section-title,
.page-title {
    letter-spacing: -0.012em;
}

.section-title {
    font-size: 1.32rem;
    line-height: 1.18;
    margin-bottom: 6px;
}

.section-desc {
    max-width: 860px;
    margin-bottom: 12px;
    font-size: 0.91rem;
    line-height: 1.55;
}

.page-title {
    font-size: 1.72rem;
    line-height: 1.14;
    margin-bottom: 6px;
}

.page-desc {
    margin-bottom: 14px;
    font-size: 0.94rem;
    line-height: 1.48;
}

.page-head {
    margin-bottom: 18px;
}

.page-head--split {
    display: grid;
    grid-template-columns: minmax(0, 1.42fr) minmax(260px, 0.78fr);
    gap: 20px;
    align-items: start;
}

.page-head-main {
    min-width: 0;
}

.page-head-note {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--border-light);
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(250,252,255,0.98) 100%);
}

.page-note-copy {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.58;
}

.theme-grid {
    gap: 5px;
}

.theme-card,
.doc-card,
.atom-card,
.timeline-content,
.doc-full-text,
.about-person-card,
.about-usecase-card,
.context-body,
.export-toolbar,
.empty-state {
    border-radius: 0;
    box-shadow: none;
}

.theme-card:hover,
.doc-card:hover,
.atom-card:hover,
.timeline-content:hover {
    transform: none;
    box-shadow: none;
}

.theme-card {
    min-height: 40px;
    padding: 10px 14px 10px 16px;
    background: var(--surface);
}

.theme-card:hover {
    background: #F8FBFF;
}

.theme-card--cta {
    background: #EDF4FF;
}

.theme-card--cta:hover {
    background: #E2EEFF;
}

.theme-card--cta:hover .theme-code,
.theme-card--cta:hover .theme-name {
    color: var(--accent);
}

.theme-code {
    width: 20px;
    font-size: 9px;
}

.theme-name {
    font-family: var(--sans);
    font-size: 0.84rem;
    line-height: 1.28;
}

.theme-count {
    font-size: 11px;
}

.docs-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
}

.doc-card {
    min-height: 118px;
    min-width: 0;
    padding: 14px;
    background: var(--surface);
}

.doc-card:hover {
    background: #F8FBFF;
}

.doc-meta {
    gap: 10px;
    margin-bottom: 8px;
    min-width: 0;
}

.doc-type,
.doc-type-badge {
    font-size: 9px;
    letter-spacing: 0.095em;
}

.doc-date,
.timeline-date {
    font-size: 11px;
}

.doc-title {
    font-family: var(--sans);
    font-size: 0.9rem;
    line-height: 1.34;
    margin-bottom: 10px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.doc-venue {
    min-width: 0;
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.doc-card-footer {
    min-width: 0;
}

.lang-pills {
    min-width: 0;
    margin-top: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.lang-pill,
.lang-tab .lang-badge {
    border-radius: 0;
}

.search-bar {
    gap: 8px;
    margin-bottom: 14px;
}

.search-input {
    min-height: 38px;
    padding: 9px 12px;
    border-radius: 0;
    font-size: 0.86rem;
}

.filter-section {
    margin-bottom: 12px;
}

.filter-drawer {
    margin-bottom: 8px;
    border-top: 1px solid var(--border-light);
}

.filter-drawer__summary {
    display: none;
}

.filter-drawer__body {
    display: block;
    padding-top: 8px;
}

.filter-section--blocks {
    margin-bottom: 18px;
}

.filter-label {
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.filters-bar {
    gap: 5px;
    margin-bottom: 14px;
}

.filters-bar--compact,
.filters-bar--dense,
.filters-bar--years {
    margin-bottom: 10px;
}

.filter-chip {
    min-height: 27px;
    max-width: 100%;
    padding: 5px 10px;
    border-radius: 0;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.18;
    text-align: left;
    overflow-wrap: anywhere;
}

.filter-chip:hover,
.filter-chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.export-toolbar {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
    margin: 6px 0 12px;
    padding: 8px 0;
    background: transparent;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.toolbar-note {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    min-width: 0;
}

.export-btn {
    padding: 7px 12px;
    font-size: 0.72rem;
}

.atoms-grid {
    gap: 10px;
}

.atom-card {
    padding: 14px 16px;
    background: var(--surface);
}

.atom-card:hover {
    background: #F8FBFF;
}

.atom-header {
    align-items: flex-start;
    gap: 7px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.atom-block-badge {
    padding: 2px 7px;
    border-radius: 0;
    font-size: 9px;
    line-height: 1.35;
}

.atom-doc-info {
    flex: 1 1 260px;
    min-width: 0;
    font-size: 10px;
    line-height: 1.35;
}

.atom-doc-info a {
    overflow-wrap: anywhere;
}

.atom-quote {
    margin-bottom: 8px;
    padding-left: 12px;
    font-family: var(--sans);
    font-size: 0.89rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.atom-paraphrase {
    margin-top: 6px;
    padding-left: 12px;
    font-size: 0.75rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.atom-tags {
    gap: 4px;
    margin-top: 8px;
}

.atom-tag,
.context-summary {
    border-radius: 0;
    font-size: 0.66rem;
    line-height: 1.2;
}

.atom-tag {
    padding: 3px 7px;
}

.context-summary {
    padding: 4px 7px;
}

.context-body {
    padding: 9px 11px;
    font-size: 0.75rem;
    line-height: 1.5;
}

.timeline {
    padding-left: 30px;
}

.timeline::before {
    left: 12px;
}

.timeline-year {
    margin: 24px 0 10px -30px;
    padding-left: 30px;
}

.year-badge {
    padding-left: 9px;
    font-family: var(--sans);
    font-size: 1.16rem;
    line-height: 1.2;
}

.timeline-item {
    padding-bottom: 10px;
}

.timeline-dot {
    left: -22px;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 0;
}

.timeline-content {
    padding: 12px 14px;
}

.timeline-meta {
    gap: 8px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.timeline-title {
    font-family: var(--sans);
    font-size: 0.88rem;
    line-height: 1.34;
    overflow-wrap: anywhere;
}

.timeline-venue,
.timeline-source {
    font-size: 0.72rem;
    line-height: 1.35;
}

.evolution-timeline {
    gap: 22px;
}

.evo-year-header {
    top: 82px;
    margin-bottom: 8px;
    padding: 7px 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
}

.evo-atoms {
    gap: 8px;
    padding-left: 14px;
}

.doc-full-text {
    padding: 28px;
    font-size: 0.94rem;
    line-height: 1.62;
}

.doc-body {
    max-width: 720px;
}

.doc-body p {
    margin-bottom: 0.82em;
    line-height: 1.62;
    overflow-wrap: anywhere;
}

.lang-tabs {
    margin-bottom: 20px;
}

.lang-tab {
    padding: 8px 14px;
    font-size: 0.78rem;
}

.about-sections-grid {
    gap: 10px;
}

.about-sections-grid--status {
    align-items: stretch;
}

.about-person-card {
    padding: 14px 16px;
}

.micro-heading {
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.about-usecases {
    gap: 10px;
}

.about-usecase-card {
    padding: 14px;
}

.latest-additions {
    display: grid;
    gap: 0;
}

.latest-addition-link {
    display: block;
    padding: 0 0 10px;
    color: var(--text) !important;
    line-height: 1.38;
    text-decoration: none;
    border-bottom: 1px solid var(--border-light);
}

.latest-addition-link + .latest-addition-link {
    padding-top: 10px;
}

.latest-addition-link:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.latest-addition-link strong {
    color: var(--text) !important;
    font-size: 0.9rem !important;
    line-height: 1.34;
    overflow-wrap: anywhere;
}

.latest-addition-title {
    display: block;
}

.latest-addition-link span {
    display: block;
    margin-top: 3px;
}

.latest-addition-date {
    font-size: 12px;
    color: var(--text-muted);
}

.latest-addition-link:hover strong {
    color: var(--accent) !important;
}

.status-copy {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.81rem;
    line-height: 1.56;
    text-align: left;
    hyphens: none;
}

.selection-summary {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid var(--border-light);
    background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(250,252,255,0.98) 100%);
}

.selection-title {
    max-width: 780px;
    font-family: var(--sans);
    font-size: 1.16rem;
    line-height: 1.24;
    color: var(--text);
    letter-spacing: -0.01em;
}

.selection-meta {
    margin-top: 4px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.about-usecase-num,
.about-numbered-list li::before {
    border-radius: 0;
}

.pagination {
    margin-top: 20px;
}

.pagination a,
.pagination span {
    width: 30px;
    height: 30px;
    border-radius: 0;
    font-size: 0.75rem;
}

footer.footer-institutional {
    margin-top: 32px;
}

footer.footer-institutional .container {
    max-width: 1120px !important;
    padding: 24px !important;
}

.footer-nav {
    gap: 16px !important;
}

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

    .nav-brand-row,
    .nav,
    .corpus-nav {
        align-items: flex-start;
    }

    .nav-links {
        gap: 18px;
    }

    .nav-link {
        font-size: 0.73rem;
    }

    .logo {
        min-width: 146px;
    }

    .corpus-nav-links {
        gap: 12px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 0.9rem;
    }

    .container {
        padding: 0 16px;
    }

    .nav-shell {
        gap: 8px;
        padding: 10px 0;
    }

    .nav-brand-row {
        align-items: center;
    }

    .speaker-switcher,
    .nav-links--global,
    .corpus-nav {
        display: none;
    }

    .nav {
        min-height: 0;
        padding-top: 0;
        border-top: 0;
    }

    .nav-burger {
        display: inline-flex;
        width: 36px;
        height: 36px;
        justify-content: center;
        border: 1px solid var(--border-light);
    }

    .mobile-nav {
        padding: 10px 16px 14px;
    }

    .mobile-nav-group {
        padding-top: 0;
    }

    .mobile-nav-tab {
        padding: 7px 12px;
    }

    .mobile-nav-link {
        padding: 10px 2px;
        font-size: 0.9rem;
    }

    .hero {
        padding: 16px 0 14px;
    }

    .hero-title {
        font-size: 1.42rem;
        line-height: 1.18;
    }

    .hero-subtitle {
        margin-bottom: 10px;
        font-size: 0.88rem;
    }

    .hero-stats {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
        min-width: 0;
        margin-bottom: 10px;
    }

    .stat-card {
        min-width: 0;
        padding: 7px 10px;
    }

    .stat-num {
        font-size: 1.12rem;
    }

    .stat-label {
        font-size: 0.58rem;
        letter-spacing: 0.055em;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 8px 10px;
    }

    .hero-search {
        max-width: 100%;
    }

    .section {
        padding: 18px 0;
    }

    .section-title {
        font-size: 1.14rem;
    }

    .page-title {
        font-size: 1.35rem;
    }

    .page-desc,
    .section-desc {
        font-size: 0.84rem;
        margin-bottom: 12px;
    }

    .latest-addition-link {
        padding-bottom: 9px;
    }

    .latest-addition-link + .latest-addition-link {
        padding-top: 9px;
    }

    .latest-addition-link strong {
        font-size: 0.82rem !important;
    }

    .selection-summary {
        margin-bottom: 14px;
    }

    .selection-title {
        font-size: 1.08rem;
        line-height: 1.26;
    }

    .selection-meta {
        font-size: 0.74rem;
    }

    .about-sections-grid,
    .docs-grid {
        grid-template-columns: 1fr;
    }

    .filters-bar {
        flex-wrap: wrap;
        overflow: visible;
        padding-bottom: 0;
        scrollbar-width: auto;
    }

    .filter-drawer {
        margin-bottom: 10px;
        border-top: 0;
    }

    .filter-drawer__summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 36px;
        padding: 0 11px;
        border: 1px solid var(--border-light);
        background: var(--surface);
        color: var(--text);
        font-size: 0.74rem;
        font-weight: 600;
        letter-spacing: 0.04em;
        list-style: none;
        cursor: pointer;
    }

    .filter-drawer__summary::-webkit-details-marker {
        display: none;
    }

    .filter-drawer__summary::after {
        content: '+';
        font-size: 0.92rem;
        color: var(--text-muted);
    }

    .filter-drawer[open] .filter-drawer__summary::after {
        content: '−';
    }

    .filter-drawer:not([open]) .filter-drawer__body {
        display: none;
    }

    .filters-bar--compact .filter-chip,
    .filters-bar--dense .filter-chip {
        flex: 1 1 calc(50% - 3px);
        max-width: calc(50% - 3px);
    }

    .filters-bar--years .filter-chip {
        flex: 0 0 calc(25% - 4px);
        justify-content: center;
        max-width: calc(25% - 4px);
        white-space: nowrap;
    }

    .filter-chip {
        min-height: 28px;
        padding: 6px 8px;
        font-size: 0.68rem;
        white-space: normal;
    }

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

    .toolbar-note {
        grid-column: 1 / -1;
        font-size: 0.62rem;
    }

    .export-toolbar .btn {
        justify-content: center;
        padding: 8px 8px;
    }

    .atom-card {
        padding: 12px;
    }

    .atom-doc-info {
        flex-basis: 100%;
        order: 5;
    }

    .atom-quote {
        font-size: 0.82rem;
        line-height: 1.5;
    }

    .atom-paraphrase {
        font-size: 0.7rem;
    }

    .atom-tag {
        font-size: 0.62rem;
        padding: 3px 6px;
    }

    .timeline {
        padding-left: 22px;
    }

    .timeline::before {
        left: 8px;
    }

    .timeline-year {
        margin-left: -22px;
        padding-left: 22px;
    }

    .timeline-dot {
        left: -17px;
    }

    .timeline-content {
        padding: 10px 11px;
    }

    .evolution-timeline {
        gap: 18px;
    }

    .evo-year-header {
        top: 52px;
        padding: 6px 0;
    }

    .evo-atoms {
        padding-left: 9px;
        gap: 7px;
    }

    .year-badge {
        font-size: 1rem;
        padding-left: 7px;
    }

    .doc-full-text {
        padding: 16px;
        font-size: 0.86rem;
        line-height: 1.58;
    }

    .doc-body p {
        line-height: 1.58;
    }

    footer.footer-institutional .container {
        padding: 20px 16px !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .logo {
        min-width: 0;
    }

    .logo-text {
        font-size: 12px;
        letter-spacing: 0.09em;
    }

    .logo-sub {
        font-size: 7px;
        letter-spacing: 0.12em;
    }

    .hero-title {
        font-size: 1.22rem;
    }

    .hero-subtitle {
        font-size: 0.8rem;
    }

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

    .stat-card {
        flex-basis: auto;
        padding: 6px 7px;
    }

    .stat-card + .stat-card::before {
        display: block;
        top: 9px;
        bottom: 9px;
    }

    .stat-num {
        font-size: 1rem;
    }

    .stat-label {
        font-size: 0.53rem;
    }

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

    .hero-search {
        display: grid;
        grid-template-columns: 1fr auto;
    }

    .hero-search-input {
        height: 38px;
        padding: 0 10px;
        font-size: 0.78rem;
    }

    .hero-search-btn {
        height: 38px;
        padding: 0 12px;
        font-size: 0.72rem;
    }

    .page-title {
        font-size: 1.18rem;
    }

    .section-title {
        font-size: 1.06rem;
    }

    .theme-card,
    .doc-card,
    .about-person-card,
    .about-usecase-card {
        padding: 11px;
    }

    .theme-name,
    .doc-title,
    .timeline-title {
        font-size: 0.8rem;
    }

    .doc-card {
        min-height: 0;
    }

    .doc-card-footer {
        min-width: 0;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 8px;
    }

    .doc-venue {
        max-width: 100%;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .search-bar {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 6px;
    }

    .search-bar .btn {
        width: auto;
        padding: 8px 11px;
    }

    .filter-drawer__summary {
        min-height: 34px;
        padding: 0 10px;
        font-size: 0.7rem;
    }

    .filters-bar--compact .filter-chip,
    .filters-bar--dense .filter-chip {
        flex-basis: 100%;
        max-width: 100%;
    }

    .filters-bar--years .filter-chip {
        flex-basis: calc(33.333% - 4px);
        max-width: calc(33.333% - 4px);
    }

    .filter-chip {
        max-width: 100%;
        font-size: 0.63rem;
    }

    .atom-card {
        padding: 10px;
    }

    .atom-block-badge {
        font-size: 8px;
        padding: 2px 6px;
    }

    .atom-quote {
        padding-left: 9px;
        font-size: 0.78rem;
    }

    .atom-tags {
        gap: 3px;
    }

    .export-btn svg {
        width: 14px;
        height: 14px;
    }

    .pagination a,
    .pagination span {
        width: 28px;
        height: 28px;
    }

footer.footer-institutional .container {
        padding: 18px 12px !important;
    }
}

/* ── Shared Public Shells / AV DS 4 normalization ─────────────── */

.footer-shell {
    max-width: 1200px;
    padding: 28px 32px 30px;
}

.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-meta {
    display: grid;
    gap: 8px;
}

.footer-title {
    font-family: var(--serif);
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0;
}

.footer-copy-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border: 1px solid var(--border);
    background: var(--surface-alt);
    color: var(--accent-strong);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-nav {
    display: flex;
    gap: 24px;
    font-size: 0.8125rem;
    flex-wrap: wrap;
    align-items: center;
}

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

.footer-nav a:hover {
    color: var(--text);
}

.about-shell,
.document-shell {
    max-width: 900px;
}

.document-shell {
    max-width: 860px;
}

.about-copy,
.about-person-copy {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.75;
    text-align: left;
    hyphens: none;
}

.about-copy {
    margin-bottom: 0;
}

.about-copy--compact {
    line-height: 1.6;
}

.about-person-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.about-person-link {
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.about-person-period {
    font-size: 11px;
    color: var(--text-muted);
}

.about-person-copy {
    margin-bottom: 0;
    font-size: 13px;
}

.notfound-shell {
    text-align: center;
    padding: 80px 24px;
}

.notfound-code {
    font-family: var(--serif);
    font-size: 4rem;
    color: var(--accent);
    margin-bottom: 16px;
}

.notfound-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.doc-breadcrumbs {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 24px;
    letter-spacing: 0.02em;
}

.doc-breadcrumb-sep {
    margin: 0 8px;
    color: var(--text-faint);
}

.doc-header {
    margin-bottom: 32px;
}

.doc-meta--header {
    margin-bottom: 16px;
}

.doc-page-title {
    font-family: var(--serif);
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    color: var(--text);
}

.doc-alt-title {
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

.doc-alt-title--spaced {
    margin-top: 4px;
}

.doc-venue-line {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}

.doc-source-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    font-size: 13px;
}

.doc-source-name {
    color: var(--text-muted);
}

.doc-source-sep {
    color: var(--border);
}

.doc-source-link {
    color: var(--accent);
    font-weight: 500;
}

.doc-tags {
    margin-bottom: 32px;
}

.doc-lang-badge {
    font-size: 10px;
    padding: 2px 8px;
}

.doc-language-note {
    margin-top: 16px;
    padding: 14px 18px;
    background: var(--surface-warm);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    font-size: 12px;
    color: var(--text-muted);
}

.doc-language-note-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.doc-language-chip,
.doc-language-link,
.doc-language-missing {
    margin-left: 6px;
}

.doc-language-sep {
    margin-left: 10px;
    color: var(--text-faint);
}

.doc-language-link {
    color: var(--accent);
}

.doc-language-missing {
    color: var(--text-faint);
}

.doc-atoms-section {
    margin-top: 40px;
}

.doc-subtitle {
    font-family: var(--serif);
    font-size: 1.15rem;
    margin-bottom: 18px;
    color: var(--text);
}

.doc-wordcounts {
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.doc-prevnext {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.doc-prevnext-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 46%;
    text-decoration: none;
}

.doc-prevnext-link--next {
    text-align: right;
    align-items: flex-end;
    margin-left: auto;
}

.doc-prevnext-label {
    font-size: 11px;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.doc-prevnext-title {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-family: var(--serif);
    font-weight: 600;
    line-height: 1.4;
}

.icon-fixed {
    flex-shrink: 0;
}

.filter-chip--theme-active {
    background: var(--chip-accent);
    border-color: var(--chip-accent);
}

.atom-block-badge--theme {
    background: color-mix(in srgb, var(--badge-color) 12%, white);
    color: var(--badge-color);
}

.atom-block-badge--key {
    background: #8b743215;
    color: #8b7432;
}

.atom-doc-link {
    color: var(--text-muted);
    border-bottom: 1px dotted var(--border);
}

.atom-doc-link:hover {
    color: var(--text);
}

.atom-lang-badge {
    margin-left: auto;
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.04em;
}

.atom-lang-badge--inline {
    margin-left: 0;
}

.atoms-total {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-muted);
}

.evo-year-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 12px;
}

.atom-card--evolution {
    border-left: 3px solid var(--card-accent);
}

.timeline-dot--послание { background: #1b4f72; }
.timeline-dot--интервью-ин { background: #6c3483; }
.timeline-dot--статья { background: #1e8449; }
.timeline-dot--пост { background: #2980b9; }
.timeline-dot--комментарий { background: #8e44ad; }
.timeline-dot--выступление { background: #5d6d7e; }
.timeline-dot--интервью { background: #6c3483; }

/* ── Homepage Dashboard Refresh ───────────────────────────── */

.hero--dashboard {
    padding: 26px 0 22px;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.99) 0%, rgba(255,255,255,0.98) 52%, rgba(247,251,255,0.9) 78%, rgba(247,251,255,0.94) 100%),
        linear-gradient(180deg, rgba(255,255,255,0.99) 0%, rgba(247,251,255,0.96) 100%);
}

.hero--dashboard::after {
    background-image:
        linear-gradient(90deg, rgba(247,251,255,0.98) 0%, rgba(247,251,255,0.9) 52%, rgba(247,251,255,0.5) 74%, rgba(247,251,255,0.08) 100%),
        url('/brand/illustrations/akorda-lineart-clean.webp');
    background-size: cover, min(44vw, 560px) auto;
    background-position: center, right 22px bottom 12px;
    opacity: 1;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.44fr) minmax(330px, 0.88fr);
    gap: 32px;
    align-items: start;
}

.hero-main {
    min-width: 0;
}

.hero-kicker {
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

.hero-side {
    min-width: 0;
}

.hero-meta-strip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    margin-bottom: 10px;
    border: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.88);
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.45;
}

.home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
    gap: 18px;
    align-items: start;
}

.home-panel {
    background: var(--surface);
    border: 1px solid var(--border-light);
    padding: 18px 18px 16px;
    background-image: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(251,253,255,0.98) 100%);
}

.home-panel--hero {
    min-height: 100%;
}

.home-panel-head {
    margin-bottom: 14px;
}

.home-panel-title {
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.home-panel-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.home-stack {
    border-top: 1px solid var(--border-light);
    padding-top: 14px;
    margin-top: 14px;
}

.home-stack--meta {
    display: grid;
    gap: 14px;
}

.home-microtitle {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.latest-additions--compact .latest-addition-link {
    padding: 10px 0;
}

.hero-side-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.hero-side-links a {
    color: var(--accent);
}

.overview-hero-note {
    margin-top: 6px;
    margin-left: auto;
    max-width: 340px;
    padding: 20px 0 0 24px;
    border-left: 1px solid rgba(214, 230, 246, 0.9);
}

.overview-hero-note-title {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.overview-hero-note-copy {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.overview-speaker-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.overview-speaker-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid var(--border-light);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: var(--surface);
}

.overview-speaker-pill:hover {
    border-color: var(--accent-subtle);
    color: var(--text);
}

.section--dashboard {
    padding-top: 34px;
}

.section--alt {
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 100%);
}

.overview-section-head {
    margin-bottom: 18px;
}

.overview-surface {
    background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
    border: 1px solid var(--border-light);
    padding: 18px 18px 16px;
}

.overview-subhead {
    margin-bottom: 12px;
}

.overview-subtitle {
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 5px;
}

.overview-subcopy {
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.docs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.docs-list-item {
    display: block;
    padding: 14px 14px 12px;
    border: 1px solid var(--border-light);
    color: var(--text);
    transition: border-color var(--transition), background var(--transition);
}

.docs-list-item:hover {
    border-color: var(--accent-subtle);
    background: #fbfcff;
}

.hero-inline-points {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
    max-width: 760px;
}

.hero-inline-point {
    padding: 12px 14px;
    border: 1px solid rgba(213, 226, 242, 0.92);
    background: rgba(255, 255, 255, 0.9);
}

.hero-inline-point strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
}

.hero-inline-point span {
    display: block;
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.doc-list-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.doc-speaker-link {
    font-size: 11px;
    color: var(--text-muted);
    text-align: right;
}

.hero--overview {
    padding: 30px 0 28px;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.99) 0%, rgba(255,255,255,0.98) 48%, rgba(246,250,255,0.9) 74%, rgba(246,250,255,0.94) 100%),
        url('/brand/illustrations/akorda-lineart-clean.webp');
    background-repeat: no-repeat;
    background-size: auto, min(39vw, 520px) auto;
    background-position: left top, right max(18px, calc((100vw - 1120px) / 2)) bottom 22px;
}

.hero--overview::after {
    background:
        linear-gradient(180deg, rgba(247,251,255,0) 0%, rgba(247,251,255,0.16) 100%),
        linear-gradient(90deg, rgba(255,255,255,0) 54%, rgba(255,255,255,0.34) 68%, rgba(255,255,255,0.78) 100%);
    opacity: 1;
}

.overview-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.52fr) minmax(320px, 0.72fr);
    gap: 34px;
    align-items: start;
}

.overview-hero-main,
.overview-hero-side {
    min-width: 0;
}

.overview-hero-primary {
    display: block;
    max-width: 700px;
}

.hero-stats--overview .stat-card {
    min-width: 180px;
}

.hero-stats--overview {
    margin-bottom: 14px;
}

.overview-hero-inline {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 660px;
    margin-top: 18px;
}

.overview-hero-inline-item {
    padding: 12px 14px;
    border: 1px solid rgba(213, 226, 242, 0.92);
    background: rgba(255, 255, 255, 0.9);
}

.overview-hero-inline-item strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
}

.overview-hero-inline-item span {
    display: block;
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.overview-hero-note {
    position: relative;
    z-index: 1;
    padding: 18px 0 0 22px;
    border-left: 1px solid rgba(214, 230, 246, 0.92);
    background: transparent;
}

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

.speaker-overview-card {
    display: block;
    background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
    border: 1px solid var(--border-light);
    padding: 16px 16px 14px;
    color: var(--text);
    transition: border-color var(--transition), background var(--transition);
}

.speaker-overview-card:hover {
    border-color: var(--accent-subtle);
    background: #fbfcff;
}

.speaker-overview-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.speaker-overview-name {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

.speaker-overview-period {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.speaker-overview-arrow {
    font-size: 16px;
    color: var(--text-faint);
    flex-shrink: 0;
    text-decoration: none;
}

.speaker-overview-title {
    font-family: var(--serif);
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 10px;
}

.speaker-overview-title a,
.speaker-overview-item strong a,
.speaker-overview-cta a {
    color: inherit;
    text-decoration: none;
}

.speaker-overview-title a:hover,
.speaker-overview-item strong a:hover,
.speaker-overview-cta a:hover,
.speaker-overview-arrow:hover {
    color: var(--accent);
}

.speaker-overview-copy {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.58;
    margin-bottom: 12px;
}

.speaker-overview-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
}

.speaker-overview-latest {
    margin-top: 10px;
    display: grid;
    gap: 8px;
}

.speaker-overview-item {
    display: grid;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
}

.speaker-overview-item strong {
    font-size: 14px;
    line-height: 1.4;
}

.speaker-overview-item span {
    font-size: 12px;
    color: var(--text-muted);
}

.speaker-overview-cta {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

.home-grid--overview {
    grid-template-columns: minmax(0, 1.46fr) minmax(270px, 0.64fr);
}

.overview-hero-points {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.overview-hero-point {
    display: grid;
    gap: 4px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}

.overview-hero-point:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.overview-hero-point strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.overview-hero-point span {
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.overview-focus-list {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.overview-focus-item {
    display: grid;
    gap: 6px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
}

.overview-focus-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.overview-focus-item strong {
    font-size: 13px;
    line-height: 1.45;
}

.overview-focus-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.overview-summary-list {
    display: grid;
    gap: 10px;
}

.overview-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 10px 0;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
}

.overview-summary-item:last-child {
    border-bottom: none;
}

.overview-summary-item strong {
    color: var(--text);
    font-size: 13px;
}

.overview-summary-item span {
    color: var(--text-muted);
    text-align: right;
}

.overview-summary-item a {
    color: var(--accent);
}

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

.docs-showcase {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
    gap: 18px;
    align-items: start;
}

.docs-list--overview-compact {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.docs-list-item {
    display: block;
    padding: 15px 15px 13px;
    border: 1px solid var(--border-light);
    color: var(--text);
    background: var(--surface);
}

.docs-list-item:hover {
    border-color: var(--accent-subtle);
    background: #fbfcff;
}

.overview-doc-speaker {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
}

.docs-list-item--lead {
    min-height: 100%;
    padding: 22px 22px 18px;
    background: #fcfdff;
}

.docs-list-item--lead .doc-title {
    font-size: 1.72rem;
    line-height: 1.14;
    margin-bottom: 12px;
    max-width: 96%;
}

.doc-lead-summary {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 18px;
}

.docs-list-item--compact .doc-title {
    font-size: 1.02rem;
    line-height: 1.32;
}

.docs-list-item--compact .doc-list-footer {
    margin-top: 10px;
}

@media (max-width: 1180px) {
    .hero-grid,
    .home-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .hero-inline-points {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .overview-hero {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .overview-hero-primary {
        max-width: none;
    }

    .overview-hero-note {
        max-width: none;
        margin-top: 0;
        margin-left: 0;
        padding: 16px 0 0;
        border-left: none;
        border-top: 1px solid rgba(214, 230, 246, 0.9);
    }

    .overview-hero-inline {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .footer-shell {
        padding: 20px 14px;
    }

    .footer-row {
        gap: 18px;
    }

    .footer-copy-row {
        gap: 8px;
    }

    .footer-nav {
        gap: 10px 14px;
        font-size: 0.75rem;
    }

    .notfound-shell {
        padding: 48px 16px;
    }

    .notfound-code {
        font-size: 3rem;
    }

    .doc-page-title {
        font-size: 1.32rem;
    }

    .doc-source-row,
    .doc-wordcounts {
        justify-content: flex-start;
        text-align: left;
    }

    .doc-prevnext-link,
    .doc-prevnext-link--next {
        max-width: 100%;
        width: 100%;
        text-align: left;
        align-items: flex-start;
        margin-left: 0;
    }

    .evo-year-meta {
        display: block;
        margin: 8px 0 0;
    }

    .hero-grid,
    .home-grid,
    .overview-hero,
    .home-grid--overview,
    .docs-showcase {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .hero--overview {
        background:
            linear-gradient(180deg, rgba(255,255,255,0.99) 0%, rgba(255,255,255,0.98) 58%, rgba(247,251,255,0.9) 100%),
            none;
    }

    .hero--dashboard::after {
        background-image: linear-gradient(180deg, rgba(247,251,255,0.92) 0%, rgba(247,251,255,0.3) 100%);
        background-size: cover;
        background-position: center;
    }

    .hero-meta-strip {
        display: flex;
        padding: 8px 10px;
        min-height: 0;
    }

    .overview-hero-note {
        margin-top: 0;
        margin-left: 0;
        max-width: none;
        padding: 14px 0 0;
        border-left: none;
        border-top: 1px solid rgba(214, 230, 246, 0.8);
    }

    .speaker-overview-grid,
    .docs-list--overview,
    .docs-list--overview-compact {
        grid-template-columns: 1fr;
    }

    .hero-stats--overview .stat-card {
        min-width: 0;
    }

    .overview-speaker-pills {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .overview-speaker-pill:last-child {
        grid-column: 1 / -1;
    }

    .overview-hero-inline {
        gap: 8px;
        margin-top: 14px;
    }

    .overview-hero-inline-item {
        padding: 10px 12px;
    }

    .hero-inline-points {
        gap: 8px;
        margin-top: 14px;
    }

    .hero-inline-point {
        padding: 10px 12px;
    }

    .home-panel,
    .home-panel--hero {
        padding: 14px 14px 12px;
    }

    .hero-kicker {
        margin-bottom: 8px;
    }

    .doc-list-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .doc-speaker-link {
        text-align: left;
    }
}

/* ── AI assistant page ───────────────────────────────────────── */

.assistant-hero {
    padding: 72px 0 42px;
    background:
        linear-gradient(135deg, rgba(234, 244, 255, 0.9) 0%, rgba(255, 255, 255, 0.96) 48%, rgba(243, 229, 200, 0.34) 100%),
        radial-gradient(circle at 12% 20%, rgba(31, 95, 174, 0.12), transparent 34%);
    border-bottom: 1px solid var(--border-light);
}

.assistant-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
    gap: 32px;
    align-items: stretch;
}

.assistant-hero-main,
.assistant-note,
.assistant-panel,
.assistant-prompts,
.assistant-method-card {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--border);
}

.assistant-hero-main {
    padding: 34px;
}

.assistant-note {
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
}

.assistant-note h2,
.assistant-prompts h3 {
    font-size: 1rem;
    letter-spacing: 0.02em;
    margin-bottom: 12px;
    color: var(--accent-strong);
}

.assistant-note p {
    color: var(--text-secondary);
}

.assistant-note-freshness {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border-light);
    color: var(--text-muted);
    font-size: 0.88rem;
}

.assistant-status-mini {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(139, 92, 50, 0.24);
    background: rgba(139, 92, 50, 0.06);
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.82rem;
}

.assistant-status-mini strong {
    color: var(--text);
    font-size: 0.95rem;
}

.assistant-status-mini--ok {
    border-color: rgba(26, 107, 90, 0.26);
    background: rgba(26, 107, 90, 0.08);
}

.assistant-status-mini--warn {
    border-color: rgba(176, 93, 28, 0.28);
    background: rgba(176, 93, 28, 0.08);
}

.assistant-status-detail,
.section-note {
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.assistant-source-note {
    margin: 12px 0 0;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.assistant-stat-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 24px 0;
}

.assistant-stat {
    padding: 14px 16px;
    background: var(--surface-warm);
    border: 1px solid var(--border-light);
}

.assistant-stat strong {
    display: block;
    font-size: 1.5rem;
    color: var(--accent-strong);
    line-height: 1.1;
}

.assistant-stat span {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 4px;
}

.assistant-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

.assistant-panel {
    padding: 24px;
}

.overview-section-head--compact {
    margin-bottom: 18px;
}

.assistant-frame-shell {
    height: clamp(580px, 72vh, 760px);
    border: 1px solid var(--border);
    background: #fff;
    overflow: hidden;
}

.assistant-frame-shell iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.assistant-prompts {
    padding: 22px;
    position: sticky;
    top: 112px;
}

.assistant-prompts button {
    width: 100%;
    display: block;
    text-align: left;
    padding: 12px 14px;
    margin-bottom: 10px;
    border: 1px solid var(--border-light);
    background: var(--surface-warm);
    color: var(--text);
    font: inherit;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.assistant-prompts button:hover,
.assistant-prompts button:focus-visible {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent-strong);
    outline: none;
}

.assistant-latest {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border-light);
}

.assistant-latest span {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.assistant-latest a {
    display: block;
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

.assistant-method-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.assistant-method-card {
    padding: 20px;
}

.assistant-method-card strong {
    display: block;
    color: var(--accent-strong);
    margin-bottom: 8px;
}

.assistant-method-card span {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.status-hero {
    padding-bottom: 28px;
}

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

.status-card,
.doc-ai-panel {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow-soft);
}

.status-card {
    padding: 20px;
}

.status-card-kicker,
.doc-ai-kicker {
    display: block;
    margin-bottom: 8px;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status-card strong {
    display: block;
    color: var(--accent-strong);
    font-size: clamp(1.35rem, 2.6vw, 2.1rem);
    line-height: 1.05;
}

.status-card p {
    margin: 10px 0 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

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

.avds-analytics-panel {
    display: grid;
    gap: 18px;
}

.avds-score-list,
.avds-threshold-list,
.avds-corpus-list,
.avds-source-panel__docs {
    display: grid;
    gap: 12px;
}

.avds-score-row,
.avds-corpus-card,
.avds-threshold-card,
.avds-source-doc {
    display: grid;
    gap: 10px;
    padding: 14px 15px;
    border: 1px solid var(--border-light);
    background: var(--surface);
    color: var(--text);
}

.avds-score-row:hover,
.avds-source-doc:hover {
    border-color: var(--accent-subtle);
    background: #fbfcff;
}

.avds-score-row__meta,
.avds-corpus-card__head,
.avds-corpus-card__metric,
.avds-threshold-card__head,
.avds-threshold-card__scale {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.avds-score-row__label,
.avds-corpus-card__head strong,
.avds-threshold-card__head strong,
.avds-source-doc strong {
    font-size: 13px;
    line-height: 1.35;
    color: var(--text);
}

.avds-score-row__value,
.avds-corpus-card__head span,
.avds-corpus-card__metric span,
.avds-corpus-card__foot,
.avds-threshold-card__head span,
.avds-threshold-card__scale span,
.avds-source-doc span,
.avds-source-doc em {
    font-size: 11px;
    color: var(--text-muted);
    font-style: normal;
}

.avds-corpus-card__metric strong,
.avds-threshold-card__scale strong,
.avds-source-fact strong {
    font-size: 14px;
    color: var(--accent-strong);
}

.avds-scorebar {
    position: relative;
    height: 8px;
    overflow: hidden;
    background: var(--surface-alt);
    border: 1px solid var(--border-light);
}

.avds-scorebar__fill {
    display: block;
    height: 100%;
    background: var(--bar-color, linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%));
}

.avds-scorebar--compact {
    height: 7px;
}

.avds-scorebar--gold .avds-scorebar__fill {
    --bar-color: linear-gradient(90deg, var(--gold) 0%, #e1ba78 100%);
}

.avds-corpus-card__foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 4px;
    border-top: 1px solid var(--border-light);
}

.avds-threshold-card p {
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-secondary);
}

.avds-threshold-meter {
    position: relative;
    display: grid;
    grid-template-columns: 45fr 30fr 25fr;
    height: 10px;
    overflow: hidden;
    background: var(--surface-alt);
    border: 1px solid var(--border-light);
}

.avds-threshold-meter__zone--danger {
    background: rgba(185, 28, 28, 0.16);
}

.avds-threshold-meter__zone--warn {
    background: rgba(180, 83, 9, 0.18);
}

.avds-threshold-meter__zone--safe {
    background: rgba(5, 150, 105, 0.18);
}

.avds-threshold-meter__marker {
    position: absolute;
    top: -2px;
    bottom: -2px;
    width: 2px;
    background: var(--accent-strong);
}

.avds-threshold-meter--safe .avds-threshold-meter__marker {
    background: #0b7a56;
}

.avds-threshold-meter--warn .avds-threshold-meter__marker {
    background: #b45309;
}

.avds-threshold-meter--danger .avds-threshold-meter__marker {
    background: #b91c1c;
}

.avds-source-panel {
    display: grid;
    gap: 18px;
    padding: 22px;
    border: 1px solid var(--border);
    background:
        linear-gradient(135deg, rgba(234, 244, 255, 0.65), rgba(255, 255, 255, 0.96) 55%, rgba(243, 229, 200, 0.28)),
        var(--surface);
    border-top: 2px solid var(--accent);
}

.avds-source-panel__kicker {
    display: block;
    margin-bottom: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
}

.avds-source-panel__intro h2,
.avds-source-panel__intro h3 {
    font-size: 1.25rem;
    line-height: 1.2;
    color: var(--accent-strong);
    margin-bottom: 10px;
}

.avds-source-panel__intro p {
    max-width: 860px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.avds-source-panel__facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.avds-source-fact {
    display: grid;
    gap: 6px;
    padding: 13px 14px;
    border: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.88);
}

.avds-source-fact span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.avds-source-fact small {
    font-size: 11px;
    line-height: 1.45;
    color: var(--text-secondary);
}

.avds-source-doc {
    grid-template-columns: 120px 1fr 110px;
    align-items: baseline;
}

.doc-ai-panel {
    margin: 28px 0;
    padding: 22px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.85fr);
    gap: 20px;
    align-items: center;
    background:
        linear-gradient(135deg, rgba(26, 107, 90, 0.09), rgba(255, 255, 255, 0.92)),
        #fff;
}

.doc-ai-actions {
    display: grid;
    gap: 10px;
}

.doc-ai-actions button {
    width: 100%;
    border: 1px solid rgba(26, 107, 90, 0.22);
    background: #fff;
    color: var(--accent-strong);
    cursor: pointer;
    font: inherit;
    font-weight: 750;
    padding: 11px 14px;
    text-align: left;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.doc-ai-actions button:hover,
.doc-ai-actions button:focus-visible {
    border-color: rgba(26, 107, 90, 0.5);
    box-shadow: 0 10px 28px rgba(26, 107, 90, 0.11);
    outline: none;
    transform: translateY(-1px);
}

@media (max-width: 880px) {
    .assistant-hero-grid,
    .assistant-layout,
    .assistant-method-grid,
    .avds-analytics-grid,
    .avds-source-panel__facts,
    .status-grid,
    .doc-ai-panel {
        grid-template-columns: 1fr;
    }

    .assistant-prompts {
        position: static;
    }
}

@media (max-width: 560px) {
    html,
    body {
        min-height: 0;
    }

    .site-header {
        position: relative;
        top: auto;
        transform: none;
    }

    .assistant-hero {
        padding: 22px 0 22px;
        min-height: 0;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 250, 255, 0.98) 100%);
    }

    .assistant-hero-grid {
        gap: 14px;
    }

    .assistant-hero-main,
    .assistant-note,
    .assistant-panel,
    .assistant-prompts {
        padding: 16px;
    }

    .assistant-stat-row {
        grid-template-columns: 1fr;
        gap: 8px;
        margin: 16px 0;
    }

    .assistant-frame-shell {
        height: min(560px, calc(100vh - 180px));
        min-height: 420px;
    }

    .avds-source-doc {
        grid-template-columns: 1fr;
    }
}
