/* SDA redesign — organic dark design system */
:root {
    --forest-charcoal: #08100D;
    --leaf-emerald: #113624;
    --accent-green: #1E6341;
    --blaze-orange: #F27405;
    --blaze-hover: #D15F00;
    --text-light: #A8D5BC;
    --text-muted: #5A7A68;
    --text-dark: #08100D;
    --mist-gray: #F4F6F5;
    --card-light: #E8F5E9;
    --card-light-title: #8BC58A;
    --card-light-text: #6BA26B;
    --card-light-muted: #A8D5BC;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--forest-charcoal);
    color: var(--text-light);
    line-height: 1.5;
}

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar.bg-forest {
    background-color: var(--forest-charcoal);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.brand {
    color: var(--text-light);
    text-decoration: none;
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;
}

.brand:hover {
    color: var(--blaze-orange);
}

.text-orange {
    color: var(--blaze-orange);
}

.navbar.bg-forest .nav-link {
    color: var(--text-light);
    font-weight: 600;
    padding: 10px 14px;
    text-decoration: none;
    transition: color 0.2s;
}

.navbar.bg-forest .nav-link:hover,
.navbar.bg-forest .nav-link:focus {
    color: var(--blaze-orange);
    text-decoration: none;
}

.navbar.bg-forest .nav-link.active {
    color: var(--blaze-orange);
}

.navbar.bg-forest .navbar-nav {
    gap: 4px;
    align-items: center;
    margin-left: auto;
}

.navbar.bg-forest .navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 6px 10px;
}

.navbar.bg-forest .navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

.navbar.bg-forest .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba%28255,255,255,0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

@media (max-width: 991.98px) {
    .navbar.bg-forest .navbar-nav {
        align-items: flex-start;
        width: 100%;
        padding: 10px 0;
    }
}

.navbar.bg-forest .navbar-nav a {
    text-decoration: none;
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    padding: 10px 26px;
    border: 2px solid transparent;
    border-radius: 6px;
    font-size: 16px;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, transform 0.12s ease;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 14px;
}

.btn-blaze {
    background-color: var(--blaze-orange);
    color: #ffffff;
}

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

.btn-outline-light {
    border-color: #ffffff;
    color: #ffffff;
}

.btn-outline-light:hover,
.btn-outline-light:focus {
    background-color: #ffffff;
    color: var(--forest-charcoal);
}

/* Hero */
.hero {
    padding: 90px 0;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
}

.hero-copy {
    padding-right: 40px;
}

@media (max-width: 767.98px) {
    .hero-copy {
        padding-right: 12px;
    }
}

.hero-text-animated {
    color: var(--text-light);
    font-size: 18px;
    font-weight: 400;
    min-height: 1.5em;
    height: 1.5em;
    line-height: 1.5em;
    overflow: hidden;
    display: block;
    white-space: nowrap;
}

.hero-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 25px;
}

/* Card and content components */
.split-card-dark {
    background: var(--leaf-emerald);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0,0,0,0.5);
    border: 1px solid var(--accent-green);
    margin-top: 40px;
}

.card-image-side-dark {
    background-color: #070D0B;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.card-text-side-dark {
    padding: 50px;
}

.card-text-side-dark h3 {
    color: var(--text-light);
    font-weight: 700;
}

.card-text-side-dark p {
    color: var(--text-light);
}

.btn-blaze-dark {
    display: inline-block;
    background-color: var(--blaze-orange);
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.2s;
}

.btn-blaze-dark:hover {
    background-color: var(--blaze-hover);
}

/* Metrics */
.metrics-section {
    padding: 80px 0 0;
    text-align: center;
}

.metrics-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
}

.metric-card {
    background: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-bottom: 4px solid var(--leaf-emerald);
}

.metric-card.orange-border {
    border-color: var(--blaze-orange);
}

.metric-num {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
}

.metric-num a {
    color: var(--blaze-orange);
    text-decoration: none;
    transition: color 0.2s;
}

.metric-num a:hover,
.metric-num a:focus {
    color: var(--blaze-hover);
    text-decoration: underline;
}

.metric-label {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

/* Light card — Fully open-source */
.split-card {
    background: var(--card-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(13,22,18,0.06);
    border: 1px solid rgba(30,99,65,0.1);
    margin-top: 40px;
}

.card-image-side {
    background-color: var(--leaf-emerald);
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card-text-side {
    padding: 50px;
}

.card-text-side h3 {
    color: var(--leaf-emerald);
    font-weight: 700;
}

.card-text-side p {
    color: var(--text-muted);
    margin-bottom: 25px;
}

.card-text-side a.btn {
    background-color: var(--blaze-orange);
    color: #ffffff;
}

.card-text-side a.btn:hover {
    background-color: var(--blaze-hover);
}

/* Home page component utilities (extracted from inline styles) */
.manifesto-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.manifesto-list li {
    color: var(--text-muted);
    font-size: 15px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.manifesto-list li:last-child {
    border-bottom: none;
}

.stat-box {
    flex: 0 1 420px;
    min-width: 0;
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--accent-green);
    border-radius: 12px;
}

.stat-value {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: var(--blaze-orange);
}

.stat-value-lg {
    font-size: 36px;
}

.stat-value-sm {
    font-size: 28px;
    margin-top: 12px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-row {
    margin: 0;
    align-items: stretch;
}

.card-image-inner {
    text-align: center;
    padding: 20px;
}

.card-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--accent-green);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.card-heading {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
}

.card-para {
    margin-bottom: 25px;
}

.metric-col {
    max-width: 100%;
}

.involve-col {
    padding: 0 15px;
}

.involve-inner {
    padding: 40px 30px;
    height: 100%;
    border-right: 1px solid rgba(30,99,65,0.1);
    display: flex;
    flex-direction: column;
}

.involve-col:last-child .involve-inner {
    border-right: none;
}

.involve-heading {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--leaf-emerald);
}

.involve-text {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1 1 auto;
}

.involve-btn {
    border-radius: 4px;
    width: 100%;
    text-align: center;
    display: inline-block;
}

/* Subpage content components */
.content-card {
    background: var(--card-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(13,22,18,0.06);
    border: 1px solid rgba(30,99,65,0.1);
    padding: 50px;
    margin-top: 40px;
}

.content-card > :first-child {
    margin-top: 0;
}

.content-card h2 {
    color: var(--leaf-emerald);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
}

.content-card h3 {
    color: var(--leaf-emerald);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin: 30px 0 12px;
}

.content-card p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 15px;
}

.content-card a:not(.btn) {
    color: var(--blaze-orange);
    text-decoration: none;
}

.content-card a:not(.btn):hover {
    text-decoration: underline;
}

.content-card ul,
.content-card ol {
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0 0 15px 20px;
}

.content-card li {
    margin-bottom: 6px;
}

.content-card img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--accent-green);
    margin: 15px 0;
}

.content-card strong {
    color: var(--leaf-emerald);
}

.content-card-grid {
    padding: 30px;
    margin-top: 0;
    height: 100%;
}

.rating-stars {
    color: var(--blaze-orange);
    letter-spacing: 2px;
    margin-bottom: 10px;
}

/* Image gallery + lightbox */
.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 15px 0;
}

.gallery img {
    flex: 1 1 200px;
    min-width: 0;
    width: 100%;
    height: 160px;
    object-fit: cover;
    margin: 0;
    border-radius: 8px;
    border: 1px solid var(--accent-green);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gallery img:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.img-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1080;
    background: rgba(8, 16, 13, 0.9);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 40px 20px;
}

.img-modal.active {
    display: flex;
}

.img-modal img {
    max-width: 90%;
    max-height: 80vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--accent-green);
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.img-modal-caption {
    color: var(--text-light);
    margin-top: 16px;
    font-size: 15px;
    text-align: center;
}

.img-modal-close {
    position: absolute;
    top: 16px;
    right: 28px;
    color: #ffffff;
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
}

.img-modal-close:hover {
    color: var(--blaze-orange);
}

/* Emulator */
.emscripten_border {
    border: 1px solid var(--accent-green);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 15px;
    background: #070D0B;
    text-align: center;
}

#canvas {
    display: block;
    margin: 0 auto;
    max-width: 100%;
}

.emscripten#status {
    color: var(--leaf-emerald);
    font-weight: 600;
    margin-top: 10px;
}

#output {
    display: block;
    width: 100%;
    margin-top: 15px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    background: #070D0B;
    color: var(--text-light);
    border: 1px solid var(--accent-green);
    border-radius: 8px;
    padding: 10px;
    resize: vertical;
}

.spinner {
    height: 32px;
    width: 32px;
    margin: 10px auto;
    border: 4px solid rgba(30,99,65,0.2);
    border-top-color: var(--blaze-orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Parallax */
.parallax-wrapper {
    height: 350px;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
}

.parallax-content h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.parallax-bg-image {
    background-image: linear-gradient(rgba(13,22,18,0.85), rgba(13,22,18,0.85)), url("data:image/svg+xml,%3Csvg xmlns='http://w3.org' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%231e6341' fill-opacity='0.15'%3E%3Cpath d='M0 0h40v40H0V0zm40 40h40v40H40V40z'/%3E%3C/g%3E%3Ccircle cx='20' cy='20' r='6' fill='%23f27405' fill-opacity='0.25'/%3E%3Ccircle cx='60' cy='60' r='6' fill='%23f27405' fill-opacity='0.25'/%3E%3C/svg%3E");
}

@media (max-width: 768px) {
    .parallax-wrapper {
        background-attachment: scroll;
    }
}

/* Subpages: tighten the gap between the top bar and the first content block */
.page-top {
    padding-top: 30px;
}

/* Links page: tighten gap between the main-links cards and the content cards */
.links-content {
    padding-top: 0;
}

/* Footer */
footer {
    background-color: var(--forest-charcoal);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 14px;
    padding: 25px 0;
    text-align: center;
}

footer a {
    color: var(--blaze-orange);
    text-decoration: none;
}

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

/* Animations */
@keyframes blink-caret {
    50% { border-color: transparent; }
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-anim {
    opacity: 0;
    animation: fade-in-up 0.6s ease-out forwards;
}

.hero-anim-1 { animation-delay: 0.2s; }
.hero-anim-2 { animation-delay: 0.5s; }
.hero-anim-3 { animation-delay: 0.8s; }
.hero-anim-4 { animation-delay: 1.1s; }
.hero-anim-5 { animation-delay: 1.4s; }

@media (prefers-reduced-motion: reduce) {
    .hero-anim { opacity: 1; animation: none; }
    .hero-text-animated .typed { animation: none; border-right: none; }
    .live-indicator::before { animation: none; }
}

/* Responsive */
@media (max-width: 991.98px) {
    .hero {
        padding: 60px 0;
    }
}

@media (max-width: 768px) {
    .card-text-side {
        padding: 30px;
    }
    .card-image-side {
        min-height: 250px;
    }
    .card-text-side-dark {
        padding: 30px;
    }
    .card-image-side-dark {
        min-height: 250px;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 50px 0;
    }
}

/* Links page: stack the main-link cards cleanly on mobile */
@media (max-width: 575.98px) {
    .metric-col {
        max-width: 100%;
    }
    .metric-card {
        margin-bottom: 15px;
    }
}

/* ===== Index: scroll-driven 3D model (hero -> features) ===== */
.model-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    will-change: opacity;
}

/* Invisible layout anchors the 3D model is positioned against */
.model-slot {
    width: 100%;
    min-height: 380px;
}

/* Keep hero + features copy above the 3D canvas */
.hero .container,
.features-section .container {
    position: relative;
    z-index: 4;
}

/* Features section (replaces the manifesto) */
.features-section {
    position: relative;
    background-color: var(--forest-charcoal);
    padding: 100px 0;
    overflow: hidden;
}

.features-section h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
    color: var(--blaze-orange);
}

.features-lead {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 24px;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    position: relative;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.5;
    padding: 10px 0 10px 26px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.features-list li:last-child {
    border-bottom: none;
}

.features-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 15px;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: var(--blaze-orange);
}

@media (max-width: 767.98px) {
    .model-slot {
        min-height: 300px;
    }
    .features-section {
        padding: 70px 0;
    }
}

/* Mailing list modal + forms */
.mailing-modal {
    background-color: var(--leaf-emerald);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.mailing-modal .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mailing-modal .modal-title {
    color: var(--blaze-orange);
    font-weight: 700;
}

.mailing-modal .btn-close {
    filter: invert(1) grayscale(1) brightness(2);
}

.mailing-intro {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 16px;
}

.mailing-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mailing-input {
    flex: 1 1 200px;
    min-width: 0;
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: var(--forest-charcoal);
    color: var(--text-light);
    font-size: 15px;
}

.mailing-input:focus {
    outline: none;
    border-color: var(--blaze-orange);
}

.mailing-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.mailing-status {
    margin: 12px 0 0;
    font-size: 14px;
    min-height: 1.2em;
}

.mailing-status.is-ok {
    color: var(--text-light);
}

.mailing-status.is-error {
    color: #ff8a65;
}

.involve-inline-link {
    color: var(--accent-green);
    font-weight: 600;
    text-decoration: none;
}

.involve-inline-link:hover {
    color: var(--blaze-orange);
}

/* Admin + unsubscribe pages */
.section-padding {
    padding: 70px 0;
}

.admin-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--blaze-orange);
    margin-bottom: 24px;
}

.admin-card {
    background: var(--leaf-emerald);
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 24px;
}

.admin-note {
    color: var(--text-light);
    font-size: 15px;
    margin-bottom: 16px;
}

.admin-note.is-error {
    color: #ff8a65;
}

.admin-secret-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-username {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
}

.admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 18px;
}

.admin-count {
    color: var(--text-light);
    font-size: 14px;
    margin-left: auto;
}

.admin-table-wrap {
    overflow-x: auto;
}

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

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
}

.admin-table th {
    color: var(--blaze-orange);
    font-weight: 700;
}

.admin-table td {
    color: var(--text-light);
}

.unsubscribe-card {
    max-width: 560px;
}

/* Contact form textarea */
.mailing-textarea {
    width: 100%;
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: var(--forest-charcoal);
    color: var(--text-light);
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
}

.mailing-textarea:focus {
    outline: none;
    border-color: var(--blaze-orange);
}

/* Admin tabs */
.admin-tabs {
    display: flex;
    gap: 6px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.admin-tab {
    background: none;
    border: none;
    color: var(--text-light);
    font-weight: 600;
    font-size: 15px;
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.admin-tab:hover {
    color: var(--text-light);
}

.admin-tab.active {
    color: var(--blaze-orange);
    border-bottom-color: var(--blaze-orange);
}

.admin-badge {
    display: inline-block;
    min-width: 20px;
    padding: 1px 6px;
    margin-left: 6px;
    border-radius: 10px;
    background: var(--blaze-orange);
    color: #ffffff;
    font-size: 12px;
    text-align: center;
}

/* Message rows */
.msg-preview {
    display: inline-block;
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
    cursor: pointer;
    color: var(--text-light);
}

.msg-full {
    display: inline-block;
    white-space: pre-wrap;
    color: var(--text-light);
    cursor: pointer;
}

.msg-unread td {
    font-weight: 600;
}

.msg-unread .msg-preview {
    color: var(--text-light);
}

/* ===== Downloads page ===== */
.dl-intro {
    margin-top: 0;
}

.dl-section-title {
    color: var(--blaze-orange);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin: 50px 0 8px;
}

.dl-section-lead {
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.7;
    margin: 0 0 8px;
    max-width: 780px;
}

/* Device firmware block */
.device-card {
    padding: 0;
    overflow: hidden;
}

.device-head {
    display: flex;
    gap: 24px;
    align-items: center;
    padding: 30px 30px 24px;
    border-bottom: 1px solid rgba(30, 99, 65, 0.12);
}

.device-head-text {
    flex: 1 1 auto;
    min-width: 0;
}

.device-head-text h3 {
    margin: 0 0 6px;
    font-size: 22px;
}

.device-head-text p {
    margin: 0;
    font-size: 14px;
}

.device-card .device-thumb {
    flex: 0 0 auto;
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--accent-green);
    margin: 0;
}

.fw-table-wrap {
    overflow-x: auto;
}

.fw-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

.fw-table th,
.fw-table td {
    text-align: left;
    padding: 14px 30px;
    border-bottom: 1px solid rgba(30, 99, 65, 0.1);
    font-size: 14px;
    color: var(--text-muted);
    vertical-align: middle;
}

.fw-table th {
    color: var(--leaf-emerald);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(30, 99, 65, 0.05);
}

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

.fw-table tbody tr:hover {
    background: rgba(30, 99, 65, 0.04);
}

.fw-version {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: var(--leaf-emerald);
    font-size: 15px;
}

.fw-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
}

.fw-tag-stable {
    background: rgba(30, 99, 65, 0.15);
    color: var(--accent-green);
}

.fw-tag-beta {
    background: rgba(242, 116, 5, 0.15);
    color: var(--blaze-hover);
}

.fw-tag-legacy {
    background: rgba(90, 122, 104, 0.15);
    color: var(--text-muted);
}

.fw-apps-link {
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.fw-dl {
    text-align: right;
    white-space: nowrap;
}

.fw-dl-inner {
    display: inline-block;
    text-align: center;
}

.fw-sha-toggle {
    display: block;
    margin: 6px auto 0;
    padding: 0;
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 11px;
    letter-spacing: 0.3px;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.fw-sha-toggle:hover,
.fw-sha-toggle:focus-visible {
    color: var(--accent-green);
}

.fw-sha {
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.5;
    word-break: break-all;
    text-align: center;
}

.fw-sha code {
    font-family: 'Courier New', monospace;
    color: var(--text-muted);
    background: rgba(30, 99, 65, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Shared app packages */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.app-card {
    background: var(--card-light);
    border: 1px solid rgba(30, 99, 65, 0.1);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(13, 22, 18, 0.06);
}

.app-card h4 {
    color: var(--leaf-emerald);
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
}

.app-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 16px;
    flex: 1 1 auto;
}

.app-req {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.app-req code {
    font-family: 'Courier New', monospace;
    background: rgba(30, 99, 65, 0.1);
    color: var(--accent-green);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

/* Misc downloads */
.misc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.misc-card {
    background: var(--card-light);
    border: 1px solid rgba(30, 99, 65, 0.1);
    border-radius: 10px;
    padding: 20px;
    text-decoration: none;
    display: block;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.misc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.misc-card h4 {
    color: var(--leaf-emerald);
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 6px;
}

.misc-card p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 575.98px) {
    .device-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .fw-table th,
    .fw-table td {
        padding: 12px 16px;
    }
}

/* ===== Features page: hardware specification table ===== */
.spec-table-wrap {
    overflow-x: auto;
    margin-top: 20px;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
}

.spec-table th,
.spec-table td {
    text-align: left;
    padding: 12px 18px;
    border-bottom: 1px solid rgba(30, 99, 65, 0.1);
    font-size: 14px;
    color: var(--text-muted);
    vertical-align: top;
}

.spec-table th {
    color: var(--leaf-emerald);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(30, 99, 65, 0.05);
}

.spec-table tbody tr:not(.spec-group) td:first-child {
    color: var(--leaf-emerald);
    font-weight: 600;
    white-space: nowrap;
    width: 34%;
}

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

.spec-table tbody tr:not(.spec-group):hover {
    background: rgba(30, 99, 65, 0.04);
}

.spec-group td {
    background: rgba(30, 99, 65, 0.08);
    color: var(--leaf-emerald);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 18px;
}

@media (max-width: 575.98px) {
    .spec-table th,
    .spec-table td {
        padding: 10px 14px;
    }
}

.spec-intro {
    display: flex;
    gap: 24px;
    align-items: center;
    margin-bottom: 8px;
}

.spec-intro p {
    margin: 0;
}

.spec-intro .spec-device-img {
    flex: 0 0 auto;
    width: 200px;
    max-width: 40%;
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--accent-green);
    margin: 0;
}

@media (max-width: 575.98px) {
    .spec-intro {
        flex-direction: column;
        align-items: flex-start;
    }
    .spec-intro .spec-device-img {
        width: 100%;
        max-width: 100%;
    }
}

/* ===== Features page: comparison table ===== */
.compare-table-wrap {
    overflow-x: auto;
    margin-top: 20px;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
}

.compare-table th,
.compare-table td {
    text-align: center;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(30, 99, 65, 0.1);
    font-size: 14px;
    color: var(--text-muted);
    vertical-align: middle;
}

.compare-table th {
    color: var(--leaf-emerald);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(30, 99, 65, 0.05);
}

.compare-table th:first-child,
.compare-table td:first-child {
    text-align: left;
    color: var(--leaf-emerald);
    font-weight: 600;
    white-space: nowrap;
}

/* Highlight the SDA column */
.compare-table th.compare-col-sda,
.compare-table td.compare-col-sda {
    background: rgba(242, 116, 5, 0.08);
    color: var(--leaf-emerald);
    font-weight: 600;
}

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

.compare-table tbody tr:hover td {
    background: rgba(30, 99, 65, 0.04);
}

.compare-table tbody tr:hover td.compare-col-sda {
    background: rgba(242, 116, 5, 0.12);
}

.compare-yes {
    color: var(--accent-green);
    font-weight: 700;
    font-size: 18px;
}

.compare-no {
    color: #c0392b;
    font-weight: 700;
    font-size: 18px;
}

.compare-partial {
    color: var(--blaze-hover);
    font-weight: 700;
    font-size: 18px;
}

.content-card .compare-legend {
    margin: 12px 0 0;
    font-size: 13px;
    color: var(--text-muted);
}

@media (max-width: 575.98px) {
    .compare-table th,
    .compare-table td {
        padding: 10px 12px;
    }
}
