/* Hero Image Card */
.hero-image-container {
    position: relative;
    width: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 1024px) {
    .hero-image-container {
        min-height: 600px;
        justify-content: flex-end;
    }
}

.hero-card {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 4 / 5;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(var(--black-rgb), 0.25);
    border: 4px solid var(--surface-light);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(var(--secondary-rgb), 0.5), transparent, transparent);
    z-index: 10;
}

.card-image-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.card-image-content {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.7s;
    display: block;
}

.hero-card:hover .card-image-content {
    transform: scale(1.05);
}

.card-info {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    z-index: 20;
    background-color: rgba(var(--surface-light-rgb), 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(var(--border-color), 0.5);
    padding: 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(var(--black-rgb), 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-info-text p:first-child {
    color: var(--secondary);
    font-weight: 700;
    font-size: 0.875rem;
}

.card-info-text p:last-child {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
}

.verified-icon {
    background-color: var(--primary);
    padding: 0.5rem;
    border-radius: 0.5rem;
    color: var(--surface-light);
    display: flex;
    box-shadow: 0 1px 2px 0 rgba(var(--black-rgb), 0.05);
}

.verified-icon span {
    font-size: 1.125rem;
}

/* Deal Badges */
.deal-badges {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
    padding-left: 1.5rem;
    /* Align with bullet text */
}

.deal-badge {
    width: 55px;
    height: 55px;
    background-color: var(--slate-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 1px solid rgba(var(--black-rgb), 0.05);
    transition: all 0.3s ease;
    color: var(--text-color);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(var(--black-rgb), 0.05);
    overflow: hidden;
    position: relative;
}

.deal-badge picture {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.deal-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.deal-badge:hover {
    transform: translateY(-3px);
    background-color: white;
    box-shadow: 0 5px 15px rgba(var(--black-rgb), 0.1);
    color: var(--primary);
    border-color: var(--primary);
}

@media (max-width: 768px) {
    .deal-badges {
        padding-left: 0;
        margin-left: 1rem;
    }
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
    border: none;
    padding: 0;
}

.form-group label,
.form-group legend {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.form-group input[type="email"] {
    width: 100%;
    height: 3rem;
    padding: 0 1rem;
    border: 1px solid var(--slate-300);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-main);
    background-color: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input[type="email"]::placeholder {
    color: var(--slate-400);
}

.form-group input[type="email"]:focus:not(:focus-visible) {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.form-group input[type="email"].error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(var(--error-rgb), 0.1);
}

.error-message {
    display: block;
    font-size: 0.8rem;
    color: var(--error);
    margin-top: 0.5rem;
    min-height: 1.2rem;
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 1.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-main);
}

.radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-custom {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--slate-300);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s;
}

.radio-custom::after {
    content: '';
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
    background-color: var(--primary);
    transform: scale(0);
    transition: transform 0.2s;
}

.radio-label input[type="radio"]:checked+.radio-custom {
    border-color: var(--primary);
}

.radio-label input[type="radio"]:checked+.radio-custom::after {
    transform: scale(1);
}

.radio-label input[type="radio"]:focus-visible+.radio-custom {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Submit Button */
.btn-full {
    width: 100%;
    margin-top: 0.5rem;
}

.btn .btn-text,
.btn .btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn .btn-loading {
    display: none;
}

.btn.loading .btn-text {
    display: none;
}

.btn.loading .btn-loading {
    display: flex;
}

/* Spinner Animation */
.spinner {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(var(--white-rgb), 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Form Notice */
.form-notice {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--slate-100);
}

/* Success State */
.modal-success {
    text-align: center;
    padding: 1rem 0;
}

.modal-success .success-icon {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 1rem;
    display: block;
}

.modal-success h2 {
    padding-right: 0;
    text-align: center;
}

.modal-success p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.modal-success .btn {
    gap: 0.75rem;
}

.modal-success .btn .material-symbols-outlined {
    font-size: 1.25rem;
}

/* Modal Large (Contact) */
.modal-container-lg {
    max-width: 36rem;
}

/* Search Modal - Compact */
.modal-container-search {
    max-width: 32rem;
    margin-top: 10vh;
}

.modal-search .modal-content {
    padding: 1.5rem;
}

.search-form {
    width: 100%;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1.125rem;
    font-family: var(--font-family);
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    background: var(--background);
    color: var(--text-primary);
    transition: border-color var(--transition-fast);
}

.search-input:focus:not(:focus-visible) {
    outline: none;
    border-color: var(--primary);
}

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

.search-kbd {
    position: absolute;
    right: 1rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-family: var(--font-family);
    background: var(--surface-accent);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    color: var(--text-muted);
}

.search-hint {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
}

/* Search Page */
.search-page {
    min-height: 60vh;
}

.search-page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

/* Pagefind UI Overrides */
.pagefind-ui {
    --pagefind-ui-scale: 1;
    --pagefind-ui-primary: var(--primary);
    --pagefind-ui-text: var(--text-primary);
    --pagefind-ui-background: var(--background);
    --pagefind-ui-border: var(--border-color);
    --pagefind-ui-tag: var(--surface-accent);
    --pagefind-ui-border-width: 1px;
    --pagefind-ui-border-radius: 0.5rem;
    --pagefind-ui-font: var(--font-family);
}

.pagefind-ui__search-input {
    font-family: var(--font-family) !important;
    font-size: 1rem !important;
    padding: 0.875rem 1rem !important;
    border-radius: 0.5rem !important;
}

.pagefind-ui__result-link {
    color: var(--primary) !important;
    font-weight: 600 !important;
}

.pagefind-ui__result-excerpt {
    color: var(--text-secondary) !important;
}

.pagefind-ui__result {
    padding: 1rem 0 !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.pagefind-ui__result-image {
    border-radius: 0.375rem !important;
}

/* Form Row (2 columns) */
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 480px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* Text Input (shared with email) */
.form-group input[type="text"] {
    width: 100%;
    height: 3rem;
    padding: 0 1rem;
    border: 1px solid var(--slate-300);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-main);
    background-color: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input[type="text"]::placeholder {
    color: var(--slate-400);
}

.form-group input[type="text"]:focus:not(:focus-visible) {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.form-group input[type="text"].error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(var(--error-rgb), 0.1);
}

/* Textarea */
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--slate-300);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-main);
    background-color: var(--white);
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group textarea::placeholder {
    color: var(--slate-400);
}

.form-group textarea:focus:not(:focus-visible) {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.form-group textarea.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(var(--error-rgb), 0.1);
}

/* Required indicator */
.required {
    color: var(--error);
}

/* Honeypot - Hidden from users */
.form-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Modal Responsive */
@media (max-width: 480px) {
    .modal-container {
        padding: 1.5rem;
        margin: 0.5rem;
    }

    .modal-content h2 {
        font-size: 1.25rem;
    }

    .radio-group {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* =====================================================
   Project Detail Pages
   ===================================================== */

/* Topic card: reduced height on small mobile */
@media (max-width: 640px) {
    .topic-card {
        min-height: 10rem;
    }
}

/* Journey steps: narrower cards on mobile */
@media (max-width: 767px) {
    .journey-step {
        flex: 0 0 14rem;
    }
}

/* Input */
.ai-input-area {
    padding: 0.75rem;
    background: var(--surface-light);
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.5rem;
}

#ai-input-field {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 0.6rem 1rem;
    font-family: inherit;
    font-size: 0.9rem;
    background: var(--background);
    color: var(--text-main);
    transition: border-color 0.2s;
}

#ai-input-field:focus:not(:focus-visible) {
    outline: none;
    border-color: var(--primary);
}

.ai-send-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ai-send-btn:hover {
    background: var(--primary-dark);
}

/* =====================================================
   Floating FABs — Scroll to top + Search
   ===================================================== */
.scroll-top-fab {
    position: fixed;
    bottom: calc(2rem + 3.5rem + 0.75rem + 3.5rem + 0.75rem);
    right: 2rem;
    z-index: 8999;
    background: var(--primary);
    color: white;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 12px rgba(128, 0, 32, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.scroll-top-fab.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top-fab:hover {
    transform: scale(1.1);
}

.scroll-top-fab span {
    font-size: 1.75rem;
}

/* =====================================================
   Floating Search FAB
   ===================================================== */
.search-fab {
    position: fixed;
    bottom: calc(2rem + 3.5rem + 0.75rem);
    right: 2rem;
    z-index: 8999;
    background: var(--primary);
    color: white;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 12px rgba(128, 0, 32, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.search-fab:hover {
    transform: scale(1.1);
}

.search-fab span {
    font-size: 1.75rem;
}

/* =====================================================
   AI Chat Widget — Container, FAB & Window
   ===================================================== */
#ai-chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9000;
    font-family: 'Manrope', sans-serif;
}

.ai-fab {
    background: var(--primary);
    color: white;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 12px rgba(128, 0, 32, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.ai-fab:hover {
    transform: scale(1.1);
}

.ai-fab span {
    font-size: 1.75rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-fab-badge {
    position: absolute !important;
    top: -6px !important;
    right: -10px !important;
    background: var(--secondary) !important;
    color: var(--white) !important;
    font-size: 8px !important;
    font-weight: 600 !important;
    padding: 2px 5px !important;
    border-radius: 4px !important;
    border: 1px solid var(--background) !important;
    text-transform: uppercase !important;
    z-index: 10 !important;
    pointer-events: none !important;
    letter-spacing: 0.02em !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

.ai-window {
    position: absolute;
    bottom: 5rem;
    right: 0;
    width: 350px;
    height: 500px;
    background: var(--background);
    border-radius: 1.5rem;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    transform-origin: bottom right;
}

#ai-chat-widget.open .ai-window {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
    background: var(--surface-light);
}

#ai-chat-widget.open .ai-fab .material-symbols-outlined {
    transform: rotate(90deg) scale(0);
}

@media (max-width: 480px) {
    #ai-chat-widget.open .ai-window {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    #ai-chat-widget.open .ai-fab {
        display: none;
    }
}

/* =====================================================
   Blog / Articles Archive
   ===================================================== */
.archive-section {
    padding-top: calc(var(--header-height) + 2rem);
}

.archive-intro {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 500px;
}

.archive-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 2.5rem;
}

.filter-btn {
    font-family: var(--font-mono);
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    background: rgba(var(--primary-rgb), 0.15);
}

.filter-btn.active {
    background: var(--primary);
    color: var(--white);
}

.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 640px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Article Card */
.article-card {
    background: var(--surface-light);
    border-radius: 2rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.article-card-image {
    display: block;
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease-out;
}

.article-card:hover .article-card-image img {
    transform: scale(1.05);
}

.article-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary);
    color: var(--white);
    padding: 0.3rem 0.85rem;
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
}

/* Article Placeholder */
.article-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, #4a0012 100%);
}

.article-card-placeholder .placeholder-logo {
    transform: scale(1.5);
    opacity: 0.9;
}

.article-card-placeholder .monogram-r,
.article-card-placeholder .monogram-de span {
    color: white;
}

.article-card:hover .article-card-placeholder {
    background: linear-gradient(135deg, #9a0028 0%, var(--primary) 100%);
}

.article-card-content {
    padding: 1.5rem;
}

.article-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.reading-time {
    opacity: 0.8;
}

.article-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.125rem * 1.3 * 3);
}

.article-card-title a {
    color: var(--secondary);
    text-decoration: none;
    background-image: linear-gradient(var(--primary), var(--primary));
    background-size: 0% 2px;
    background-position: left bottom;
    background-repeat: no-repeat;
    transition: background-size 0.5s ease;
}

.article-card:hover .article-card-title a {
    background-size: 100% 2px;
}

.article-card-excerpt {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.article-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    text-decoration: none;
    transition: gap 0.3s ease;
}

.article-card:hover .article-card-link {
    gap: 0.6rem;
}

.article-card-link .material-symbols-outlined {
    font-size: 0.9rem;
}

/* AI Translation Banner */
.ai-translation-banner {
    background: var(--ai-translation-bg);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.ai-translation-banner .material-symbols-outlined {
    font-size: 1.25rem;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.ai-translation-banner a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.ai-translation-banner a:hover {
    text-decoration: underline;
}

/* Article Page */
.article-page {
    padding-top: var(--header-height);
}

/* Article Page Header */
.article-header {
    text-align: center;
    padding-bottom: 2rem;
    background: linear-gradient(to bottom, transparent 0%, var(--surface-light) 75%);
}

.article-header .container {
    max-width: 800px;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.article-category-pill {
    background-color: var(--primary);
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.article-title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.25rem;
}

.article-excerpt {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1.375rem;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.5;
}

.article-hero-image {
    margin-top: 3rem;
    margin-bottom: 0;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.article-hero-ratio {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 2rem;
}

.article-hero-image img,
.article-hero-image picture {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-hero-caption {
    margin-top: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--text-muted);
    text-align: center;
}

.article-hero-source {
    display: block;
    font-size: 0.6875rem;
    color: var(--text-muted);
    opacity: 0.7;
}

.article-content {
    padding-top: 0;
    background-color: var(--surface-light);
}

.container-narrow {
    max-width: 900px;
    margin: 0 auto;
}

/* Glossary tooltips (in article/event content) */
a.glossary-term {
    cursor: help;
    position: relative;
    text-decoration: none;
    background-color: var(--glossary-term-bg);
    color: var(--glossary-term-color);
    font-weight: 700;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    border: 1px solid var(--glossary-term-border);
    transition: background-color var(--transition-fast);
}

a.glossary-term:hover {
    background-color: var(--glossary-term-hover-bg);
}

a.glossary-term:hover::after {
    content: attr(data-definition);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    width: max-content;
    max-width: 300px;
    font-size: 0.875rem;
    line-height: 1.4;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    pointer-events: none;
    color: var(--text-main);
}

/* Tooltip arrow */
a.glossary-term:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--border-color);
    z-index: 101;
}

/* Article tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
}

.tags-label {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.tag {
    font-family: var(--font-mono);
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: all var(--transition-fast);
}

.tag:hover {
    background: rgba(var(--primary-rgb), 0.15);
    color: var(--primary);
}

/* Author box */
.author-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding: 1.5rem;
    background: var(--surface-accent);
    border-radius: var(--radius-xl);
}

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

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 700;
    color: var(--secondary);
}

.author-title {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Video embed */
.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 2rem 0;
    border-radius: var(--radius-lg);
}

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

/* =====================================================
   Veille Grid & Card
   ===================================================== */
.veille-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .veille-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .veille-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.veille-week-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    margin-bottom: 2rem;
}

.veille-week-badge .material-symbols-outlined {
    font-size: 1rem;
}

.veille-summary {
    margin-bottom: 2.5rem;
}

.veille-homepage-summary {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-main);
    margin-bottom: 2rem;
}

.veille-theme-section {
    margin-bottom: 3rem;
}

.veille-theme-section:last-child {
    margin-bottom: 0;
}

.veille-theme-title {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.veille-card {
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 1.5rem;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.veille-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.veille-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.veille-card-theme {
    display: inline-block;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
}

.veille-card-lang {
    display: inline-block;
    background: var(--border-color);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full);
}

.veille-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}

.veille-card-title a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s ease;
}

.veille-card-title a:hover {
    color: var(--primary);
}

.veille-card-summary {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.veille-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: auto;
}

.veille-card-source {
    font-weight: 600;
}

.veille-card-separator {
    opacity: 0.5;
}

/* Veille Navigation (prev/next + week selector) */
.veille-nav {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.veille-nav-arrows {
    display: flex;
    gap: 1rem;
    width: 100%;
    justify-content: space-between;
}

.veille-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    transition: background 0.2s ease, gap 0.3s ease;
}

.veille-nav-btn:hover {
    background: rgba(var(--primary-rgb), 0.06);
    gap: 0.6rem;
}

.veille-nav-btn.disabled {
    color: var(--text-muted);
    opacity: 0.4;
    pointer-events: none;
}

.veille-nav-btn .material-symbols-outlined {
    font-size: 1rem;
}

.veille-nav-select select {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-main);
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.veille-nav-select select:focus:not(:focus-visible) {
    outline: none;
    border-color: var(--primary);
}

/* =====================================================
   Events Archive
   ===================================================== */
.events-section-title {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .legal-table th,
    .legal-table td {
        padding: 0.5rem 0.75rem;
    }
}

/* =====================================================
   AI Summary Block (article pages)
   ===================================================== */
.ai-summary-block {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    background: var(--surface-accent);
}

.ai-summary-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-summary-header .material-symbols-outlined {
    font-size: 1.125rem;
    color: var(--primary);
}

.ai-summary-title {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--secondary);
}

.ai-summary-select {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    font-family: inherit;
    font-size: 0.8125rem;
    color: var(--text-main);
    background: var(--surface-light);
    margin: 0.75rem 0;
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

.ai-summary-select:focus:not(:focus-visible) {
    outline: none;
    border-color: var(--primary);
}

.ai-summary-llms {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ai-llm-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    background: var(--surface-light);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    transition: border-color 150ms ease, background 150ms ease;
}

.ai-llm-btn:hover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.04);
}

.ai-llm-btn img {
    width: 20px;
    height: 20px;
    border-radius: 0;
    flex-shrink: 0;
}

.ai-summary-toast {
    font-size: 0.75rem;
    color: var(--success);
    margin-top: 0.5rem;
    transition: opacity 300ms ease;
}

/* Mobile: 3-column grid for LLM buttons */
@media (max-width: 640px) {
    .ai-summary-llms {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .ai-llm-btn {
        justify-content: center;
    }
}