:root {
    /* Palette provided by user */
    --gray-100: #f8f9fa;
    --gray-200: #edecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;

    /* Semantic mapping for Light Mode */
    --bg-color: var(--gray-100);
    --text-color: var(--gray-900);
    --text-muted: var(--gray-600);

    --primary-color: var(--gray-800);
    /* Removed the non-palette green, strictly using dark grays */
    --primary-hover: var(--gray-900);
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(0, 0, 0, 0.05);
}

/* Offline Roboto Fonts */
@font-face {
    font-family: 'Roboto';
    src: url('../fonts/roboto-thin.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('../fonts/roboto-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('../fonts/roboto-bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

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

.h-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--gray-900);
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

p {
    color: var(--gray-800);
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Header & Nav */
.site-header {
    background: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
}

.brand-logo {
    height: 50px;
    width: auto;
    border-radius: 8px;
    object-fit: contain;
}

.site-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.site-nav a {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--gray-800);
}

.site-nav a:hover {
    color: var(--gray-900);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: 0.3s;
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(237, 236, 239, 0.05) 0%, transparent 50%);
    z-index: -1;
}

.hero-logo {
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto 2rem;
}

.hero-title {
    font-size: 5.5rem;
    font-weight: 900;
    letter-spacing: -2.5px;
    margin-bottom: 2rem;
    line-height: 1.05;
    color: var(--gray-900);
}

.hero-title .highlight {
    background: linear-gradient(110deg, var(--gray-900) 20%, var(--gray-400) 50%, var(--gray-900) 80%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: text-shine 6s linear infinite;
    position: relative;
    display: inline-block;
}

.hero-title .highlight::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--gray-300);
    border-radius: 4px;
    z-index: -1;
    opacity: 0.6;
}

@keyframes text-shine {
    to {
        background-position: 200% center;
    }
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 100;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto 3rem;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--gray-900);
    background-color: var(--gray-100);
    color: var(--gray-900);
}

.btn:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-outline:hover {
    background-color: var(--gray-900);
    color: var(--gray-100);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Obsolete button variants removed */

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mb-4 {
    margin-bottom: 2.5rem;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Grids */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

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

/* Features */
.features {
    padding: 4rem 0 6rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.typewriter-title {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 0.1em solid var(--primary-color);
    max-width: 10em;
    color: var(--gray-900);
    animation:
        typing 3s steps(25, end),
        blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from {
        max-width: 0;
    }

    to {
        max-width: 10em;
    }
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent;
    }

    50% {
        border-color: var(--primary-color);
    }
}

/* Mission Statement Overview */
.mission-statement {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: justify;
}

.mission-statement p {
    color: var(--gray-800);
}

/* Comparison Table */
.comparison {
    padding: 2rem 1.5rem 6rem;
}

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

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

.comparison-table th,
.comparison-table td {
    padding: 1.5rem;
    border-bottom: 1px solid var(--card-border);
}

.comparison-table th {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--gray-900);
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.highlight-col {
    background-color: rgba(255, 255, 255, 0.4);
}

.comparison-table td {
    color: var(--gray-800);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
}

.card-icon svg {
    display: block;
}

/* Download Section */
.page-content {
    padding: 4rem 1.5rem;
}

/* Download cards: flex column so buttons align at the same height */
.download-section {
    display: flex;
    flex-direction: column;
}

.download-section h2 {
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-300);
    padding-bottom: 0.5rem;
}

/* Consistent spacing between description and buttons */
.download-section .download-links {
    margin-top: 1rem;
}

.download-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.full-width {
    grid-column: 1 / -1;
}

/* Typography / Prose Pages */
.document-page .prose {
    max-width: 800px;
    margin: 0 auto;
}

.prose h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.prose h2 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    color: var(--gray-900);
}

.prose p {
    margin-bottom: 1.25rem;
    color: var(--gray-800);
}

.prose pre {
    background: var(--gray-200);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid var(--gray-300);
    margin-bottom: 1.5rem;
}

.prose code {
    font-family: monospace;
    color: var(--gray-900);
}

.docs-list {
    margin-left: 2rem;
    margin-bottom: 2rem;
    line-height: 1.6;
    color: var(--gray-800);
}

.docs-list li {
    margin-bottom: 0.5rem;
}

/* Comprehensive Features Accordion */
.comprehensive-features {
    padding: 4rem 1.5rem;
}

.accordion-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.accordion-item {
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-item summary {
    padding: 1.5rem 2rem;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    position: relative;
    background: transparent;
    border-bottom: 1px solid transparent;
    color: var(--gray-900);
}

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

.accordion-item summary::after {
    content: '+';
    position: absolute;
    right: 2rem;
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1;
    color: var(--gray-700);
    transition: transform 0.3s ease;
}

.accordion-item[open] summary::after {
    content: '−';
}

.accordion-item[open] summary {
    border-bottom: 1px solid var(--card-border);
}

.accordion-content {
    padding: 2rem;
}

.accordion-content ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.accordion-content li h4 {
    margin-bottom: 0.25rem;
    color: var(--gray-900);
    font-size: 1.1rem;
}

.accordion-content li p {
    margin-bottom: 0;
    color: var(--gray-700);
}

/* FAQ */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-item h3 {
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.faq-item p {
    color: var(--gray-700);
    margin: 0;
}

/* Footer */
.site-footer {
    background-color: var(--gray-200);
    border-top: 1px solid var(--gray-300);
    padding: 4rem 0 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    max-width: 450px;
}

.footer-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    margin-bottom: 1rem;
    border-radius: 6px;
}

.tagline {
    color: var(--gray-700);
    margin-bottom: 1.5rem;
}

.contact-info {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: var(--gray-800);
}

.contact-info p {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.contact-note {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--gray-700);
    font-style: italic;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.link-group h3 {
    color: var(--gray-900);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.link-group ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.link-group a {
    color: var(--gray-800);
}

.link-group a:hover {
    color: var(--gray-900);
}

.footer-bottom {
    background-color: var(--gray-900);
    padding: 1.5rem 0;
    text-align: center;
    border-top: 1px solid var(--gray-800);
}

.footer-bottom p {
    color: var(--gray-300);
    margin-bottom: 0;
}

/* KB Card Centering */
.kb-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* KB Article CTA */
.kb-cta {
    margin-top: 4rem;
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid var(--gray-300);
    background: linear-gradient(180deg, transparent 0%, rgba(237, 236, 239, 0.3) 100%);
    border-radius: 12px;
}

.kb-cta h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.kb-cta p {
    color: var(--gray-700);
    max-width: 550px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

/* KB Search Container */
.search-container {
    max-width: 600px;
    margin: 0 auto 3rem auto;
    position: relative;
    padding: 0 1rem;
}

.kb-search-input {
    width: 100%;
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    border: 1px solid var(--gray-200);
    border-radius: 9999px;
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05);
    transition: all 0.3s ease;
    font-family: inherit;
    text-align: center;
}

.kb-search-input:focus {
    outline: none;
    border-color: var(--gray-300);
    box-shadow: 0 0 0 4px var(--gray-100);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .page-content {
        padding: 2rem 1rem;
    }

    .site-header .h-flex {
        position: relative;
        justify-content: center;
    }

    .menu-toggle {
        display: flex;
        position: absolute;
        right: 1.5rem;
    }

    .glass-card {
        padding: 1.5rem;
        max-width: 100%;
        overflow-x: hidden;
    }

    .hero {
        padding: 4rem 0;
    }

    .hero-title {
        word-break: break-word;
        white-space: normal;
    }

    .prose {
        max-width: 100%;
        overflow-x: auto;
    }

    .prose pre {
        max-width: calc(100vw - 4rem);
    }

    .docs-list {
        margin-left: 1.25rem;
    }

    section,
    main {
        max-width: 100vw;
        overflow-x: hidden;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .search-container {
        padding: 0 0.5rem;
    }

    .kb-search-input {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .card.glass-card .card-icon,
    .card.glass-card h2,
    .card.glass-card h3 {
        text-align: center;
    }

    .card.glass-card .card-icon svg {
        margin: 0 auto;
    }

    .comparison {
        padding-top: 5rem;
        padding-left: 0;
        padding-right: 0;
    }

    .comparison .table-wrapper {
        margin: 0;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }

    .accordion-item.glass-card {
        padding: 0;
    }

    .accordion-item summary {
        padding: 1.25rem 1.5rem;
        font-size: 1.1rem;
    }

    .accordion-item summary::after {
        right: 1.5rem;
    }

    .accordion-content {
        padding: 1.5rem;
    }

    .document-page .prose pre {
        max-width: 100%;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--gray-100);
        padding: 2rem;
        border-bottom: 1px solid var(--gray-300);
    }

    .site-nav.open {
        display: block;
    }

    .site-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .hero-title {
        font-size: 3.5rem;
        letter-spacing: -1.5px;
    }

    .hero-actions {
        flex-direction: column;
    }

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

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .link-group {
        text-align: center;
    }

    .footer-links {
        flex-direction: row;
        gap: 2rem;
    }
}