:root {
    /* Azure Cosmos DB color palette */
    --cosmos-blue: #0078D4;
    --cosmos-blue-hover: #005a9e;
    --cosmos-navy: #1B1F3B;
    --cosmos-dark: #0E1726;
    --cosmos-teal: #50E6FF;
    --cosmos-purple: #7B2FBE;

    /* Light mode (default) */
    --bg-page: #FAF9F8;
    --bg-panel: #FFFFFF;
    --bg-panel-alt: #F3F2F1;
    --bg-nav: #1B1F3B;
    --bg-code: #1E1E1E;
    --bg-input: #FFFFFF;
    --text-primary: #1B1F3B;
    --text-secondary: #605E5C;
    --text-muted: #A19F9D;
    --text-nav: #EDEBE9;
    --text-code: #D4D4D4;
    --border-color: #E1DFDD;
    --border-light: #F3F2F1;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.12);
}

[data-theme="dark"] {
    --bg-page: #1E1E1E;
    --bg-panel: #252525;
    --bg-panel-alt: #2D2D2D;
    --bg-nav: #0E1726;
    --bg-code: #1A1A1A;
    --bg-input: #333333;
    --text-primary: #E1DFDD;
    --text-secondary: #A19F9D;
    --text-muted: #605E5C;
    --text-nav: #EDEBE9;
    --text-code: #D4D4D4;
    --border-color: #3D3D3D;
    --border-light: #333333;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.4);
}

/* ── Reset & Base ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-primary);
    background: var(--bg-page);
    line-height: 1.5;
    height: 100%;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Prevent focus outline on page load / navigation */
*:focus-visible { outline: 2px solid var(--cosmos-blue); outline-offset: 2px; }
*:focus:not(:focus-visible) { outline: none; }

h1, h2, h3 { color: var(--text-primary); margin-top: 0; }
h1 { font-size: 1.75rem; font-weight: 600; }
h2 { font-size: 1.35rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; color: var(--text-secondary); }

a { color: var(--cosmos-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Top Navigation Bar ───────────────────────── */
.top-nav {
    display: flex;
    align-items: center;
    background: var(--bg-nav);
    color: var(--text-nav);
    padding: 0 1.5rem;
    height: 62px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--text-nav);
    text-decoration: none;
    white-space: nowrap;
    margin-right: 2rem;
}

.nav-brand:hover { text-decoration: none; color: #fff; }

.nav-brand .brand-icon {
    width: 30px;
    height: 30px;
    border-radius: 4px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
}

.nav-links a {
    color: var(--text-nav);
    opacity: 0.8;
    padding: 0.4rem 0.85rem;
    border-radius: 4px;
    font-size: 1rem;
    transition: opacity 0.2s, background 0.2s;
    text-decoration: none;
}

.nav-links a:hover, .nav-links a.active {
    opacity: 1;
    background: rgba(255,255,255,0.1);
    text-decoration: none;
}

.nav-separator {
    color: rgba(255,255,255,0.25);
    margin: 0 0.25rem;
    font-size: 1rem;
    user-select: none;
}

.nav-external {
    color: var(--text-nav);
    opacity: 0.8;
    padding: 0.4rem 0.85rem;
    border-radius: 4px;
    font-size: 1rem;
    transition: opacity 0.2s, background 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-external:hover {
    opacity: 1;
    background: rgba(255,255,255,0.1);
    text-decoration: none;
}

.nav-external-icon {
    border-radius: 3px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

/* ── Benchmark Display ────────────────────────── */
.benchmark {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
}

.benchmark-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.benchmark-stat .stat-value {
    font-weight: 700;
    color: var(--cosmos-blue);
    font-size: 0.8rem;
}

.benchmark-stat .stat-label {
    color: var(--text-muted);
}

.benchmark-clear {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.15rem 0.25rem;
    border-radius: 3px;
    transition: color 0.2s;
}

.benchmark-clear:hover { color: var(--text-primary); }

/* ── Theme Toggle ─────────────────────────────── */
.theme-toggle {
    background: none;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-nav);
    cursor: pointer;
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
    display: flex;
    align-items: center;
}

.theme-toggle:hover { border-color: rgba(255,255,255,0.5); }

/* ── Main Content ─────────────────────────────── */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
}

/* ── Panels ───────────────────────────────────── */
.panel {
    background: var(--bg-panel);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
    border: 1px solid var(--border-color);
}

.panel h3 {
    margin-top: 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}

/* ── Page Header ───────────────────────────────── */
.page-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1rem;
}

.page-header h1 { margin: 0; }

.page-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── Search Row ───────────────────────────────── */
.search-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1.5rem;
}

.search-row-right {
    flex-shrink: 0;
}

/* ── Demo Controls ────────────────────────────── */
.demo-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.demo-controls select,
.demo-controls input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
    background: var(--bg-input);
    color: var(--text-primary);
}

.demo-controls input { min-width: 280px; max-width: 380px; }

.demo-controls button {
    padding: 0.5rem 1.25rem;
    background: var(--cosmos-blue);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.demo-controls button:hover { background: var(--cosmos-blue-hover); }
.demo-controls button:disabled { background: var(--text-muted); cursor: not-allowed; }

/* ── Diagnostics ──────────────────────────────── */
.diag-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
}

.diag-label { font-weight: 600; color: var(--text-secondary); }
.diag-value { color: var(--text-primary); text-align: right; max-width: 65%; word-break: break-all; }
.diag-value.diag-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ru-highlight { font-weight: 600; color: var(--cosmos-blue); }

/* ── Results Layout (Data Modeling) ───────────── */
.results-panel {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 1.5rem;
    margin-top: 1rem;
    height: 950px;
}

.results-panel > .panel-left {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-left .diag-summary {
    flex-shrink: 0;
}

.panel-left pre.doc-json {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.panel-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 0;
}

.panel-right > .panel,
.panel-right > .movie-detail {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.panel-right > .cost-tracker {
    flex-shrink: 0;
}

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

/* ── JSON Viewer ──────────────────────────────── */
pre.doc-json {
    background: var(--bg-code);
    color: var(--text-code);
    padding: 1rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-family: 'Cascadia Code', 'Fira Code', Consolas, monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-y: auto;
    margin: 0.75rem 0 0 0;
    border: 1px solid var(--border-color);
}

/* ── Movie Poster Cards ───────────────────────── */
.poster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.poster-card {
    background: var(--bg-panel-alt);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.poster-card:hover {
    border-color: var(--cosmos-blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.poster-card .poster-img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
    background: var(--border-light);
}

.poster-card .poster-img-placeholder {
    width: 100%;
    aspect-ratio: 2/3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-panel-alt);
    color: var(--text-muted);
    font-size: 2rem;
}

.poster-card .poster-info {
    padding: 0.5rem 0.6rem;
}

.poster-card .poster-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.poster-card .poster-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.15rem;
}

.poster-card .poster-year {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.poster-card .poster-rating {
    font-size: 0.6rem;
    color: var(--text-secondary);
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    padding: 0.05rem 0.3rem;
    font-weight: 600;
}

/* ── Movie Detail View ────────────────────────── */
.movie-detail {
    padding: 1rem 1.25rem;
}

.detail-back {
    background: none;
    border: none;
    color: var(--cosmos-blue);
    cursor: pointer;
    font-size: 0.82rem;
    padding: 0;
    margin-bottom: 0.75rem;
}
.detail-back:hover { text-decoration: underline; }

.detail-header {
    display: flex;
    gap: 1.25rem;
}

.detail-poster {
    width: 180px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

.detail-poster-placeholder {
    width: 180px;
    aspect-ratio: 2/3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-panel-alt);
    border-radius: 8px;
    font-size: 3rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.detail-info {
    flex: 1;
    min-width: 0;
}

.detail-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.4rem 0;
    color: var(--text-primary);
}

.detail-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.detail-meta-left {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.detail-badge {
    font-size: 0.72rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: var(--bg-panel-alt);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 600;
}

.detail-badge.rating {
    background: var(--cosmos-navy);
    color: var(--text-nav);
    border-color: var(--cosmos-navy);
}

.detail-badge.genre {
    background: transparent;
    color: var(--cosmos-blue);
    border-color: var(--cosmos-blue);
}

.detail-badge.cosmos-rating {
    background: transparent;
    border: none;
    color: var(--cosmos-blue);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.planet-icon {
    stroke: var(--cosmos-teal);
}

.detail-tagline {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0 0 0.5rem 0;
}

.detail-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.detail-description p { margin: 0; }

.detail-section {
    margin-top: 1rem;
}
.detail-section h3 {
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}

.detail-people {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.person-link {
    font-size: 0.8rem;
    color: var(--cosmos-blue);
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: var(--bg-panel-alt);
    border: 1px solid var(--border-color);
    transition: background 0.2s, border-color 0.2s;
}
.person-link:hover {
    background: rgba(0, 120, 212, 0.1);
    border-color: var(--cosmos-blue);
}

.person-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.person-avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-panel-alt);
    color: var(--text-muted);
    font-size: 1.5rem;
    overflow: hidden;
}

.silhouette-icon {
    width: 40px;
    height: 40px;
    fill: var(--text-muted);
}

.person-card-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 0.2s;
    text-decoration: none;
    color: var(--cosmos-blue);
    width: 90px;
}

.person-card-link:hover {
    background: rgba(0, 120, 212, 0.1);
}

.person-name {
    font-size: 0.75rem;
    text-align: center;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
}

.review-item {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.review-score {
    font-weight: 700;
    color: var(--cosmos-blue);
    background: var(--bg-panel-alt);
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    flex-shrink: 0;
    font-size: 0.75rem;
}

.review-text {
    line-height: 1.4;
}

/* ── Person Cards ─────────────────────────────── */
.person-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.person-card {
    background: var(--bg-panel-alt);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.person-card:hover {
    border-color: var(--cosmos-blue);
    box-shadow: var(--shadow-md);
}

.person-card .name { font-weight: 600; font-size: 0.875rem; color: var(--text-primary); }
.person-card .role { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ── Module Cards (Modules Landing) ───────────── */
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
    margin-bottom: 2.5rem;
}

.module-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.module-card:hover {
    border-color: var(--cosmos-blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.module-card .module-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.module-card .module-title { font-size: 1.1rem; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 0.4rem; }
.module-card .module-title img, .module-card .module-title svg { width: 18px; height: 18px; border-radius: 4px; flex-shrink: 0; }
.module-card .module-desc { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.4rem; }

.demo-module-link {
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.demo-module-link a {
    color: var(--cosmos-blue);
    text-decoration: none;
}

.demo-module-link a:hover {
    text-decoration: underline;
}

.demo-instructions {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.demo-instructions p {
    margin: 0;
    line-height: 1.6;
}

.demo-top-row {
    display: flex;
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1rem;
}

.demo-top-row .demo-instructions {
    flex: 0 1 50%;
    min-width: 0;
    display: flex;
    align-items: center;
}

.demo-controls-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.75rem;
}

.demo-sample-values {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
}

.demo-hints-inline {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    white-space: nowrap;
}

/* ── Home Page ────────────────────────────────── */
.hero {
    text-align: center;
    padding: 3rem 1rem 2rem;
}

.hero h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.hero p { font-size: 1.05rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto; }

.features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0;
}

.feature-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem;
}

.feature-card .feature-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.feature-card h3 { margin-bottom: 0.3rem; color: var(--text-primary); }
.feature-card p { font-size: 0.85rem; color: var(--text-secondary); margin: 0; }

/* ── About Section ────────────────────────────── */
/* ── Cost Tracker Table ────────────────────────── */
.cost-tracker {
    margin-top: 1.25rem;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 0.78rem;
}

.cost-tracker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.cost-tracker-title {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.cost-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.cost-table th, .cost-table td {
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.6rem;
    text-align: center;
}

.cost-table th {
    background: var(--bg-nav);
    color: var(--text-nav);
    font-weight: 600;
    font-size: 0.75rem;
}

.cost-table td {
    background: var(--bg-panel);
    color: var(--text-muted);
}

.cost-table td.cost-active {
    color: var(--cosmos-blue);
    font-weight: 600;
}

.cost-table td.cost-total {
    background: var(--bg-panel-alt);
}

/* ── About Section ────────────────────────────── */
.about-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
}

.model-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.875rem;
}

.model-table th, .model-table td {
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
    text-align: center;
}

.model-table th {
    background: var(--bg-nav);
    color: var(--text-nav);
}

.model-table td { background: var(--bg-panel); }

/* ── Loading ──────────────────────────────────── */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem;
}

.loading-progress circle {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--cosmos-blue);
    stroke-dasharray: calc(3.14159 * 80%);
    stroke-dashoffset: calc(3.14159 * 80%);
    transition: stroke-dashoffset 0.5s ease-in-out;
}

/* ── Blazor Error UI ──────────────────────────── */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: #333;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ── Error message ────────────────────────────── */
.error-message {
    color: #d13438;
    background: rgba(209,52,56,0.08);
    border: 1px solid rgba(209,52,56,0.2);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

/* ── Site Footer ──────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    padding: 1.25rem 2rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    text-decoration: none;
}

.footer-brand:hover { color: var(--text-secondary); text-decoration: none; }

.footer-icon {
    width: 32px;
    height: 32px;
    border-radius: 3px;
}

.footer-github {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-muted);
    text-decoration: none;
}

.footer-github:hover { color: var(--text-secondary); text-decoration: none; }

.github-icon {
    width: 32px;
    height: 32px;
}

/* Demo hints */
.hints-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 100;
}

.hints-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-page);
    cursor: pointer;
    padding: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

.hints-toggle:hover { background: var(--bg-hover); }

.hints-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.hints-overlay {
    position: absolute;
    bottom: 44px;
    right: 0;
    min-width: 340px;
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    font-size: 0.8rem;
    opacity: 1;
}

.hints-header {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hints-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.25rem 0;
    color: var(--text-primary);
}

.hints-label {
    color: var(--text-secondary);
    white-space: nowrap;
}

.hints-copy {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 0.15rem;
    color: var(--text-secondary);
    opacity: 0.4;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
}

.hints-copy:hover { opacity: 0.8; }

/* ===== Indexing Module ===== */

.ix-results-panel {
    height: auto;
    min-height: 500px;
    justify-content: start;
    grid-template-columns: 3fr 2fr;
}

.ix-policies-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
}

.ix-policy-box {
    flex-shrink: 0;
    padding: 0.5rem;
}

.ix-policy-box pre.doc-json {
    margin: 0;
    padding: 1rem;
}

.ix-help-wrapper {
    position: relative;
    margin-left: auto;
}

.ix-help-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid var(--text-muted);
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.ix-help-btn:hover {
    border-color: var(--cosmos-blue);
}

.ix-help-btn:hover .ix-help-icon {
    color: var(--cosmos-blue);
}

.ix-help-icon {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    line-height: 1;
}

.ix-help-popup {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 340px;
    max-width: 420px;
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    font-size: 0.8rem;
    z-index: 100;
}

.ix-policy-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.ix-policy-header h3 {
    margin: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.ix-ru-badge {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    background: var(--cosmos-blue);
    color: white;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.ix-help-text {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.82rem;
    line-height: 1.6;
}

.ix-policy-json {
    margin: 0; padding: 0.6rem; background: var(--bg-code); color: var(--text-code);
    border-radius: 6px; font-size: 0.75rem; overflow-x: auto; line-height: 1.5;
}


