/* ==========================================================================
   YoBench — Minimalist Design System (BEM)
   ========================================================================== */

/* ---------- Reset & Base ---------- */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #1a1a2e;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

html[lang="zh"] body {
    font-family: 'Noto Sans SC', 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', Roboto, sans-serif;
}

.main {
    flex: 1;
}

a {
    color: #4361ee;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #3251d3;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid #4361ee;
    outline-offset: 2px;
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}

/* ---------- Container ---------- */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Section ---------- */

.section__title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1a1a2e;
}

.section__subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 48px;
    max-width: 640px;
}

/* ---------- Header ---------- */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #f0f0f0;
}

.header__inner {
    display: flex;
    align-items: center;
    height: 64px;
    gap: 32px;
}

.header__logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.header__logo:hover {
    color: #4361ee;
}

.header__download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    padding: 8px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    background: #4361ee;
    border-radius: 8px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.header__download:hover {
    background: #3251d3;
    color: #ffffff;
}

.header__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
}

.header__burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #1a1a2e;
    border-radius: 1px;
    transition: transform 0.3s, opacity 0.3s;
}

.header__burger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.header__burger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.header__burger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Nav ---------- */

.nav {
    flex: 1;
}

.nav__list {
    display: flex;
    gap: 24px;
}

.nav__link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #6b7280;
    padding: 4px 0;
    transition: color 0.2s;
}

.nav__link:hover,
.nav__link--active {
    color: #1a1a2e;
}

/* ---------- Lang Switcher ---------- */

.lang-switcher {
    position: relative;
    flex-shrink: 0;
}

.lang-switcher__toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #6b7280;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.lang-switcher__toggle:hover {
    color: #1a1a2e;
    border-color: #9ca3af;
}

.lang-switcher__arrow {
    transition: transform 0.2s;
}

.lang-switcher--open .lang-switcher__arrow {
    transform: rotate(180deg);
}

.lang-switcher__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 100%;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 4px;
    z-index: 200;
    flex-direction: column;
}

.lang-switcher--open .lang-switcher__dropdown {
    display: flex;
}

.lang-switcher__link {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #6b7280;
    padding: 6px 10px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
    text-align: left;
    white-space: nowrap;
}

.lang-switcher__link:hover {
    color: #1a1a2e;
    background: #f3f4f6;
}

.lang-switcher__link--active {
    color: #1a1a2e;
    background: #f3f4f6;
    cursor: default;
}

/* ---------- Hero ---------- */

.hero {
    padding: 96px 0 80px;
    text-align: center;
}

.hero__title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    max-width: 800px;
    margin: 0 auto 20px;
    color: #1a1a2e;
}

.hero__subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ---------- Advantages ---------- */

.advantages {
    padding: 80px 0;
    background: #fafafa;
}

.advantages .section__title {
    text-align: center;
    margin-bottom: 48px;
}

.advantages__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.advantage-card {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 32px;
    transition: box-shadow 0.2s;
}

.advantage-card:hover {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.advantage-card__icon {
    color: #4361ee;
    margin-bottom: 20px;
}

.advantage-card__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a2e;
}

.advantage-card__text {
    font-size: 0.9375rem;
    color: #6b7280;
    line-height: 1.6;
}

/* ---------- Features Overview (Home) ---------- */

.features-overview {
    padding: 80px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    display: flex;
    flex-direction: column;
    padding: 28px;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    color: #1a1a2e;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    border-color: #4361ee;
    box-shadow: 0 4px 24px rgba(67, 97, 238, 0.08);
    color: #1a1a2e;
}

.feature-card__title {
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card__text {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
    flex: 1;
}

.feature-card__arrow {
    display: inline-block;
    margin-top: 16px;
    font-size: 1.125rem;
    color: #4361ee;
    transition: transform 0.2s;
}

.feature-card:hover .feature-card__arrow {
    transform: translateX(4px);
}

/* ---------- Download Page ---------- */

.download-hero {
    padding: 64px 0 48px;
    text-align: center;
}

.download-hero__title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: #1a1a2e;
}

.download-hero__subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.download-platforms {
    padding: 0 0 80px;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.download-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 32px;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.download-card:hover {
    border-color: #4361ee;
    box-shadow: 0 4px 24px rgba(67, 97, 238, 0.08);
}

.download-card__icon {
    color: #4361ee;
    margin-bottom: 20px;
}

.download-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a2e;
}

.download-card__desc {
    font-size: 0.9375rem;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 24px;
}

.download-card__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    padding: 12px 32px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #ffffff;
    background: #4361ee;
    border-radius: 8px;
    transition: background 0.2s;
    margin-bottom: 12px;
}

.download-card__btn:hover {
    background: #3251d3;
    color: #ffffff;
}

.download-card__format {
    font-size: 0.8125rem;
    color: #9ca3af;
}

.download-card--disabled {
    opacity: 0.5;
    pointer-events: none;
}

.download-card__btn--soon {
    background-color: #9ca3af;
    cursor: default;
    pointer-events: none;
}

/* ---------- Nav Mobile Download ---------- */

.nav__item--mobile-download,
.nav__item--mobile-donate {
    display: none;
}

.nav__link--button {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    text-align: inherit;
    width: 100%;
    padding: 4px 0;
    color: inherit;
}

/* ---------- Feature Page Hero ---------- */

.feature-hero {
    padding: 64px 0 48px;
}

.feature-hero__title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: #1a1a2e;
}

.feature-hero__subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 680px;
    line-height: 1.6;
}

/* ---------- Benefits List ---------- */

.benefits {
    padding: 48px 0 80px;
}

.benefits .section__title {
    margin-bottom: 40px;
}

.benefit-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 800px;
}

.benefit-list__item {
    display: flex;
    gap: 20px;
    padding: 24px;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    transition: border-color 0.2s;
}

.benefit-list__item:hover {
    border-color: #e0e0e0;
}

.benefit-list__number {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f0f4ff;
    color: #4361ee;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 8px;
}

.benefit-list__title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #1a1a2e;
}

.benefit-list__text {
    font-size: 0.9375rem;
    color: #6b7280;
    line-height: 1.6;
}

/* ---------- Feature CTA ---------- */

.feature-cta {
    padding: 0 0 80px;
}

.feature-cta__link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #4361ee;
    transition: color 0.2s;
}

.feature-cta__link:hover {
    color: #3251d3;
}

/* ---------- Breadcrumbs ---------- */

.breadcrumbs {
    padding: 16px 0 0;
}

.breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    font-size: 0.8125rem;
}

.breadcrumbs__item {
    display: flex;
    align-items: center;
}

.breadcrumbs__link {
    color: #9ca3af;
}

.breadcrumbs__link:hover {
    color: #4361ee;
}

.breadcrumbs__separator {
    margin: 0 8px;
    color: #d1d5db;
}

.breadcrumbs__current {
    color: #6b7280;
}

/* ---------- Footer ---------- */

.footer {
    padding: 40px 0;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

.footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.footer__main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer__copy {
    font-size: 0.875rem;
    color: #9ca3af;
}

.footer__tagline {
    font-size: 0.875rem;
    color: #9ca3af;
}

.footer__links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.footer__link {
    font-size: 0.875rem;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.footer__link:hover {
    color: #1a1a2e;
}

.footer__link--active {
    color: #1a1a2e;
    font-weight: 500;
}

/* ---------- Error Page ---------- */

.error-page {
    padding: 120px 0;
    text-align: center;
}

.error-page__title {
    font-size: 6rem;
    font-weight: 700;
    color: #e5e7eb;
    margin-bottom: 16px;
}

.error-page__text {
    font-size: 1.25rem;
    color: #6b7280;
    margin-bottom: 32px;
}

.error-page__link {
    font-size: 1rem;
    font-weight: 500;
    color: #4361ee;
}

/* ---------- Roadmap Page ---------- */

.roadmap-hero {
    padding: 64px 0 32px;
    text-align: center;
}

.roadmap-hero__title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: #1a1a2e;
}

.roadmap-hero__subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.roadmap-details {
    padding: 0 0 80px;
}

.roadmap-details__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.roadmap-milestone {
    padding: 32px;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.roadmap-milestone:hover {
    border-color: #e0e0e0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.roadmap-milestone__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.roadmap-milestone__number--blue {
    background: rgba(67, 97, 238, 0.1);
    color: #4361ee;
}

.roadmap-milestone__number--purple {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.roadmap-milestone__number--green {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.roadmap-milestone__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 12px;
}

.roadmap-milestone__text {
    font-size: 0.9375rem;
    color: #6b7280;
    line-height: 1.6;
}

/* ---------- Changelog Page ---------- */

.changelog-hero {
    padding: 64px 0 48px;
    text-align: center;
}

.changelog-hero__title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: #1a1a2e;
}

.changelog-hero__subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.changelog {
    padding: 0 0 80px;
}

.changelog-release {
    padding: 32px 0;
    border-bottom: 1px solid #f0f0f0;
}

.changelog-release:first-child {
    padding-top: 0;
}

.changelog-release:last-child {
    border-bottom: none;
}

.changelog-release__header {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 20px;
}

.changelog-release__version {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
}

.changelog-release__date {
    font-size: 0.875rem;
    color: #9ca3af;
}

.changelog-release__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.changelog-release__item {
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-size: 0.9375rem;
    color: #1a1a2e;
    line-height: 1.5;
}

.changelog-tag {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 4px;
}

.changelog-tag--feature {
    color: #4361ee;
    background: #f0f4ff;
}

.changelog-tag--improvement {
    color: #059669;
    background: #ecfdf5;
}

.changelog-tag--fix {
    color: #d97706;
    background: #fffbeb;
}

/* ---------- About Page ---------- */

.about-hero {
    padding: 64px 0 32px;
    text-align: center;
}

.about-hero__title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: #1a1a2e;
}

.about-hero__subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
}

.about-faq {
    padding: 24px 0 80px;
}

.faq {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq__item {
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.faq__item[open] {
    border-color: #e0e0e0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.faq__item:hover {
    border-color: #e0e0e0;
}

.faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    cursor: pointer;
    font-size: 1.0625rem;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.4;
    list-style: none;
    user-select: none;
}

.faq__question::-webkit-details-marker {
    display: none;
}

.faq__question-text {
    flex: 1;
}

.faq__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    position: relative;
    transition: transform 0.2s;
}

.faq__icon::before,
.faq__icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background: #6b7280;
    border-radius: 2px;
    transition: background 0.2s;
}

.faq__icon::before {
    width: 12px;
    height: 2px;
    transform: translate(-50%, -50%);
}

.faq__icon::after {
    width: 2px;
    height: 12px;
    transform: translate(-50%, -50%);
    transition: transform 0.2s, background 0.2s;
}

.faq__item[open] .faq__icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}

.faq__item[open] .faq__icon::before {
    background: #1a1a2e;
}

.faq__question:focus-visible {
    outline: 2px solid #4361ee;
    outline-offset: 2px;
    border-radius: 12px;
}

.faq__answer {
    padding: 0 24px 24px;
    color: #4b5563;
    font-size: 1rem;
    line-height: 1.65;
}

.faq__answer p {
    margin: 0;
}

/* ---------- Privacy Page ---------- */

.privacy-hero {
    padding: 64px 0 24px;
    text-align: center;
}

.privacy-hero__title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    color: #1a1a2e;
}

.privacy-hero__meta {
    font-size: 0.9375rem;
    color: #9ca3af;
    margin-bottom: 16px;
}

.privacy-hero__intro {
    font-size: 1.0625rem;
    color: #4b5563;
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.65;
}

.privacy-content {
    padding: 24px 0 96px;
}

.privacy-content__inner {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 48px;
    align-items: start;
    max-width: 1080px;
}

.privacy-toc {
    position: sticky;
    top: 96px;
    align-self: start;
    padding: 20px 20px 20px 0;
    border-right: 1px solid #f0f0f0;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.privacy-toc__title {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    margin: 0 0 12px;
}

.privacy-toc__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.privacy-toc__link {
    display: block;
    font-size: 0.9375rem;
    color: #4b5563;
    text-decoration: none;
    padding: 4px 0;
    line-height: 1.45;
    transition: color 0.15s;
}

.privacy-toc__link:hover {
    color: #4361ee;
}

.privacy-body {
    min-width: 0;
}

.privacy-section {
    padding: 24px 0;
    border-bottom: 1px solid #f5f5f5;
}

.privacy-section:last-child {
    border-bottom: 0;
}

.privacy-section__title {
    font-size: 1.375rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 16px;
    line-height: 1.3;
    scroll-margin-top: 96px;
}

.privacy-section__text {
    color: #374151;
    font-size: 1rem;
    line-height: 1.7;
    margin: 0 0 12px;
}

.privacy-section__list {
    color: #374151;
    font-size: 1rem;
    line-height: 1.65;
    margin: 0 0 12px;
    padding-left: 22px;
}

.privacy-section__list li {
    margin-bottom: 6px;
}

.privacy-section__text a,
.privacy-section__list a {
    color: #4361ee;
    text-decoration: underline;
}

.privacy-section__text a:hover,
.privacy-section__list a:hover {
    color: #2944c7;
}

.privacy-empty {
    text-align: center;
    color: #9ca3af;
    padding: 48px 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .advantages__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .download-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero__title {
        font-size: 2.5rem;
    }

    .roadmap-details__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 991px) {
    .header__burger {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: #ffffff;
        border-bottom: 1px solid #f0f0f0;
        padding: 16px 24px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.3s, opacity 0.3s, visibility 0.3s;
        z-index: 99;
    }

    .nav--open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav__list {
        flex-direction: column;
        gap: 12px;
    }

    .lang-switcher {
        position: fixed;
        top: 64px;
        right: 24px;
        z-index: 100;
        display: none;
    }

    .lang-switcher__toggle {
        display: none;
    }

    .lang-switcher__dropdown {
        display: flex;
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
        border: none;
        box-shadow: none;
        padding: 0;
        background: transparent;
    }

    .nav--open ~ .lang-switcher {
        display: flex;
    }

    .header__download {
        display: none;
    }

    .nav__item--mobile-download,
    .nav__item--mobile-donate {
        display: list-item;
    }

    .header__inner {
        flex-wrap: wrap;
    }

    .advantages__grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .download-grid {
        grid-template-columns: 1fr;
    }

    .download-hero__title {
        font-size: 1.75rem;
    }

    .hero {
        padding: 64px 0 56px;
    }

    .hero__title {
        font-size: 2rem;
    }

    .hero__subtitle {
        font-size: 1.0625rem;
    }

    .feature-hero__title {
        font-size: 1.75rem;
    }

    .benefit-list__item {
        flex-direction: column;
        gap: 12px;
    }

    .footer__inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .footer__links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 16px;
    }

    .section__title {
        font-size: 1.5rem;
    }

    .roadmap-hero__title,
    .changelog-hero__title,
    .about-hero__title,
    .privacy-hero__title {
        font-size: 1.75rem;
    }

    .privacy-content__inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .privacy-toc {
        position: static;
        max-height: none;
        padding: 16px 16px;
        border-right: 0;
        border: 1px solid #f0f0f0;
        border-radius: 12px;
        background: #fafbfc;
    }

    .privacy-section__title {
        font-size: 1.25rem;
    }

    .faq__question {
        font-size: 1rem;
        padding: 16px 20px;
    }

    .faq__answer {
        padding: 0 20px 20px;
        font-size: 0.9375rem;
    }

    .roadmap-details__grid {
        grid-template-columns: 1fr;
    }

    .changelog-release__item {
        flex-direction: column;
        gap: 6px;
    }
}

@media (max-width: 374px) {
    .hero__title,
    .download-hero__title {
        font-size: 1.5rem;
    }

    .section__title {
        font-size: 1.25rem;
    }

    .container {
        padding: 0 16px;
    }
}

/* ==========================================================================
   Documentation
   ========================================================================== */

/* ---------- Index page ---------- */
.docs-index {
    padding: 48px 0 80px;
}

.docs-search {
    margin: 24px 0 32px;
}

.docs-search__input {
    width: 100%;
    max-width: 480px;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 0.9375rem;
    color: #1a1a2e;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.docs-search__input:focus {
    outline: none;
    border-color: #4361ee;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: 16px;
    margin-top: 24px;
}

.docs-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 24px;
    color: inherit;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
    position: relative;
}

/* `display: flex` above overrides the UA `[hidden] { display: none }` rule
   (same specificity, but author CSS wins). Restore it for the search filter. */
.docs-card[hidden] {
    display: none;
}

.docs-card:hover {
    border-color: #4361ee;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.08);
    color: inherit;
}

.docs-card__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a2e;
    padding-right: 24px;
}

.docs-card__text {
    font-size: 0.9375rem;
    color: #6b7280;
    line-height: 1.5;
}

.docs-card__arrow {
    position: absolute;
    top: 20px;
    right: 24px;
    color: #9ca3af;
    font-size: 1.25rem;
    transition: transform 0.15s, color 0.15s;
}

.docs-card:hover .docs-card__arrow {
    color: #4361ee;
    transform: translateX(4px);
}

.docs-empty {
    color: #6b7280;
    text-align: center;
    padding: 32px 0;
}

/* ---------- Single doc page ---------- */
.doc-page {
    padding: 32px 0 80px;
}

.doc-page__inner {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
        "sidebar"
        "content";
    gap: 32px;
    align-items: start;
}

.doc-page__sidebar {
    grid-area: sidebar;
}

.doc-page__content {
    grid-area: content;
    min-width: 0;
}

@media (min-width: 1024px) {
    .doc-page__inner {
        grid-template-columns: minmax(0, 1fr) 240px;
        grid-template-areas: "content sidebar";
    }

    .doc-page__sidebar {
        position: sticky;
        top: 96px;
    }
}

.doc-page__header {
    margin-bottom: 32px;
}

.doc-page__title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: #1a1a2e;
    margin-bottom: 12px;
}

.doc-page__lead {
    font-size: 1.125rem;
    color: #6b7280;
    line-height: 1.5;
}

/* ---------- TOC ---------- */
.doc-toc-mobile {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    overflow: hidden;
}

.doc-toc__heading {
    padding: 12px 16px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1a1a2e;
    cursor: pointer;
    list-style: none;
}

.doc-toc__heading::-webkit-details-marker {
    display: none;
}

.doc-toc__heading::after {
    content: '▾';
    float: right;
    color: #9ca3af;
    transition: transform 0.15s;
}

.doc-toc-mobile[open] .doc-toc__heading::after {
    transform: rotate(180deg);
}

.doc-toc {
    padding: 4px 0 12px;
}

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

.doc-toc__item {
    margin: 0;
}

.doc-toc__item--lvl3 {
    padding-left: 16px;
}

.doc-toc__link {
    display: block;
    padding: 6px 16px;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.4;
    border-left: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.doc-toc__link:hover {
    color: #1a1a2e;
    background: #f3f4f6;
}

.doc-toc__link--active {
    color: #4361ee;
    font-weight: 600;
    border-left-color: #4361ee;
    background: #eef2ff;
}

@media (min-width: 1024px) {
    .doc-toc-mobile {
        border: none;
        background: transparent;
        overflow: visible;
    }

    .doc-toc-mobile[open] .doc-toc__heading::after,
    .doc-toc__heading::after {
        display: none;
    }

    .doc-toc__heading {
        padding: 0 16px 8px;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #9ca3af;
        cursor: default;
        pointer-events: none;
    }

    /* Force open on desktop regardless of <details> state */
    .doc-toc-mobile > .doc-toc {
        display: block !important;
    }
}

/* ---------- Markdown content ---------- */
.markdown {
    color: #1a1a2e;
    line-height: 1.7;
    font-size: 1rem;
    overflow-wrap: break-word;
}

.markdown h1,
.markdown h2,
.markdown h3,
.markdown h4 {
    color: #1a1a2e;
    font-weight: 700;
    line-height: 1.3;
    scroll-margin-top: 96px;
}

.markdown h1 { font-size: 1.875rem; margin: 32px 0 16px; }
.markdown h2 { font-size: 1.5rem;   margin: 32px 0 14px; }
.markdown h3 { font-size: 1.25rem;  margin: 24px 0 12px; }
.markdown h4 { font-size: 1.0625rem; margin: 20px 0 10px; }

.markdown p,
.markdown ul,
.markdown ol,
.markdown blockquote,
.markdown pre,
.markdown table {
    margin: 0 0 16px;
}

.markdown ul,
.markdown ol {
    padding-left: 28px;
}

.markdown li {
    margin: 4px 0;
}

.markdown li > ul,
.markdown li > ol {
    margin: 4px 0;
}

.markdown a {
    color: #4361ee;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    overflow-wrap: anywhere;
}

.markdown a:hover {
    color: #3251d3;
}

.markdown blockquote {
    padding: 4px 16px;
    color: #6b7280;
    border-left: 3px solid #e5e7eb;
    background: #f9fafb;
}

.markdown blockquote p:last-child {
    margin-bottom: 0;
}

.markdown code {
    font-family: 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
    font-size: 0.875em;
    padding: 2px 6px;
    background: #f3f4f6;
    border-radius: 4px;
    color: #be185d;
}

.markdown pre {
    padding: 16px 20px;
    background: #1a1a2e;
    border-radius: 8px;
    overflow-x: auto;
    color: #f3f4f6;
}

.markdown pre code {
    padding: 0;
    background: none;
    color: inherit;
    font-size: 0.875rem;
}

.markdown table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.markdown th,
.markdown td {
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    text-align: left;
}

.markdown th {
    background: #f9fafb;
    font-weight: 600;
}

.markdown__table-wrap {
    overflow-x: auto;
    margin: 0 0 16px;
}

.markdown__table-wrap table {
    margin-bottom: 0;
}

.markdown hr {
    margin: 32px 0;
    border: none;
    border-top: 1px solid #e5e7eb;
}

.markdown img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ---------- Visually hidden utility ---------- */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   Donate (header button + modal)
   ========================================================================== */

/* ---------- Header donate text link ---------- */
.header__donate {
    background: none;
    border: none;
    padding: 4px 0;
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.2s;
    flex-shrink: 0;
}

.header__donate:hover {
    color: #1a1a2e;
}

.header__donate:focus-visible {
    outline: 2px solid #4361ee;
    outline-offset: 2px;
    border-radius: 2px;
}

@media (max-width: 991px) {
    .header__donate {
        display: none;
    }
}

/* ---------- Modal container ---------- */
.donate-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.donate-modal--open {
    display: flex;
    animation: donateModalFadeIn 0.18s ease-out;
}

@keyframes donateModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.donate-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.donate-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 32px 28px 24px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
    animation: donateDialogIn 0.22s ease-out;
}

@keyframes donateDialogIn {
    from { transform: translateY(8px) scale(0.98); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

.donate-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 8px;
    color: #6b7280;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.donate-modal__close:hover {
    background: #f3f4f6;
    color: #1a1a2e;
}

.donate-modal__close:focus-visible {
    outline: 2px solid #4361ee;
    outline-offset: 2px;
}

.donate-modal__title {
    margin: 0 0 6px;
    font-size: 1.375rem;
    font-weight: 700;
    color: #1a1a2e;
    padding-right: 32px;
}

.donate-modal__subtitle {
    margin: 0 0 20px;
    font-size: 0.9375rem;
    color: #6b7280;
    line-height: 1.5;
}

.donate-modal__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.donate-modal__item {
    margin: 0;
}

.donate-modal__link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    color: #1a1a2e;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.donate-modal__link:hover {
    border-color: #4361ee;
    background: #ffffff;
    color: #1a1a2e;
}

.donate-modal__link:active {
    transform: translateY(1px);
}

.donate-modal__link:focus-visible {
    outline: 2px solid #4361ee;
    outline-offset: 2px;
}

.donate-modal__icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.donate-modal__icon svg {
    display: block;
    width: 28px;
    height: 28px;
}

.donate-modal__name {
    flex: 1;
    font-size: 0.9375rem;
    font-weight: 600;
}

.donate-modal__arrow {
    flex-shrink: 0;
    color: #9ca3af;
    transition: transform 0.15s, color 0.15s;
}

.donate-modal__link:hover .donate-modal__arrow {
    color: #4361ee;
    transform: translateX(2px);
}

@media (prefers-reduced-motion: reduce) {
    .donate-modal--open,
    .donate-modal__dialog {
        animation: none;
    }
    .donate-modal__link,
    .donate-modal__arrow,
    .header__donate {
        transition: none;
    }
}

/* ==========================================================================
   Feedback page + form
   ========================================================================== */

.feedback-page {
    padding: 32px 0 80px;
}

.feedback-page__inner {
    max-width: 720px;
    margin: 0 auto;
}

.feedback-page__header {
    margin-bottom: 32px;
}

/* ---------- Form ---------- */
.feedback-form {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form__group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form__label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1a1a2e;
}

.form__label--required::after {
    content: ' *';
    color: #ef4444;
}

.form__input,
.form__textarea {
    width: 100%;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 0.9375rem;
    color: #1a1a2e;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form__input:focus,
.form__textarea:focus {
    outline: none;
    border-color: #4361ee;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

.form__textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.5;
}

.form__group--error .form__input,
.form__group--error .form__textarea {
    border-color: #ef4444;
}

.form__group--success .form__input,
.form__group--success .form__textarea {
    border-color: #10b981;
}

.form__error {
    margin: 0;
    font-size: 0.8125rem;
    color: #b91c1c;
}

.form__message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.form__message--success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid #10b981;
    color: #047857;
}

.form__message--error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #b91c1c;
}

.form__actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

/* Submit element is <div role="button"> — anti-bot guard.
   Native <button>/form.submit() is blocked by JS; only real click
   or keyboard activation on this div triggers the request. */
.form__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    padding: 12px 24px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #ffffff;
    background: #4361ee;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s, transform 0.1s;
}

.form__submit:hover {
    background: #3251d3;
}

.form__submit:active {
    transform: translateY(1px);
}

.form__submit:focus-visible {
    outline: 2px solid #1a1a2e;
    outline-offset: 2px;
}

.form__submit--loading {
    opacity: 0.6;
    pointer-events: none;
}

.form__honeypot {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form__noscript {
    margin-top: 8px;
    padding: 12px 16px;
    font-size: 0.9375rem;
    color: #6b7280;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.form__noscript a {
    color: #4361ee;
}

@media (prefers-reduced-motion: reduce) {
    .form__input,
    .form__textarea,
    .form__submit {
        transition: none;
    }
}
