:root {
    --bg: #0a0b0d;
    --panel: #111316;
    --panel-2: #181a1f;
    --panel-glass: rgba(17, 19, 22, 0.75);
    --bronze: #b98e59;
    --copper: #9b6c43;
    --bronze-light: #f5d7b5;
    --blue: #00e5ff;
    --blue-glow: rgba(0, 229, 255, 0.4);
    --line: #2a2d35;
    --text: #e0e2e6;
    --muted: #888c96;
    
    --font-heading: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    background-image: radial-gradient(circle at 50% 0%, #15181d 0%, var(--bg) 70%);
}

/* Typography Utilities */
h1, h2, h3, h4, .brand-title {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.bronze-text {
    background: linear-gradient(135deg, var(--bronze-light), var(--bronze), var(--copper));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Layout */
.app-container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.screen {
    display: none;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 2rem;
    animation: fadeIn 0.5s ease-out forwards;
}

.screen.active {
    display: flex;
}

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

/* Top Rail */
.top-rail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--line);
    margin-bottom: 3rem;
}

.rail-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    color: var(--bronze);
}

.v-icon-small {
    font-size: 1.2rem;
    font-weight: 700;
}

.rail-actions {
    display: flex;
    gap: 0.5rem;
}

.rail-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--line);
}

/* Progress Rail */
.progress-rail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--line);
    margin-bottom: 2rem;
}

.progress-text {
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    color: var(--muted);
    font-weight: 600;
}

.progress-dots {
    display: flex;
    gap: 0.75rem;
}

.p-dot {
    width: 30px;
    height: 2px;
    background-color: var(--line);
    transition: all 0.3s ease;
}

.p-dot.active {
    background-color: var(--bronze);
}

.p-dot.glow {
    background-color: var(--blue);
    box-shadow: 0 0 10px var(--blue-glow);
}

/* Buttons */
button {
    font-family: var(--font-heading);
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, var(--bronze-light), var(--bronze), var(--copper));
    color: #000;
    padding: 1.2rem 2.5rem;
    font-size: 1rem;
    border-radius: 2px;
    box-shadow: 0 4px 15px rgba(185, 142, 89, 0.2);
}

.btn-primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 20px rgba(185, 142, 89, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--bronze);
    padding: 1rem 2.5rem;
    font-size: 0.9rem;
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(185, 142, 89, 0.1);
}

.btn-secondary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: var(--line);
}

.btn-secondary.glow:not(:disabled), .blue-glow {
    border-color: var(--blue);
    color: var(--blue);
    box-shadow: 0 0 15px var(--blue-glow), inset 0 0 10px var(--blue-glow);
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
    padding: 1rem 2rem;
    font-size: 0.9rem;
}

.btn-ghost:hover {
    color: var(--text);
}

.btn-icon {
    background: var(--panel-2);
    border: 1px solid var(--line);
    color: var(--bronze);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Landing Screen */
.landing-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    flex: 1;
    align-items: center;
}

.brand-block {
    margin-bottom: 2rem;
}

.brand-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff, var(--text), var(--muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-subtitle {
    font-size: 1rem;
    color: var(--bronze);
    letter-spacing: 0.2em;
}

.landing-copy {
    font-size: 1.2rem;
    color: var(--muted);
    margin-bottom: 3rem;
    max-width: 450px;
}

.stat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
    max-width: 500px;
}

.stat-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.icon-dot {
    width: 4px;
    height: 4px;
    background: var(--bronze);
    border-radius: 50%;
}

.micro-copy {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 1.5rem;
    font-style: italic;
}

/* Portals & Emblems */
.portal-chamber {
    position: relative;
    width: 100%;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, var(--panel-2) 0%, transparent 70%);
    border-radius: 50%;
}

.chamber-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--blue);
    filter: blur(150px);
    opacity: 0.1;
}

.v-emblem-large {
    font-family: var(--font-heading);
    font-size: 180px;
    background: linear-gradient(135deg, var(--bronze-light), var(--bronze), var(--copper));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px rgba(185, 142, 89, 0.2));
    z-index: 2;
}

.v-emblem-large.glowing {
    background: linear-gradient(135deg, #fff, var(--blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px var(--blue-glow));
}

.chamber-rings {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(185, 142, 89, 0.1);
}

.r1 { width: 400px; height: 400px; border-style: dashed; }
.r2 { width: 500px; height: 500px; }
.r3 { width: 600px; height: 600px; border-color: rgba(0, 229, 255, 0.05); }

/* Dashboard Split */
.dashboard-split {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    flex: 1;
}

.panel {
    background: var(--panel-glass);
    border: 1px solid var(--line);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
}

.panel-title {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.panel-desc {
    color: var(--muted);
    font-size: 1rem;
    margin-bottom: 2.5rem;
}

/* Grids & Cards */
.receipts-grid, .memory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.option-card {
    background: var(--panel-2);
    border: 1px solid var(--line);
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.option-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--line);
    transition: all 0.3s ease;
}

.option-card:hover {
    border-color: var(--bronze);
    background: var(--panel);
}

.option-card:hover::before {
    background: var(--bronze);
}

.option-card.selected {
    border-color: var(--blue);
    background: rgba(0, 229, 255, 0.05);
}

.option-card.selected::before {
    background: var(--blue);
    box-shadow: 0 0 10px var(--blue);
}

.card-icon {
    color: var(--bronze);
    font-size: 1.2rem;
    line-height: 1;
}

.option-card.selected .card-icon {
    color: var(--blue);
}

.card-text {
    font-size: 0.95rem;
    color: var(--text);
}

/* Form Inputs */
.custom-input-group {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.input-metallic {
    flex: 1;
    background: var(--panel-2);
    border: 1px solid var(--line);
    padding: 1rem 1.5rem;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
}

.input-metallic:focus {
    outline: none;
    border-color: var(--bronze);
}

/* Sidebars */
.side-title {
    font-size: 1rem;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.selected-count {
    font-family: var(--font-heading);
    color: var(--bronze);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.selected-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.selected-item {
    font-size: 0.85rem;
    color: var(--text);
    padding: 0.75rem;
    background: rgba(255,255,255,0.03);
    border-left: 2px solid var(--blue);
}

.empty-state {
    color: var(--muted);
    font-size: 0.9rem;
    font-style: italic;
}

.side-visual {
    margin-top: auto;
    display: flex;
    justify-content: center;
    padding-top: 2rem;
}

.v-emblem-medium {
    font-family: var(--font-heading);
    font-size: 80px;
    color: var(--line);
}

/* Action Bars */
.action-bar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 0 0 0;
    margin-top: auto;
}

/* Visual Panels (Radar / Portals) */
.visual-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
}

.vertical-portal {
    position: relative;
    height: 100%;
    width: 2px;
    background: var(--line);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.portal-node {
    width: 12px;
    height: 12px;
    background: var(--bg);
    border: 2px solid var(--bronze);
    border-radius: 50%;
}

.portal-node.center {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--panel);
}

.v-emblem-small {
    font-family: var(--font-heading);
    font-size: 24px;
    color: var(--bronze);
}

.radar-visual {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(0, 229, 255, 0.15);
}

.rr1 { width: 100%; height: 100%; border-style: dashed; }
.rr2 { width: 66%; height: 66%; }
.rr3 { width: 33%; height: 33%; background: rgba(0, 229, 255, 0.02); }

.radar-center {
    width: 40px;
    height: 40px;
    background: var(--panel);
    border: 1px solid var(--blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px var(--blue-glow);
    z-index: 2;
}

.radar-sweep {
    position: absolute;
    width: 50%;
    height: 50%;
    top: 0;
    right: 0;
    transform-origin: bottom left;
    background: linear-gradient(45deg, transparent, rgba(0, 229, 255, 0.1));
    border-right: 1px solid var(--blue);
    animation: sweep 4s linear infinite;
    border-radius: 0 150px 0 0;
}

@keyframes sweep {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Lens Questions */
.lens-questions {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.lens-block h4 {
    font-size: 1.1rem;
    color: var(--bronze);
    margin-bottom: 1rem;
    font-family: var(--font-body);
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
}

.lens-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Review Dashboard */
.review-dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.review-card {
    background: var(--panel-2);
    border: 1px solid var(--line);
    padding: 1.5rem;
}

.review-label {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 1rem;
}

.review-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.r-chip {
    background: rgba(0, 229, 255, 0.05);
    border: 1px solid var(--blue);
    color: var(--blue);
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.review-value {
    font-size: 1.1rem;
    font-weight: 500;
}

.review-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.review-list li {
    font-size: 0.95rem;
    color: var(--text);
    padding-left: 1rem;
    border-left: 1px solid var(--bronze);
}

/* Results Dashboard */
.results-dashboard {
    display: grid;
    grid-template-columns: 350px 1fr 300px;
    gap: 2rem;
    flex: 1;
}

.signature-card {
    background: var(--panel-glass);
    border: 1px solid var(--blue);
    box-shadow: inset 0 0 30px rgba(0, 229, 255, 0.05);
    padding: 3rem 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.sig-medallion-container {
    margin-bottom: 2rem;
}

.sig-medallion {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 60px;
    background: var(--panel);
}

.blue-glow-intense {
    border: 2px solid var(--blue);
    color: var(--blue);
    box-shadow: 0 0 30px var(--blue-glow), inset 0 0 20px var(--blue-glow);
    text-shadow: 0 0 10px var(--blue);
}

.signature-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #fff, var(--text));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sig-stats {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: auto;
}

.stat-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.15em;
}

.stat-value {
    font-size: 1.1rem;
    color: var(--bronze);
    font-weight: 500;
}

.insight-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(min-content, max-content);
    gap: 1.5rem;
    height: 100%;
}

.insight-card {
    background: var(--panel-glass);
    border: 1px solid var(--line);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.insight-card.highlight-card {
    border-color: var(--bronze);
    background: linear-gradient(180deg, rgba(185, 142, 89, 0.05) 0%, transparent 100%);
}

.insight-label {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--muted);
}

.insight-body {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.6;
}

.private-division-panel {
    background: var(--panel-glass);
    border: 1px solid var(--line);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.division-title {
    font-size: 1.2rem;
    color: var(--text);
    margin-bottom: 1.5rem;
    letter-spacing: 0.15em;
}

.division-copy {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 3rem;
}

.division-seal {
    font-family: var(--font-heading);
    font-size: 40px;
    color: var(--line);
    width: 80px;
    height: 80px;
    border: 1px solid var(--line);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.results-actions {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
    justify-content: center;
}

/* Utilities */
.mt-auto { margin-top: auto; }
.btn-sm { padding: 0.75rem 1.5rem; font-size: 0.8rem; }

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 11, 13, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    animation: fadeInModal 0.3s forwards;
}

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

.modal-panel {
    max-width: 500px;
    width: 100%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5), inset 0 0 20px rgba(185, 142, 89, 0.05);
    max-height: 90vh;
    overflow-y: auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.85rem;
    color: var(--muted);
    letter-spacing: 0.05em;
    font-family: var(--font-heading);
}

.w-100 {
    width: 100%;
}

.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.text-center { text-align: center; }

.error-text {
    color: #ff6b6b;
    font-size: 0.85rem;
    min-height: 1.2rem;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Responsive Media Queries */
@media (max-width: 1200px) {
    .results-dashboard {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .signature-card {
        padding: 2rem;
    }
    
    .insight-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 1024px) {
    .landing-layout {
        grid-template-columns: 1fr;
    }
    
    .portal-chamber {
        height: 400px;
    }
    
    .dashboard-split {
        grid-template-columns: 1fr;
    }
    
    .reverse-mobile {
        display: flex;
        flex-direction: column-reverse;
    }
    
    .visual-panel {
        display: none;
    }
    
    .side-panel {
        min-height: 200px;
    }
}

@media (max-width: 768px) {
    .app-container {
        padding: 0 1rem;
    }
    
    .brand-title {
        font-size: 2.5rem;
    }
    
    .lens-options {
        grid-template-columns: 1fr;
    }
    
    .insight-grid {
        grid-template-columns: 1fr;
    }
    
    .action-bar {
        flex-direction: column-reverse;
        gap: 1rem;
    }
    
    .action-bar button {
        width: 100%;
    }
    
    .progress-dots {
        display: none;
    }
}

/* STEP NAVIGATION POSITION LOCK */

.step-actions,
.step-footer,
.nav-actions,
.panel-actions,
.wizard-actions,
.action-row,
.action-bar:not(.results-actions) {
  justify-content: flex-start !important;
  align-items: center !important;
}

#step-compliments .step-actions,
#step-compliments .step-footer,
#step-compliments .nav-actions,
#step-compliments .panel-actions,
#step-impact .step-actions,
#step-impact .step-footer,
#step-impact .nav-actions,
#step-impact .panel-actions,
#step-lens .step-actions,
#step-lens .step-footer,
#step-lens .nav-actions,
#step-lens .panel-actions,
#step-review .step-actions,
#step-review .step-footer,
#step-review .nav-actions,
#step-review .panel-actions {
  display: flex !important;
  justify-content: flex-start !important;
  gap: 18px !important;
  width: 100% !important;
}

#btn-compliments-back,
#btn-compliments-next,
#btn-impact-back,
#btn-impact-next,
#btn-lens-back,
#btn-lens-next,
#btn-review-back,
#btn-generate {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* OVERRIDES FOR OVERSIZED RESULT CARDS */
#screen-6 .results-dashboard {
  flex: 0 0 auto;
  align-items: start;
}

#screen-6 .insight-grid {
  height: auto;
  align-content: start;
  align-items: start;
  grid-auto-rows: auto;
}

#screen-6 .insight-card {
  height: auto;
  min-height: 0;
  align-self: start;
}

#screen-6 .insight-body {
  margin-bottom: 0;
}