/*
 * THE ROSETTA ENGINE - Unified Theme
 * Soul Science Aesthetic: Hazels, Pale Blues, Cosmic Vignette
 * [1 = -1]
 *
 * Version 1.0 | January 6, 2026
 * Have Mind Media / The Epoch Project
 */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Core Colors - Soul Science Palette */
    --void: #030508;
    --deep-space: #0a0d12;
    --cosmic-dark: #0f1318;
    --panel: #151a24;
    --panel-light: #1a2030;

    /* Earth Tones */
    --earth-deep: #1a1510;
    --earth-warm: #2a2318;
    --hazel: #8b7355;
    --hazel-light: #a89070;

    /* Blues - Primary */
    --nebula-blue: #1a2a3a;
    --glow-blue: #4a8ec8;
    --bright-blue: #6ab4f5;
    --soft-blue: #a8d4f5;
    --pale-blue: #d0e8f8;

    /* Accents */
    --gold-deep: #8b6914;
    --gold: #c9a227;
    --gold-light: #e8c84a;
    --accent-warm: #a85a48;

    /* D-Position Colors */
    --d1-color: #3fb950;
    --d2-color: #1abc9c;
    --d3-color: #ff6b6b;
    --d4-color: #ff6b35;
    --d5-color: #9b59b6;
    --d6-color: #00bcd4;
    --d7-color: #c9a227;
    --d8-color: #006994;
    --d9-color: #c0392b;

    /* Triaxial Colors */
    --splus-color: #c9a227;
    --sminus-color: #6ab4f5;
    --coin-color: #d4a8e0;

    /* Text */
    --soft-cream: #f0e8d8;
    --pale-cream: #faf6ee;
    --text-dim: #8a9aaa;

    /* Borders */
    --border: rgba(70, 130, 180, 0.25);
    --border-light: rgba(70, 130, 180, 0.4);

    /* Fonts */
    --font-display: 'Cinzel', Georgia, serif;
    --font-body: 'Cormorant Garamond', Georgia, serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Transitions */
    --transition-smooth: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.3s ease;
}

/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--void);
    color: var(--soft-cream);
    line-height: 1.8;
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 18px;
}

/* ==========================================
   COSMIC BACKGROUND
   ========================================== */

.cosmic-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -3;
    background:
        radial-gradient(ellipse at 15% 20%, rgba(74, 142, 200, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 25%, rgba(106, 180, 245, 0.08) 0%, transparent 45%),
        radial-gradient(ellipse at 60% 75%, rgba(74, 142, 200, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 25% 80%, rgba(139, 105, 20, 0.06) 0%, transparent 40%),
        radial-gradient(ellipse at 70% 50%, rgba(26, 42, 58, 0.4) 0%, transparent 60%),
        radial-gradient(ellipse at center, var(--deep-space) 0%, var(--void) 100%);
}

.stars {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -2;
    background:
        radial-gradient(1px 1px at 100px 50px, rgba(168, 212, 245, 0.9), transparent),
        radial-gradient(1px 1px at 250px 150px, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(2px 2px at 400px 80px, rgba(168, 212, 245, 0.8), transparent),
        radial-gradient(1px 1px at 550px 200px, rgba(201, 162, 39, 0.5), transparent),
        radial-gradient(1px 1px at 700px 120px, rgba(255, 255, 255, 0.6), transparent);
    background-size: 1200px 600px;
    animation: twinkle 15s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.vignette {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    background: radial-gradient(ellipse at center, transparent 0%, transparent 40%, rgba(3, 5, 8, 0.7) 100%);
    pointer-events: none;
}

/* ==========================================
   NAVIGATION
   ========================================== */

.unified-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(3, 5, 8, 0.92);
    backdrop-filter: blur(12px);
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.nav-brand-text {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--gold);
    letter-spacing: 3px;
}

.nav-signature {
    font-size: 0.7rem;
    color: var(--soft-blue);
    opacity: 0.6;
    letter-spacing: 2px;
}

.nav-principle {
    font-family: var(--font-mono);
    color: var(--gold);
    font-size: 0.9rem;
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 400;
    color: var(--pale-cream);
    letter-spacing: 2px;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.8rem; color: var(--soft-blue); text-align: center; }
h3 { font-size: 1.4rem; color: var(--gold); }

p {
    color: var(--soft-cream);
    opacity: 0.9;
    margin-bottom: 1rem;
}

a {
    color: var(--bright-blue);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--pale-blue);
}

/* ==========================================
   MAIN LAYOUT
   ========================================== */

.rosetta-container {
    position: relative;
    z-index: 1;
    padding-top: 80px;
    min-height: 100vh;
}

.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* ==========================================
   HERO WITH 3D STONE
   ========================================== */

.hero-stone {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    min-height: 70vh;
    padding: 2rem 0 4rem;
}

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

.hero-content h1 {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--gold), #ffd700, var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.hero-tagline {
    font-size: 1.4rem;
    color: var(--soft-blue);
    font-style: italic;
    margin-bottom: 2rem;
}

/* Translation Box */
.translation-box {
    width: 100%;
    max-width: 500px;
    margin-bottom: 2rem;
}

.translation-input-wrapper {
    display: flex;
    gap: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(201, 162, 39, 0.2);
}

.translation-input {
    flex: 1;
    padding: 1.2rem 1.5rem;
    font-size: 1.2rem;
    background: var(--panel);
    border: 2px solid var(--gold);
    border-right: none;
    border-radius: 12px 0 0 12px;
    color: var(--soft-cream);
    font-family: var(--font-body);
}

.translation-input:focus {
    outline: none;
    background: var(--panel-light);
}

.translation-input::placeholder {
    color: var(--text-dim);
}

.translate-btn {
    padding: 1.2rem 2rem;
    font-size: 1rem;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--void);
    border: none;
    border-radius: 0 12px 12px 0;
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 2px;
    transition: var(--transition-fast);
}

.translate-btn:hover {
    background: linear-gradient(135deg, var(--gold-light), #ffd700);
    transform: scale(1.02);
}

.translation-hint {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-top: 0.75rem;
    font-style: italic;
}

/* Translation Result */
.translation-result {
    display: none;
    width: 100%;
    max-width: 500px;
    background: var(--panel);
    border: 2px solid var(--gold);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.translation-result.show {
    display: block;
}

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

.result-word {
    font-size: 1.5rem;
    color: var(--soft-blue);
    margin-bottom: 0.5rem;
    font-family: var(--font-display);
    letter-spacing: 3px;
}

.result-arrow {
    font-size: 2rem;
    color: var(--gold);
    margin: 0.5rem 0;
}

.result-d-position {
    font-size: 3rem;
    font-family: var(--font-display);
    margin-bottom: 0.5rem;
}

.result-meaning {
    font-size: 1.2rem;
    color: var(--soft-cream);
    font-style: italic;
}

.result-breakdown {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.8;
}

/* Stone Viewer */
.stone-viewer {
    display: flex;
    justify-content: center;
    align-items: center;
}

.stone-frame {
    width: 100%;
    max-width: 550px;
    position: relative;
}

.stone-video-wrapper {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 0 60px rgba(201, 162, 39, 0.3),
        0 0 120px rgba(201, 162, 39, 0.15);
    border: 2px solid rgba(201, 162, 39, 0.4);
    animation: stoneGlow 4s ease-in-out infinite;
}

@keyframes stoneGlow {
    0%, 100% {
        box-shadow:
            0 0 60px rgba(201, 162, 39, 0.3),
            0 0 120px rgba(201, 162, 39, 0.15);
    }
    50% {
        box-shadow:
            0 0 80px rgba(201, 162, 39, 0.4),
            0 0 160px rgba(201, 162, 39, 0.2);
    }
}

.stone-video-wrapper video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 14px;
}

.sketchfab-embed-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 120%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 0 60px rgba(201, 162, 39, 0.3),
        0 0 120px rgba(201, 162, 39, 0.15);
    border: 2px solid rgba(201, 162, 39, 0.4);
}

.sketchfab-embed-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.stone-credit {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-dim);
    font-style: italic;
}

/* ==========================================
   EXPLANATION SECTION
   ========================================== */

.explanation-section {
    padding: 4rem 0;
}

.explanation-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 3rem;
    max-width: 1100px;
    margin: 0 auto;
}

.explanation-card h2 {
    margin-bottom: 1.5rem;
}

.explanation-lead {
    font-size: 1.3rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
    line-height: 1.9;
}

.explanation-lead strong {
    color: var(--gold);
}

.explanation-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.explanation-item {
    text-align: center;
    padding: 1.5rem;
}

.explanation-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--gold);
}

.explanation-item h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.explanation-item p {
    font-size: 1rem;
    color: var(--soft-cream);
    opacity: 0.85;
}

/* ==========================================
   D-POSITION SECTION
   ========================================== */

.positions-section {
    padding: 4rem 0;
    text-align: center;
}

.positions-section h2 {
    margin-bottom: 1rem;
}

.section-intro {
    max-width: 600px;
    margin: 0 auto 3rem;
    color: var(--text-dim);
    font-size: 1.1rem;
}

.d-position-wheel {
    display: flex;
    justify-content: center;
    align-items: center;
}

.d-grid-centered {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 0.75rem;
    max-width: 900px;
    width: 100%;
}

.d-position-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    background: var(--panel);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: var(--font-display);
    padding: 0.5rem;
}

.d-position-btn:hover {
    border-color: var(--d-color, var(--gold));
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.d-position-btn.active {
    border-color: var(--d-color, var(--gold));
    background: rgba(201, 162, 39, 0.15);
    box-shadow: 0 0 30px rgba(201, 162, 39, 0.4);
    transform: scale(1.08);
}

.d-position-btn.emergent {
    border-style: dashed;
}

.d-position-btn .d-number {
    font-size: 1.8rem;
    color: var(--d-color, var(--gold));
    font-weight: 600;
}

.d-position-btn .d-name {
    font-size: 0.65rem;
    color: var(--text-dim);
    text-align: center;
    line-height: 1.2;
    margin-top: 0.25rem;
}

/* ==========================================
   COMPARISON SECTION
   ========================================== */

.comparison-section {
    padding: 4rem 0;
}

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

.comparison-header {
    text-align: center;
    margin-bottom: 2rem;
}

.comparison-header h2 {
    margin-bottom: 0.5rem;
}

.d-meaning {
    font-style: italic;
    color: var(--text-dim);
    font-size: 1.1rem;
}

.script-comparison-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.script-column {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    border-top: 3px solid var(--script-color, var(--gold));
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

.script-column[data-script="voynich"] { --script-color: #6ab4f5; border-top-color: #6ab4f5; }
.script-column[data-script="indus"] { --script-color: #c9a227; border-top-color: #c9a227; }
.script-column[data-script="linearA"] { --script-color: #3fb950; border-top-color: #3fb950; }
.script-column[data-script="rongorongo"] { --script-color: #ff6b6b; border-top-color: #ff6b6b; }
.script-column[data-script="phaistos"] { --script-color: #9b59b6; border-top-color: #9b59b6; }

.script-header {
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.script-header h3 {
    color: var(--script-color, var(--gold));
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.script-period {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.symbol-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.symbol-placeholder-msg {
    color: var(--text-dim);
    text-align: center;
    font-style: italic;
    font-size: 0.9rem;
    padding: 2rem 0.5rem;
    opacity: 0.6;
}

.symbol-card {
    display: flex;
    gap: 0.75rem;
    padding: 0.6rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    align-items: center;
}

.symbol-card:hover {
    background: rgba(70, 130, 180, 0.15);
    transform: translateX(4px);
}

.symbol-icon {
    width: 40px;
    height: 40px;
    background: var(--panel-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--gold);
    font-family: var(--font-display);
    flex-shrink: 0;
}

.symbol-info {
    flex: 1;
    min-width: 0;
}

.symbol-name {
    color: var(--soft-cream);
    font-weight: 500;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.symbol-basis {
    font-size: 0.7rem;
    color: var(--text-dim);
    font-style: italic;
}

/* ==========================================
   STATISTICS SECTION
   ========================================== */

.statistics-section {
    padding: 2rem 0 4rem;
}

.stats-container {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.stats-container h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.stats-content {
    color: var(--text-dim);
}

.stats-placeholder {
    font-style: italic;
    padding: 1rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-label {
    color: var(--text-dim);
}

.stat-value {
    font-family: var(--font-mono);
    color: var(--soft-cream);
}

/* Triaxial State Visualization */
.triaxial-state {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.triaxial-state h4 {
    font-size: 0.9rem;
    color: var(--soft-blue);
    margin-bottom: 1rem;
}

.triaxial-bars {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.triaxial-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bar-label {
    width: 40px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
}

.bar-track {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.bar-fill.splus { background: var(--splus-color); }
.bar-fill.sminus { background: var(--sminus-color); }
.bar-fill.coin { background: var(--coin-color); }

.bar-value {
    width: 40px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--soft-cream);
    text-align: right;
}

/* ==========================================
   FRAMEWORK SECTION
   ========================================== */

.framework-section {
    padding: 2rem 0 4rem;
}

.framework-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 3rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.framework-card h2 {
    margin-bottom: 2rem;
}

.framework-content p {
    max-width: 600px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.framework-equation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.framework-equation .kappa {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--gold);
}

.framework-equation .equals {
    font-size: 1.5rem;
    color: var(--text-dim);
}

.framework-equation .value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--soft-blue);
}

.principle-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 2rem;
    background: rgba(201, 162, 39, 0.1);
    border: 2px solid var(--gold);
    border-radius: 12px;
    display: inline-flex;
}

.principle-box .principle {
    font-family: var(--font-mono);
    font-size: 2rem;
    color: var(--gold);
}

.principle-box .principle-meaning {
    font-size: 1rem;
    color: var(--soft-blue);
    font-style: italic;
}

/* ==========================================
   EXPORT SECTION
   ========================================== */

.export-section {
    text-align: center;
    padding: 2rem 0;
}

/* ==========================================
   FOOTER
   ========================================== */

.unified-footer {
    text-align: center;
    padding: 3rem 2rem;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--gold);
    letter-spacing: 3px;
    margin-bottom: 0.3rem;
}

.footer-tagline {
    color: var(--soft-blue);
    font-style: italic;
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

.footer-principle {
    font-family: var(--font-mono);
    color: var(--gold);
    opacity: 0.5;
    font-size: 0.9rem;
}

.footer-credit {
    margin-top: 1rem;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.footer-source {
    margin-top: 0.5rem;
    color: var(--text-dim);
    font-size: 0.75rem;
    opacity: 0.6;
}

/* ==========================================
   BUTTONS
   ========================================== */

.btn {
    font-family: var(--font-display);
    padding: 0.8rem 1.5rem;
    font-size: 0.85rem;
    letter-spacing: 2px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: transparent;
    color: var(--bright-blue);
    border: 1px solid var(--border);
}

.btn-primary:hover {
    background: rgba(70, 130, 180, 0.15);
    border-color: var(--bright-blue);
}

.btn-gold {
    background: transparent;
    color: var(--gold);
    border: 1px solid rgba(201, 162, 39, 0.4);
}

.btn-gold:hover {
    background: rgba(201, 162, 39, 0.1);
    border-color: var(--gold);
}

/* ==========================================
   MODAL
   ========================================== */

#symbol-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
}

#symbol-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: var(--soft-cream);
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 1200px) {
    .script-comparison-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .hero-stone {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-content {
        order: 1;
    }

    .stone-viewer {
        order: 2;
    }

    .d-grid-centered {
        grid-template-columns: repeat(5, 1fr);
    }

    .explanation-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

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

@media (max-width: 768px) {
    .unified-nav {
        padding: 0.6rem 1rem;
    }

    .nav-brand-text {
        font-size: 0.85rem;
        letter-spacing: 2px;
    }

    .nav-signature {
        display: none;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-tagline {
        font-size: 1.1rem;
    }

    .d-grid-centered {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .d-position-btn .d-number {
        font-size: 1.4rem;
    }

    .d-position-btn .d-name {
        font-size: 0.55rem;
    }

    .script-comparison-grid {
        grid-template-columns: 1fr;
    }

    .translation-input-wrapper {
        flex-direction: column;
        border-radius: 12px;
    }

    .translation-input {
        border-radius: 12px 12px 0 0;
        border-right: 2px solid var(--gold);
        border-bottom: none;
    }

    .translate-btn {
        border-radius: 0 0 12px 12px;
    }
}
