/* Numerology Items */
.js-numerology-item {
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.js-numerology-item:hover {
    transform: scale(1.05);
}

.js-numerology-title {
    font-weight: 600;
    color: #374151;
}

.js-numerology-value {
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 700;
    color: #4f46e5;
}

/* Tooltip */
#numerology-tooltip {
    position: fixed !important;
    z-index: 9999 !important;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
    border-radius: 1rem !important;
    transition: opacity 0.15s ease-out !important;
}

/* Sticky Footer */
html, body {
    height: 100%;
}
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main {
    flex: 1 0 auto;
}
footer {
    flex-shrink: 0;
}

/* Modern Card Form */
.numerology-form-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-radius: 1.5rem;
    box-shadow: 0 20px 45px -15px rgba(30, 27, 75, 0.08), 0 0 0 1px rgba(226, 232, 240, 0.85);
    padding: 2rem 1.75rem;
    margin: 2rem auto;
    max-width: 40rem;
    width: 100%;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
@media (min-width: 640px) {
    .numerology-form-card {
        padding: 2.75rem 2.5rem;
    }
}
.numerology-form-card:hover {
    box-shadow: 0 25px 50px -12px rgba(30, 27, 75, 0.12), 0 0 0 1px rgba(99, 102, 241, 0.2);
}

/* Chrome autofill background fix - prevent washed out light blue */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
    -webkit-text-fill-color: #0f172a !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Improved Dropdown */
.styled-dropdown {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    padding: 0.5rem 2.25rem 0.5rem 0.875rem;
    font-size: 0.925rem;
    color: #334155;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="none" stroke="%236366f1" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M19 9l-7 7-7-7"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.1em;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.styled-dropdown:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    outline: none;
}

/* Improved Buttons */
.styled-btn {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #7c3aed 100%);
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 0.75rem;
    padding: 0.625rem 1.5rem;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px -2px rgba(79, 70, 229, 0.35);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.styled-btn:hover, .styled-btn:focus-visible {
    background: linear-gradient(135deg, #4338ca 0%, #4f46e5 50%, #6d28d9 100%);
    box-shadow: 0 8px 20px -3px rgba(79, 70, 229, 0.45);
    transform: translateY(-1px);
}
.styled-btn:active {
    transform: translateY(0) scale(0.98);
}

.styled-btn-secondary {
    background: #f8fafc;
    color: #334155;
    font-weight: 600;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.95rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.styled-btn-secondary:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
    transform: translateY(-1px);
}

.styled-btn-ghost {
    background: transparent;
    color: #475569;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.95rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.styled-btn-ghost:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

/* Interactive 9-Cell Grid & Arrows */
.matrix-cell {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s, opacity 0.2s;
    user-select: none;
}
.matrix-cell:hover {
    transform: translateY(-2px) scale(1.03);
}
.matrix-cell.cell-highlight-strength {
    background-color: #ecfdf5 !important;
    color: #065f46 !important;
    border-color: #10b981 !important;
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.4), 0 8px 10px -6px rgba(16, 185, 129, 0.2) !important;
}
.matrix-cell.cell-highlight-empty {
    background-color: #fff1f2 !important;
    color: #9f1239 !important;
    border-color: #f43f5e !important;
    box-shadow: 0 10px 25px -5px rgba(244, 63, 94, 0.4), 0 8px 10px -6px rgba(244, 63, 94, 0.2) !important;
}
.matrix-cell.cell-highlight-isolated {
    background-color: #faf5ff !important;
    color: #6b21a8 !important;
    border-color: #a855f7 !important;
    box-shadow: 0 10px 25px -5px rgba(168, 85, 247, 0.4), 0 8px 10px -6px rgba(168, 85, 247, 0.2) !important;
}
.matrix-cell.cell-highlight-selected {
    background-color: #eef2ff !important;
    color: #312e81 !important;
    border-color: #4f46e5 !important;
    box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.4), 0 8px 10px -6px rgba(79, 70, 229, 0.2) !important;
}

.arrow-chip {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}
.arrow-chip:hover {
    transform: translateY(-1px);
}
.arrow-chip.active-chip {
    background-color: #059669 !important;
    color: #ffffff !important;
    border-color: #047857 !important;
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.4), 0 0 0 2px #ffffff, 0 0 0 4px #10b981 !important;
    transform: translateY(-1px) scale(1.02);
}
.arrow-chip.active-chip span:last-child {
    background-color: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}
.arrow-chip.active-empty-chip {
    background-color: #e11d48 !important;
    color: #ffffff !important;
    border-color: #be123c !important;
    box-shadow: 0 4px 14px 0 rgba(244, 63, 94, 0.4), 0 0 0 2px #ffffff, 0 0 0 4px #f43f5e !important;
    transform: translateY(-1px) scale(1.02);
}
.arrow-chip.active-empty-chip span:last-child {
    background-color: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}
.arrow-chip.active-isolated-chip {
    background-color: #9333ea !important;
    color: #ffffff !important;
    border-color: #7e22ce !important;
    box-shadow: 0 4px 14px 0 rgba(168, 85, 247, 0.4), 0 0 0 2px #ffffff, 0 0 0 4px #a855f7 !important;
    transform: translateY(-1px) scale(1.02);
}
.arrow-chip.active-isolated-chip span:last-child {
    background-color: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

/* ==========================================================================
   Content Layout Width Modes (Narrow, Wide, Full Width)
   ========================================================================== */
.layout-container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    transition: max-width 0.22s cubic-bezier(0.4, 0, 0.2, 1), padding 0.2s ease;
}

/* 1. Narrow Mode (Standard compact view: 1152px / 72rem) */
html[data-layout-width="narrow"] .layout-container,
body[data-layout-width="narrow"] .layout-container {
    max-width: 72rem; /* 1152px - max-w-6xl */
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}
@media (min-width: 640px) {
    html[data-layout-width="narrow"] .layout-container,
    body[data-layout-width="narrow"] .layout-container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}
@media (min-width: 1024px) {
    html[data-layout-width="narrow"] .layout-container,
    body[data-layout-width="narrow"] .layout-container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* 2. Wide Mode (Recommended Default - Expands comfortably: 1568px / 98rem) */
html[data-layout-width="wide"] .layout-container,
body[data-layout-width="wide"] .layout-container {
    max-width: 98rem; /* 1568px */
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}
@media (min-width: 640px) {
    html[data-layout-width="wide"] .layout-container,
    body[data-layout-width="wide"] .layout-container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}
@media (min-width: 1024px) {
    html[data-layout-width="wide"] .layout-container,
    body[data-layout-width="wide"] .layout-container {
        padding-left: 1.75rem;
        padding-right: 1.75rem;
    }
}
@media (min-width: 1440px) {
    html[data-layout-width="wide"] .layout-container,
    body[data-layout-width="wide"] .layout-container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* 3. Full Width Mode (Edge-to-edge with balanced gutters for ultra-wide displays) */
html[data-layout-width="full"] .layout-container,
body[data-layout-width="full"] .layout-container {
    max-width: 100%;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}
@media (min-width: 640px) {
    html[data-layout-width="full"] .layout-container,
    body[data-layout-width="full"] .layout-container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}
@media (min-width: 1024px) {
    html[data-layout-width="full"] .layout-container,
    body[data-layout-width="full"] .layout-container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}
@media (min-width: 1536px) {
    html[data-layout-width="full"] .layout-container,
    body[data-layout-width="full"] .layout-container {
        padding-left: 2.75rem;
        padding-right: 2.75rem;
    }
}
@media (min-width: 1920px) {
    html[data-layout-width="full"] .layout-container,
    body[data-layout-width="full"] .layout-container {
        padding-left: 3.5rem;
        padding-right: 3.5rem;
    }
}
@media (min-width: 2560px) {
    html[data-layout-width="full"] .layout-container,
    body[data-layout-width="full"] .layout-container {
        padding-left: 4.5rem;
        padding-right: 4.5rem;
    }
}

/* Width Switcher Segmented Control Button Styles */
.width-mode-btn {
    user-select: none;
    outline: none;
}
.width-mode-btn:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 1px;
}
.width-mode-btn.is-active {
    background-color: #ffffff !important;
    color: #4338ca !important; /* indigo-700 */
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(99, 102, 241, 0.25) !important;
    font-weight: 700 !important;
}

.width-mode-btn-mobile.is-active {
    background-color: #ffffff !important;
    color: #4338ca !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(99, 102, 241, 0.25) !important;
    font-weight: 700 !important;
}

/* In Full Width mode on large screens (>=1440px), expand aspect cards into 4 balanced columns */
@media (min-width: 1440px) {
    html[data-layout-width="full"] .aspects-cards-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

 