/* ============================================
   CSS Reset & Base Styles
   ============================================ */

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

:root {
    /* Colors - Dark theme, gold used sparingly */
    --primary-color: #e6c200;
    --primary-hover: #f5d20a;
    --secondary-color: #8a8a8a;
    --accent-color: #e6c200;
    --success-color: #2d9d5f;
    --background: #0c0c0c;
    --surface: #1a1a1a;
    --surface-hover: #252525;
    --card-background: #141414;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --border-color: #2a2a2a;
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Consolas', monospace;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.7);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.8);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.9);
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        -webkit-animation-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        -webkit-animation-iteration-count: 1 !important;
        animation-iteration-count: 1 !important;
        -webkit-transition-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(230, 194, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(230, 194, 0, 0.03) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    z-index: 0;
}

body > * {
    position: relative;
    z-index: 1;
}

/* Skip to main content link (accessibility) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: #000000;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    font-weight: 600;
    z-index: 10000;
    border-radius: 0 0 var(--radius-md) 0;
    -webkit-transition: top 0.2s ease;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid #000000;
    outline-offset: 2px;
}

/* Hide skip link on mobile - not needed */
@media (max-width: 768px) {
    .skip-link {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        left: -9999px !important;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
}

h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
}

h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

h4 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
    max-width: 75ch; /* Optimal reading width */
}

/* Ensure proper heading hierarchy */
section h2 {
    margin-top: 0;
}

section h3 {
    margin-top: var(--spacing-md);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

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

a:focus {
    outline: none;
}

a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

code {
    font-family: var(--font-mono);
    background-color: var(--surface);
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    word-break: break-all;
    overflow-wrap: break-word;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

pre {
    background-color: var(--surface);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: var(--spacing-md) 0;
    border: 1px solid var(--border-color);
}

pre code {
    background: none;
    padding: 0;
    color: var(--primary-color);
}

/* ============================================
   Navigation
   ============================================ */

.navbar {
    background-color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.navbar .container {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-align-items: center;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    overflow: visible;
}

.navbar .container > .nav-menu {
    order: 2;
    -webkit-order: 2;
    margin-left: auto;
    margin-right: var(--spacing-md);
}

.navbar .container > .lang-selector {
    order: 3;
    -webkit-order: 3;
    margin-left: 0;
    margin-right: 0;
}

.nav-brand {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    order: 1;
    -webkit-order: 1;
    -webkit-align-items: center;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    -webkit-transition: opacity 0.2s ease;
    transition: opacity 0.2s ease;
}

.nav-brand:hover {
    opacity: 0.9;
}

.nav-brand:focus {
    outline: none;
}

.nav-brand:focus-visible {
    outline: 2px solid rgba(0, 0, 0, 0.5);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.nav-brand .logo {
    height: 40px;
    width: auto;
}

.nav-brand h1 {
    font-size: 1.5rem;
    margin: 0;
    color: #000000;
}

.nav-toggle {
    display: none;
    order: 2;
    -webkit-order: 2;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.75rem;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    z-index: 1001;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    overflow: hidden;
    gap: 6px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: #000000;
    -webkit-transition: all 0.3s;
    transition: all 0.3s;
    border-radius: 2px;
    position: relative;
    margin: 0;
    flex-shrink: 0;
}

.nav-toggle:focus {
    outline: none;
}

.nav-toggle:focus-visible {
    outline: 2px solid rgba(0, 0, 0, 0.5);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.nav-toggle.active span:nth-child(1) {
    -webkit-transform: translateY(9px) rotate(45deg);
    transform: translateY(9px) rotate(45deg);
    transform-origin: center;
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    -webkit-transform: scale(0);
    transform: scale(0);
}

.nav-toggle.active span:nth-child(3) {
    -webkit-transform: translateY(-9px) rotate(-45deg);
    transform: translateY(-9px) rotate(-45deg);
    transform-origin: center;
}

.nav-menu {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
    -webkit-align-items: center;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    color: #000000;
    font-weight: 500;
    transition: color 0.2s;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    display: block;
}

.nav-menu li a:hover {
    color: #000000;
    opacity: 0.8;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
    background-color: rgba(0, 0, 0, 0.05);
}

.nav-menu li a:focus {
    outline: none;
}

.nav-menu li a:focus-visible {
    outline: 2px solid rgba(0, 0, 0, 0.5);
    outline-offset: 2px;
    background-color: rgba(0, 0, 0, 0.1);
}

/* ============================================
   Language Selector - Rebuilt
   ============================================ */

.lang-selector {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}

.lang-toggle {
    background: transparent;
    border: 2px solid #000000;
    color: #000000;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    margin: 0;
    font-family: inherit;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px;
    min-width: 80px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-toggle:hover {
    background: #000000;
    color: var(--primary-color);
}

.lang-toggle:focus {
    outline: none;
}

.lang-toggle:focus-visible {
    outline: 2px solid rgba(0, 0, 0, 0.3);
    outline-offset: 2px;
}

.lang-toggle:active {
    transform: scale(0.98);
}

.lang-toggle svg {
    transition: transform 0.2s ease;
    flex-shrink: 0;
    width: 12px;
    height: 12px;
}

.lang-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--primary-color);
    border: 2px solid #000000;
    border-radius: var(--radius-md);
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    min-width: 150px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 1001;
    pointer-events: none;
}

.lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.lang-dropdown li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.lang-dropdown a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #000000;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease;
    min-height: 44px;
    opacity: 1;
    visibility: visible;
}

.lang-dropdown a:hover,
.lang-dropdown a:focus,
.lang-dropdown a.active {
    background-color: rgba(0, 0, 0, 0.1);
    outline: none;
}

.lang-dropdown a:focus-visible {
    outline: 2px solid rgba(0, 0, 0, 0.3);
    outline-offset: -2px;
    background-color: rgba(0, 0, 0, 0.15);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 1rem;
    min-height: 44px; /* WCAG touch target minimum */
    min-width: 44px;
    display: -webkit-inline-box;
    display: -webkit-inline-flex;
    display: -moz-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #000000;
    font-weight: 700;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: #000000;
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
    box-shadow: 0 0 20px var(--primary-color);
}

.btn-primary:focus {
    outline: none;
}

.btn-primary:focus-visible {
    outline: 3px solid rgba(0, 0, 0, 0.5);
    outline-offset: 3px;
    box-shadow: 0 0 0 2px var(--primary-color), 0 0 20px var(--primary-color);
}

.btn-primary:active {
    -webkit-transform: translateY(0);
    transform: translateY(0);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: #000000;
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
    box-shadow: 0 0 15px var(--primary-color);
}

.btn-secondary:focus {
    outline: none;
}

.btn-secondary:focus-visible {
    outline: 3px solid rgba(255, 215, 0, 0.5);
    outline-offset: 3px;
    box-shadow: 0 0 0 2px var(--primary-color), 0 0 15px var(--primary-color);
}

.btn-secondary:active {
    -webkit-transform: translateY(0);
    transform: translateY(0);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: #000000;
    box-shadow: 0 0 15px var(--primary-color);
}

.btn-outline:focus {
    outline: none;
}

.btn-outline:focus-visible {
    outline: 3px solid rgba(255, 215, 0, 0.5);
    outline-offset: 3px;
    box-shadow: 0 0 0 2px var(--primary-color), 0 0 15px var(--primary-color);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    min-height: 48px;
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    position: relative;
    padding: var(--spacing-3xl) 0;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.hero-bg {
    display: none;
}

.hero-container {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
    max-width: 1100px;
}

.hero-content {
    text-align: left;
}

.hero-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.0625rem;
    margin-bottom: var(--spacing-lg);
    color: var(--text-secondary);
    max-width: 42ch;
    line-height: 1.55;
}

.hero-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-md);
}

.hero-meta {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
}

.hero-meta-sep {
    margin: 0 0.5rem;
    opacity: 0.6;
}

.hero-app-block {
    margin-top: var(--spacing-lg);
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-md) var(--spacing-lg);
}

.hero-app-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-xs) 0;
}

.hero-app-subtitle {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0 0 var(--spacing-sm) 0;
    line-height: 1.4;
}

.hero-app-list {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--spacing-sm) 0;
}

.hero-app-list li {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.45;
    padding: 0.2rem 0;
    padding-left: 1rem;
    position: relative;
}

.hero-app-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 3px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.7;
}

.hero-app-platform {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
    opacity: 0.85;
}

.hero-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
}

.hero-preview {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.hero-download {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

/* ============================================
   Section Styles
   ============================================ */

section {
    padding: var(--spacing-2xl) 0;
}

.section-title {
    text-align: left;
    margin-bottom: var(--spacing-lg);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.section-subtitle {
    text-align: left;
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    max-width: 60ch;
}


/* ============================================
   Feature Clusters (single-column, aligned)
   ============================================ */

.features-clusters {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2xl);
    max-width: 720px;
}

.feature-cluster {
    padding: 0;
    border: none;
}

.feature-cluster + .feature-cluster {
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border-color);
}

.cluster-heading {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-md) 0;
}

.cluster-content {
    margin: 0;
}

.cluster-content h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: var(--spacing-md) 0 var(--spacing-xs) 0;
}

.cluster-content h3:first-child {
    margin-top: 0;
}

.feature-cluster ul {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--spacing-md) 0;
}

.feature-cluster ul:last-child {
    margin-bottom: 0;
}

.feature-cluster ul li {
    padding: 0.25rem 0;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.5;
    padding-left: 1.25rem;
    position: relative;
}

.feature-cluster ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.8;
}

.cluster-open .cluster-heading {
    color: var(--primary-color);
}

.cluster-open ul li::before {
    background: var(--primary-color);
}

/* ============================================
   Technical Reference (unified Hardware + Commands)
   ============================================ */

.tech-reference-section {
    padding: var(--spacing-2xl) 0;
}

.tech-reference-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin: 0 0 var(--spacing-xl) 0;
}

.tech-reference-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    max-width: 1100px;
    margin: 0 auto;
}

.tech-block {
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
}

.tech-block-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-lg) 0;
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border-color);
}

.tech-subsection {
    margin-bottom: var(--spacing-lg);
}

.tech-subsection:last-child {
    margin-bottom: 0;
}

.tech-subsection-label {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin: 0 0 var(--spacing-sm) 0;
}

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

.tech-list li {
    padding: 0.35rem 0;
    padding-left: 1.25rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.45;
    position: relative;
}

.tech-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: 600;
    font-size: 0.9em;
}

.tech-list-compact li {
    padding: 0.2rem 0;
    padding-left: 0;
    font-size: 0.8125rem;
}

.tech-list-compact li::before {
    content: none;
}

.tech-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: var(--spacing-sm);
    font-size: 0.8125rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.tech-table thead {
    background: rgba(0, 0, 0, 0.2);
}

.tech-table th,
.tech-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.tech-table th {
    font-weight: 600;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}

.tech-table td {
    color: var(--text-primary);
}

.tech-table td:first-child {
    color: var(--text-secondary);
}

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

.tech-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Pin-specific styling */
.tech-table td:nth-child(2) {
    font-family: var(--font-mono);
    color: var(--primary-color);
}

/* Compact table variant */
.tech-table-compact th,
.tech-table-compact td {
    padding: 0.4rem 0.6rem;
}

.tech-table-compact td:first-child {
    width: 48px;
    text-align: center;
}

.tech-code {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    margin: var(--spacing-sm) 0;
    overflow-x: auto;
}

.tech-code code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.8125rem;
    color: var(--primary-color);
}

.hero-download {
    margin-top: 0;
    text-align: center;
}

.hero-download-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.app-store-link {
    display: inline-block;
    text-decoration: none;
}

.app-store-badge {
    height: 60px;
    width: auto;
    max-width: 180px;
    max-height: 60px;
    display: block;
    object-fit: contain;
}

.qr-code-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.qr-code-image {
    width: 200px;
    height: 200px;
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
}

.qr-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
}

.platform-requirements {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-lg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.platform-requirements h3 {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.requirement-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-top: var(--spacing-sm);
}

.requirement {
    text-align: left;
}

.requirement strong {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.requirement p {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    margin: 0;
}


/* ============================================
   Getting Started (path sequence)
   ============================================ */

.path-section {
    padding: var(--spacing-2xl) 0;
    background: #141414;
}

.path-title {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
}

.steps-sequence {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
    max-width: 1200px;
    margin: 0 auto;
}

.step-card {
    background: var(--card-background);
    padding: var(--spacing-lg);
    padding-top: calc(var(--spacing-lg) + 28px);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    position: relative;
    -webkit-transition: border-color 0.2s;
    transition: border-color 0.2s;
}

.step-card:hover {
    border-color: rgba(230, 194, 0, 0.25);
}

.step-label {
    position: absolute;
    top: -12px;
    left: var(--spacing-md);
    width: 28px;
    height: 28px;
    background: var(--primary-color);
    color: #000000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    z-index: 1;
}

.step-card h3 {
    margin-top: 0;
    margin-bottom: var(--spacing-md);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.step-card ol {
    padding-left: var(--spacing-md);
    margin: 0;
}

.step-card ol li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Copy button container */
.copy-container {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.copy-btn {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.4rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--text-secondary);
    min-width: 44px; /* WCAG touch target minimum */
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.copy-btn:hover {
    background: var(--primary-color);
    color: #000000;
    border-color: var(--primary-color);
    -webkit-transform: scale(1.1);
    transform: scale(1.1);
    box-shadow: 0 0 10px var(--primary-color);
}

.copy-btn:focus {
    outline: none;
}

.copy-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 2px var(--primary-color);
}

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

.copy-btn svg {
    display: block;
}

/* ============================================
   GitHub Section (one block)
   ============================================ */

.github-block {
    max-width: 560px;
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-xl);
}

.github-block:hover {
    border-color: rgba(230, 194, 0, 0.2);
}

.github-block-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-xs) 0;
}

.github-block-subtitle {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 0 0 var(--spacing-lg) 0;
}

.github-block-repo {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 var(--spacing-sm) 0;
}

.github-block-desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0 0 var(--spacing-lg) 0;
}

/* ============================================
   CTA Section
   ============================================ */

.cta-section {
    background: var(--background);
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.cta-section .container {
    text-align: center;
}

.cta-section h2 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    font-size: 1.25rem;
}

.cta-section p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: var(--spacing-lg);
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
}

/* ============================================
   Footer
   ============================================ */

.footer {
    color: var(--text-secondary);
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-section h3,
.footer-section h4 {
    color: var(--text-primary);
    font-size: 0.9375rem;
    margin-bottom: var(--spacing-sm);
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: center;
    align-items: center;
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    margin: 0;
}

.footer-bottom a {
    color: var(--text-secondary);
}

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

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

/* Tablet styles (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 var(--spacing-lg);
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        text-align: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

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

    .tech-reference-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

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

/* Mobile styles */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
    }

    .container {
        padding: 0 var(--spacing-sm);
        max-width: 100%;
        overflow-x: hidden;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
        text-align: center;
    }

    .hero-content {
        text-align: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .steps-sequence {
        grid-template-columns: 1fr;
    }

    .tech-reference-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

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

    .navbar .container {
        position: relative;
        padding: var(--spacing-sm);
        flex-wrap: nowrap;
        gap: var(--spacing-sm);
        overflow: visible;
        align-items: center;
        min-height: 60px;
        justify-content: flex-start;
    }

    .navbar {
        overflow: visible;
        position: relative;
    }

    .nav-brand {
        flex: 0 0 auto;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        order: 1;
        -webkit-order: 1;
        margin-right: 0;
    }

    .nav-brand h1 {
        font-size: 1.1rem;
    }

    .nav-brand .logo {
        height: 32px;
    }

    .navbar .container > .nav-menu {
        order: 999;
        -webkit-order: 999;
        margin-left: 0;
        margin-right: 0;
    }

    /* Language Selector - Mobile */
    .navbar .container > .lang-selector {
        order: 2;
        -webkit-order: 2;
        margin-left: auto;
        margin-right: 0.25rem;
        z-index: 1002;
        position: relative;
    }
    
    .navbar .container > .lang-selector .lang-toggle {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        min-height: 44px;
        min-width: 70px;
    }

    .lang-dropdown {
        position: absolute;
        right: 0;
        left: auto;
        min-width: 140px;
        z-index: 1003;
        top: calc(100% + 0.25rem);
    }
    
    .lang-dropdown li {
        margin: 0;
        padding: 0;
        list-style: none;
    }
    
    .lang-dropdown a {
        display: flex;
        align-items: center;
        padding: 0.75rem 1rem;
        color: #000000;
        min-height: 44px;
    }

    .navbar .container > .nav-toggle {
        order: 3;
        -webkit-order: 3;
        margin-left: 0;
        margin-right: 0;
        display: flex;
        flex-shrink: 0;
        z-index: 1000;
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
        padding: 0.75rem;
        overflow: hidden;
        justify-content: center;
        align-items: center;
        background: transparent;
        position: relative;
        flex-direction: column;
        gap: 6px;
    }
    
    .navbar .container > .nav-toggle span {
        width: 24px;
        height: 3px;
        background-color: #000000;
        display: block;
        position: relative;
        flex-shrink: 0;
        margin: 0;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        margin-top: 0;
        padding: var(--spacing-sm);
        background-color: var(--primary-color);
        border-top: 1px solid rgba(0, 0, 0, 0.2);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        -webkit-transition: opacity 0.3s ease;
        transition: opacity 0.3s ease;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu li a {
        display: block;
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.95rem;
        width: 100%;
    }

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

    .hero-actions .btn {
        width: 100%;
    }

    /* Fix hardware and command cards overflow */
    .tech-block {
        padding: var(--spacing-md);
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .hero-download-content {
        flex-direction: column;
        gap: var(--spacing-lg);
    }

    .qr-code-container {
        margin-top: var(--spacing-md);
    }

    .tech-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        font-size: 0.75rem;
    }

    .tech-table thead {
        display: table-header-group;
    }

    .tech-table tbody {
        display: table-row-group;
    }

    .tech-table tr {
        display: table-row;
    }

    .tech-table th,
    .tech-table td {
        display: table-cell;
        white-space: nowrap;
        padding: 0.4rem 0.5rem;
    }

    .tech-table-compact td:first-child {
        min-width: 44px;
        width: 44px;
    }

    /* Ensure sections don't overflow */
    section {
        overflow-x: hidden;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-3xl: 3rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.75rem;
    }
}

/* ============================================
   Privacy & Terms Pages
   ============================================ */

.legal-page {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-3xl) var(--spacing-md);
}

.legal-page h1 {
    margin-bottom: var(--spacing-md);
}

.legal-page .last-updated {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: var(--spacing-xl);
}

.legal-page h2 {
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
}

.legal-page h3 {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
}

.legal-page ul,
.legal-page ol {
    margin-left: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.legal-page li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.legal-page p {
    margin-bottom: var(--spacing-md);
}

.legal-page strong {
    color: var(--text-primary);
}

.legal-page .highlight-box {
    background-color: rgba(255, 215, 0, 0.1);
    border-left: 4px solid var(--primary-color);
    padding: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.back-link {
    display: inline-block;
    margin-bottom: var(--spacing-lg);
    color: var(--primary-color);
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

.back-link:focus {
    outline: none;
}

.back-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .navbar,
    .lang-selector,
    .nav-toggle,
    .nav-menu,
    .hero-download,
    .qr-code-container,
    .skip-link {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    a {
        color: #0000ee;
        text-decoration: underline;
    }

    .btn {
        border: 1px solid #000;
        background: transparent;
        color: #000;
    }

    .tech-block,
    .step-card {
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}