/* Default view: ~80% browser zoom for comfortable reading density */
html {
    zoom: 0.8;
}

@supports not (zoom: 0.8) {
    html {
        transform: scale(0.8);
        transform-origin: top center;
        width: 125%;
        min-height: 125vh;
    }
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.8;
    margin: 0;
    padding: 32px 20px;
    background-color: #f4f4f9;
    color: #333;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page {
    max-width: 1200px;
    margin: 0 auto;
}

.hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-welcome {
    margin: 0 0 6px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #3498db;
    letter-spacing: 0.02em;
}

.hero-cta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
    width: 100%;
}

.hero-cta__btn {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--t-card-border, #dde4ec);
    background: var(--t-card-bg, #ffffff);
    color: var(--t-text, #333);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    min-height: 72px;
}

.hero-cta__btn:hover,
.hero-cta__btn:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    border-color: var(--t-focus, #3498db);
    outline: none;
}

.hero-cta__btn--primary {
    border-color: var(--t-focus, #3498db);
    background: var(--t-card-bg, #fff);
}

@supports (color: color-mix(in srgb, red, blue)) {
    .hero-cta__btn--primary {
        border-color: color-mix(in srgb, var(--t-focus, #3498db) 55%, transparent);
        background: color-mix(in srgb, var(--t-focus, #3498db) 12%, var(--t-card-bg, #fff));
    }
}

.hero-cta__icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    background: rgba(52, 152, 219, 0.18);
    background: color-mix(in srgb, var(--t-focus, #3498db) 18%, transparent);
    color: var(--t-hero-accent, #3498db);
}

.hero-cta__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.hero-cta__title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--t-heading, #2c3e50);
    line-height: 1.25;
}

.hero-cta__sub {
    font-size: 0.82rem;
    color: var(--t-desc, #6b7280);
    line-height: 1.35;
}

html[dir="rtl"] .hero-cta__btn {
    flex-direction: row-reverse;
    text-align: right;
}

html[dir="rtl"] .hero-cta__text {
    align-items: flex-end;
}

.product-features {
    margin: 24px 0 8px;
    padding: 24px;
    border-radius: 14px;
    border: 1px solid var(--t-card-border, #dde4ec);
    background: var(--t-card-bg, #ffffff);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.product-features h2 {
    margin: 0 0 18px;
    font-size: 1.35rem;
    color: var(--t-heading, #2c3e50);
    text-align: center;
}

.product-features__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.product-features__card {
    padding: 16px;
    border-radius: 10px;
    border: 1px solid var(--t-card-border, #e5e7eb);
    background: var(--t-card-bg, #fff);
    background: color-mix(in srgb, var(--t-bg-page, #f4f4f9) 65%, var(--t-card-bg, #fff));
}

.product-features__card h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    color: var(--t-heading-3, #16a085);
}

.product-features__card p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--t-desc, #6b7280);
}

.product-download {
    margin: 0 0 20px;
    padding: 20px 24px;
    border-radius: 12px;
    border: 1px dashed var(--t-card-border, #c8d7ea);
    background: var(--t-card-bg, #fff);
    background: color-mix(in srgb, var(--t-focus, #3498db) 6%, var(--t-card-bg, #fff));
    text-align: center;
}

.product-download h2 {
    margin: 0 0 10px;
    font-size: 1.2rem;
}

.product-download p {
    margin: 0 0 14px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    color: var(--t-text-muted, #555);
}

.product-download__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    background: var(--t-btn, #3498db);
    color: var(--t-btn-text, #fff);
    border: 1px solid transparent;
}

.product-download__link:hover {
    background: var(--t-btn-hover, #2980b9);
}

.product-download__link--secondary {
    background: transparent;
    color: var(--t-focus, #3498db);
    border: 1px solid var(--t-focus, #3498db);
    margin-top: 8px;
}

.product-download__link--secondary:hover {
    background: rgba(52, 152, 219, 0.1);
}

@supports (color: color-mix(in srgb, red, blue)) {
    .product-download__link--secondary {
        border: 1px solid color-mix(in srgb, var(--t-focus, #3498db) 45%, transparent);
    }

    .product-download__link--secondary:hover {
        background: color-mix(in srgb, var(--t-focus, #3498db) 10%, transparent);
    }
}

.download-version-note {
    margin: 0 0 16px;
    font-size: 0.9rem;
    color: var(--t-desc, #6b7280);
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 0 0 18px;
    text-align: start;
    align-items: stretch;
}

.download-card {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    height: 100%;
    padding: 18px;
    border-radius: 10px;
    border: 1px solid var(--t-card-border, #e5e7eb);
    background: var(--t-card-bg, #fff);
}

.download-card--pending {
    opacity: 0.92;
    border-style: dashed;
}

.download-card--span {
    grid-column: 1 / -1;
}

.download-card__head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.download-card__text {
    flex: 1;
    min-width: 0;
}

.download-card__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    background: rgba(52, 152, 219, 0.14);
    background: color-mix(in srgb, var(--t-focus, #3498db) 14%, transparent);
    color: var(--t-heading, #2c3e50);
}

.download-card__title {
    margin: 0;
    font-size: 1rem;
    color: var(--t-heading, #2c3e50);
}

.download-card__desc {
    margin: 4px 0 0;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--t-desc, #6b7280);
}

.download-card__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

.download-card__footer {
    margin: 12px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--t-card-border, #e5e7eb);
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--t-desc, #94a3b8);
    text-align: center;
}

.download-card__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    background: var(--t-btn, #3498db);
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
}

.download-card__btn:hover {
    background: var(--t-btn-hover, #2980b9);
}

.download-card__btn--disabled {
    background: var(--t-card-border, #cbd5e1);
    color: var(--t-desc, #64748b);
    cursor: not-allowed;
}

.download-card--windows .download-card__head {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.download-card--windows .download-card__actions--multi {
    justify-content: center;
    width: 100%;
}

.download-card--span:not(.download-card--windows) .download-card__head {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.download-card--span:not(.download-card--windows) .download-card__actions {
    justify-content: center;
}

.download-card__btn--outline {
    background: transparent;
    color: var(--t-focus, #3498db);
    border: 1px solid var(--t-focus, #3498db);
}

.download-card__btn--outline:hover {
    background: rgba(52, 152, 219, 0.1);
}

@supports (color: color-mix(in srgb, red, blue)) {
    .download-card__btn--outline:hover {
        background: color-mix(in srgb, var(--t-focus, #3498db) 10%, transparent);
    }
}

.download-card__btn--disabled.download-card__btn--outline,
.download-card__btn--disabled {
    border: none;
}

@media (max-width: 720px) {
    .download-grid {
        grid-template-columns: 1fr;
    }

    .download-card--span {
        grid-column: auto;
    }
}

.windows-build-guide {
    width: 100%;
    margin: 4px 0 0;
    text-align: start;
    border-radius: 10px;
    border: 1px solid var(--t-card-border, #c8d7ea);
    background: var(--t-card-bg, #fff);
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.windows-build-guide__summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 20px;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--t-focus, #3498db);
    cursor: pointer;
    list-style: none;
    -webkit-user-select: none;
    user-select: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.windows-build-guide__summary::-webkit-details-marker {
    display: none;
}

.windows-build-guide__summary::after {
    content: "▾";
    font-size: 0.9em;
    line-height: 1;
    opacity: 0.85;
    transition: transform 0.2s ease;
}

.windows-build-guide[open] .windows-build-guide__summary::after {
    transform: rotate(180deg);
}

.windows-build-guide__summary:hover,
.windows-build-guide__summary:focus-visible {
    background: rgba(52, 152, 219, 0.08);
    outline: none;
}

.windows-build-guide[open] .windows-build-guide__summary {
    border-bottom: 1px solid var(--t-card-border, #c8d7ea);
}

html[dir="rtl"] .windows-build-guide__summary {
    flex-direction: row-reverse;
}

.windows-build-guide__body {
    margin: 0;
    padding: 20px 22px 24px;
    max-width: none;
    text-align: start;
}

.windows-build-guide__intro {
    margin: 0 0 16px;
    color: var(--t-text-muted, #555);
}

.windows-build-guide__h {
    margin: 18px 0 8px;
    font-size: 1.05rem;
}

.windows-build-guide__label {
    margin: 10px 0 6px;
    font-weight: 600;
    color: var(--t-text, #1f2937);
}

.windows-build-guide__list {
    margin: 0 0 12px;
    padding-inline-start: 1.35rem;
}

.windows-build-guide__list li {
    margin-bottom: 6px;
}

.windows-build-guide__body pre {
    margin: 8px 0 14px;
    text-align: left;
    direction: ltr;
}

.product-contact {
    margin: 0 0 20px;
    padding: 24px;
    border-radius: 14px;
    border: 1px solid var(--t-card-border, #dde4ec);
    background: var(--t-card-bg, #ffffff);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.product-contact h2 {
    margin: 0 0 8px;
    text-align: center;
    font-size: 1.35rem;
}

.product-contact__intro {
    margin: 0 auto 20px;
    max-width: 560px;
    text-align: center;
    color: var(--t-text-muted, #555);
    font-size: 0.98rem;
}

.product-contact__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.product-contact__card {
    padding: 18px;
    border-radius: 10px;
    border: 1px solid var(--t-card-border, #e5e7eb);
    background: var(--t-card-bg, #fff);
    background: color-mix(in srgb, var(--t-bg-page, #f4f4f9) 55%, var(--t-card-bg, #fff));
    text-align: center;
}

.product-contact__card-title {
    margin: 0 0 6px;
    font-size: 1.05rem;
    color: var(--t-heading-3, #16a085);
}

.product-contact__card-desc {
    margin: 0 0 12px;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--t-desc, #6b7280);
}

.product-contact__email,
.product-contact__link {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--t-link, #3498db);
    text-decoration: none;
    word-break: break-all;
}

.product-contact__email:hover,
.product-contact__link:hover {
    color: var(--t-link-hover, #2980b9);
    text-decoration: underline;
}

.site-footer__emails {
    margin: 10px 0 0;
    font-size: 0.9rem;
}

.site-footer__emails a {
    color: var(--t-footer-link, #2980b9);
    text-decoration: none;
}

.site-footer__emails a:hover {
    text-decoration: underline;
}

.site-footer__sep {
    margin: 0 8px;
    color: var(--t-footer-text, #5a6b7d);
}

@media (max-width: 900px) {
    .product-contact__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    .hero-cta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .product-features__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .hero-cta {
        grid-template-columns: 1fr;
    }
    .product-features__grid {
        grid-template-columns: 1fr;
    }
    .product-features {
        padding: 16px;
    }
}

.top-action-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1 1 420px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-left: auto;
}

.pref-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pref-label {
    font-size: 0.95rem;
    white-space: nowrap;
}

.pref-select {
    padding: 10px 12px;
    border: 1px solid var(--t-input-border, #ddd);
    border-radius: 8px;
    background: var(--t-input-bg, #fff);
    color: var(--t-input-text, #2c3e50);
    font-size: 1rem;
    min-width: 150px;
    cursor: pointer;
}

.pref-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.35);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--t-focus, #3498db) 35%, transparent);
    border-color: var(--t-focus, #3498db);
}

html[dir="rtl"] .pref-control {
    flex-direction: row-reverse;
}

.lang-label {
    font-size: 0.95rem;
    color: #34495e;
}

.lang-select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #2c3e50;
    font-size: 1rem;
    min-width: 180px;
}

.lang-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.35);
    border-color: #3498db;
}

/* RTL (Arabic) */
html[dir="rtl"] body {
    direction: rtl;
}

html[dir="rtl"] .folder-structure ul {
    padding-left: 0;
    padding-right: 20px;
}

html[dir="rtl"] .folder-structure ul li::before {
    margin-right: 0;
    margin-left: 10px;
}

html[dir="rtl"] .back-to-top {
    margin-left: 0;
    margin-right: 12px;
}

html[dir="rtl"] .hero-actions {
    flex-direction: row-reverse;
}

html[dir="rtl"] button.copy-path {
    right: auto;
    left: 0;
}

html[dir="rtl"] button.copy-path.copy-path-win {
    left: 30px;
}

html[dir="rtl"] .folder-structure ul li {
    padding-right: 0;
    padding-left: 34px;
}

h1, h2, h3 {
    color: #2c3e50;
    margin-top: 30px;
}

h1 {
    font-size: 2.5rem;
    border-bottom: 2px solid #2c3e50;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

h2 {
    font-size: 2rem;
    margin-top: 40px;
    color: #34495e;
}

h3 {
    font-size: 1.5rem;
    margin-top: 30px;
    color: #16a085;
}

p {
    font-size: 1.1rem;
    color: #555;
}

.subtitle {
    margin-top: 0;
    color: #34495e;
}

code {
    background-color: #eaeaea;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: "Courier New", Courier, monospace;
    color: #c0392b;
}

/* Folder descriptions (i18n) */
.desc:not(:empty)::before {
    content: " — ";
    color: #6b7280;
}

.desc {
    color: #6b7280;
    font-size: 0.98rem;
}

/* Notes Section */
.note {
    background-color: #fff3d4;
    padding: 15px;
    border-left: 4px solid #f0ad4e;
    margin: 20px 0;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.note strong {
    color: #d35400;
}

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

.note ul li {
    margin: 5px 0;
}

/* Folder Structure Section */
.folder-structure {
    background-color: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.folder-structure ul {
    list-style-type: none;
    padding-left: 20px;
}

.folder-structure ul li {
    margin: 10px 0;
    font-size: 1.1rem;
    color: #333;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.folder-structure ul li::before {
    content: "📁";
    margin-right: 10px;
    color: #16a085;
}

.folder-structure ul li strong {
    color: #2c3e50;
}

/* Preformatted Text (for code blocks) */
pre {
    background-color: #2c3e50;
    color: #fff;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

/* Links */
a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Collapsible Headers */
.collapsible-header {
    cursor: pointer;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 10px 0;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.5rem;
    color: #16a085;
    position: relative;
}

.collapsible-header:hover {
    background-color: #f1f1f1;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.collapsible-header.collapsed::after {
    content: ' ▶';
}

.collapsible-header::after {
    content: ' ▼';
    float: right;
    transition: transform 0.3s ease;
}

.collapsible-header.collapsed::after {
    transform: rotate(0deg);
}

.collapsible-header::after {
    transform: rotate(90deg);
}

/* Per-section helper link */
.back-to-top {
    font-size: 0.9rem;
    margin-left: 12px;
    opacity: 0.85;
}

.back-to-top:hover {
    opacity: 1;
}

/* Copy path button */
.folder-structure ul li {
    position: relative;
    padding-right: 34px; /* room for the button */
}

button.copy-path {
    position: absolute;
    right: 0;
    top: 2px;
    width: 26px;
    height: 26px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

button.copy-path::before {
    content: "⧉";
    font-size: 14px;
    color: #34495e;
}

button.copy-path.copy-path-win {
    right: 30px;
}

button.copy-path.copy-path-win::before {
    content: "\005C"; /* backslash */
    font-size: 16px;
    color: #34495e;
    font-family: "Courier New", Courier, monospace;
}

button.copy-path:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
    border-color: #cfcfcf;
}

button.copy-path:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.35);
}

/* Toast */
.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(10px);
    background: rgba(44, 62, 80, 0.95);
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    max-width: min(820px, calc(100vw - 24px));
    font-size: 0.95rem;
    z-index: 9999;
}

.toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Search Input */
.search-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
    outline: none;
}

/* Button Container */
.button-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* Action Buttons */
.action-button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.collapse-all {
    background-color: #e74c3c;
    color: #fff;
}

.collapse-all:hover {
    background-color: #c0392b;
}

.expand-all {
    background-color: #2ecc71;
    color: #fff;
}

.expand-all:hover {
    background-color: #27ae60;
}

.reset-search {
    background-color: #3498db;
    color: #fff;
}

.reset-search:hover {
    background-color: #2980b9;
}

.dark-mode-toggle {
    background-color: #34495e;
    color: #fff;
}

.dark-mode-toggle:hover {
    background-color: #2c3e50;
}

.print-guide {
    background-color: #9b59b6;
    color: #fff;
}

.print-guide:hover {
    background-color: #8e44ad;
}

.doc-export {
    background: linear-gradient(180deg, #ffffff 0%, #f5f7fa 100%);
    color: #1f2937;
    border: 1px solid #d1d5db;
    position: relative;
    padding-left: 36px;
}

.doc-export::before {
    content: "📄";
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
}

.doc-export:hover {
    border-color: #9ca3af;
    background: linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
}

/* Smooth Transitions */
.folder-structure ul {
    transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 16px 12px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .folder-structure ul li {
        font-size: 1rem;
    }

    .button-container {
        flex-direction: column;
    }

    .action-button {
        width: 100%;
    }
}

/* Utility Classes */
.hidden {
    display: none;
}

.visible {
    display: block;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Dark Mode */
body.dark-mode {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

body.dark-mode .hero-welcome {
    color: #5dade2;
}

body.dark-mode .hero-link {
    color: #85c1e9;
}

body.dark-mode .hero-link:hover,
body.dark-mode .hero-link:focus-visible {
    background-color: rgba(93, 173, 226, 0.15);
    border-color: rgba(93, 173, 226, 0.4);
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3 {
    color: #e8edf3;
}

body.dark-mode h1 {
    border-bottom-color: #4b5563;
}

body.dark-mode p,
body.dark-mode .subtitle,
body.dark-mode .lang-label {
    color: #cfd6de;
}

body.dark-mode .lang-select {
    background: #2d2d2d;
    border-color: #4b5563;
    color: #f3f4f6;
}

body.dark-mode .folder-structure {
    background-color: #2d2d2d;
    border-color: #444;
}

body.dark-mode .folder-structure ul li {
    color: #d6dbe3;
}

body.dark-mode .folder-structure ul li strong {
    color: #f3f4f6;
}

body.dark-mode .desc,
body.dark-mode .desc:not(:empty)::before {
    color: #aab4c0;
}

body.dark-mode .collapsible-header {
    background-color: #333;
    border-color: #444;
    color: #d1fae5;
}

body.dark-mode .collapsible-header:hover {
    background-color: #444;
}

body.dark-mode .note {
    background-color: #3a3a3a;
    border-color: #555;
    color: #e0e0e0;
}

body.dark-mode .note strong {
    color: #f7b267;
}

body.dark-mode pre {
    background-color: #252526;
    color: #e0e0e0;
}

body.dark-mode .search-input {
    background-color: #333;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode .search-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

body.dark-mode .action-button {
    background-color: #3498db;
    color: #fff;
}

body.dark-mode .action-button:hover {
    background-color: #2980b9;
}

body.dark-mode .doc-export {
    background: linear-gradient(180deg, #374151 0%, #2f3947 100%);
    color: #f3f4f6;
    border-color: #4b5563;
}

body.dark-mode .doc-export:hover {
    background: linear-gradient(180deg, #3f4b5d 0%, #374151 100%);
    border-color: #6b7280;
}

body.dark-mode a {
    color: #58a6ff;
}

body.dark-mode a:hover {
    color: #79b8ff;
}

body.dark-mode .highlight {
    background-color: #f0ad4e;
    color: #1e1e1e;
}

body.dark-mode button.copy-path {
    background: #2d2d2d;
    border-color: #444;
}

body.dark-mode button.copy-path::before {
    color: #e0e0e0;
}

body.dark-mode .toast {
    background: rgba(240, 240, 240, 0.95);
    color: #111;
}

/* Search Results Counter */
.search-results-counter {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #555;
    display: none;
}

/* Highlight Search Results */
.highlight {
    background-color: #f0ad4e;
    color: #fff;
    padding: 2px 5px;
    border-radius: 3px;
}

/* Print Styles */
@media print {
    html {
        zoom: 1 !important;
        transform: none !important;
        width: auto !important;
        min-height: unset !important;
    }

    .top-toolbar,
    .pref-control,
    .hero,
    .product-features,
    .product-contact,
    .product-download,
    .primary-controls,
    .note,
    p[data-i18n="intro"],
    h2[data-i18n="howWorks"],
    h2[data-i18n="conclusion"],
    p[data-i18n="conclusionText"],
    .button-container,
    .search-input,
    .search-results-counter {
        display: none;
    }

    .page > * {
        display: none !important;
    }

    #guideContent,
    #guideContent * {
        display: revert !important;
    }

    #guideContent {
        display: block !important;
    }

    .folder-structure ul {
        display: block !important;
    }
}


/* ===== V1.2.1 Topbar + Full-width Theme Overrides ===== */
body {
    padding: 0;
    background: #edf2f8;
    color: #1f2937;
}

.page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 14px 16px 24px;
}

.top-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: #172a46;
    border: 1px solid #27446d;
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 14px;
    position: fixed;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: min(1560px, calc(100vw - 20px));
    z-index: 11000;
    box-shadow: 0 10px 26px rgba(8, 20, 38, 0.35);
}

.top-action-bar {
    justify-content: flex-start;
    flex: 1 1 680px;
}

.hero {
    align-items: center;
    justify-content: flex-start;
}

.hero-actions {
    margin-left: auto;
}

.lang-label {
    color: #d8e7ff;
}

.lang-select {
    background: #0f1e33;
    border-color: #365788;
    color: #edf3ff;
    min-width: 138px;
    padding: 8px 10px;
}

.action-button {
    padding: 8px 13px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 0.9rem;
    font-weight: 600;
}

.dark-mode-toggle { background-color: #2a4f82; }
.dark-mode-toggle:hover { background-color: #3567a8; }
.print-guide { background-color: #6f56c7; }
.print-guide:hover { background-color: #7f67d6; }

.doc-export {
    background: linear-gradient(180deg, #f9fbff 0%, #eef3fa 100%);
    border-color: #c4d4ea;
    color: #243447;
    padding-left: 48px;
    position: relative;
}

.doc-export::before {
    content: "";
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 20px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.4px;
    line-height: 20px;
    text-align: center;
}

.doc-export:hover {
    background: linear-gradient(180deg, #ffffff 0%, #e9f0f9 100%);
    border-color: #9db6d6;
}

.download-pdf::before {
    content: "PDF";
    background: linear-gradient(180deg, #ef4444 0%, #c62828 100%);
}

.download-excel::before {
    content: "XLS";
    background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
}

.download-word::before {
    content: "DOC";
    background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
}

/* Dark mode palette close to requested example */
body.dark-mode {
    background: #0b1524;
    color: #d9e4f6;
}

body.dark-mode .top-toolbar {
    background: #111f35;
    border-color: #2f4f7b;
}

body.dark-mode .lang-label { color: #d3e3fb; }
body.dark-mode .lang-select {
    background: #12233d;
    border-color: #31547f;
    color: #edf3ff;
}

body.dark-mode .folder-structure {
    background-color: #14253f;
    border-color: #254266;
}

body.dark-mode .collapsible-header {
    background-color: #13233d;
    border-color: #2c4a74;
}

body.dark-mode .collapsible-header:hover {
    background-color: #1c3150;
}

body.dark-mode .search-input {
    background: #13233d;
    border-color: #2c4a74;
    color: #e7efff;
}

body.dark-mode .doc-export {
    background: linear-gradient(180deg, #1d3252 0%, #162842 100%);
    border-color: #345886;
    color: #eef4ff;
}

body.dark-mode .doc-export:hover {
    background: linear-gradient(180deg, #244067 0%, #1a2f4d 100%);
    border-color: #4a74aa;
}

body.dark-mode .doc-export::before {
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset;
}

@media (max-width: 900px) {
    .hero-actions {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    body { padding: 0; }
    .page { padding: 12px; }
    .top-toolbar { border-radius: 10px; }
}

/* Professional content frame (small side gutters) */
.page {
    max-width: 1560px;
    margin: 0 auto;
    padding-top: var(--top-toolbar-offset, 84px);
    padding-left: 18px;
    padding-right: 18px;
}

@media (min-width: 1440px) {
    .page {
        padding-left: 24px;
        padding-right: 24px;
    }
}

@media (max-width: 1024px) {
    .page {
        padding-left: 14px;
        padding-right: 14px;
    }
}

@media (max-width: 768px) {
    .top-toolbar {
        width: calc(100vw - 14px);
        top: 6px;
    }
    .page {
        padding-top: var(--top-toolbar-offset, 96px);
        padding-left: 12px;
        padding-right: 12px;
    }
}

.hero-title {
    width: 100%;
    max-width: 100%;
    text-align: center;
    margin: 0 auto;
}

.hero-title h1 {
    margin-bottom: 10px;
}

.primary-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.primary-controls .search-input {
    width: min(420px, 100%);
    margin: 0;
}

.primary-controls .button-container {
    margin: 0;
}

.primary-controls .search-results-counter {
    margin: 0;
    padding: 4px 8px;
}

.version-chip {
    background: #ffffff;
    border: 1px solid #c8d7ea;
    border-radius: 999px;
    padding: 7px 12px;
    color: #1f3250;
    font-weight: 700;
}

body.dark-mode .version-chip {
    background: #162a46;
    border-color: #33567f;
    color: #e8f0ff;
}

.site-footer {
    max-width: 1200px;
    margin: 28px auto 0;
    padding: 20px 20px 36px;
    border-top: 1px solid #dde4ec;
    text-align: center;
}

.site-footer__credit {
    margin: 0;
    font-size: 0.95rem;
    color: #5a6b7d;
}

.site-footer__link {
    margin-inline-start: 6px;
    font-weight: 700;
    color: #2980b9;
    text-decoration: none;
}

.site-footer__link:hover,
.site-footer__link:focus-visible {
    text-decoration: underline;
    outline: none;
}

html[dir="rtl"] .site-footer__link {
    margin-inline-start: 0;
    margin-inline-end: 6px;
}

body.dark-mode .site-footer {
    border-top-color: #3d4f63;
}

body.dark-mode .site-footer__credit {
    color: #aab4c0;
}

body.dark-mode .site-footer__link {
    color: #85c1e9;
}
