
:root {
    --bg: #1a1a2e;
    --bg-light: #16213e;
    --accent: #e94560;
    --text: #eee;
    --text-muted: #888;
    --border: #333;
    /* Domain accent colors */
    --domain-law: #7f1d1d;
    --domain-computer-science: #1e3a8a;
    --law-tint: rgba(127,29,29,.18);
    --cs-tint: rgba(30,58,138,.16);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

header h1 {
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

header a {
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon {
    width: 1.5em;
    height: 1.5em;
    stroke: var(--accent);
}

/* Facet filters */
.filters {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-group h3 {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.filter-group .tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: var(--bg-light);
    color: var(--text);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    text-decoration: none;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

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

.tag.active {
    background: var(--accent);
    border-color: var(--accent);
}

/* Entry cards */
.entries {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.entry-card {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: border-color 0.2s;
}

.entry-card:hover {
    border-color: var(--accent);
}

.entry-card h2 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.entry-card h2 a {
    color: var(--text);
    text-decoration: none;
}

.entry-card h2 a:hover {
    color: var(--accent);
}

.entry-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.entry-summary {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.entry-summary ul {
    list-style: none;
    padding-left: 0;
}

.entry-summary li::before {
    content: "→ ";
    color: var(--accent);
}

/* Transcript page */
.transcript-header {
    margin-bottom: 2rem;
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    margin-bottom: 2rem;
    background: #000;
    border-radius: 0.5rem;
    overflow: hidden;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.sections-nav {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.sections-nav h3 {
    margin-bottom: 1rem;
    color: var(--accent);
}

.sections-nav ul {
    list-style: none;
}

.sections-nav li {
    margin-bottom: 0.5rem;
}

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

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

.sections-nav .timestamp {
    color: var(--text-muted);
    font-family: monospace;
    margin-right: 0.5rem;
}

/* Full transcript */
.transcript-content {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 0.5rem;
}

.transcript-content h2,
.transcript-content h3 {
    color: var(--accent);
    margin: 1.5rem 0 1rem;
}

.transcript-content .timestamp {
    color: var(--text-muted);
    font-family: monospace;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    opacity: 0.6;
}

.transcript-content p {
    margin-bottom: 0.5rem;
}

/* Margin timestamp transcript viewer (Akademie Ausgabe style) */
.transcript-prose {
    padding-left: 5.5rem;
    position: relative;
    line-height: 1.9;
    font-size: 1rem;
}

.margin-timestamp {
    position: absolute;
    left: 0;
    width: 4.5rem;
    text-align: right;
    font-family: 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
    font-size: 0.65rem;
    color: var(--text-muted);
    opacity: 0.35;
    user-select: none;
    transition: opacity 0.15s ease;
}

.margin-timestamp:hover {
    opacity: 0.85;
    color: var(--accent);
}

.margin-timestamp a {
    color: inherit;
    text-decoration: none;
}

.prose-segment {
    display: inline;
}

/* Mobile: inline superscript timestamps */
@media (max-width: 640px) {
    .transcript-prose {
        padding-left: 0;
    }

    .margin-timestamp {
        position: static;
        display: inline;
        width: auto;
        opacity: 0.2;
        font-size: 0.55rem;
        vertical-align: super;
        margin-right: 0.2rem;
    }
}

/* Summary */
.summary {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    border-left: 3px solid var(--accent);
}

.summary h3 {
    color: var(--accent);
    margin-bottom: 1rem;
}

.summary ul {
    list-style: none;
}

.summary li {
    margin-bottom: 0.5rem;
}

.summary li::before {
    content: "• ";
    color: var(--accent);
}

/* Back link */
.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--text-muted);
    text-decoration: none;
}

.back-link:hover {
    color: var(--accent);
}

/* Main Navigation */
.main-nav {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.main-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

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

.main-nav a.active {
    color: var(--accent);
}

.nav-divider {
    color: var(--border);
}

/* Channel List */
.channel-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.channel-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s;
}

.channel-card:hover {
    border-color: var(--accent);
}

.channel-name {
    font-weight: 500;
}

.channel-count {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.channel-link {
    color: var(--accent);
    text-decoration: none;
}

.channel-link:hover {
    text-decoration: underline;
}

/* Letter Navigation */
.letter-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
}

.letter-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.letter-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.letter-link.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}

/* Search Container */
.search-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

#search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text);
    font-size: 1rem;
}

#search-input:focus {
    outline: none;
    border-color: var(--accent);
}

#search-input::placeholder {
    color: var(--text-muted);
}

#search-btn, #clear-search {
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    border: none;
    border-radius: 0.5rem;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

#search-btn:hover, #clear-search:hover {
    opacity: 0.9;
}

#clear-search {
    background: var(--bg-light);
    border: 1px solid var(--border);
    color: var(--text);
}

/* Search Results */
.search-results {
    margin-bottom: 2rem;
}

.search-result-card {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.search-result-card mark {
    background: var(--accent);
    color: white;
    padding: 0 0.2rem;
    border-radius: 0.2rem;
}

.matching-sections {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.matching-section {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--bg);
    border-radius: 0.25rem;
    font-size: 0.9rem;
}

.matching-section .timestamp {
    color: var(--accent);
    font-family: monospace;
}

.matching-section a {
    color: var(--text);
    text-decoration: none;
}

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

.matching-section p {
    margin-top: 0.5rem;
    color: var(--text-muted);
}

/* Dual Search Interface */
.dual-search {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.search-panel, .chat-panel {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem;
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.panel-title {
    color: var(--accent);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.search-panel .search-container {
    margin-bottom: 0.5rem;
}

.search-explainer {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin: 0 0 1rem 0;
    opacity: 0.8;
}

.search-panel .search-results {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

/* Chat Interface */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    max-height: 350px;
    padding: 0.5rem;
    background: var(--bg);
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

.chat-message {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.chat-message.user {
    background: var(--accent);
    color: white;
    margin-left: 2rem;
}

.chat-message.assistant {
    background: var(--bg-light);
    border: 1px solid var(--border);
    margin-right: 2rem;
}

.chat-message.loading {
    opacity: 0.6;
    font-style: italic;
}

.chat-message p {
    margin: 0;
}

.chat-videos {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.chat-videos ul {
    list-style: none;
    margin-top: 0.5rem;
}

.chat-videos li {
    margin-bottom: 0.4rem;
}

.chat-videos a {
    color: var(--text);
    text-decoration: none;
}

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

.chat-videos .meta {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Chat message formatting */
.chat-message h3, .chat-message h4 {
    color: var(--accent);
    margin: 0.75rem 0 0.5rem 0;
    font-size: 0.95rem;
}

.chat-message h3:first-child, .chat-message h4:first-child {
    margin-top: 0;
}

.chat-message ul {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}

.chat-message li {
    margin-bottom: 0.3rem;
}

.chat-message .timestamp {
    font-family: monospace;
    background: var(--bg);
    padding: 0.1rem 0.3rem;
    border-radius: 0.2rem;
    font-size: 0.8rem;
    color: var(--accent);
}

.chat-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.85rem;
}

.chat-table th, .chat-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.chat-table th {
    background: var(--bg);
    color: var(--accent);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.chat-table tr:hover {
    background: rgba(233, 69, 96, 0.05);
}

.chat-message em {
    color: var(--text-muted);
}

/* Search History Panel */
.history-panel {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.history-header .panel-title {
    margin: 0;
    padding: 0;
    border: none;
}

.history-controls {
    display: flex;
    gap: 0.5rem;
}

.history-toggle, .history-clear {
    padding: 0.35rem 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.history-toggle:hover, .history-clear:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.history-content {
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.history-empty {
    color: var(--text-muted);
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.75rem;
    background: var(--bg);
    border-radius: 0.25rem;
    gap: 1rem;
}

.history-item:hover {
    background: rgba(233, 69, 96, 0.05);
}

.history-item-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.history-type {
    padding: 0.2rem 0.5rem;
    border-radius: 0.2rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
}

.history-type.keyword {
    background: var(--bg-light);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.history-type.ai {
    background: var(--accent);
    color: white;
}

.history-query {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

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

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

.history-rerun {
    padding: 0.25rem 0.5rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 0.2rem;
    color: var(--text);
    cursor: pointer;
    font-size: 0.75rem;
}

.history-rerun:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.history-delete {
    padding: 0.15rem 0.4rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.history-delete:hover {
    color: var(--accent);
}

/* Paper-specific styles */
.content-type-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
}

.paper-badge {
    background: #6366f1;
    color: white;
}

.video-badge {
    background: #ef4444;
    color: white;
}

.podcast-badge {
    background: #22c55e;
    color: white;
}

.blog-badge {
    background: #f59e0b;
    color: white;
}

.legal-badge {
    background: #7f1d1d;
    color: white;
}

.journal-badge {
    background: #be185d;
    color: white;
}

/* Entry badges container */
.entry-badges {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.paper-header {
    margin-bottom: 2rem;
}

.paper-meta .authors {
    font-size: 0.95rem;
    color: var(--text);
}

.paper-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.upvotes {
    color: #22c55e;
    font-weight: 600;
}

.abstract {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    border-left: 3px solid #6366f1;
}

.abstract h3 {
    color: #6366f1;
    margin-bottom: 1rem;
}

.abstract p {
    line-height: 1.7;
}

.paper-content {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 0.5rem;
}

.paper-content h3 {
    color: #6366f1;
    margin-bottom: 1rem;
}

.papers-list .entry-card {
    border-left: 3px solid #6366f1;
}

.entry-list {
    list-style: none;
}

.entry-card {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s;
}

.entry-card:hover {
    border-color: var(--accent);
}

.entry-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.entry-title {
    color: var(--text);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
}

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

.entry-summary {
    margin-top: 0.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Domain separation styles */
.entry-card {
    position: relative;
    border-left: 4px solid var(--border);
}

.entry-card.domain-law {
    border-left-color: var(--domain-law);
}

.entry-card.domain-computer-science {
    border-left-color: var(--domain-computer-science);
}

/* Domain badge */
.domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
}

.domain-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--border);
}

.domain-badge.law {
    border-color: rgba(127,29,29,.5);
    color: #fca5a5;
}

.domain-badge.law::before {
    background: var(--domain-law);
}

.domain-badge.computer-science {
    border-color: rgba(30,58,138,.5);
    color: #93c5fd;
}

.domain-badge.computer-science::before {
    background: var(--domain-computer-science);
}

/* Domain filter toggle */
.domain-filter {
    display: inline-flex;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    margin-left: 1rem;
}

.domain-filter a {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.domain-filter a:hover {
    background: rgba(255,255,255,0.05);
}

.domain-filter a.active {
    background: var(--bg-light);
    color: var(--text);
}

.tag-small {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state code {
    background: var(--bg);
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.9rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.chat-input-container {
    display: flex;
    gap: 0.5rem;
}

#chat-input {
    flex: 1;
    padding: 0.6rem 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    color: var(--text);
    font-size: 0.9rem;
}

#chat-input:focus {
    outline: none;
    border-color: var(--accent);
}

#chat-input::placeholder {
    color: var(--text-muted);
}

#chat-btn {
    padding: 0.6rem 1rem;
    background: var(--accent);
    border: none;
    border-radius: 0.25rem;
    color: white;
    cursor: pointer;
    font-size: 0.85rem;
}

#chat-btn:hover {
    opacity: 0.9;
}

/* Responsive: stack on mobile */
@media (max-width: 900px) {
    .dual-search {
        grid-template-columns: 1fr;
    }

    .search-panel, .chat-panel {
        min-height: 250px;
    }

    .chat-messages {
        max-height: 250px;
    }
}

/* === Hero Section (Above the Fold) === */
.hero {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    margin-bottom: 2rem;
}

.hero-search {
    width: 100%;
    max-width: 700px;
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.hero-search input {
    flex: 1;
    padding: 1rem 1.25rem;
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text);
    font-size: 1.1rem;
}

.hero-search input:focus {
    outline: none;
    border-color: var(--accent);
}

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

.hero-search button {
    padding: 1rem 1.5rem;
    background: var(--accent);
    border: none;
    border-radius: 0.5rem;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
}

.hero-search button:hover {
    opacity: 0.9;
}

.hero-search #clear-search {
    background: var(--bg-light);
    border: 2px solid var(--border);
    color: var(--text);
}

.hero-chat {
    width: 100%;
    max-width: 700px;
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.hero-chat input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text);
    font-size: 0.95rem;
}

.hero-chat input:focus {
    outline: none;
    border-color: var(--accent);
}

.hero-chat input::placeholder {
    color: var(--text-muted);
}

.hero-chat button {
    padding: 0.75rem 1.25rem;
    background: var(--bg-light);
    border: 1px solid var(--accent);
    border-radius: 0.5rem;
    color: var(--accent);
    cursor: pointer;
    font-size: 0.9rem;
}

.hero-chat button:hover {
    background: var(--accent);
    color: white;
}

/* Docent Desk */
.docent-desk {
    margin-top: 1rem;
}

.docent-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 1rem;
    transition: color 0.2s;
}

.docent-icon:hover {
    color: var(--accent);
}

.docent-icon svg {
    width: 2rem;
    height: 2rem;
}

.docent-icon span {
    font-size: 0.85rem;
}

/* Chat Container (Expandable) */
.chat-container-expandable {
    max-width: 700px;
    margin: 0 auto 2rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem;
}

.chat-container-expandable .chat-messages {
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
    background: var(--bg);
    border-radius: 0.25rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--accent);
}

.modal-content h2 {
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.docent-section {
    margin-bottom: 1.5rem;
}

.docent-section h3 {
    color: var(--text);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.docent-section ul {
    list-style: none;
    padding: 0;
}

.docent-section li {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.docent-section a {
    color: var(--accent);
    text-decoration: none;
}

.docent-section a:hover {
    text-decoration: underline;
}

.docent-section code {
    background: var(--bg);
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.85rem;
}

.api-endpoints {
    font-family: monospace;
    font-size: 0.85rem;
}

.api-endpoints li {
    margin-bottom: 0.25rem;
}

/* Search feedback */
.search-loading, .search-empty, .search-count {
    color: var(--text-muted);
    padding: 1rem;
}

.search-count {
    margin-bottom: 1rem;
}

/* Mobile hero adjustments */
@media (max-width: 600px) {
    .hero {
        min-height: 40vh;
        padding: 1rem;
    }

    .hero-search input, .hero-chat input {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }

    .hero-search button, .hero-chat button {
        padding: 0.75rem 1rem;
    }
}
