@import url('/static/vendor/fonts/inter.css');

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --background: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-top: 2rem;
    margin-bottom: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), #9333ea);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 0.5rem 0;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

nav {
    background: var(--card-bg);
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.nav-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 400;
    font-size: 1.3rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    white-space: nowrap;
    text-align: center;
}

nav a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

nav a.active {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow);
}

.content {
    margin-top: 2rem;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-group input {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all 0.2s ease;
    background: var(--card-bg);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.form-group select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all 0.2s ease;
    background: var(--card-bg);
    width: 100%;
    cursor: pointer;
}

.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    gap: 0.5rem;
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

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

.btn-secondary:hover {
    background: #475569;
}

.btn-success {
    background: var(--success-color);
}

.btn-success:hover {
    background: #059669;
}

.table-container {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin: 2rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

table tr:hover {
    background: #f8fafc;
}

table a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

table a:hover {
    text-decoration: underline;
}

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

.stat-card {
    background: linear-gradient(135deg, var(--card-bg), #f8fafc);
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--primary-color);
}

.stat-card p {
    margin: 0.5rem 0 0 0;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin: 1rem 0;
    border-left: 4px solid;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border-left-color: var(--error-color);
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border-left-color: var(--success-color);
}

.filter-panel {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    margin: 2rem 0;
}

.filter-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.filter-options label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 400;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: background 0.2s ease;
}

.filter-options label:hover {
    background: white;
}

.filter-options input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: var(--primary-color);
}

.timeline {
    margin: 2rem 0;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 2rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), transparent);
}

.timeline-entry {
    display: flex;
    margin-bottom: 2rem;
    position: relative;
    align-items: flex-start;
}

.timeline-marker {
    flex: 0 0 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.timeline-marker::after {
    content: '';
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid white;
    box-shadow: var(--shadow);
    z-index: 2;
}

.timeline-entry.added .timeline-marker::after {
    background: var(--success-color);
}

.timeline-entry.removed .timeline-marker::after {
    background: var(--error-color);
}

.timeline-entry.modified .timeline-marker::after {
    background: var(--warning-color);
}

.timeline-date {
    flex: 0 0 140px;
    text-align: right;
    padding-right: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.timeline-content {
    flex: 1;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-left: 1rem;
}

.timeline-content h4 {
    margin: 0 0 1rem 0;
    font-weight: 600;
    color: var(--text-primary);
}

.timeline-content ul {
    margin: 0;
    padding-left: 1.5rem;
}

.timeline-content li {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

.change-list {
    margin: 1rem 0;
}

.change-item {
    margin: 0.75rem 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.change-value {
    color: var(--text-secondary);
    font-family: monospace;
    background: #f8fafc;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    margin-left: 0.5rem;
}

.added .timeline-content {
    border-left: 4px solid var(--success-color);
}

.removed .timeline-content {
    border-left: 4px solid var(--error-color);
}

.modified .timeline-content {
    border-left: 4px solid var(--warning-color);
}

.node-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.info-item {
    background: #f8fafc;
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.info-item strong {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

@media (max-width: 768px) {
    .container {
        margin: 1rem;
        padding: 1rem;
        border-radius: var(--radius);
    }
    
    .nav-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 0.5rem;
    }

    nav a {
        padding: 0.75rem 0.75rem;
        font-size: 1.1rem;
    }
    
    .search-form {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline-entry {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .timeline-date {
        flex: none;
        text-align: left;
        padding: 0 0 0.5rem 0;
    }
    
    .timeline-content {
        margin-left: 0;
        width: 100%;
    }
}

.loading {
    display: inline-block;
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-error {
    background: #fee2e2;
    color: #991b1b;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-primary {
    background: #dbeafe;
    color: #1e40af;
}

.badge-secondary {
    background: #e2e8f0;
    color: #475569;
}

.badge-historical {
    background: #2d2d2d;
    color: #e5e5e5;
    border: 1px solid #4a4a4a;
}

/* Date Picker Styles */
.date-picker-wrapper {
    position: relative;
    display: inline-block;
}

.date-picker-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.date-picker-input {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    background: white;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 200px;
    /* Firefox input fixes */
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
}

.date-picker-input:hover {
    border-color: var(--primary-color);
}

.date-picker-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.date-picker-toggle {
    padding: 0.75rem;
    background: var(--primary-color);
    border: none;
    border-radius: var(--radius);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.date-picker-toggle:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.date-picker-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    z-index: 1000;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    min-width: 320px;
}

.date-picker-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.date-picker-nav {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: var(--radius);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.date-picker-nav:hover {
    background: var(--background);
    color: var(--primary-color);
}

.date-picker-current {
    flex: 1;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}

.date-picker-month-select,
.date-picker-year-select {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: white;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    /* Firefox form element fixes */
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2214%22%20height%3D%228%22%20viewBox%3D%220%200%2014%208%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M1%201L7%207L13%201%22%20stroke%3D%22%236B7280%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

.date-picker-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.date-picker-day-name {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.25rem;
}

.date-picker-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

.date-picker-day {
    /* Firefox fallback for aspect-ratio */
    width: 100%;
    padding-bottom: 100%;
    position: relative;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
    overflow: hidden;
    display: block;
}

/* Modern browsers that support aspect-ratio */
@supports (aspect-ratio: 1) {
    .date-picker-day {
        aspect-ratio: 1;
        padding-bottom: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.5rem;
    }
}

.date-picker-day:hover:not(:disabled) {
    background: var(--background);
}

.date-picker-day.other-month {
    color: var(--text-secondary);
    opacity: 0.5;
}

.date-picker-day.available {
    font-weight: 500;
}

.date-picker-day.available::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--success-color);
    border-radius: 50%;
}

.date-picker-day.selected {
    background: var(--primary-color) !important;
    color: white !important;
    font-weight: 600;
}

.date-picker-day.today {
    position: relative;
    font-weight: 600;
    color: var(--primary-color);
}

.date-picker-day.today::before {
    content: '';
    position: absolute;
    inset: 2px;
    border: 2px solid var(--primary-color);
    border-radius: calc(var(--radius) - 2px);
    pointer-events: none;
}

.date-picker-day.unavailable {
    color: var(--text-secondary);
    opacity: 0.4;
    cursor: not-allowed;
}

.date-picker-day:disabled {
    cursor: not-allowed;
}

.date-picker-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
}

.date-picker-today-btn,
.date-picker-clear-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.date-picker-today-btn {
    background: var(--background);
    color: var(--text-primary);
}

.date-picker-today-btn:hover {
    background: var(--border-color);
}

.date-picker-clear-btn {
    background: var(--primary-color);
    color: white;
}

.date-picker-clear-btn:hover {
    background: var(--primary-hover);
}

.date-picker-legend {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-dot.available {
    background: var(--success-color);
}

.legend-dot.selected {
    background: var(--primary-color);
}

.legend-dot.unavailable {
    background: var(--text-secondary);
    opacity: 0.4;
}

/* Firefox fallback - absolute position text inside day buttons */
@supports not (aspect-ratio: 1) {
    .date-picker-day {
        height: 0;
        text-indent: -9999px;
    }
    .date-picker-day::before {
        content: attr(data-day);
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        text-indent: 0;
        width: auto;
        height: auto;
    }
}

/* Responsive for date picker */
@media (max-width: 768px) {
    .date-picker-dropdown {
        min-width: 280px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .date-picker-input {
        width: 160px;
    }
}
/* Geo Analytics Styles */
.stats-summary {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.stat-box {
    flex: 1;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    text-align: center;
}

.stat-box h3 {
    margin: 0 0 10px 0;
    font-size: 0.9em;
    color: #666;
    font-weight: normal;
}

.stat-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #2c5282;
}

.analytics-section {
    margin: 40px 0;
}

.analytics-section h2 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.analytics-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.analytics-table th {
    background: #2c5282;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: bold;
}

.analytics-table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.analytics-table tr:hover {
    background: #f9f9f9;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4299e1, #2c5282);
    transition: width 0.3s ease;
}

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

.tag {
    display: inline-block;
    padding: 3px 8px;
    background: #e2e8f0;
    border-radius: 3px;
    font-size: 0.85em;
    color: #2d3748;
}

.time-selector {
    margin: 30px 0;
    padding: 20px;
    background: #f7fafc;
    border-radius: 8px;
    text-align: center;
}

.time-selector p {
    margin-bottom: 15px;
    font-weight: bold;
    color: #2d3748;
}

.time-selector .btn {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    background: white;
    border: 2px solid #cbd5e0;
    border-radius: 5px;
    text-decoration: none;
    color: #2d3748;
    transition: all 0.2s;
}

.time-selector .btn:hover {
    background: #edf2f7;
    border-color: #4299e1;
}

.time-selector .btn.active {
    background: #4299e1;
    border-color: #4299e1;
    color: white;
}

.info-box {
    margin: 40px 0;
    padding: 20px;
    background: #ebf8ff;
    border-left: 4px solid #4299e1;
    border-radius: 4px;
}

.info-box h3 {
    margin-top: 0;
    color: #2c5282;
}

.info-box ul {
    margin: 10px 0;
    padding-left: 20px;
}

.last-updated {
    color: #718096;
    font-style: italic;
    margin-bottom: 20px;
    font-size: 0.9em;
}

/* Responsive adjustments for geo analytics */
@media (max-width: 768px) {
    .stats-summary {
        flex-direction: column;
    }
    
    .analytics-table {
        font-size: 0.9em;
    }
    
    .analytics-table th,
    .analytics-table td {
        padding: 8px;
    }
    
    .time-selector .btn {
        display: block;
        margin: 5px auto;
        width: 80%;
    }
}

/* Unified Tooltip System */
/* IP address tooltip styling */
.ip-tooltip {
    position: relative;
    cursor: help;
}

.ip-tooltip:hover::after {
    content: attr(data-ips);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #0f0;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
    font-weight: bold;
    white-space: pre;
    z-index: 1000;
    margin-bottom: 5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    min-width: max-content;
    pointer-events: none; /* Allow clicking through tooltip */
    transition: opacity 0.2s ease;
    transition-delay: 0.3s; /* Delay appearance to allow text selection */
}

.ip-tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
    z-index: 1001;
    margin-bottom: -1px;
    pointer-events: none;
    transition: opacity 0.2s ease;
    transition-delay: 0.3s;
}

/* IPv6 tooltip styling */
.ipv6-tooltip {
    position: relative;
    cursor: help;
}

.ipv6-tooltip:hover::after {
    content: attr(data-ipv6);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #0f0;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
    font-weight: bold;
    white-space: pre;
    z-index: 1000;
    margin-bottom: 5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    min-width: max-content;
    pointer-events: none;
    transition: opacity 0.2s ease;
    transition-delay: 0.3s;
}

.ipv6-tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
    z-index: 1001;
    margin-bottom: -1px;
    pointer-events: none;
    transition: opacity 0.2s ease;
    transition-delay: 0.3s;
}

/* Copy button group styling */
.tooltip-copy-group {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    margin-left: 0.25rem;
    padding: 2px 4px;
    background: white;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

/* Copy button styling */
.tooltip-copy-btn {
    background: none;
    border: none;
    padding: 2px 4px;
    cursor: pointer;
    font-size: 0.9em;
    opacity: 0.75;
    transition: all 0.2s ease;
    line-height: 1;
    vertical-align: middle;
    border-radius: 3px;
}

.tooltip-copy-btn:hover {
    opacity: 1;
    transform: scale(1.15);
    background: rgba(255, 255, 255, 0.5);
}

.tooltip-copy-btn:active {
    transform: scale(0.95);
}

.tooltip-copy-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 3px;
}

/* Flag tooltip styling (for node_history.html) */
.flag-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.flag-tooltip .tooltip-text {
    visibility: hidden;
    width: 300px;
    background-color: #333;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -150px;
    opacity: 0;
    transition: opacity 0.3s;
    transition-delay: 0.3s;
    font-size: 0.8rem;
    line-height: 1.3;
    white-space: pre-line;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    pointer-events: none;
}

.flag-tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.flag-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Adjust positioning for flags near edges */
.flag-tooltip:nth-child(1) .tooltip-text,
.flag-tooltip:nth-child(2) .tooltip-text {
    left: 0;
    margin-left: 0;
}

.flag-tooltip:nth-last-child(1) .tooltip-text,
.flag-tooltip:nth-last-child(2) .tooltip-text {
    left: auto;
    right: 0;
    margin-left: 0;
}

/* AKA Mismatch list styling */
.aka-list {
    margin-bottom: 0.25rem;
}

.aka-list:last-child {
    margin-bottom: 0;
}

/* 2026 redesign overrides */
:root {
    --primary-color: #0f766e;
    --primary-hover: #115e59;
    --secondary-color: #c96b12;
    --success-color: #1f8f60;
    --warning-color: #d97706;
    --error-color: #b42318;
    --background: #f6f1e8;
    --card-bg: #fffdf8;
    --text-primary: #13262c;
    --text-secondary: #586d73;
    --border-color: #d8cfbd;
    --shadow: 0 18px 34px rgba(19, 38, 44, 0.08);
    --shadow-lg: 0 28px 80px rgba(19, 38, 44, 0.18);
    --radius: 16px;
    --radius-lg: 26px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(180deg, #f3f7fb 0, #edf3f8 14rem, #f7fafc 100%);
    color: var(--text-primary);
}

body::before,
body::after {
    display: none;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 1.25rem auto 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.container::before {
    display: none;
}

header,
.page-header {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.25rem;
    text-align: left;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.page-kicker {
    display: none;
}

h1 {
    margin: 0;
    max-width: none;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.02;
    color: #0f172a;
    background: none;
    -webkit-text-fill-color: currentcolor;
}

h2,
h3,
h4 {
    color: #0f172a;
}

h2 {
    margin: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: clamp(1.6rem, 2.4vw, 2.15rem);
    font-weight: 750;
    letter-spacing: -0.02em;
    line-height: 1.12;
}

h3 {
    margin: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

p {
    margin-top: 0;
}

.subtitle {
    max-width: 56rem;
    margin: 0;
    font-size: 1.08rem;
    color: var(--text-secondary);
}

a {
    color: var(--primary-color);
}

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

nav,
.site-nav {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-bottom: 1rem;
}

.nav-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    max-width: none;
    padding: 0;
    margin: 0;
}

.nav-link,
nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-height: auto;
    padding: 0.72rem 0.95rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 14px;
    border: 1px solid #dbe3ec;
    background: #f8fafc;
    box-shadow: none;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
    white-space: nowrap;
    text-align: center;
}

.nav-link:hover,
nav a:hover {
    transform: translateY(-1px);
    color: var(--text-primary);
    background: #ffffff;
    border-color: rgba(15, 118, 110, 0.28);
}

.nav-link.active,
nav a.active {
    color: #ffffff;
    background: #0f766e;
    border-color: #0f766e;
    box-shadow: none;
}

/* Global FTN network filter: a persistently blue "capsule" (not another teal
   nav-destination pill), reusing the existing badge-primary tint and the
   sitewide form-focus convention. */
.nav-network {
    box-sizing: border-box;
    display: flex;
    align-items: stretch;
    gap: 0;
    min-width: 0;
    margin-left: auto;
    padding: 0;
    color: #1e40af;
    background: #dbeafe;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    white-space: nowrap;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.nav-network[hidden] {
    display: none;
}

.nav-network-label {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 0 0.65rem 0 0.8rem;
    color: #1e40af;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.01em;
}

.nav-network select {
    box-sizing: border-box;
    flex: 0 1 auto;
    min-width: 6rem;
    margin: 0;
    padding: 0.72rem 2.2rem 0.72rem 0.65rem;
    color: #1e40af;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6 8l4 4 4-4' stroke='%231e40af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.72rem center;
    background-size: 1rem;
    border: 0;
    border-left: 1px solid #bfdbfe;
    border-radius: 0 13px 13px 0;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    transition: border-color 0.18s ease;
}

.nav-network select option {
    color: #1e40af;
    background: #ffffff;
}

.nav-network:not(.nav-network-fallback):hover {
    transform: translateY(-1px);
    border-color: var(--primary-color);
}

.nav-network:not(.nav-network-fallback):hover select {
    border-left-color: var(--primary-color);
}

.nav-network:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.nav-network:focus-within select {
    border-left-color: var(--primary-color);
}

.nav-network-fallback {
    align-items: center;
    gap: 0.65rem;
    max-width: 34rem;
    padding: 0.65rem 0.8rem;
    white-space: normal;
}

.nav-network-fallback .nav-network-label {
    padding-left: 0;
}

.nav-network-message {
    color: #1e40af;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.35;
}

.nav-network-message code {
    color: inherit;
    font-size: 0.92em;
}

@media (max-width: 768px) {
    .nav-network {
        flex: 1 1 100%;
        margin-left: 0;
    }

    .nav-network select {
        flex: 1 1 0;
        min-width: 0;
    }

    .nav-network-fallback {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
        max-width: none;
    }
}

.nav-label {
    font-size: 0.95rem;
    font-weight: 700;
}

.nav-meta {
    display: none;
}

.nav-link.active .nav-meta {
    color: rgba(247, 244, 236, 0.72);
}

.content {
    position: relative;
    z-index: 1;
    margin-top: 1rem;
}

.card,
.table-container,
.filter-panel {
    position: relative;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.card {
    padding: 1.4rem;
    margin-bottom: 1rem;
}

.card > :last-child {
    margin-bottom: 0;
}

.section-tag {
    margin: 0 0 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(15, 118, 110, 0.92);
}

.section-heading {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 1.15rem;
}

.lead {
    max-width: 46rem;
    font-size: 1.06rem;
    color: var(--text-secondary);
}

.muted,
.text-muted {
    color: var(--text-secondary);
}

.button-row,
.link-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.82rem 1.25rem;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.96rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;
    box-shadow: none;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn:hover {
    color: #fff;
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f8fafc;
    color: var(--text-primary);
    border-color: #dbe3ec;
}

.btn-secondary:hover {
    color: var(--text-primary);
    background: #ffffff;
}

.btn-sm {
    padding: 0.5rem 0.9rem !important;
    font-size: 0.82rem !important;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 1rem;
    font-weight: 700;
    text-decoration: none;
}

.text-link::after {
    content: "→";
}

.hero-grid,
.search-layout,
.dual-panel-grid {
    display: grid;
    gap: 1rem;
    align-items: start;
    margin-bottom: 1.25rem;
}

.hero-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.85fr);
}

.search-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.85fr);
}

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

.hero-panel--lead h2 {
    max-width: 18ch;
}

.metric-list {
    display: grid;
    gap: 0.85rem;
}

.metric-item {
    display: grid;
    gap: 0.3rem;
    padding: 1rem 1.05rem;
    border-radius: 18px;
    background: #f8fbfc;
    border: 1px solid rgba(15, 118, 110, 0.1);
}

.metric-value {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.25;
    color: #0f172a;
}

.metric-label {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.feature-grid,
.analytics-category-grid {
    display: grid;
    gap: 1rem;
}

.feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 1rem;
}

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

.feature-card,
.analytics-category,
.note-card,
.callout-card {
    min-height: 100%;
}

.feature-card p,
.analytics-category p {
    color: var(--text-secondary);
}

.search-card {
    padding: 1.8rem;
}

.search-sidebar {
    display: grid;
    gap: 1rem;
}

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

.search-form--wide {
    margin-top: 1.35rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.form-group--wide {
    grid-column: 1 / -1;
}

.form-group--half {
    grid-column: span 6;
}

.form-group--third {
    grid-column: span 4;
}

.form-group label {
    margin: 0;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #10232b;
}

.form-group input,
.form-group select,
.form-control,
.analyzer-form input {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(185, 175, 151, 0.95);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
    font-size: 0.98rem;
    color: var(--text-primary);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-control:focus,
.analyzer-form input:focus {
    outline: none;
    border-color: rgba(15, 118, 110, 0.75);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
    background: rgba(255, 255, 255, 0.98);
}

.mono-input {
    font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
}

.field-hint {
    color: var(--text-secondary);
    font-size: 0.86rem;
}

.checkbox-field {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(216, 207, 189, 0.95);
    background: rgba(255, 255, 255, 0.72);
}

.checkbox-field input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    margin-top: 0.15rem;
    accent-color: var(--primary-color);
}

.checkbox-field strong {
    display: block;
    color: #10232b;
}

.checkbox-field small {
    display: block;
    margin-top: 0.2rem;
    color: var(--text-secondary);
}

.checkbox-field--compact {
    padding: 0.85rem 1rem;
}

.form-group--checkbox {
    justify-content: flex-end;
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-start;
    padding-top: 0.25rem;
}

.tip-list {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--text-secondary);
}

.tip-list li {
    margin-bottom: 0.6rem;
}

.results-header,
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.chart-card .section-heading,
.panel-header .section-heading {
    margin-bottom: 0;
}

.chart-frame {
    position: relative;
    min-height: 320px;
}

.chart-frame--tall {
    min-height: 400px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.stats-grid--compact {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.stat-card {
    padding: 1.25rem;
    text-align: left;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: none;
}

.stat-card h3 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: #0f172a;
}

.stat-card p {
    margin: 0.35rem 0 0;
    font-size: 0.77rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.table-container {
    overflow-x: auto;
    padding: 0;
}

table {
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

table th {
    background: #eef3f8;
    color: #0f172a;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 1rem;
    border-bottom: 1px solid #dbe3ec;
}

table th:first-child {
    border-top-left-radius: 22px;
}

table th:last-child {
    border-top-right-radius: 22px;
}

table td {
    padding: 1rem;
    border-bottom: 1px solid #e8edf3;
    vertical-align: top;
    background: #ffffff;
}

table tbody tr:nth-child(even) td {
    background: #fbfdff;
}

table tr:hover td {
    background: #f4faf9;
}

code,
pre {
    font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
}

code {
    padding: 0.14rem 0.4rem;
    border-radius: 8px;
    background: rgba(16, 35, 43, 0.08);
    color: #10232b;
}

.command-block {
    margin: 0.9rem 0 0;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: #10232b;
    color: #f6f1e8;
    overflow-x: auto;
}

.command-block code {
    padding: 0;
    background: transparent;
    color: inherit;
}

.progress-track {
    width: 100%;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(16, 35, 43, 0.08);
}

.progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.32rem 0.62rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(31, 143, 96, 0.12);
    color: #0e6f49;
}

.badge-error,
.badge-danger {
    background: rgba(180, 35, 24, 0.12);
    color: #8f1d14;
}

.badge-warning {
    background: rgba(217, 119, 6, 0.14);
    color: #98530c;
}

.badge-info,
.badge-primary {
    background: rgba(15, 118, 110, 0.12);
    color: #0d625c;
}

.badge-secondary {
    background: rgba(16, 35, 43, 0.09);
    color: #29474f;
}

.badge-historical {
    background: rgba(16, 35, 43, 0.9);
    color: #f6f1e8;
    border: none;
}

.alert {
    margin: 1rem 0;
    padding: 1rem 1.15rem;
    border-radius: 18px;
    border: 1px solid transparent;
    border-left-width: 5px;
}

.alert-error {
    background: rgba(180, 35, 24, 0.08);
    border-color: rgba(180, 35, 24, 0.14);
    border-left-color: var(--error-color);
    color: #842019;
}

.alert-success {
    background: rgba(31, 143, 96, 0.09);
    border-color: rgba(31, 143, 96, 0.14);
    border-left-color: var(--success-color);
    color: #0f6a45;
}

.alert-warning {
    background: rgba(217, 119, 6, 0.09);
    border-color: rgba(217, 119, 6, 0.16);
    border-left-color: var(--warning-color);
    color: #8a530c;
}

.alert-info {
    background: rgba(15, 118, 110, 0.08);
    border-color: rgba(15, 118, 110, 0.14);
    border-left-color: var(--primary-color);
    color: #0d625c;
}

.analyzer-card {
    display: grid;
    gap: 1rem;
}

.analyzer-form {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.analyzer-form input {
    flex: 1 1 240px;
}

.analyzer-result {
    display: grid;
    gap: 1rem;
    padding-top: 0.25rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(120px, 160px) 1fr;
    gap: 0.7rem 1rem;
    margin: 0;
}

.detail-grid dt {
    font-weight: 700;
    color: #10232b;
}

.detail-grid dd {
    margin: 0;
    color: var(--text-secondary);
}

.pill-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.58rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(216, 207, 189, 0.95);
    background: rgba(255, 255, 255, 0.84);
    color: #10232b;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.pill-link:hover {
    transform: translateY(-1px);
    color: #10232b;
    border-color: rgba(15, 118, 110, 0.45);
    background: rgba(255, 255, 255, 1);
}

.downloads-overview {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.downloads-overview .card {
    margin-bottom: 0;
}

.downloads-feature-card,
.downloads-utility-card {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.downloads-meta-grid {
    margin: 0;
}

.downloads-utility-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.9rem;
}

.downloads-utility-list li {
    display: grid;
    gap: 0.45rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid #e8edf3;
}

.downloads-utility-list li:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.downloads-utility-list strong {
    color: #10232b;
}

.downloads-utility-list p {
    margin: 0.2rem 0 0;
}

.downloads-utility-list code {
    width: 100%;
    overflow-wrap: anywhere;
}

.downloads-table .download-file {
    display: grid;
    gap: 0.25rem;
}

.download-file-link {
    font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
    font-weight: 700;
}

.download-file-note {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.downloads-table-actions {
    white-space: nowrap;
}

.downloads-year-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.downloads-year-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.archive-year-card {
    display: grid;
    gap: 1rem;
    padding: 1.2rem;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    background: #fbfdff;
}

.archive-year-card.is-active {
    border-color: rgba(15, 118, 110, 0.35);
    background: #f4faf9;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.archive-year-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
}

.archive-year-head h3 {
    margin: 0;
    font-size: 1.65rem;
    color: #0f172a;
}

.archive-year-meta {
    margin: 0;
}

.archive-preview-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.7rem;
}

.archive-preview-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    padding-top: 0.7rem;
    border-top: 1px solid #e8edf3;
}

.downloads-pill-count {
    font-size: 0.84em;
    opacity: 0.75;
}

.search-container {
    margin-bottom: 1.1rem;
}

.filter-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
    padding: 1.1rem 1.2rem;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.date-picker-input,
.date-picker-month-select,
.date-picker-year-select {
    background: rgba(255, 255, 255, 0.9);
}

.date-picker-toggle {
    background: linear-gradient(135deg, var(--primary-color), #10232b);
}

.date-picker-dropdown {
    border: 1px solid rgba(216, 207, 189, 0.95);
    background: rgba(255, 253, 248, 0.96);
}

.site-footer {
    margin-top: 2rem;
    padding-top: 0.25rem;
}

.site-footer__inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
}

.site-footer__title,
.site-footer__meta {
    margin: 0;
}

.site-footer__title {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.site-footer__meta,
.site-footer__links {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.site-footer__links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
}

@media (max-width: 1080px) {
    .hero-grid,
    .downloads-overview,
    .search-layout,
    .dual-panel-grid,
    .feature-grid,
    .analytics-category-grid {
        grid-template-columns: 1fr;
    }

    .nav-container {
        gap: 0.55rem;
    }
}

@media (max-width: 768px) {
    .container {
        margin: 0.8rem;
        padding: 1rem;
        border-radius: 20px;
    }

    header,
    .page-header,
    .card {
        padding: 1.2rem;
    }

    .nav-container {
        gap: 0.5rem;
    }

    .nav-link,
    nav a {
        min-height: auto;
        width: auto;
    }

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

    .form-group--wide,
    .form-group--half,
    .form-group--third,
    .form-actions {
        grid-column: auto;
    }

    .results-header,
    .panel-header,
    .site-footer__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .chart-frame,
    .chart-frame--tall {
        min-height: 280px;
    }
}

.aka-list .badge {
    margin-right: 0.25rem;
    margin-bottom: 0.125rem;
}
