/* ============================================
   GANITRAX — Global Stylesheet
   Version 1.0
   ============================================ */

/* CSS Variables */
:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-light: #dbeafe;
    --text: #334155;
    --text-light: #64748b;
    --text-lighter: #94a3b8;
    --bg: #ffffff;
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 0.75rem;
    --radius-sm: 0.375rem;
    --radius-lg: 1rem;
    --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg-light);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img, svg {
    display: block;
    max-width: 100%;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover, a:focus {
    color: var(--accent-hover);
    text-decoration: underline;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary);
    line-height: 1.2;
    font-weight: 700;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p {
    margin-bottom: 1rem;
    color: var(--text);
}

ul, ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Utility Classes */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container { padding: 0 1.5rem; }
}

@media (min-width: 1024px) {
    .container { padding: 0 2rem; }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo:hover, .logo:focus {
    text-decoration: none;
    color: var(--primary);
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: url('../img/gintara-logo-icon.svg') center/contain no-repeat;
    border-radius: var(--radius-sm);
    display: block;
    flex-shrink: 0;
    color: transparent;
    overflow: hidden;
}

.logo-text span {
    color: var(--accent);
}

.main-nav {
    display: none;
}

@media (min-width: 768px) {
    .main-nav {
        display: flex;
        align-items: center;
        gap: 2rem;
    }
}

.nav-link {
    color: var(--text);
    font-weight: 500;
    font-size: 0.9375rem;
    text-decoration: none;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link:hover, .nav-link:focus {
    color: var(--accent);
    text-decoration: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition);
}

.nav-link:hover::after,
.nav-link:focus::after {
    width: 100%;
}

.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary);
    border-radius: var(--radius-sm);
}

.mobile-menu-btn:hover {
    background: var(--bg-light);
}

.mobile-menu-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (min-width: 768px) {
    .mobile-menu-btn { display: none; }
}

.mobile-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
}

.mobile-nav.active {
    display: block;
}

.mobile-nav a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text);
    font-weight: 500;
    border-radius: var(--radius-sm);
    text-decoration: none;
}

.mobile-nav a:hover, .mobile-nav a:focus {
    background: var(--bg-light);
    color: var(--accent);
    text-decoration: none;
}

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

.site-footer {
    background: var(--primary);
    color: #cbd5e1;
    margin-top: auto;
    padding: 3rem 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

.footer-brand {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: inline-block;
}

.footer-brand span {
    color: var(--accent);
}

.footer-desc {
    color: #94a3b8;
    font-size: 0.9375rem;
    line-height: 1.6;
    max-width: 300px;
}

.footer-heading {
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

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

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

.footer-links a {
    color: #94a3b8;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: color var(--transition);
}

.footer-links a:hover, .footer-links a:focus {
    color: white;
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid var(--primary-light);
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
}

@media (min-width: 640px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero h1 {
    color: white;
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero p {
    color: #cbd5e1;
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: 2rem;
}

/* ============================================
   SEARCH
   ============================================ */

.search-box {
    position: relative;
    max-width: 600px;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-lighter);
    pointer-events: none;
}

.search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    z-index: 50;
    display: none;
}

.search-results.active {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover, .search-result-item:focus {
    background: var(--bg-light);
    text-decoration: none;
    color: var(--accent);
}

.search-result-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.search-result-icon {
    width: 36px;
    height: 36px;
    background: var(--accent-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.search-result-title {
    font-weight: 600;
    font-size: 0.9375rem;
}

.search-result-desc {
    font-size: 0.8125rem;
    color: var(--text-light);
}

.search-no-results {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-light);
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
    box-shadow: var(--shadow);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.card-desc {
    color: var(--text-light);
    font-size: 0.9375rem;
    margin-bottom: 0;
}

/* Calculator Card */
.calc-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    max-width: 700px;
    margin: 0 auto;
}

.calc-card h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    text-decoration: none;
    line-height: 1;
}

.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

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

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--accent-hover);
    text-decoration: none;
    color: white;
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover, .btn-secondary:focus {
    background: var(--border-light);
    text-decoration: none;
    color: var(--primary);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover, .btn-danger:focus {
    background: #dc2626;
    text-decoration: none;
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover, .btn-success:focus {
    background: #059669;
    text-decoration: none;
    color: white;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ============================================
   FORMS & INPUTS
   ============================================ */

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: var(--text-lighter);
}

.form-input:disabled,
.form-select:disabled {
    background: var(--bg-light);
    cursor: not-allowed;
    opacity: 0.6;
}

.form-hint {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.form-error {
    font-size: 0.8125rem;
    color: var(--danger);
    margin-top: 0.25rem;
    display: none;
}

.form-error.visible {
    display: block;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .input-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   RESULTS
   ============================================ */

.result-box {
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-top: 1.5rem;
    text-align: center;
    display: none;
}

.result-box.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

.result-box.success {
    background: var(--success-light);
    border-color: var(--success);
}

.result-box.error {
    background: var(--danger-light);
    border-color: var(--danger);
}

.result-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.result-value {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.result-detail {
    font-size: 0.9375rem;
    color: var(--text);
    margin-top: 0.5rem;
}

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

/* ============================================
   BREADCRUMBS
   ============================================ */

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 0;
    font-size: 0.875rem;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--text-light);
    text-decoration: none;
}

.breadcrumb a:hover, .breadcrumb a:focus {
    color: var(--accent);
    text-decoration: underline;
}

.breadcrumb-sep {
    color: var(--text-lighter);
}

.breadcrumb-current {
    color: var(--text);
    font-weight: 500;
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
    padding: 3rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    margin-bottom: 0.75rem;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   GRIDS
   ============================================ */

.grid {
    display: grid;
    gap: 1.5rem;
}

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

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

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

@media (min-width: 640px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================
   CALCULATOR CARDS (Grid)
   ============================================ */

.calc-grid-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.calc-grid-card:hover, .calc-grid-card:focus {
    box-shadow: var(--shadow);
    border-color: var(--accent);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.calc-grid-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.calc-grid-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-light);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.calc-grid-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.375rem;
}

.calc-grid-desc {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 0;
}

.calc-grid-meta {
    margin-top: auto;
    padding-top: 1rem;
    font-size: 0.8125rem;
    color: var(--accent);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ============================================
   CATEGORY CARDS
   ============================================ */

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    transition: box-shadow var(--transition), transform var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-card:hover, .category-card:focus {
    box-shadow: var(--shadow);
    transform: translateY(-4px);
    text-decoration: none;
    color: inherit;
    border-color: var(--accent);
}

.category-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.category-icon {
    width: 64px;
    height: 64px;
    background: var(--accent-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin: 0 auto 1rem;
}

.category-card h3 {
    margin-bottom: 0.5rem;
}

.category-card p {
    color: var(--text-light);
    font-size: 0.9375rem;
    margin-bottom: 0;
}

/* ============================================
   FAQ
   ============================================ */

.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 0;
}

.faq-question {
    font-weight: 600;
    font-size: 1.0625rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.faq-answer {
    color: var(--text);
    line-height: 1.6;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

/* ============================================
   CONTENT STYLES
   ============================================ */

.content-page {
    background: var(--bg);
    padding: 2rem 0 4rem;
}

.content-page h1 {
    margin-bottom: 1.5rem;
}

.content-page h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.375rem;
}

.content-page h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
}

.content-page p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.content-page ul, .content-page ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.content-page li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.formula-box {
    background: var(--bg-light);
    border-left: 4px solid var(--accent);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-family: var(--font-mono);
    font-size: 1.0625rem;
    color: var(--primary);
}

.example-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.example-box h4 {
    color: var(--accent);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.info-box {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.info-box h4 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

/* ============================================
   SCIENTIFIC CALCULATOR
   ============================================ */

.scientific-calc {
    max-width: 400px;
    margin: 0 auto;
    background: var(--primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.scientific-display {
    background: var(--primary-light);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: right;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.scientific-expression {
    font-size: 0.875rem;
    color: var(--text-lighter);
    font-family: var(--font-mono);
    min-height: 1.5rem;
    word-break: break-all;
}

.scientific-result {
    font-size: 2rem;
    color: white;
    font-family: var(--font-mono);
    font-weight: 600;
    word-break: break-all;
}

.scientific-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.scientific-btn {
    padding: 1rem 0.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.125rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
    background: var(--primary-light);
    color: white;
}

.scientific-btn:hover, .scientific-btn:focus {
    background: #334155;
}

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

.scientific-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.scientific-btn.operator {
    background: var(--accent);
    color: white;
}

.scientific-btn.operator:hover, .scientific-btn.operator:focus {
    background: var(--accent-hover);
}

.scientific-btn.danger {
    background: var(--danger);
    color: white;
}

.scientific-btn.danger:hover, .scientific-btn.danger:focus {
    background: #dc2626;
}

.scientific-btn.wide {
    grid-column: span 2;
}

/* ============================================
   BASIC CALCULATOR
   ============================================ */

.basic-calc {
    max-width: 320px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.basic-display {
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    text-align: right;
    font-size: 1.75rem;
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--primary);
    min-height: 56px;
    word-break: break-all;
}

.basic-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.basic-btn {
    padding: 0.875rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1.25rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    background: var(--bg);
    color: var(--primary);
    transition: background var(--transition), transform var(--transition);
}

.basic-btn:hover, .basic-btn:focus {
    background: var(--bg-light);
}

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

.basic-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.basic-btn.operator {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--accent-light);
}

.basic-btn.operator:hover, .basic-btn.operator:focus {
    background: #bfdbfe;
}

.basic-btn.equals {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    grid-column: span 2;
}

.basic-btn.equals:hover, .basic-btn.equals:focus {
    background: var(--accent-hover);
}

.basic-btn.danger {
    background: var(--danger-light);
    color: var(--danger);
    border-color: var(--danger-light);
}

.basic-btn.danger:hover, .basic-btn.danger:focus {
    background: #fecaca;
}

/* ============================================
   CURRENCY CONVERTER
   ============================================ */

.currency-swap {
    display: flex;
    justify-content: center;
    margin: 0.5rem 0;
}

.currency-swap-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    transition: transform var(--transition), background var(--transition);
}

.currency-swap-btn:hover, .currency-swap-btn:focus {
    background: var(--accent-light);
    transform: rotate(180deg);
}

.currency-swap-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ============================================
   UNIT CONVERTER
   ============================================ */

.unit-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: end;
}

@media (min-width: 640px) {
    .unit-grid {
        grid-template-columns: 1fr auto 1fr;
    }
}

.unit-swap-btn {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin: 0 auto;
    transition: transform var(--transition), background var(--transition);
}

.unit-swap-btn:hover, .unit-swap-btn:focus {
    background: var(--accent-light);
    transform: rotate(180deg);
}

.unit-swap-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ============================================
   404 PAGE
   ============================================ */

.error-404 {
    text-align: center;
    padding: 4rem 0;
}

.error-code {
    font-size: clamp(4rem, 15vw, 8rem);
    font-weight: 800;
    color: var(--border);
    line-height: 1;
    margin-bottom: 1rem;
}

.error-404 h1 {
    margin-bottom: 1rem;
}

.error-404 p {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

/* ============================================
   TAGS & BADGES
   ============================================ */

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 9999px;
    text-decoration: none;
}

.tag:hover, .tag:focus {
    background: #bfdbfe;
    text-decoration: none;
    color: var(--accent-hover);
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

.animate-slide-up {
    animation: slideUp 0.5s ease forwards;
}

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

@media (max-width: 639px) {
    .hide-mobile { display: none !important; }
    .section { padding: 2rem 0; }
    .calc-card { padding: 1.25rem; }
}

@media (min-width: 640px) {
    .show-mobile { display: none !important; }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .site-header, .site-footer, .breadcrumb, .hero {
        display: none;
    }
    .calc-card {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}

/* Focus visible polyfill support */
.js-focus-visible :focus:not(.focus-visible) {
    outline: none;
}

/* ============================================
   GANITRAX V1 — POLISH & UX UPGRADE
   ============================================ */

.calc-grid-card-wrap {
    position: relative;
    height: 100%;
}

.calc-grid-card-wrap .calc-grid-card {
    padding-right: 3.5rem;
}

.calc-grid-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 48px;
    margin-bottom: 1rem;
}

.calc-grid-card-top .calc-grid-icon {
    margin-bottom: 0;
    font-size: 1.55rem;
    line-height: 1;
}

.calc-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0.25rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: 9999px;
    background: var(--bg-light);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.favorite-btn,
.favorite-page-btn {
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-light);
    border-radius: 9999px;
    cursor: pointer;
    transition: transform var(--transition), color var(--transition), border-color var(--transition), background var(--transition);
}

.favorite-btn {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.favorite-btn:hover,
.favorite-btn:focus-visible,
.favorite-page-btn:hover,
.favorite-page-btn:focus-visible {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-light);
    transform: translateY(-1px);
}

.favorite-btn.is-favorite,
.favorite-page-btn[aria-pressed="true"] {
    color: var(--accent);
}

.calculator-page-tools {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 1rem;
}

.favorite-page-btn {
    padding: 0.55rem 0.9rem;
    font-weight: 600;
}

.result-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.result-action-btn {
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    border-radius: 9999px;
    padding: 0.55rem 0.8rem;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.result-action-btn:hover,
.result-action-btn:focus-visible {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
}

.formula-text {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    background: var(--bg);
    padding: 1rem;
    border-radius: var(--radius);
    overflow-wrap: anywhere;
}

#recently-used-section[hidden],
#favorites-section[hidden] {
    display: none;
}

@media (max-width: 639px) {
    .calc-grid-card-wrap .calc-grid-card {
        padding-right: 3.2rem;
    }

    .calc-badge {
        font-size: 0.68rem;
    }

    .result-actions {
        gap: 0.45rem;
    }
}


/* Final polish */
.reference-note { margin: -0.5rem 0 1.25rem; padding: 0.75rem 1rem; border-left: 3px solid var(--accent); background: var(--bg-light); color: var(--text-light); font-size: 0.9rem; border-radius: var(--radius-sm); }
.faq-question { cursor: pointer; }
.faq-question:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius-sm); }
.faq-answer { display: none; }
.faq-answer.open { display: block; }
.contact-status { margin-top: 0.85rem; color: var(--text-light); min-height: 1.25rem; }


/* Search results layering fix */
.search-container,
.search-box,
.search-results,
#search-results,
.search-results-container {
    position: relative;
    z-index: 20;
}

.search-results {
    isolation: isolate;
}

.recently-used,
.recent-section,
#recently-used,
.recent-calculators {
    position: relative;
    z-index: 1;
}


/* V2 feature layer */
[data-theme="dark"]{--primary:#f8fafc;--primary-light:#e2e8f0;--text:#e2e8f0;--text-light:#cbd5e1;--text-lighter:#94a3b8;--bg:#0b1220;--bg-light:#111827;--bg-card:#172033;--border:#334155;--border-light:#253047;--accent-light:#1e3a5f;--success-light:#064e3b;--warning-light:#78350f;--danger-light:#7f1d1d}
[data-theme="dark"] .site-header,[data-theme="dark"] .site-footer{background:var(--bg-card)}
.header-tools{display:flex;align-items:center;gap:.5rem;margin-left:auto}.header-tool-btn{border:1px solid var(--border);background:var(--bg-card);color:var(--text);border-radius:999px;padding:.45rem .7rem;font:inherit;font-size:.8rem;font-weight:700;cursor:pointer}.header-tool-btn:hover{border-color:var(--accent);color:var(--accent)}
.history-panel{margin-top:2rem}.history-header{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}.history-list{display:grid;gap:.75rem;margin-top:1rem}.history-item{padding:.85rem 1rem;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg-light)}.history-item time{display:block;font-size:.75rem;color:var(--text-light);margin-bottom:.25rem}.visual-insight{margin-top:1.25rem;padding:1rem;border-top:1px solid var(--border);background:var(--bg-light);border-radius:var(--radius-sm)}.visual-title{font-weight:800;margin-bottom:.75rem}.visual-row{display:grid;grid-template-columns:75px 1fr auto;gap:.65rem;align-items:center;margin:.55rem 0;font-size:.8rem}.visual-track{height:9px;border-radius:999px;background:var(--border);overflow:hidden}.visual-bar{height:100%;background:var(--accent);border-radius:999px}.input-grid{display:grid;gap:0}@media(max-width:700px){.header-inner{flex-wrap:wrap}.header-tools{margin-left:0}.history-header{flex-direction:column}.visual-row{grid-template-columns:65px 1fr auto}.header-tool-btn{padding:.4rem .55rem}}

@media(max-width:639px){.btn,.result-action-btn,.header-tool-btn,.favorite-page-btn{min-height:44px}.form-input,.form-select{min-height:44px}}


/* ============================================
   V3 POLISH — NAV, DARK MODE, LANGUAGE PICKER, MOBILE
   ============================================ */
.logo { margin-right: 1.75rem; }
.header-inner { gap: 1rem; }
.main-nav { gap: 1.75rem; }
.header-tools { flex: 0 0 auto; display:flex; align-items:center; gap:.5rem; margin-left:auto; }
.language-picker { position:relative; }
.language-menu { position:absolute; top:calc(100% + .55rem); right:0; width:210px; max-height:min(70vh,520px); overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; padding:.45rem; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow-lg); z-index:300; }
.language-menu[hidden] { display:none; }
.language-menu-title { padding:.55rem .7rem .45rem; font-size:.75rem; font-weight:800; color:var(--text-light); text-transform:uppercase; letter-spacing:.04em; }
.language-menu button { width:100%; display:flex; align-items:center; gap:.55rem; padding:.65rem .7rem; border:0; border-radius:var(--radius-sm); background:transparent; color:var(--text); text-align:left; font:inherit; cursor:pointer; }
.language-menu button:hover,.language-menu button:focus-visible { background:var(--bg-light); color:var(--accent); }
.language-menu button[aria-checked="true"] { background:var(--accent-light); color:var(--accent); font-weight:800; }
[data-theme="dark"] .hero { background:linear-gradient(135deg,#0b1220 0%,#172554 100%); color:#f8fafc; }
[data-theme="dark"] .hero h1 { color:#ffffff; }
[data-theme="dark"] .hero p { color:#dbeafe; }
[data-theme="dark"] .hero .search-input { background:#0f172a; color:#f8fafc; border-color:#475569; }
[data-theme="dark"] .hero .search-input::placeholder { color:#94a3b8; }
[data-theme="dark"] .site-header { background:#0b1220; }
[data-theme="dark"] .mobile-nav { background:#0b1220; }

@media (max-width: 767px) {
    .header-inner { height:64px; flex-wrap:nowrap; }
    .logo { margin-right:0; min-width:0; }
    .logo-text { font-size:1.25rem; }
    .header-tools { display:none; }
    .mobile-menu-btn { margin-left:auto; flex:0 0 44px; width:44px; height:44px; }
    .mobile-nav { top:64px; padding: .75rem 1rem 1rem; }
    .mobile-nav a { min-height:46px; display:flex; align-items:center; }
    .mobile-nav .mobile-nav-tools { display:flex; gap:.6rem; margin-top:.5rem; padding-top:.75rem; border-top:1px solid var(--border); }
    .mobile-nav .mobile-nav-tools .header-tool-btn { flex:1; min-height:46px; }
    .language-menu { position:fixed; top:72px; right:1rem; width:min(240px,calc(100vw - 2rem)); }
    .hero { padding:3rem 0; }
    .hero h1 { font-size:clamp(1.9rem,9vw,2.5rem); }
    .hero p { font-size:1rem; }
    .search-input { font-size:1rem; }
    .calc-grid-card { min-height:unset; }
    .result-actions { flex-wrap:wrap; }
}

@media (min-width: 768px) {
    .mobile-nav .mobile-nav-tools { display:none; }
}

/* ============================================================
   GANITRAX V4.1 — RESULT + HISTORY + DISCOVERY POLISH
   ============================================================ */
.result-box.success {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
    text-align: left;
    padding: 1.75rem;
    box-shadow: 0 14px 35px rgba(15, 23, 42, .16);
}
.result-box.success .result-label {
    color: #cbd5e1;
    font-size: .78rem;
    letter-spacing: .08em;
}
.result-box.success .result-value,
.result-box.success .result-value * {
    color: #ffffff;
}
.result-box.success .result-detail,
.result-box.success .result-detail * {
    color: #cbd5e1;
}
.result-box.success .result-actions {
    border-top-color: rgba(255,255,255,.14);
}
.result-box.success .result-action-btn {
    color: #e2e8f0;
    border-color: rgba(255,255,255,.16);
    background: rgba(255,255,255,.06);
}
.result-box.success .result-action-btn:hover,
.result-box.success .result-action-btn:focus-visible {
    color: #ffffff;
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.28);
}

/* Dark mode signature: dark environment + light answer card. */
html[data-theme="dark"] .result-box.success {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
    color: #111827 !important;
    box-shadow: 0 14px 35px rgba(0,0,0,.28);
}
html[data-theme="dark"] .result-box.success .result-label,
html[data-theme="dark"] .result-box.success .result-value,
html[data-theme="dark"] .result-box.success .result-value *,
html[data-theme="dark"] .result-box.success .result-detail,
html[data-theme="dark"] .result-box.success .result-detail * {
    color: #111827 !important;
}
html[data-theme="dark"] .result-box.success .result-label { color: #475569 !important; }
html[data-theme="dark"] .result-box.success .result-detail { color: #475569 !important; }
html[data-theme="dark"] .result-box.success .result-actions { border-top-color: #e5e7eb; }
html[data-theme="dark"] .result-box.success .result-action-btn {
    color: #111827;
    background: #f8fafc;
    border-color: #d1d5db;
}
html[data-theme="dark"] .result-box.success .result-action-btn:hover,
html[data-theme="dark"] .result-box.success .result-action-btn:focus-visible {
    background: #eef2f7;
    border-color: #94a3b8;
}

.age-result-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1rem;
    margin-top: .5rem;
}
.age-result-grid > div { min-width: 0; }
.age-result-grid span {
    display: block;
    color: #cbd5e1;
    font-size: .78rem;
    line-height: 1.35;
    margin-bottom: .4rem;
}
.age-result-grid strong {
    display: block;
    color: #ffffff;
    font-size: clamp(1.45rem, 3vw, 2rem);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
html[data-theme="dark"] .age-result-grid span { color: #64748b; }
html[data-theme="dark"] .age-result-grid strong { color: #111827; }

.v4-result-details {
    margin-top: 1.5rem;
    padding-top: 1.15rem;
    border-top: 1px solid rgba(255,255,255,.16);
    display: grid;
    gap: .9rem;
}
.v4-result-details h3 {
    margin: 0 0 .25rem;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #cbd5e1;
}
.v4-result-details p { margin: 0; color: #e2e8f0; line-height: 1.6; }
html[data-theme="dark"] .v4-result-details { border-top-color: #e5e7eb; }
html[data-theme="dark"] .v4-result-details h3 { color: #475569; }
html[data-theme="dark"] .v4-result-details p { color: #334155; }

/* Compact history: closed by default, details open only on demand. */
.history-panel { margin-top: 1.5rem; }
.history-details { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); overflow: hidden; }
.history-details summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: 1rem 1.15rem;
    font-weight: 700;
    color: var(--text);
}
.history-details summary::-webkit-details-marker { display: none; }
.history-details summary::after { content: '+'; font-size: 1.25rem; color: var(--text-light); }
.history-details[open] summary::after { content: '−'; }
.history-summary-title { display: inline-flex; align-items: center; gap: .4rem; }
.history-count {
    min-width: 1.6rem; height: 1.6rem; padding: 0 .4rem; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--bg-light); color: var(--text-light); font-size: .75rem;
}
.history-content { border-top: 1px solid var(--border); padding: 1rem 1.15rem 1.15rem; }
.history-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.history-toolbar .card-desc { margin: 0; }
.history-list { display: grid; gap: .65rem; margin-top: .9rem; }
.history-item {
    padding: .85rem 1rem;
    border: 1px solid var(--border);
    border-radius: .7rem;
    background: var(--bg-light);
}
.history-item time { display:block; font-size:.72rem; color:var(--text-light); margin-bottom:.3rem; }
.history-item-result { color:var(--text); font-size:.9rem; line-height:1.5; }

.v4-interesting { width: 100%; }
.v4-interest-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.v4-interest-card { min-height: 118px; align-items: center; }
.v4-interest-card strong { line-height: 1.45; }

@media (max-width: 900px) {
    .age-result-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .result-box.success { padding: 1.25rem; }
    .age-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem .8rem; }
    .v4-interest-grid { grid-template-columns: 1fr; }
    .history-toolbar { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
    .result-box.visible { animation: none; }
    .v4-interest-card { transform: none !important; }
}

/* ============================================================
   GANITRAX V4.2 — SHARE + CURRENCY + KEYBOARD POLISH
   ============================================================ */
.gx-currency-group { margin-bottom: 1.15rem; }
.gx-currency-group .field-help { margin-top: .4rem; font-size: .78rem; color: var(--text-light); line-height: 1.45; }
.gx-modal-open { overflow: hidden; }
.gx-share-modal { position: fixed; inset: 0; z-index: 10000; display:flex; align-items:center; justify-content:center; padding:1rem; }
.gx-share-backdrop { position:absolute; inset:0; background:rgba(15,23,42,.58); backdrop-filter:blur(5px); }
.gx-share-dialog { position:relative; width:min(620px,100%); max-height:min(720px,calc(100vh - 2rem)); overflow:auto; background:var(--bg-card); color:var(--text); border:1px solid var(--border); border-radius:1.15rem; box-shadow:0 25px 70px rgba(0,0,0,.25); padding:1.35rem; }
.gx-share-head { display:flex; justify-content:space-between; gap:1rem; align-items:flex-start; margin-bottom:1rem; }
.gx-share-kicker { font-size:.72rem; text-transform:uppercase; letter-spacing:.12em; color:var(--primary); font-weight:800; margin-bottom:.25rem; }
.gx-share-head h2 { margin:0; font-size:1.45rem; }
.gx-share-head p { margin:.35rem 0 0; color:var(--text-light); font-size:.9rem; }
.gx-share-close { width:40px; height:40px; border:1px solid var(--border); background:var(--bg-light); color:var(--text); border-radius:50%; font-size:1.5rem; line-height:1; cursor:pointer; }
.gx-share-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.7rem; }
.gx-share-option { min-height:92px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.3rem; border:1px solid var(--border); border-radius:.85rem; background:var(--bg-light); color:var(--text); text-decoration:none; cursor:pointer; padding:.75rem; font:inherit; }
.gx-share-option:hover,.gx-share-option:focus-visible { border-color:var(--primary); transform:translateY(-1px); }
.gx-share-option span { font-size:1.45rem; }
.gx-share-option strong { font-size:.88rem; }
.gx-share-option small { font-size:.68rem; color:var(--text-light); }
.gx-share-note { margin:.95rem 0 .1rem; color:var(--text-light); font-size:.76rem; line-height:1.5; }
html[data-theme="dark"] .gx-share-dialog { background:#111827; color:#f8fafc; border-color:#334155; }
html[data-theme="dark"] .gx-share-option { background:#0f172a; border-color:#334155; color:#f8fafc; }
html[data-theme="dark"] .gx-share-close { background:#0f172a; color:#f8fafc; border-color:#334155; }
@media(max-width:560px){ .gx-share-grid{grid-template-columns:repeat(2,minmax(0,1fr));} .gx-share-dialog{padding:1rem;} }

/* ============================================================
   GANITRAX V4.3 — STABILITY + RESULT REVEAL
   ============================================================ */
.input-with-select{display:grid;grid-template-columns:minmax(0,1fr) 150px;gap:.65rem;align-items:stretch}
.input-with-select .form-input,.input-with-select .form-select{min-width:0}
.gx-toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,16px);opacity:0;pointer-events:none;z-index:11000;background:#111827;color:#fff;border-radius:999px;padding:.7rem 1rem;font-size:.88rem;font-weight:700;box-shadow:0 12px 30px rgba(0,0,0,.22);transition:opacity .18s ease,transform .18s ease}
.gx-toast.show{opacity:1;transform:translate(-50%,0)}
.gx-share-option{appearance:none;-webkit-appearance:none}
.gx-share-option:focus-visible,.gx-share-close:focus-visible{outline:3px solid rgba(37,99,235,.35);outline-offset:2px}
html[data-theme="dark"] .gx-toast{background:#fff;color:#111827}
@media(max-width:560px){.input-with-select{grid-template-columns:1fr 120px}.gx-toast{bottom:16px;max-width:calc(100vw - 32px);text-align:center}}
@media(prefers-reduced-motion:reduce){.gx-toast{transition:none}.gx-share-option{transition:none!important}}

/* ============================================================
   GANITRAX V5 — ADAPTIVE EXPERIENCE SYSTEM
   One responsive system from compact phones to wide desktops.
   ============================================================ */

:root {
    --gx-content-max: 1240px;
    --gx-page-gutter: clamp(1rem, 2.5vw, 2rem);
    --gx-section-space: clamp(2.5rem, 5vw, 4.5rem);
    --gx-card-gap: clamp(1rem, 2vw, 1.5rem);
}

.container {
    max-width: var(--gx-content-max);
    padding-left: var(--gx-page-gutter);
    padding-right: var(--gx-page-gutter);
}

.section {
    padding-top: var(--gx-section-space);
    padding-bottom: var(--gx-section-space);
}

.section-header {
    margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem);
}

.section-header p {
    max-width: 680px;
}

.grid {
    gap: var(--gx-card-gap);
}

/* Give the calculator workspace breathing room without wasting desktop space. */
.calc-card {
    width: min(100%, 760px);
    padding: clamp(1.25rem, 3vw, 2.25rem);
}

.calc-card h2 {
    font-size: clamp(1.3rem, 2.4vw, 1.65rem);
    margin-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
}

/* Results should remain the visual destination of the calculator. */
.result-box.success {
    margin-top: 1.75rem;
}

.result-value {
    overflow-wrap: anywhere;
}

.result-actions .result-action-btn {
    min-height: 40px;
}

/* Calculator cards: roomier on small screens, denser only when the viewport earns it. */
.calc-grid-card-wrap .calc-grid-card {
    min-height: 100%;
    padding: clamp(1.1rem, 2.5vw, 1.5rem);
    padding-right: clamp(3.1rem, 5vw, 3.5rem);
}

.calc-grid-card-top {
    margin-bottom: .9rem;
}

.calc-grid-title {
    line-height: 1.3;
}

.calc-grid-desc {
    line-height: 1.55;
}

/* Homepage curiosity cards should feel like prompts, not a list of links. */
.v4-interest-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gx-card-gap);
}

.v4-interest-card {
    min-height: 128px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: .8rem;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    color: var(--text);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.v4-interest-card:hover,
.v4-interest-card:focus-visible {
    color: var(--text);
    text-decoration: none;
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.v4-interest-card > span {
    font-size: 1.65rem;
    line-height: 1;
}

.v4-interest-card strong {
    font-size: .98rem;
    line-height: 1.35;
}

/* Mobile language picker is a real part of the mobile menu, never a hidden desktop child. */
.mobile-language-menu {
    width: 100%;
    max-height: min(60vh, 420px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    margin-top: .65rem;
    padding: .45rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.mobile-language-menu[hidden] { display: none; }
.mobile-language-menu-title {
    padding: .55rem .7rem .45rem;
    color: var(--text-light);
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.mobile-language-menu button {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .6rem .7rem;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text);
    text-align: left;
    font: inherit;
    cursor: pointer;
}
.mobile-language-menu button:hover,
.mobile-language-menu button:focus-visible {
    background: var(--bg-light);
    color: var(--accent);
}
.mobile-language-menu button[aria-checked="true"] {
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 800;
}

@media (max-width: 767px) {
    body { overflow-x: hidden; }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .header-inner {
        min-height: 64px;
        height: auto;
        padding-top: .45rem;
        padding-bottom: .45rem;
    }

    .mobile-nav {
        max-height: calc(100vh - 64px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-nav-tools {
        flex-direction: column;
    }

    .mobile-nav .mobile-nav-tools .header-tool-btn {
        width: 100%;
        justify-content: center;
    }

    .mobile-language-chevron {
        margin-left: auto;
        transition: transform var(--transition);
    }

    #mobile-language-toggle[aria-expanded="true"] .mobile-language-chevron {
        transform: rotate(180deg);
    }

    .hero {
        padding: clamp(2.75rem, 9vw, 4rem) 0;
    }

    .hero-content {
        max-width: none;
    }

    .hero h1 {
        font-size: clamp(2rem, 9vw, 2.65rem);
        max-width: 12ch;
    }

    .hero p {
        line-height: 1.55;
        margin-bottom: 1.5rem;
    }

    .search-box {
        max-width: none;
    }

    .search-input {
        min-height: 52px;
        padding-top: .85rem;
        padding-bottom: .85rem;
    }

    .section-header h2 {
        line-height: 1.15;
    }

    .section-header p {
        font-size: 1rem;
        line-height: 1.55;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .calc-grid-card-wrap .calc-grid-card {
        padding: 1.2rem 3.35rem 1.25rem 1.2rem;
    }

    .calc-grid-card-top {
        min-height: 40px;
    }

    .calc-grid-icon {
        width: 40px;
        height: 40px;
    }

    .calc-grid-title {
        font-size: 1rem;
    }

    .calc-grid-desc {
        font-size: .875rem;
        line-height: 1.5;
    }

    .calc-card {
        margin-left: auto;
        margin-right: auto;
        border-radius: var(--radius-lg);
    }

    .input-row {
        gap: .85rem;
    }

    .input-group input,
    .input-group select,
    .input-group textarea {
        min-height: 46px;
    }

    .calc-card .btn-primary,
    .calc-card .btn-secondary {
        width: 100%;
    }

    .result-box.success {
        padding: 1.25rem;
        border-radius: var(--radius-lg);
    }

    .result-value {
        font-size: clamp(1.65rem, 8vw, 2.35rem);
    }

    .result-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .result-actions .result-action-btn {
        width: 100%;
        min-width: 0;
    }

    .v4-interest-grid {
        grid-template-columns: 1fr;
    }

    .v4-interest-card {
        min-height: 104px;
        padding: 1rem 1.1rem;
    }

    .footer-grid {
        gap: 1.5rem;
    }

    .breadcrumb {
        padding-top: .75rem;
        padding-bottom: .75rem;
        font-size: .8rem;
        line-height: 1.45;
    }
}

@media (min-width: 768px) {
    .mobile-language-menu { display: none !important; }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .v4-interest-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .hero-content {
        max-width: 760px;
    }
}

@media (min-width: 1600px) {
    :root { --gx-content-max: 1320px; }
}

@media (max-width: 359px) {
    .logo-text { font-size: 1.15rem; }
    .logo-icon { width: 30px; height: 30px; }
    .header-inner { padding-left: .85rem; padding-right: .85rem; }
    .container { padding-left: .85rem; padding-right: .85rem; }
    .result-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .v4-interest-card,
    .mobile-language-chevron { transition: none; }
}

/* V5 calculator result navigation */
.result-box { scroll-margin-top: 96px; }
@media (max-width: 767px) { .result-box { scroll-margin-top: 76px; } }

.footer-brand::before { content:""; display:inline-block; width:30px; height:30px; margin-right:.55rem; vertical-align:-.5rem; background:url('../img/gintara-logo-icon.svg') center/contain no-repeat; }
.footer-brand { display:inline-flex; align-items:center; }


/* RTL support for Arabic and Persian localization */
html[dir="rtl"]{direction:rtl;}
html[dir="rtl"] body{text-align:right;}
html[dir="rtl"] .header-inner,html[dir="rtl"] .main-nav,html[dir="rtl"] .header-tools{direction:rtl;}
html[dir="rtl"] .input-row,html[dir="rtl"] .unit-grid,html[dir="rtl"] .result-actions{direction:rtl;}
html[dir="rtl"] input,html[dir="rtl"] select,html[dir="rtl"] textarea{text-align:right;}
html[dir="rtl"] .result-value,html[dir="rtl"] .scientific-result,html[dir="rtl"] .scientific-expression{direction:ltr;text-align:left;}
html[dir="rtl"] .logo{direction:ltr;}

html[dir="rtl"] body{font-family:Arial,'Noto Sans Arabic','Noto Sans',sans-serif;}


/* ============================================================
   GANITRA CALCULATOR PHASE 2.5 — PREMIUM DECISION UX
   ============================================================ */
.calc-card{border-radius:22px;border:1px solid color-mix(in srgb,var(--border) 82%,transparent);box-shadow:0 14px 40px rgba(15,23,42,.07);padding:clamp(1.2rem,3vw,2rem);background:var(--bg-card)}
.calc-card h2{letter-spacing:-.015em;margin-bottom:1.1rem}
.calc-card .form-label{font-weight:650;font-size:.86rem;margin-bottom:.48rem}
.calc-card .form-input,.calc-card .form-select{min-height:50px;border-radius:13px;font-size:1rem;padding:.75rem .9rem}
.calc-card .form-input:focus,.calc-card .form-select:focus{box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 14%,transparent);}
.calc-card .btn-primary{min-height:50px;border-radius:13px;font-weight:750}
.calc-card .btn-secondary{min-height:50px;border-radius:13px}
.gx-currency-group{padding:.8rem .9rem;border:1px solid var(--border);border-radius:14px;background:var(--bg-light)}
.gx-currency-group .form-label{display:block}
.gx-currency-group .form-select{background:var(--bg-card)}
.result-box{border-radius:20px;padding:clamp(1rem,3vw,1.6rem);margin-top:1.25rem;overflow:hidden}
.result-box.visible{box-shadow:0 12px 34px rgba(15,23,42,.08)}
.result-value{font-size:clamp(1.8rem,5vw,2.75rem);font-weight:800;letter-spacing:-.035em}
.result-actions{gap:.55rem}
.result-action-btn{min-height:42px;border-radius:12px;padding:.6rem .78rem}
.gx25-extra{margin-top:1.1rem}
.gx25-extra section,.gx25-chart-wrap,.gx25-scenario,.gx25-journey{padding:1rem 0;border-top:1px solid var(--border)}
.gx25-extra h3{margin:.15rem 0 .45rem;font-size:1.05rem}
.gx25-extra p{margin:.25rem 0;line-height:1.65;color:var(--text-light)}
.gx25-section-kicker{text-transform:uppercase;letter-spacing:.11em;font-size:.68rem;font-weight:800;color:var(--accent);margin-bottom:.2rem}
.gx25-chart{margin-top:.8rem;border:1px solid var(--border);border-radius:15px;background:var(--bg-light);padding:.7rem;overflow:hidden}
.gx25-chart svg{width:100%;height:220px;display:block}
.gx25-chart-line{fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;stroke-dashoffset:1;transition:stroke-dashoffset 1s ease}
.gx25-chart-grid{fill:none;stroke:currentColor;stroke-width:1;opacity:.13}
.gx25-chart-dot{fill:currentColor;opacity:.75}
.gx25-chart-ready .gx25-chart-line{stroke-dashoffset:0}
.gx25-chart-caption{font-size:.8rem!important}
.gx25-scenario-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.7rem;margin-top:.8rem}
.gx25-scenario-card{border:1px solid var(--border);border-radius:15px;padding:.85rem;background:var(--bg-light);display:flex;flex-direction:column;gap:.35rem}
.gx25-scenario-card.is-current{border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 10%,transparent)}
.gx25-scenario-card span{font-weight:750}.gx25-scenario-card small{display:block;color:var(--accent);font-size:.7rem;margin-top:.12rem}.gx25-scenario-card strong{font-size:1.1rem}.gx25-scenario-card em{font-style:normal;color:var(--text-light);font-size:.78rem}.gx25-use-scenario{margin-top:.35rem;border:1px solid var(--border);background:var(--bg-card);border-radius:10px;padding:.5rem .65rem;font:inherit;font-size:.78rem;font-weight:700;cursor:pointer;color:var(--text)}
.gx25-use-scenario:hover,.gx25-use-scenario:focus-visible{border-color:var(--accent);color:var(--accent)}
.gx25-journey-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.7rem;margin-top:.75rem}
.gx25-journey-card{display:flex;align-items:center;gap:.55rem;text-decoration:none;color:var(--text);border:1px solid var(--border);border-radius:14px;padding:.85rem;background:var(--bg-light);min-height:58px}.gx25-journey-card:hover{border-color:var(--accent)}
.gx25-journey-card span{font-size:1.2rem;color:var(--accent)}
#gx25-toast{position:fixed;left:50%;bottom:22px;transform:translate(-50%,12px);opacity:0;pointer-events:none;z-index:12000;background:#111827;color:#fff;border-radius:12px;padding:.7rem 1rem;font-size:.86rem;font-weight:700;transition:opacity .18s ease,transform .18s ease;max-width:calc(100vw - 32px);text-align:center}
#gx25-toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:720px){.gx25-scenario-grid,.gx25-journey-grid{grid-template-columns:1fr}.calc-card{border-radius:18px}.result-value{font-size:2rem}}
@media(prefers-reduced-motion:reduce){.gx25-chart-line{transition:none}.gx25-chart-ready .gx25-chart-line{stroke-dashoffset:0}#gx25-toast{transition:none}}
@media print{.site-header,.site-footer,.calculator-page-tools,.result-actions,.gx25-use-scenario,.history-panel{display:none!important}.gx25-extra{display:block!important}.calc-card{box-shadow:none;border:0}.gx25-chart{break-inside:avoid}.result-box{box-shadow:none!important}}

.gx25-compare-table-wrap{overflow-x:auto;margin-top:.7rem}.gx25-compare-table{width:100%;border-collapse:collapse;min-width:420px;font-size:.82rem}.gx25-compare-table th,.gx25-compare-table td{text-align:left;padding:.65rem .55rem;border-bottom:1px solid var(--border)}.gx25-compare-table th{font-size:.72rem;text-transform:uppercase;letter-spacing:.05em;color:var(--text-light)}.gx25-compare-table td:nth-child(n+2){text-align:right}.gx25-compare-table th:nth-child(n+2){text-align:right}

/* ============================================================
   GANITRA CALCULATOR 1–8 EXPERIENCE PASS
   ============================================================ */
.calculator-actions{display:flex;flex-wrap:wrap;gap:.75rem;margin-top:1.5rem}
.calculator-actions .btn{min-width:140px}
.gx-currency-group{display:grid;grid-template-columns:minmax(0,1fr);gap:.35rem;margin:0 0 1.15rem;padding:1rem;border:1px solid var(--border);border-radius:15px;background:var(--bg-light)}
.gx-currency-group .form-label{margin:0;font-size:.84rem;font-weight:750}
.gx-currency-group .form-select{min-height:48px;background:var(--bg-card);font-weight:650}
.gx-currency-group .field-help{font-size:.76rem;line-height:1.45;color:var(--text-light)}
.result-box.success .result-detail{display:flex;flex-wrap:wrap;gap:.7rem;margin-top:1rem;color:inherit!important;font-size:.92rem;font-weight:650;line-height:1.5}
.result-box.success .result-detail .result-metric{flex:1 1 180px;padding:.75rem .85rem;border:1px solid rgba(148,163,184,.35);border-radius:12px;background:rgba(255,255,255,.06)}
html[data-theme="dark"] .result-box.success .result-detail .result-metric{background:#f8fafc;border-color:#cbd5e1}
.result-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch;gap:.65rem;margin-top:1.2rem;padding-top:1.05rem;border-top:1px solid rgba(148,163,184,.24)}
.result-action-btn{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;min-height:44px;width:100%;border-radius:12px!important;padding:.62rem .72rem!important;font-size:.8rem!important;font-weight:750!important;line-height:1.2}
.result-action-btn svg{width:17px;height:17px;flex:0 0 17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.result-action-btn[data-result-action="share"]{border-color:var(--accent);background:var(--accent);color:#fff}
.result-action-btn[data-result-action="share"]:hover,.result-action-btn[data-result-action="share"]:focus-visible{background:var(--accent-hover);color:#fff}
.result-action-btn[data-result-action="save-pdf"],.result-action-btn[data-result-action="report"]{background:var(--bg-light)}
.gx25-chart{border:1px solid var(--border);background:var(--bg-light);padding:.8rem;border-radius:16px}
.gx25-chart svg{height:260px}
.gx25-chart-line{stroke:var(--accent)!important;stroke-width:4!important;filter:drop-shadow(0 2px 2px rgba(37,99,235,.18))}
.gx25-chart-grid{stroke:var(--text-lighter)!important;stroke-width:1!important;opacity:.42!important}
.gx25-chart-dot{fill:var(--accent)!important;opacity:1!important}
.gx25-chart-label{fill:var(--text-light);font-size:11px;font-family:ui-sans-serif,system-ui,sans-serif}
html[data-theme="dark"] .gx25-chart-line{stroke:#60a5fa!important}
html[data-theme="dark"] .gx25-chart-dot{fill:#60a5fa!important}
html[data-theme="dark"] .gx25-chart-grid{stroke:#94a3b8!important;opacity:.5!important}
html[data-theme="dark"] .gx25-chart-label{fill:#cbd5e1}
.gx25-chart-caption{color:var(--text-light)!important;font-size:.82rem!important;margin-top:.65rem!important}
.gx25-chart-wrap{padding-top:1.15rem!important}
.gx25-extra .gx25-meaning-text{max-width:75ch;color:var(--text)!important}
@media(max-width:820px){.result-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.calculator-actions{display:grid;grid-template-columns:1fr}.calculator-actions .btn{width:100%}.result-actions{grid-template-columns:1fr 1fr}.result-action-btn{font-size:.76rem!important;padding:.58rem .45rem!important}.result-action-btn svg{width:16px;height:16px}.gx25-chart svg{height:230px}}
@media print{.calculator-actions,.result-actions,.gx-currency-group{display:none!important}.result-box.success{background:#fff!important;color:#111!important;border:0!important}.gx25-chart{border:1px solid #ddd!important;background:#fff!important}.gx25-chart-line{stroke:#2563eb!important}.gx25-chart-label{fill:#475569!important}}

.gx25-extra .result-metric-single{display:block;padding:.75rem .85rem;border:1px solid rgba(148,163,184,.35);border-radius:12px;background:rgba(255,255,255,.06);margin-top:.7rem}
html[data-theme="dark"] .gx25-extra .result-metric-single{background:#f8fafc;border-color:#cbd5e1}
.result-box.success .result-detail .result-metric{display:block;color:inherit!important;font-weight:750!important;min-height:44px}
@media(max-width:820px){.result-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* ============================================================
   GANITRA RESULT EXPERIENCE V2
   ============================================================ */
.gxv2-result-card{position:relative;overflow:hidden;border-radius:24px!important;padding:clamp(1.25rem,3vw,2rem)!important;background:#0f172a!important;border:1px solid #1e293b!important;color:#fff!important;box-shadow:0 18px 42px rgba(15,23,42,.16)!important;text-align:left!important}
.gxv2-result-card .result-label{font-size:.75rem!important;letter-spacing:.14em!important;text-transform:uppercase!important;font-weight:800!important;color:#94a3b8!important;margin-bottom:.45rem}
.gxv2-result-card .result-value,.gxv2-result-card .result-value *{font-size:clamp(2.1rem,6vw,3.5rem)!important;line-height:1.02!important;letter-spacing:-.045em!important;color:#fff!important;font-weight:850!important;font-variant-numeric:tabular-nums!important}
.gxv2-result-card .result-detail{display:none!important}
.gxv2-context{margin:.9rem 0 0;color:#cbd5e1!important;line-height:1.55;font-size:.92rem}
.gxv2-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem;margin-top:1.15rem}
.gxv2-metric{padding:1rem;border-radius:16px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.13)}
.gxv2-metric span{display:block;color:#cbd5e1;font-size:.76rem;font-weight:700;line-height:1.3}.gxv2-metric strong{display:block;color:#fff;font-size:1.2rem;line-height:1.25;margin-top:.25rem;font-variant-numeric:tabular-nums}
.gxv2-result-card .result-actions{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.55rem;margin-top:1.15rem;padding-top:1rem;border-top:1px solid rgba(255,255,255,.14)}
.gxv2-result-card .result-action-btn{min-height:44px!important;padding:.65rem .5rem!important;border-radius:12px!important;background:rgba(255,255,255,.06)!important;border:1px solid rgba(255,255,255,.14)!important;color:#fff!important;font-size:.78rem!important;font-weight:750!important;display:flex;align-items:center;justify-content:center;gap:.35rem}
.gxv2-result-card .result-action-btn svg{width:18px;height:18px;flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.gxv2-result-card .result-action-btn:hover,.gxv2-result-card .result-action-btn:focus-visible{background:rgba(255,255,255,.12)!important;border-color:rgba(255,255,255,.28)!important;color:#fff!important}
.gxv2-info{display:grid;grid-template-columns:1fr 1fr;gap:.9rem;margin-top:1.25rem;padding-top:1.15rem;border-top:1px solid rgba(255,255,255,.14)}
.gxv2-info section{padding:1rem;border-radius:16px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1)}
.gxv2-kicker{display:block;color:#93c5fd;font-size:.69rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase}.gxv2-info h3{margin:.25rem 0 .35rem;color:#fff;font-size:1rem}.gxv2-info p{margin:0;color:#e2e8f0;line-height:1.58;font-size:.9rem}
.gxv2-result-card .gx25-extra{margin-top:1.25rem!important}.gxv2-result-card .gx25-chart-wrap,.gxv2-result-card .gx25-scenario,.gxv2-result-card .gx25-journey{border-radius:18px!important}
.gx25-chart-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}.gxv2-chart-controls{display:flex;gap:.35rem;flex:0 0 auto}.gxv2-chart-toggle{width:38px;height:38px;border-radius:10px;border:1px solid var(--border);background:var(--bg-card);color:var(--text);display:grid;place-items:center;cursor:pointer}.gxv2-chart-toggle svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.gxv2-chart-toggle.is-active{background:var(--accent);border-color:var(--accent);color:#fff}.gxv2-pie-view{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:260px}.gxv2-pie-svg{width:min(210px,70%);height:auto}.gxv2-pie-legend{width:min(560px,100%);display:grid;grid-template-columns:repeat(2,1fr);gap:.65rem;margin-top:.6rem}.gxv2-pie-legend span{display:grid;grid-template-columns:10px 1fr auto;gap:.45rem;align-items:center;font-size:.78rem;color:var(--text)}.gxv2-pie-legend i{width:9px;height:9px;border-radius:50%}.gxv2-pie-legend em{font-style:normal;font-weight:800}
.gxv2-history-content{border-top:1px solid var(--border);padding:1rem 1.15rem 1.15rem}.gxv2-history-list{display:grid;gap:.75rem}.gxv2-history-card{padding:1rem;border:1px solid var(--border);border-radius:16px;background:var(--bg-card);box-shadow:var(--shadow-sm)}.gxv2-history-meta{display:flex;justify-content:space-between;gap:.8rem;align-items:center}.gxv2-history-meta strong{color:var(--text);font-size:.9rem}.gxv2-history-meta time{font-size:.72rem;color:var(--text-light)}.gxv2-history-card h3{font-size:.75rem;letter-spacing:.1em;text-transform:uppercase;color:var(--text-light);margin:.8rem 0 .15rem}.gxv2-history-card>b{display:block;color:var(--text);font-size:1.35rem;line-height:1.15}.gxv2-history-metrics{display:flex;flex-wrap:wrap;gap:.7rem;margin-top:.65rem}.gxv2-history-metrics span{font-size:.76rem;color:var(--text-light)}.gxv2-history-metrics em{font-style:normal;color:var(--text);font-weight:800}.gxv2-history-actions{display:flex;gap:.55rem;margin-top:.85rem}.gxv2-history-actions .btn{min-height:40px}
.gxv2-modal-open{overflow:hidden}.gxv2-share{position:fixed;inset:0;z-index:11000;display:flex;align-items:center;justify-content:center;padding:1rem}.gxv2-share-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.62);backdrop-filter:blur(6px)}.gxv2-share-dialog{position:relative;width:min(680px,100%);max-height:calc(100vh - 2rem);overflow:auto;background:var(--bg-card);border:1px solid var(--border);border-radius:24px;padding:1.4rem;box-shadow:0 28px 80px rgba(0,0,0,.28);color:var(--text)}.gxv2-share-head{display:flex;justify-content:space-between;gap:1rem}.gxv2-share-head h2{margin:.2rem 0 0}.gxv2-share-head p{margin:.35rem 0 0;color:var(--text-light)}.gxv2-close{width:40px;height:40px;border-radius:50%;border:1px solid var(--border);background:var(--bg-light);color:var(--text);font-size:1.4rem;cursor:pointer}.gxv2-preview{margin:1rem 0;padding:1rem;border:1px solid var(--border);border-radius:16px;background:var(--bg-light);display:grid;gap:.25rem}.gxv2-preview strong{font-size:.8rem;color:var(--accent);text-transform:uppercase;letter-spacing:.09em}.gxv2-preview b{font-size:1.05rem}.gxv2-preview span{color:var(--text-light);font-size:.84rem}.gxv2-share-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:.65rem}.gxv2-share-option{min-height:92px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.25rem;padding:.65rem;border-radius:15px;border:1px solid var(--border);background:var(--bg-light);color:var(--text);text-decoration:none;cursor:pointer;font:inherit}.gxv2-share-option:hover,.gxv2-share-option:focus-visible{border-color:var(--accent);transform:translateY(-1px)}.gxv2-share-option span{font-size:1.35rem}.gxv2-share-option strong{font-size:.84rem}.gxv2-share-option small{font-size:.68rem;color:var(--text-light)}
.gxv2-toast{position:fixed;left:50%;bottom:22px;z-index:12000;transform:translate(-50%,12px);opacity:0;pointer-events:none;background:#111827;color:#fff;border-radius:999px;padding:.7rem 1rem;font-size:.85rem;font-weight:750;box-shadow:0 12px 30px rgba(0,0,0,.24);transition:.18s ease}.gxv2-toast.show{opacity:1;transform:translate(-50%,0)}
html[data-theme="dark"] .gxv2-result-card{background:#ffffff!important;border-color:#e5e7eb!important;color:#111827!important}.gxv2-result-card{--gxv2-dark-text:#fff}.gxv2-result-card{--gxv2-muted:#cbd5e1}html[data-theme="dark"] .gxv2-result-card .result-label{color:#475569!important}html[data-theme="dark"] .gxv2-result-card .result-value,html[data-theme="dark"] .gxv2-result-card .result-value *{color:#111827!important}html[data-theme="dark"] .gxv2-context{color:#475569!important}html[data-theme="dark"] .gxv2-metric{background:#f8fafc;border-color:#dbe3ec}html[data-theme="dark"] .gxv2-metric span{color:#64748b}html[data-theme="dark"] .gxv2-metric strong{color:#111827}html[data-theme="dark"] .gxv2-result-card .result-actions{border-top-color:#e5e7eb}html[data-theme="dark"] .gxv2-result-card .result-action-btn{background:#f8fafc!important;border-color:#d1d5db!important;color:#111827!important}html[data-theme="dark"] .gxv2-result-card .result-action-btn:hover,html[data-theme="dark"] .gxv2-result-card .result-action-btn:focus-visible{background:#eef2f7!important;border-color:#94a3b8!important}html[data-theme="dark"] .gxv2-info{border-top-color:#e5e7eb}html[data-theme="dark"] .gxv2-info section{background:#f8fafc;border-color:#dbe3ec}html[data-theme="dark"] .gxv2-info h3{color:#111827}html[data-theme="dark"] .gxv2-info p{color:#334155}
@media(max-width:860px){.gxv2-result-card .result-actions{grid-template-columns:repeat(3,1fr)}.gxv2-info{grid-template-columns:1fr}.gxv2-share-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){.gxv2-result-card{padding:1.15rem!important;border-radius:20px!important}.gxv2-metrics{grid-template-columns:1fr}.gxv2-result-card .result-actions{grid-template-columns:repeat(2,1fr)}.gxv2-share-grid{grid-template-columns:repeat(2,1fr)}.gxv2-history-meta{align-items:flex-start;flex-direction:column}.gxv2-history-actions{flex-direction:column}.gxv2-history-actions .btn{width:100%}.gxv2-chart-head{align-items:center}.gxv2-pie-legend{grid-template-columns:1fr}}
@media print{.gxv2-result-card{box-shadow:none!important}}

/* ============================================================
   GANITRA RESULT EXPERIENCE V2.1 — STRUCTURED RESULT SYSTEM
   ============================================================ */
.gx-result-shell{display:block;margin-top:1.25rem;color:var(--text)}
.gx-primary-card{background:var(--bg-card);border:1px solid var(--border);border-radius:24px;padding:clamp(1.25rem,3vw,2rem);box-shadow:0 16px 42px rgba(15,23,42,.09)}
.gx-primary-top{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}
.gx-primary-kicker,.gx-kicker{display:block;font-size:.68rem;line-height:1.2;font-weight:850;letter-spacing:.13em;color:var(--accent);text-transform:uppercase}
.gx-primary-top h2{margin:.3rem 0 0;font-size:1.35rem;letter-spacing:-.02em;color:var(--text)}
.gx-complete{display:inline-flex;align-items:center;gap:.3rem;border:1px solid color-mix(in srgb,var(--accent) 28%,var(--border));background:color-mix(in srgb,var(--accent) 7%,var(--bg-card));color:var(--accent);border-radius:999px;padding:.38rem .65rem;font-size:.7rem;font-weight:800;white-space:nowrap}
.gx-primary-value{margin-top:1rem;font-size:clamp(2.4rem,6vw,4.15rem);line-height:1.02;font-weight:900;letter-spacing:-.055em;color:var(--text);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.gx-based-on{margin:.85rem 0 0;color:var(--text-light);font-size:.92rem;line-height:1.55;max-width:760px}
.gx-metric-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem;margin-top:1.1rem}
.gx-metric-card{border:1px solid var(--border);background:var(--bg-light);border-radius:16px;padding:1rem 1.05rem;min-width:0}
.gx-metric-card span{display:block;color:var(--text-light);font-size:.75rem;font-weight:750;line-height:1.3}
.gx-metric-card strong{display:block;margin-top:.25rem;color:var(--text);font-size:1.22rem;line-height:1.3;font-weight:850;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.gx-result-actions{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:.55rem;margin-top:1.2rem;padding-top:1rem;border-top:1px solid var(--border)}
.gx-result-action{min-height:46px;display:flex;align-items:center;justify-content:center;gap:.35rem;border:1px solid var(--border);background:var(--bg-light);color:var(--text);border-radius:12px;padding:.55rem .45rem;font:inherit;font-size:.74rem;font-weight:800;cursor:pointer;transition:transform .16s ease,border-color .16s ease,background .16s ease}
.gx-result-action:hover,.gx-result-action:focus-visible{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 6%,var(--bg-light));transform:translateY(-1px);outline:none}
.gx-result-action svg,.gx-quick-grid button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.gx-result-section{margin-top:1rem;border:1px solid var(--border);background:var(--bg-card);border-radius:20px;padding:clamp(1.1rem,2.5vw,1.45rem);box-shadow:var(--shadow-sm)}
.gx-two-col{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.gx-two-col article{border:1px solid var(--border);border-radius:16px;background:var(--bg-light);padding:1.05rem}
.gx-result-section h3{margin:.3rem 0 .45rem;color:var(--text);font-size:1.05rem;letter-spacing:-.01em}
.gx-result-section p{margin:.25rem 0;color:var(--text-light);line-height:1.65;font-size:.9rem}
.gx-section-head{margin-bottom:.85rem}.gx-section-head h3{margin:.25rem 0 .25rem}.gx-section-head p{margin:0;max-width:720px}
.gx-input-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem}
.gx-input-item{display:flex;justify-content:space-between;gap:.8rem;align-items:center;border:1px solid var(--border);border-radius:12px;padding:.7rem .8rem;background:var(--bg-light);min-width:0}.gx-input-item span{color:var(--text-light);font-size:.78rem}.gx-input-item strong{color:var(--text);font-size:.8rem;text-align:right;overflow-wrap:anywhere}
.gx-quick-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem}.gx-quick-grid button{min-height:48px;border:1px solid var(--border);border-radius:13px;background:var(--bg-light);color:var(--text);font:inherit;font-weight:800;cursor:pointer}.gx-quick-grid button:hover{border-color:var(--accent);color:var(--accent)}
.gx-chart-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}.gx-chart-toggle{width:40px;height:40px;border-radius:11px;border:1px solid var(--border);background:var(--bg-light);color:var(--text);cursor:pointer;font-size:1.05rem}.gx-chart-wrap{margin-top:.8rem;border:1px solid var(--border);border-radius:16px;background:var(--bg-light);padding:.65rem;overflow:hidden}.gx-v2-chart-canvas{margin:0!important;border:0!important;background:transparent!important;padding:0!important}.gx-v2-chart-canvas svg{width:100%;height:260px;display:block}.gx-v2-chart-canvas .gx25-chart-label{fill:var(--text-light)!important;font-size:12px}.gx-v2-chart-canvas .gx25-chart-grid{stroke:var(--border)!important;opacity:.75}.gx-v2-chart-canvas .gx25-chart-line{stroke:var(--accent)!important}.gx-v2-chart-canvas .gx25-chart-dot{fill:var(--accent)!important}.gx-chart-note{margin-top:.75rem;padding:.8rem .9rem;border-left:3px solid var(--accent);background:var(--bg-light);color:var(--text-light);font-size:.82rem;line-height:1.55}.gx-chart-note strong{color:var(--text)}
.gx-tradeoff-body .gx25-section-kicker{display:none}.gx-tradeoff-body .gx25-scenario-intro{margin-bottom:.8rem}.gx-tradeoff-body .gx25-scenario-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.7rem}.gx-tradeoff-body .gx25-scenario-card{border:1px solid var(--border);background:var(--bg-light);border-radius:15px;padding:.9rem;min-width:0}.gx-tradeoff-body .gx25-scenario-card.is-current{border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 12%,transparent)}.gx-tradeoff-body .gx25-scenario-card span{color:var(--text);font-weight:800}.gx-tradeoff-body .gx25-scenario-card small{color:var(--accent);font-weight:850}.gx-tradeoff-body .gx25-scenario-card strong{display:block;color:var(--text);font-size:1.15rem;margin-top:.35rem}.gx-tradeoff-body .gx25-scenario-card em{display:block;color:var(--text-light);font-style:normal;font-size:.78rem;margin-top:.2rem}.gx-tradeoff-body .gx25-use-scenario{margin-top:.55rem;border:1px solid var(--border);border-radius:9px;background:var(--bg-card);color:var(--text);padding:.45rem .6rem;font:inherit;font-size:.75rem;font-weight:800;cursor:pointer}.gx-tradeoff-body .gx25-use-scenario:hover{border-color:var(--accent);color:var(--accent)}.gx-tradeoff-body .gx25-compare{margin-top:1rem}.gx-tradeoff-body .gx25-compare h3{font-size:.95rem}.gx-tradeoff-body .gx25-compare-table-wrap{overflow:auto}.gx-tradeoff-body .gx25-compare-table{width:100%;border-collapse:collapse;min-width:420px}.gx-tradeoff-body .gx25-compare-table th,.gx-tradeoff-body .gx25-compare-table td{padding:.68rem .55rem;border-bottom:1px solid var(--border);color:var(--text);text-align:left}.gx-tradeoff-body .gx25-compare-table th{font-size:.7rem;color:var(--text-light);text-transform:uppercase;letter-spacing:.05em}.gx-tradeoff-body .gx25-compare-table td:nth-child(n+2),.gx-tradeoff-body .gx25-compare-table th:nth-child(n+2){text-align:right}.gx-tradeoff-body .gx25-compare-table tbody tr:nth-child(2){background:color-mix(in srgb,var(--accent) 7%,var(--bg-card));font-weight:800}.gx-tradeoff-body .gx25-compare p{font-size:.78rem}
.gx-related-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.7rem}.gx-related-card{display:flex;align-items:center;gap:.75rem;min-width:0;padding:.9rem;border:1px solid var(--border);border-radius:15px;background:var(--bg-light);color:var(--text);text-decoration:none}.gx-related-card:hover{border-color:var(--accent);transform:translateY(-1px)}.gx-related-card .related-calc-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:color-mix(in srgb,var(--accent) 9%,var(--bg-card));flex:0 0 auto}.gx-related-card div{min-width:0;display:grid;gap:.2rem}.gx-related-card strong{font-size:.82rem;overflow-wrap:anywhere}.gx-related-card span{font-size:.7rem;color:var(--text-light)}.gx-related-card>b{margin-left:auto;color:var(--accent)}
.gx-history-list{display:grid;gap:.75rem}.gx-history-card{border:1px solid var(--border);border-radius:16px;background:var(--bg-card);padding:1rem;box-shadow:var(--shadow-sm)}.gx-history-head{display:flex;justify-content:space-between;gap:.8rem}.gx-history-head strong{font-size:.88rem}.gx-history-head time{font-size:.7rem;color:var(--text-light)}.gx-history-card>b{display:block;font-size:1.25rem;margin:.25rem 0 .45rem;color:var(--text)}.gx-history-card>.gx-kicker{margin-top:.7rem}.gx-history-metric{display:block;color:var(--text-light);font-size:.76rem;margin-top:.2rem}.gx-history-metric em{font-style:normal;font-weight:750;color:var(--text)}.gx-history-actions{display:flex;gap:.5rem;margin-top:.8rem}.gx-history-actions .btn{min-height:40px}
.gx-result-toast{position:fixed;left:50%;bottom:22px;z-index:12000;transform:translate(-50%,12px);opacity:0;pointer-events:none;background:#111827;color:#fff;border-radius:999px;padding:.7rem 1rem;font-size:.84rem;font-weight:800;box-shadow:0 12px 30px rgba(0,0,0,.25);transition:.18s ease}.gx-result-toast.show{opacity:1;transform:translate(-50%,0)}
.gx-share-open{overflow:hidden}.gx-share-modal{position:fixed;inset:0;z-index:11000;display:flex;align-items:center;justify-content:center;padding:1rem}.gx-share-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.64);backdrop-filter:blur(5px)}.gx-share-dialog{position:relative;width:min(720px,100%);max-height:calc(100vh - 2rem);overflow:auto;border:1px solid var(--border);background:var(--bg-card);color:var(--text);border-radius:24px;padding:1.35rem;box-shadow:0 30px 90px rgba(0,0,0,.3)}.gx-share-close{position:absolute;right:1rem;top:1rem;width:38px;height:38px;border-radius:50%;border:1px solid var(--border);background:var(--bg-light);color:var(--text);font-size:1.35rem;cursor:pointer}.gx-share-kicker{font-size:.68rem;font-weight:850;letter-spacing:.13em;color:var(--accent)}.gx-share-dialog h2{margin:.3rem 3rem 0 0}.gx-share-dialog>p{margin:.35rem 0;color:var(--text-light)}.gx-share-preview{display:grid;gap:.25rem;margin:1rem 0;padding:1rem;border:1px solid var(--border);border-radius:16px;background:var(--bg-light)}.gx-share-preview strong{font-size:.7rem;color:var(--accent);text-transform:uppercase;letter-spacing:.09em}.gx-share-preview b{font-size:1.1rem}.gx-share-preview span{color:var(--text-light);font-size:.82rem}.gx-share-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:.65rem}.gx-share-grid>a,.gx-share-grid>button{min-height:94px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.25rem;border:1px solid var(--border);border-radius:14px;background:var(--bg-light);color:var(--text);text-decoration:none;font:inherit;cursor:pointer}.gx-share-grid>a:hover,.gx-share-grid>button:hover{border-color:var(--accent);transform:translateY(-1px)}.gx-share-grid strong{font-size:.8rem}.gx-share-grid small{font-size:.67rem;color:var(--text-light)}
.gx-pie-svg{display:block;width:min(240px,75%);height:auto;margin:auto}.gx-pie-svg path{stroke:var(--bg-card);stroke-width:2}.gx-pie-note{text-align:center;color:var(--text-light);font-size:.75rem;padding:.4rem}
@media(max-width:980px){.gx-result-actions{grid-template-columns:repeat(3,minmax(0,1fr))}.gx-related-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.gx-two-col,.gx-input-grid{grid-template-columns:1fr}.gx-tradeoff-body .gx25-scenario-grid{grid-template-columns:1fr}.gx-result-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.gx-quick-grid{grid-template-columns:1fr}.gx-related-grid{grid-template-columns:1fr}.gx-primary-top{flex-direction:column}.gx-complete{align-self:flex-start}.gx-share-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:420px){.gx-primary-card{padding:1rem}.gx-primary-value{font-size:2.35rem}.gx-result-actions{grid-template-columns:1fr 1fr}.gx-history-head{flex-direction:column}.gx-history-actions{flex-direction:column}.gx-history-actions .btn{width:100%}}
@media print{.gx-result-shell{display:block!important}.gx-result-action,.gx-quick-section,.gx-related-section,.gx-share-modal,.gx-result-toast,.gx-history-card,.history-panel{display:none!important}.gx-primary-card,.gx-result-section{box-shadow:none!important;break-inside:avoid}.gx-primary-value{font-size:2.5rem}.gx-result-shell{margin-top:0}}
.gx-pie-seg.gx-pie-0{fill:var(--accent)}.gx-pie-seg.gx-pie-1{fill:#94a3b8}.gx-pie-legend{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem;margin:.7rem auto 0;max-width:520px}.gx-pie-legend span{display:grid;grid-template-columns:10px 1fr auto;gap:.45rem;align-items:center;font-size:.75rem;color:var(--text)}.gx-pie-dot{width:9px;height:9px;border-radius:50%;display:block}.gx-pie-dot-0{background:var(--accent)}.gx-pie-dot-1{background:#94a3b8}.gx-pie-legend em{font-style:normal;font-weight:800}
@media(max-width:560px){.gx-pie-legend{grid-template-columns:1fr}}

/* ============================================================
   RESULT EXPERIENCE V2.2 POLISH — FUNCTION + VISUAL QA FIXES
   ============================================================ */
.gx-primary-card{background:var(--bg-card)!important;color:var(--text)!important;box-shadow:0 14px 34px rgba(15,23,42,.08)!important}
.gx-primary-value{font-size:clamp(2.45rem,6vw,4rem)!important;max-width:100%;}
.gx-metric-card{background:var(--bg-light)!important;border:1px solid var(--border)!important;padding:1.05rem 1.1rem!important}
.gx-metric-card span{font-size:.76rem!important;color:var(--text-light)!important;font-weight:750!important}
.gx-metric-card strong{font-size:1.28rem!important;color:var(--text)!important}
.gx-result-actions{grid-template-columns:repeat(6,minmax(105px,1fr))!important;overflow-x:auto;padding-bottom:.15rem}
.gx-result-action{min-width:105px!important;white-space:nowrap;font-size:.76rem!important}
.gx-insight-section{background:var(--bg-card)!important}
.gx-two-col article{background:var(--bg-light)!important}
.gx-two-col article p{color:var(--text)!important;opacity:1!important}
.gx-chart-controls{display:flex;align-items:center;gap:.45rem}
.gx-chart-toggle{display:grid!important;place-items:center!important;padding:0!important;flex:0 0 42px!important;min-width:42px!important;position:relative;z-index:4;pointer-events:auto!important}
.gx-chart-toggle svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.gx-chart-wrap{background:var(--bg-light)!important;min-height:300px!important}
.gx-chart-wrap>svg{width:100%;height:auto;min-height:280px;display:block}
.gx-chart-line-new{fill:none;stroke:var(--accent);stroke-width:4;stroke-linecap:round;stroke-linejoin:round}
.gx-chart-gridline{stroke:var(--border);stroke-width:1}
.gx-chart-point{fill:var(--accent);stroke:var(--bg-card);stroke-width:2}
.gx-chart-axis{fill:var(--text-light);font-size:12px;font-weight:650}
.gx-chart-y-label{fill:var(--text);font-size:11px;font-weight:800}
.gx-chart-legend{display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-top:.65rem;color:var(--text-light);font-size:.74rem}
.gx-chart-legend span:first-child{display:flex;align-items:center;gap:.4rem;color:var(--text);font-weight:750}
.gx-chart-legend i{width:9px;height:9px;border-radius:50%;background:var(--accent);display:inline-block}
.gx-chart-axis-note{font-size:.7rem}
.gx-chart-note{color:var(--text)!important;background:var(--bg-light)!important;border-left-width:3px!important}
.gx-chart-note strong{color:var(--text)!important}
.gx-tradeoff-body .gx25-scenario-card{background:var(--bg-light)!important;color:var(--text)!important}
.gx-tradeoff-body .gx25-scenario-card *{color:var(--text)!important;opacity:1!important}
.gx-tradeoff-body .gx25-scenario-card small{color:var(--accent)!important}
.gx-tradeoff-body .gx25-scenario-card.is-current{background:color-mix(in srgb,var(--accent) 8%,var(--bg-card))!important;border-width:2px!important}
.gx-tradeoff-body .gx25-compare-table tbody tr:nth-child(2){background:color-mix(in srgb,var(--accent) 10%,var(--bg-card))!important}
.gx-related-card{background:var(--bg-light)!important}
.gx-related-card span{color:var(--text)!important;opacity:.82!important}
.gx-history-card{background:var(--bg-card)!important}
.gx-history-card>b{font-size:1.45rem!important;line-height:1.15!important;margin:.35rem 0 .65rem!important}
.gx-history-metric{display:inline-flex!important;margin:.2rem .7rem .2rem 0!important;padding:.3rem .45rem!important;border-radius:8px!important;background:var(--bg-light)!important;color:var(--text)!important}
.gx-history-metric em{color:var(--text-light)!important;margin-right:.25rem}
.gx-history-actions{margin-top:1rem!important}
.gx-share-dialog{width:min(760px,100%)!important}
.gx-share-message{margin:1rem 0;padding:1rem;border:1px solid var(--border);border-radius:16px;background:var(--bg-light);display:grid;gap:.55rem}
.gx-share-message label{font-size:.72rem;text-transform:uppercase;letter-spacing:.1em;font-weight:850;color:var(--text-light)}
.gx-share-message textarea{width:100%;min-height:150px;resize:vertical;border:1px solid var(--border);border-radius:11px;background:var(--bg-card);color:var(--text);padding:.8rem;font:inherit;font-size:.82rem;line-height:1.55}
.gx-share-copy-main{justify-self:start;display:inline-flex;align-items:center;gap:.4rem;border:1px solid var(--accent);background:var(--accent);color:#fff;border-radius:10px;padding:.58rem .8rem;font:inherit;font-weight:800;cursor:pointer}
.gx-share-copy-main svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8}
.gx-share-preview small{display:block;color:var(--text-light);font-size:.75rem;margin-top:.15rem}.gx-share-preview small b{color:var(--text)}
.gx-share-option{position:relative}
.gx-share-option span{font-size:1.35rem;line-height:1}
html[data-theme="dark"] .gx-primary-card,html[data-theme="dark"] .gx-result-section{background:#111827!important;border-color:#334155!important}
html[data-theme="dark"] .gx-metric-card,html[data-theme="dark"] .gx-two-col article,html[data-theme="dark"] .gx-input-item,html[data-theme="dark"] .gx-quick-grid button,html[data-theme="dark"] .gx-related-card,html[data-theme="dark"] .gx-history-metric,html[data-theme="dark"] .gx-chart-wrap,html[data-theme="dark"] .gx-chart-note,html[data-theme="dark"] .gx-share-message{background:#0f172a!important;border-color:#334155!important}
html[data-theme="dark"] .gx-two-col article p,html[data-theme="dark"] .gx-chart-note,html[data-theme="dark"] .gx-related-card span{color:#e5e7eb!important}
html[data-theme="dark"] .gx-chart-axis{fill:#cbd5e1}.gxv2-result-card{display:none!important}
@media(max-width:980px){.gx-result-actions{grid-template-columns:repeat(3,minmax(120px,1fr))!important;overflow:visible}.gx-related-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.gx-result-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}.gx-result-action{min-width:0!important}.gx-chart-wrap>svg{min-height:240px}.gx-history-actions{flex-direction:row!important}.gx-history-actions .btn{width:auto!important}.gx-related-grid{grid-template-columns:1fr}}

/* ============================================================
   GANITRA CALCULATOR — PREMIUM RESULT EXPERIENCE V2.3
   Final visual layer: hierarchy, contrast, calm motion, light/dark parity.
   ============================================================ */
.gx-result-shell{width:100%;max-width:920px;margin:1.35rem auto 0;color:var(--text);isolation:isolate}
.gx-primary-card{position:relative;overflow:hidden;border:1px solid color-mix(in srgb,var(--accent) 18%,var(--border))!important;border-radius:26px!important;padding:clamp(1.35rem,3vw,2rem)!important;background:linear-gradient(145deg,var(--bg-card) 0%,color-mix(in srgb,var(--accent) 3%,var(--bg-card)) 100%)!important;box-shadow:0 20px 55px rgba(15,23,42,.10)!important}
.gx-primary-card:before{content:"";position:absolute;inset:0 0 auto 0;height:4px;background:linear-gradient(90deg,var(--accent),color-mix(in srgb,var(--accent) 35%,white),transparent);opacity:.95}
.gx-primary-top{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}
.gx-primary-kicker,.gx-kicker{color:var(--accent)!important;font-size:.68rem!important;font-weight:900!important;letter-spacing:.13em!important;text-transform:uppercase!important;opacity:1!important}
.gx-primary-top h2{margin:.25rem 0 0!important;color:var(--text)!important;font-size:clamp(1.15rem,2.4vw,1.5rem)!important;letter-spacing:-.02em}
.gx-complete{display:inline-flex;align-items:center;gap:.35rem;padding:.38rem .65rem;border:1px solid color-mix(in srgb,var(--success) 28%,var(--border));border-radius:999px;background:color-mix(in srgb,var(--success) 8%,var(--bg-card));color:var(--success)!important;font-size:.7rem;font-weight:850;white-space:nowrap}
.gx-primary-value{margin-top:1.15rem!important;color:var(--primary)!important;font-size:clamp(2.7rem,7vw,4.6rem)!important;line-height:.98!important;letter-spacing:-.065em!important;font-weight:900!important;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.gx-based-on{margin:.85rem 0 0!important;max-width:760px;color:var(--text-light)!important;font-size:.9rem!important;line-height:1.6!important;opacity:1!important}
.gx-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:.85rem!important;margin-top:1.25rem!important}
.gx-metric-card{position:relative;overflow:hidden;border:1px solid var(--border)!important;border-radius:17px!important;padding:1rem 1.05rem!important;background:var(--bg-light)!important;box-shadow:none!important}
.gx-metric-card:after{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--accent);opacity:.72}
.gx-metric-card span{color:var(--text-light)!important;font-size:.72rem!important;font-weight:800!important;letter-spacing:.02em;opacity:1!important}
.gx-metric-card strong{color:var(--text)!important;font-size:clamp(1.1rem,2.3vw,1.4rem)!important;font-weight:900!important;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.gx-result-actions{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:.55rem!important;margin-top:1.3rem!important;padding-top:1.15rem!important;border-top:1px solid var(--border)!important;overflow:visible!important}
.gx-result-action{min-width:0!important;min-height:48px!important;border:1px solid var(--border)!important;border-radius:13px!important;background:var(--bg-light)!important;color:var(--text)!important;font-size:.72rem!important;font-weight:850!important;box-shadow:0 1px 1px rgba(15,23,42,.03);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background .18s ease}
.gx-result-action:hover,.gx-result-action:focus-visible{transform:translateY(-2px)!important;border-color:color-mix(in srgb,var(--accent) 45%,var(--border))!important;background:color-mix(in srgb,var(--accent) 7%,var(--bg-light))!important;box-shadow:0 7px 18px rgba(15,23,42,.08)!important;outline:none}
.gx-result-action svg{width:17px!important;height:17px!important;color:currentColor}
.gx-result-section{border:1px solid var(--border)!important;border-radius:21px!important;padding:clamp(1.15rem,2.7vw,1.55rem)!important;background:var(--bg-card)!important;box-shadow:0 8px 26px rgba(15,23,42,.045)!important}
.gx-insight-section{margin-top:1rem!important}
.gx-two-col{gap:.85rem!important}
.gx-two-col article{border:1px solid var(--border)!important;border-radius:17px!important;background:var(--bg-light)!important;padding:1.15rem!important;box-shadow:none!important}
.gx-two-col article h3,.gx-result-section h3{color:var(--text)!important;font-weight:850!important}
.gx-two-col article p,.gx-result-section p{color:var(--text-light)!important;opacity:1!important}
.gx-input-grid{gap:.6rem!important}
.gx-input-item{border-radius:13px!important;background:var(--bg-light)!important;border-color:var(--border)!important;padding:.75rem .85rem!important}
.gx-input-item span{color:var(--text-light)!important;opacity:1!important}.gx-input-item strong{color:var(--text)!important;opacity:1!important}
.gx-quick-grid button{border-radius:13px!important;background:var(--bg-light)!important;color:var(--text)!important;border-color:var(--border)!important;transition:all .18s ease}
.gx-quick-grid button:hover,.gx-quick-grid button:focus-visible{border-color:var(--accent)!important;color:var(--accent)!important;transform:translateY(-1px);outline:none}
.gx-chart-wrap{min-height:310px!important;border-radius:18px!important;background:var(--bg-light)!important;border-color:var(--border)!important;padding:.75rem!important}
.gx-chart-controls{align-items:center!important}
.gx-chart-toggle{display:grid!important;place-items:center!important;width:42px!important;height:42px!important;border-radius:12px!important;border:1px solid var(--border)!important;background:var(--bg-light)!important;color:var(--text)!important;cursor:pointer!important;pointer-events:auto!important;transition:all .18s ease}
.gx-chart-toggle:hover,.gx-chart-toggle:focus-visible{border-color:var(--accent)!important;color:var(--accent)!important;transform:translateY(-1px);outline:none}
.gx-chart-toggle.is-active{background:var(--accent)!important;color:#fff!important;border-color:var(--accent)!important}
.gx-chart-axis{fill:var(--text-light)!important;font-size:11px!important;font-weight:700!important;opacity:1!important}.gx-chart-y-label{fill:var(--text)!important;font-weight:850!important}.gx-chart-gridline{stroke:var(--border)!important;opacity:.9!important}.gx-chart-point{fill:var(--accent)!important;stroke:var(--bg-card)!important;stroke-width:3!important}.gx-chart-line-new{stroke:var(--accent)!important;stroke-width:3.5!important}
.gx-chart-legend{color:var(--text-light)!important;opacity:1!important}.gx-chart-legend span:first-child{color:var(--text)!important}.gx-chart-axis-note{color:var(--text-light)!important;opacity:1!important}
.gx-chart-note{color:var(--text-light)!important;background:color-mix(in srgb,var(--accent) 4%,var(--bg-light))!important;border-left-color:var(--accent)!important;opacity:1!important}.gx-chart-note strong{color:var(--text)!important}
.gx-tradeoff-body .gx25-scenario-grid{gap:.8rem!important}
.gx-tradeoff-body .gx25-scenario-card{border:1px solid var(--border)!important;border-radius:17px!important;background:var(--bg-light)!important;color:var(--text)!important;padding:1rem!important;box-shadow:none!important;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}
.gx-tradeoff-body .gx25-scenario-card:hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(15,23,42,.06)}
.gx-tradeoff-body .gx25-scenario-card *{opacity:1!important}.gx-tradeoff-body .gx25-scenario-card span{color:var(--text)!important}.gx-tradeoff-body .gx25-scenario-card small{color:var(--accent)!important}.gx-tradeoff-body .gx25-scenario-card strong{color:var(--text)!important;font-size:1.3rem!important;font-weight:900!important}.gx-tradeoff-body .gx25-scenario-card em{color:var(--text-light)!important}.gx-tradeoff-body .gx25-scenario-card.is-current{border:2px solid var(--accent)!important;background:color-mix(in srgb,var(--accent) 7%,var(--bg-card))!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 10%,transparent)!important}.gx-tradeoff-body .gx25-use-scenario{background:var(--bg-card)!important;color:var(--text)!important;border-color:var(--border)!important}.gx-tradeoff-body .gx25-use-scenario:hover{border-color:var(--accent)!important;color:var(--accent)!important}
.gx-tradeoff-body .gx25-compare-table th{color:var(--text-light)!important;opacity:1!important}.gx-tradeoff-body .gx25-compare-table td{color:var(--text)!important;opacity:1!important}.gx-tradeoff-body .gx25-compare-table tbody tr:nth-child(2){background:color-mix(in srgb,var(--accent) 9%,var(--bg-card))!important}
.gx-related-grid{gap:.8rem!important}.gx-related-card{border-radius:16px!important;background:var(--bg-light)!important;border-color:var(--border)!important;color:var(--text)!important;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease!important}.gx-related-card:hover{transform:translateY(-2px)!important;box-shadow:0 8px 20px rgba(15,23,42,.06)!important}.gx-related-card strong{color:var(--text)!important}.gx-related-card span{color:var(--text-light)!important;opacity:1!important}.gx-related-card>b{color:var(--accent)!important}
.gx-history-card{border-radius:17px!important;background:var(--bg-card)!important;border-color:var(--border)!important;padding:1rem 1.05rem!important;box-shadow:0 4px 14px rgba(15,23,42,.045)!important}.gx-history-head strong{color:var(--text)!important;font-size:.9rem!important}.gx-history-head time{color:var(--text-light)!important;opacity:1!important}.gx-history-card>.gx-kicker{display:block;margin-top:.75rem}.gx-history-card>b{color:var(--text)!important;font-size:1.45rem!important;font-weight:900!important}.gx-history-metric{color:var(--text-light)!important;background:var(--bg-light)!important;border:1px solid var(--border)!important;opacity:1!important}.gx-history-metric em{color:var(--text)!important}.gx-history-actions .btn{font-weight:800!important}
.history-details{border-radius:19px!important;border-color:var(--border)!important;background:var(--bg-card)!important;overflow:hidden}.history-details summary{color:var(--text)!important;background:var(--bg-card)!important}.history-details summary::after{color:var(--text-light)!important}.history-content{border-top-color:var(--border)!important}
.gx-share-dialog{border-radius:24px!important;background:var(--bg-card)!important;color:var(--text)!important;border-color:var(--border)!important;box-shadow:0 30px 90px rgba(0,0,0,.32)!important}.gx-share-dialog>p,.gx-share-preview span,.gx-share-message label,.gx-share-grid small{color:var(--text-light)!important;opacity:1!important}.gx-share-preview,.gx-share-message,.gx-share-grid>a,.gx-share-grid>button{background:var(--bg-light)!important;border-color:var(--border)!important;color:var(--text)!important}.gx-share-preview b,.gx-share-grid strong{color:var(--text)!important}.gx-share-message textarea{background:var(--bg-card)!important;color:var(--text)!important;border-color:var(--border)!important}.gx-share-copy-main{box-shadow:0 5px 15px color-mix(in srgb,var(--accent) 22%,transparent)!important}
/* Kill accidental low-opacity text inherited from older result layers. */
.gx-result-shell,.gx-result-shell *{opacity:1}
html[data-theme="dark"] .gx-result-shell{color:var(--text)}
html[data-theme="dark"] .gx-primary-card{background:linear-gradient(145deg,#172033 0%,#111827 100%)!important;border-color:#3b4b63!important;box-shadow:0 22px 60px rgba(0,0,0,.28)!important}
html[data-theme="dark"] .gx-primary-card:before{background:linear-gradient(90deg,#60a5fa,#93c5fd,transparent)}
html[data-theme="dark"] .gx-primary-value,html[data-theme="dark"] .gx-primary-top h2,html[data-theme="dark"] .gx-metric-card strong,html[data-theme="dark"] .gx-input-item strong,html[data-theme="dark"] .gx-result-section h3,html[data-theme="dark"] .gx-two-col article h3,html[data-theme="dark"] .gx-history-card>b,html[data-theme="dark"] .gx-history-head strong{color:#f8fafc!important}
html[data-theme="dark"] .gx-based-on,html[data-theme="dark"] .gx-result-section p,html[data-theme="dark"] .gx-two-col article p,html[data-theme="dark"] .gx-input-item span,html[data-theme="dark"] .gx-metric-card span,html[data-theme="dark"] .gx-history-head time,html[data-theme="dark"] .gx-history-metric,html[data-theme="dark"] .gx-related-card span,html[data-theme="dark"] .gx-chart-axis,html[data-theme="dark"] .gx-chart-axis-note,html[data-theme="dark"] .gx-chart-note{color:#cbd5e1!important}
html[data-theme="dark"] .gx-metric-card,html[data-theme="dark"] .gx-two-col article,html[data-theme="dark"] .gx-input-item,html[data-theme="dark"] .gx-quick-grid button,html[data-theme="dark"] .gx-related-card,html[data-theme="dark"] .gx-history-metric,html[data-theme="dark"] .gx-chart-wrap,html[data-theme="dark"] .gx-chart-note,html[data-theme="dark"] .gx-history-card{background:#0f172a!important;border-color:#334155!important}
html[data-theme="dark"] .gx-result-section,html[data-theme="dark"] .history-details{background:#111827!important;border-color:#334155!important}
html[data-theme="dark"] .gx-result-action{background:#0f172a!important;color:#e5e7eb!important;border-color:#334155!important}.gx-result-action:hover,.gx-result-action:focus-visible{background:#172033!important}
html[data-theme="dark"] .gx-tradeoff-body .gx25-scenario-card{background:#0f172a!important;border-color:#334155!important}.gx-tradeoff-body .gx25-scenario-card.is-current{background:#172554!important;border-color:#60a5fa!important}.gx-tradeoff-body .gx25-scenario-card strong,.gx-tradeoff-body .gx25-scenario-card span{color:#f8fafc!important}.gx-tradeoff-body .gx25-scenario-card em{color:#cbd5e1!important}.gx-tradeoff-body .gx25-compare-table td{color:#f1f5f9!important}.gx-tradeoff-body .gx25-compare-table th{color:#cbd5e1!important}
html[data-theme="dark"] .gx-share-dialog{background:#111827!important;border-color:#334155!important}.gx-share-dialog h2{color:var(--text)!important}html[data-theme="dark"] .gx-share-preview,html[data-theme="dark"] .gx-share-message,html[data-theme="dark"] .gx-share-grid>a,html[data-theme="dark"] .gx-share-grid>button{background:#0f172a!important;border-color:#334155!important}html[data-theme="dark"] .gx-share-preview b,html[data-theme="dark"] .gx-share-grid strong{color:#f8fafc!important}html[data-theme="dark"] .gx-share-message textarea{background:#111827!important;color:#f8fafc!important;border-color:#475569!important}
@media(max-width:980px){.gx-result-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important}.gx-related-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:760px){.gx-result-shell{margin-top:1rem}.gx-primary-card{border-radius:21px!important;padding:1.15rem!important}.gx-primary-top{flex-direction:column}.gx-complete{align-self:flex-start}.gx-primary-value{font-size:clamp(2.4rem,13vw,3.45rem)!important}.gx-metric-grid{grid-template-columns:1fr!important}.gx-result-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}.gx-result-action{font-size:.74rem!important}.gx-two-col,.gx-input-grid{grid-template-columns:1fr!important}.gx-tradeoff-body .gx25-scenario-grid{grid-template-columns:1fr!important}.gx-related-grid{grid-template-columns:1fr!important}.gx-chart-wrap{min-height:260px!important}.gx-chart-wrap>svg{min-height:235px!important}.gx-share-grid{grid-template-columns:repeat(2,1fr)!important}}
@media(max-width:420px){.gx-result-actions{grid-template-columns:1fr 1fr!important}.gx-history-actions{flex-direction:column!important}.gx-history-actions .btn{width:100%!important}.gx-share-grid{grid-template-columns:1fr 1fr!important}}
@media(prefers-reduced-motion:reduce){.gx-result-action,.gx-related-card,.gx-tradeoff-body .gx25-scenario-card,.gx-chart-toggle{transition:none!important;transform:none!important}}

/* ============================================================
   GANITRA CALCULATOR — RESULT EXPERIENCE V2.4 POLISH
   Global metric hierarchy + premium light-mode hero + interaction polish.
   ============================================================ */
/* Secondary metrics are always intentional two-up cards on larger screens. */
.gx-metric-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
.gx-metric-card{min-width:0!important;min-height:88px!important;display:flex!important;flex-direction:column!important;justify-content:center!important}
.gx-metric-card strong{display:block!important;margin-top:.3rem!important;line-height:1.15!important}

/* Light mode: make the result the visual anchor without darkening the page. */
html:not([data-theme="dark"]) .gx-primary-card{
  background:#111827!important;
  color:#f8fafc!important;
  border-color:#1f2937!important;
  box-shadow:0 20px 48px rgba(15,23,42,.14)!important;
}
html:not([data-theme="dark"]) .gx-primary-card .gx-primary-top h2,
html:not([data-theme="dark"]) .gx-primary-card .gx-primary-value{color:#f8fafc!important}
html:not([data-theme="dark"]) .gx-primary-card .gx-based-on{color:#cbd5e1!important}
html:not([data-theme="dark"]) .gx-primary-card .gx-metric-card{
  background:#1f2937!important;
  border-color:#374151!important;
  box-shadow:none!important;
}
html:not([data-theme="dark"]) .gx-primary-card .gx-metric-card span{color:#aeb9c8!important}
html:not([data-theme="dark"]) .gx-primary-card .gx-metric-card strong{color:#ffffff!important}
html:not([data-theme="dark"]) .gx-primary-card .gx-result-actions{border-top-color:#2b3442!important}
html:not([data-theme="dark"]) .gx-primary-card .gx-result-action{
  background:#1f2937!important;
  color:#f8fafc!important;
  border-color:#374151!important;
  box-shadow:none!important;
}
html:not([data-theme="dark"]) .gx-primary-card .gx-result-action:hover,
html:not([data-theme="dark"]) .gx-primary-card .gx-result-action:focus-visible{
  background:#202633!important;
  border-color:#60a5fa!important;
  color:#ffffff!important;
  box-shadow:0 8px 22px rgba(0,0,0,.22)!important;
}

/* Give the action area breathing room and a deliberate 3 × 2 desktop rhythm. */
.gx-result-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important;margin-top:1.4rem!important;padding-top:1.25rem!important}
.gx-result-action{min-height:52px!important;padding:.65rem .8rem!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:.48rem!important;line-height:1.2!important;white-space:normal!important}
.gx-result-action svg{flex:0 0 auto!important;stroke:currentColor!important;fill:none!important;stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important}

/* Related calculators should feel like product cards, not underlined hyperlinks. */
.gx-related-card,.gx-related-card *{text-decoration:none!important}
.gx-related-card{cursor:pointer!important}
.gx-related-card:hover strong{color:var(--accent)!important}
.gx-related-card:hover>b{transform:translateX(3px);display:inline-block}
.gx-related-card>b{transition:transform .18s ease!important}

/* Chart: reserve a real gutter for the Y-axis so labels can never sit on top of values. */
.gx-chart-wrap{overflow:hidden!important}
.gx-chart-wrap svg{overflow:visible!important}
.gx-chart-axis,.gx-chart-y-label{paint-order:stroke!important;stroke:transparent!important}
.gx-chart-toggle{position:relative;z-index:3!important;cursor:pointer!important;pointer-events:auto!important}
.gx-chart-toggle svg{width:19px!important;height:19px!important;stroke:currentColor!important;fill:none!important;stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important}
.gx-chart-toggle:active{transform:scale(.96)!important}

@media(max-width:760px){
  .gx-metric-grid{grid-template-columns:1fr!important}
  .gx-result-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
}

/* ============================================================
   GANITRA CALCULATOR — V2.4.1 LIGHT-MODE TYPOGRAPHY POLISH
   Keep the premium black/grey editorial hierarchy consistently
   across every Result Experience section. Dark mode is untouched.
   ============================================================ */
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-kicker,
html:not([data-theme="dark"]) .gx-result-shell .gx-kicker {
  color:#111827!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-top h2,
html:not([data-theme="dark"]) .gx-result-shell .gx-result-section h3,
html:not([data-theme="dark"]) .gx-result-shell .gx-two-col article h3 {
  color:#111827!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-based-on,
html:not([data-theme="dark"]) .gx-result-shell .gx-result-section p,
html:not([data-theme="dark"]) .gx-result-shell .gx-two-col article p,
html:not([data-theme="dark"]) .gx-result-shell .gx-chart-axis-note,
html:not([data-theme="dark"]) .gx-result-shell .gx-chart-note,
html:not([data-theme="dark"]) .gx-result-shell .gx-chart-note strong,
html:not([data-theme="dark"]) .gx-result-shell .gx-input-item span,
html:not([data-theme="dark"]) .gx-result-shell .gx-metric-card span,
html:not([data-theme="dark"]) .gx-result-shell .gx-history-head time {
  color:#4b5563!important;
}
/* Keep numeric values and actionable labels crisp black in light mode. */
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-value,
html:not([data-theme="dark"]) .gx-result-shell .gx-metric-card strong,
html:not([data-theme="dark"]) .gx-result-shell .gx-input-item strong,
html:not([data-theme="dark"]) .gx-result-shell .gx-history-card>b,
html:not([data-theme="dark"]) .gx-result-shell .gx-history-head strong,
html:not([data-theme="dark"]) .gx-result-shell .gx-related-card strong,
html:not([data-theme="dark"]) .gx-result-shell .gx-related-card span,
html:not([data-theme="dark"]) .gx-result-shell .gx-quick-grid button,
html:not([data-theme="dark"]) .gx-result-shell .gx-result-action,
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card span,
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card strong,
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card em,
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-compare-table td,
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-compare-table th {
  color:#111827!important;
  opacity:1!important;
}
/* Calculation details: label + value are intentionally bold for fast scanning. */
html:not([data-theme="dark"]) .gx-result-shell .gx-input-item span,
html:not([data-theme="dark"]) .gx-result-shell .gx-input-item strong,
html[data-theme="dark"] .gx-result-shell .gx-input-item span,
html[data-theme="dark"] .gx-result-shell .gx-input-item strong {
  font-weight:800!important;
}

/* Small supporting copy stays grey, never faint/transparent. */
html:not([data-theme="dark"]) .gx-result-shell .gx-related-card span,
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card em,
html:not([data-theme="dark"]) .gx-result-shell .gx-chart-note {
  color:#4b5563!important;
}
/* Accent is reserved for interaction/state rather than section prose. */
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card small,
html:not([data-theme="dark"]) .gx-result-shell .gx-complete {
  color:var(--accent)!important;
}

/* ============================================================
   GANITRA CALCULATOR — V2.5 PREMIUM LIGHT-MODE RESULT SECTIONS
   The page remains light; the complete result experience uses a
   layered charcoal/black card family. Dark mode is intentionally
   left to its existing theme rules.
   ============================================================ */
@media (min-width:761px){
  html:not([data-theme="dark"]) .gx-result-shell .gx-result-section{
    background:linear-gradient(145deg,#171a21 0%,#101319 100%)!important;
    border-color:#272d38!important;
    color:#f8fafc!important;
    box-shadow:0 18px 42px rgba(15,23,42,.13)!important;
  }
  html:not([data-theme="dark"]) .gx-result-shell .gx-result-section .gx-section-head h3,
  html:not([data-theme="dark"]) .gx-result-shell .gx-result-section h3{
    color:#f8fafc!important;
  }
  html:not([data-theme="dark"]) .gx-result-shell .gx-result-section .gx-section-head p,
  html:not([data-theme="dark"]) .gx-result-shell .gx-result-section p{
    color:#c7ced9!important;
  }
  html:not([data-theme="dark"]) .gx-result-shell .gx-result-section .gx-kicker{
    color:#93c5fd!important;
  }

  /* What This Means + Key Insight */
  html:not([data-theme="dark"]) .gx-result-shell .gx-two-col article{
    background:#20242c!important;
    border-color:#323946!important;
    color:#f8fafc!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important;
  }
  html:not([data-theme="dark"]) .gx-result-shell .gx-two-col article h3{color:#f8fafc!important}
  html:not([data-theme="dark"]) .gx-result-shell .gx-two-col article p{color:#cbd5e1!important}

  /* Calculation details */
  html:not([data-theme="dark"]) .gx-result-shell .gx-input-item{
    background:#20242c!important;
    border-color:#343b48!important;
  }
  html:not([data-theme="dark"]) .gx-result-shell .gx-input-item span{color:#aeb8c7!important}
  html:not([data-theme="dark"]) .gx-result-shell .gx-input-item strong{color:#f8fafc!important}

  /* Quick actions */
  html:not([data-theme="dark"]) .gx-result-shell .gx-quick-grid button{
    background:#20242c!important;
    color:#f8fafc!important;
    border-color:#343b48!important;
    box-shadow:none!important;
  }
  html:not([data-theme="dark"]) .gx-result-shell .gx-quick-grid button:hover,
  html:not([data-theme="dark"]) .gx-result-shell .gx-quick-grid button:focus-visible{
    background:#2a303a!important;
    color:#fff!important;
    border-color:#60a5fa!important;
    box-shadow:0 8px 20px rgba(0,0,0,.22)!important;
  }

  /* Visual summary */
  html:not([data-theme="dark"]) .gx-result-shell .gx-chart-wrap{
    background:#0d1015!important;
    border-color:#2f3744!important;
  }
  html:not([data-theme="dark"]) .gx-result-shell .gx-chart-axis{fill:#b8c2d0!important}
  html:not([data-theme="dark"]) .gx-result-shell .gx-chart-y-label{fill:#f8fafc!important}
  html:not([data-theme="dark"]) .gx-result-shell .gx-chart-gridline{stroke:#303846!important}
  html:not([data-theme="dark"]) .gx-result-shell .gx-chart-axis-note{color:#aeb8c7!important}
  html:not([data-theme="dark"]) .gx-result-shell .gx-chart-legend{color:#cbd5e1!important}
  html:not([data-theme="dark"]) .gx-result-shell .gx-chart-legend span:first-child{color:#f8fafc!important}
  html:not([data-theme="dark"]) .gx-result-shell .gx-chart-note{
    background:#20242c!important;
    color:#cbd5e1!important;
    border-left-color:#60a5fa!important;
  }
  html:not([data-theme="dark"]) .gx-result-shell .gx-chart-note strong{color:#f8fafc!important}
  html:not([data-theme="dark"]) .gx-result-shell .gx-chart-toggle{
    background:#20242c!important;color:#f8fafc!important;border-color:#3a4350!important;
  }
  html:not([data-theme="dark"]) .gx-result-shell .gx-chart-toggle:hover,
  html:not([data-theme="dark"]) .gx-result-shell .gx-chart-toggle:focus-visible{
    background:#2a303a!important;color:#fff!important;border-color:#60a5fa!important;
  }

  /* Compare options */
  html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card{
    background:#20242c!important;
    border-color:#343b48!important;
    color:#f8fafc!important;
  }
  html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card span,
  html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card strong{color:#f8fafc!important}
  html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card em{color:#b8c2d0!important}
  html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card small{color:#93c5fd!important}
  html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card.is-current{
    background:#172554!important;border-color:#60a5fa!important;box-shadow:0 0 0 3px rgba(96,165,250,.10)!important;
  }
  html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-use-scenario{
    background:#2a303a!important;color:#f8fafc!important;border-color:#3a4350!important;
  }
  html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-use-scenario:hover{
    background:#334155!important;color:#fff!important;border-color:#60a5fa!important;
  }
  html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-compare-table{
    background:#20242c!important;border-color:#343b48!important;color:#f8fafc!important;
  }
  html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-compare-table th{color:#aeb8c7!important}
  html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-compare-table td{color:#f1f5f9!important}
  html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-compare-table tbody tr:nth-child(2){background:#172554!important}

  /* Keep Going */
  html:not([data-theme="dark"]) .gx-result-shell .gx-related-card{
    background:#20242c!important;
    border-color:#343b48!important;
    color:#f8fafc!important;
    box-shadow:none!important;
  }
  html:not([data-theme="dark"]) .gx-result-shell .gx-related-card strong{color:#f8fafc!important}
  html:not([data-theme="dark"]) .gx-result-shell .gx-related-card span{color:#b8c2d0!important}
  html:not([data-theme="dark"]) .gx-result-shell .gx-related-card>b{color:#93c5fd!important}
  html:not([data-theme="dark"]) .gx-result-shell .gx-related-card:hover{
    background:#272d37!important;border-color:#60a5fa!important;box-shadow:0 10px 24px rgba(15,23,42,.18)!important;
  }
  html:not([data-theme="dark"]) .gx-result-shell .gx-related-card:hover strong{color:#fff!important}
}

/* Small screens keep the light page airy while retaining the same dark card family. */
@media (max-width:760px){
  html:not([data-theme="dark"]) .gx-result-shell .gx-result-section{
    background:#15181e!important;border-color:#2a3039!important;color:#f8fafc!important;
    box-shadow:0 12px 30px rgba(15,23,42,.12)!important;
  }
  html:not([data-theme="dark"]) .gx-result-shell .gx-result-section h3{color:#f8fafc!important}
  html:not([data-theme="dark"]) .gx-result-shell .gx-result-section p{color:#cbd5e1!important}
  html:not([data-theme="dark"]) .gx-result-shell .gx-result-section .gx-kicker{color:#93c5fd!important}
  html:not([data-theme="dark"]) .gx-result-shell .gx-two-col article,
  html:not([data-theme="dark"]) .gx-result-shell .gx-input-item,
  html:not([data-theme="dark"]) .gx-result-shell .gx-quick-grid button,
  html:not([data-theme="dark"]) .gx-result-shell .gx-related-card,
  html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card{
    background:#20242c!important;border-color:#343b48!important;color:#f8fafc!important;
  }
  html:not([data-theme="dark"]) .gx-result-shell .gx-two-col article h3,
  html:not([data-theme="dark"]) .gx-result-shell .gx-input-item strong,
  html:not([data-theme="dark"]) .gx-result-shell .gx-related-card strong,
  html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card strong,
  html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card span{color:#f8fafc!important}
  html:not([data-theme="dark"]) .gx-result-shell .gx-two-col article p,
  html:not([data-theme="dark"]) .gx-result-shell .gx-input-item span,
  html:not([data-theme="dark"]) .gx-result-shell .gx-related-card span,
  html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card em{color:#b8c2d0!important}
}

/* ============================================================
   GANITRA CALCULATOR — V2.5.2 FINAL LIGHT-MODE HERO BALANCE
   The light-mode primary result is premium charcoal, not near-black.
   Keep the result readable and visually lighter than the previous pass.
   ============================================================ */
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card{
  background:linear-gradient(145deg,#2b313b 0%,#232932 100%)!important;
  color:#f8fafc!important;
  border-color:#3d4653!important;
  box-shadow:0 18px 42px rgba(15,23,42,.14)!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card:before{
  background:linear-gradient(90deg,#60a5fa,#93c5fd,transparent)!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-primary-kicker,
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-kicker{
  color:#93c5fd!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-primary-top h2,
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-primary-value{
  color:#ffffff!important;
  opacity:1!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-based-on{
  color:#d1d7e0!important;
  opacity:1!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-complete{
  background:rgba(255,255,255,.09)!important;
  border-color:rgba(147,197,253,.34)!important;
  color:#d9f99d!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-metric-card{
  background:#353d49!important;
  border-color:#465160!important;
  color:#f8fafc!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-metric-card span{
  color:#c4ccd7!important;
  opacity:1!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-metric-card strong{
  color:#ffffff!important;
  opacity:1!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-result-actions{
  border-top-color:#465160!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-result-action{
  background:#353d49!important;
  border-color:#465160!important;
  color:#f8fafc!important;
  opacity:1!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-result-action:hover,
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-result-action:focus-visible{
  background:#414b59!important;
  border-color:#60a5fa!important;
  color:#ffffff!important;
}

/* ============================================================
   GANITRA CALCULATOR — RESTORE APPROVED ORIGINAL LIGHT PALETTE
   Apply the original airy, premium result-card language across
   the entire Result Experience. Dark mode remains unchanged.
   ============================================================ */
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card{
  background:linear-gradient(145deg,#eefaff 0%,#e2f7fc 100%)!important;
  color:#172033!important;
  border:1px solid #c9eaf4!important;
  box-shadow:0 16px 36px rgba(24,102,132,.10)!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card:before{
  background:linear-gradient(90deg,#1d8cf8,#48c8d8,transparent)!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-primary-kicker,
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-kicker{
  color:#075985!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-primary-top h2{
  color:#172033!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-primary-value{
  color:#0f766e!important;
  opacity:1!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-based-on{
  color:#526274!important;
  opacity:1!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-complete{
  background:#ecfdf5!important;
  border-color:#b7e6d1!important;
  color:#166534!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-metric-card{
  background:rgba(255,255,255,.88)!important;
  border:1px solid #cfe6ef!important;
  box-shadow:0 6px 16px rgba(30,90,120,.06)!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-metric-card span{
  color:#486276!important;
  font-weight:800!important;
  opacity:1!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-metric-card strong{
  color:#172033!important;
  opacity:1!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-result-actions{
  border-top-color:#c8e2eb!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-result-action{
  background:rgba(255,255,255,.86)!important;
  color:#172033!important;
  border:1px solid #c9e1ea!important;
  box-shadow:0 3px 10px rgba(30,90,120,.04)!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-result-action:hover,
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-result-action:focus-visible{
  background:#ffffff!important;
  color:#075985!important;
  border-color:#60a5fa!important;
  box-shadow:0 8px 20px rgba(30,90,120,.10)!important;
}

/* Every major result section uses the same approved light visual family. */
html:not([data-theme="dark"]) .gx-result-shell .gx-result-section{
  background:linear-gradient(145deg,#f2fbfe 0%,#eaf8fc 100%)!important;
  border:1px solid #cfe8f0!important;
  color:#172033!important;
  box-shadow:0 12px 28px rgba(24,102,132,.07)!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-result-section h3,
html:not([data-theme="dark"]) .gx-result-shell .gx-result-section .gx-section-head h3{
  color:#172033!important;
  opacity:1!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-result-section p,
html:not([data-theme="dark"]) .gx-result-shell .gx-result-section .gx-section-head p{
  color:#526274!important;
  opacity:1!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-result-section .gx-kicker{
  color:#075985!important;
  opacity:1!important;
}

/* What This Means / Key Insight */
html:not([data-theme="dark"]) .gx-result-shell .gx-two-col article{
  background:rgba(255,255,255,.90)!important;
  border:1px solid #d4e9f0!important;
  color:#172033!important;
  box-shadow:0 6px 16px rgba(24,102,132,.05)!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-two-col article h3{
  color:#172033!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-two-col article p{
  color:#526274!important;
  opacity:1!important;
}

/* Calculation Inputs: label and value are both deliberately bold. */
html:not([data-theme="dark"]) .gx-result-shell .gx-input-item{
  background:#ffffff!important;
  border:1px solid #d4e9f0!important;
  color:#172033!important;
  box-shadow:none!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-input-item span,
html:not([data-theme="dark"]) .gx-result-shell .gx-input-item strong{
  color:#172033!important;
  font-weight:800!important;
  opacity:1!important;
}

/* Quick Actions */
html:not([data-theme="dark"]) .gx-result-shell .gx-quick-grid button{
  background:#ffffff!important;
  color:#172033!important;
  border:1px solid #d4e9f0!important;
  box-shadow:none!important;
  opacity:1!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-quick-grid button:hover,
html:not([data-theme="dark"]) .gx-result-shell .gx-quick-grid button:focus-visible{
  background:#f8fdff!important;
  color:#075985!important;
  border-color:#60a5fa!important;
  box-shadow:0 8px 18px rgba(24,102,132,.09)!important;
}

/* Visual Summary */
html:not([data-theme="dark"]) .gx-result-shell .gx-chart-wrap{
  background:#ffffff!important;
  border:1px solid #d4e9f0!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-chart-axis{
  fill:#526274!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-chart-y-label{
  fill:#172033!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-chart-gridline{
  stroke:#d8e8ef!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-chart-axis-note,
html:not([data-theme="dark"]) .gx-result-shell .gx-chart-legend{
  color:#526274!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-chart-note{
  background:#f5fbfd!important;
  color:#526274!important;
  border-left-color:#38bdf8!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-chart-note strong{
  color:#172033!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-chart-toggle{
  background:#ffffff!important;
  color:#172033!important;
  border-color:#cfe4ec!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-chart-toggle:hover,
html:not([data-theme="dark"]) .gx-result-shell .gx-chart-toggle:focus-visible{
  background:#eefaff!important;
  color:#075985!important;
  border-color:#60a5fa!important;
}

/* Compare Options / Trade-offs */
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card{
  background:#ffffff!important;
  border:1px solid #d4e9f0!important;
  color:#172033!important;
  box-shadow:0 5px 14px rgba(24,102,132,.04)!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card span,
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card strong{
  color:#172033!important;
  opacity:1!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card em{
  color:#526274!important;
  opacity:1!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card small{
  color:#075985!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card.is-current{
  background:#e8f6ff!important;
  border-color:#60a5fa!important;
  box-shadow:0 0 0 3px rgba(96,165,250,.10)!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-use-scenario{
  background:#f7fcfe!important;
  color:#172033!important;
  border-color:#cfe4ec!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-use-scenario:hover{
  background:#eefaff!important;
  color:#075985!important;
  border-color:#60a5fa!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-compare-table{
  background:#ffffff!important;
  border-color:#d4e9f0!important;
  color:#172033!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-compare-table th,
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-compare-table td{
  color:#172033!important;
  opacity:1!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-compare-table th{
  background:#f5fbfd!important;
  color:#526274!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-compare-table tbody tr:nth-child(2){
  background:#e8f6ff!important;
}

/* Keep Going / Related Calculators */
html:not([data-theme="dark"]) .gx-result-shell .gx-related-card{
  background:#ffffff!important;
  border:1px solid #d4e9f0!important;
  color:#172033!important;
  box-shadow:0 6px 16px rgba(24,102,132,.05)!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-related-card strong{
  color:#172033!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-related-card span{
  color:#526274!important;
  opacity:1!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-related-card>b{
  color:#075985!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-related-card:hover{
  background:#f8fdff!important;
  border-color:#60a5fa!important;
  box-shadow:0 12px 26px rgba(24,102,132,.11)!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-related-card:hover strong{
  color:#075985!important;
}

/* ============================================================
   GANITRA CALCULATOR — FINAL APPROVED LIGHT PALETTE OVERRIDE
   Matches the locked Result Experience reference: airy page,
   pale-blue result hero, white supporting cards, clear hierarchy.
   Dark mode is intentionally unaffected.
   ============================================================ */
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card{
  background:linear-gradient(145deg,#eefaff 0%,#e2f7fc 100%)!important;
  color:#172033!important;
  border:1px solid #c9eaf4!important;
  box-shadow:0 16px 36px rgba(24,102,132,.10)!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-primary-top h2,
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-primary-value{color:#172033!important;opacity:1!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-primary-value{color:#0f9f88!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-based-on{color:#526274!important;opacity:1!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-metric-card{background:#ffffff!important;border:1px solid #cfe6ef!important;box-shadow:0 6px 16px rgba(30,90,120,.06)!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-metric-card span{color:#486276!important;opacity:1!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-metric-card strong{color:#172033!important;opacity:1!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-result-actions{border-top-color:#c8e2eb!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-result-action{background:#ffffff!important;color:#172033!important;border:1px solid #c9e1ea!important;box-shadow:0 3px 10px rgba(30,90,120,.04)!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-result-action:hover,
html:not([data-theme="dark"]) .gx-result-shell .gx-primary-card .gx-result-action:focus-visible{background:#f8fdff!important;color:#075985!important;border-color:#60a5fa!important;box-shadow:0 8px 20px rgba(30,90,120,.10)!important}

html:not([data-theme="dark"]) .gx-result-shell .gx-result-section{
  background:linear-gradient(145deg,#f7fcfe 0%,#eef9fc 100%)!important;
  border:1px solid #cfe8f0!important;
  color:#172033!important;
  box-shadow:0 12px 28px rgba(24,102,132,.07)!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-result-section h3,
html:not([data-theme="dark"]) .gx-result-shell .gx-result-section .gx-section-head h3{color:#172033!important;opacity:1!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-result-section p,
html:not([data-theme="dark"]) .gx-result-shell .gx-result-section .gx-section-head p{color:#526274!important;opacity:1!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-result-section .gx-kicker{color:#075985!important;opacity:1!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-two-col article,
html:not([data-theme="dark"]) .gx-result-shell .gx-input-item,
html:not([data-theme="dark"]) .gx-result-shell .gx-quick-grid button,
html:not([data-theme="dark"]) .gx-result-shell .gx-related-card,
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card{
  background:#ffffff!important;border:1px solid #d4e9f0!important;color:#172033!important;
}
html:not([data-theme="dark"]) .gx-result-shell .gx-two-col article h3{color:#172033!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-two-col article p{color:#526274!important;opacity:1!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-input-item span,
html:not([data-theme="dark"]) .gx-result-shell .gx-input-item strong{color:#172033!important;font-weight:800!important;opacity:1!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-quick-grid button{box-shadow:none!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-quick-grid button:hover,
html:not([data-theme="dark"]) .gx-result-shell .gx-quick-grid button:focus-visible{background:#f8fdff!important;color:#075985!important;border-color:#60a5fa!important;box-shadow:0 8px 18px rgba(24,102,132,.09)!important}

html:not([data-theme="dark"]) .gx-result-shell .gx-chart-wrap{background:#ffffff!important;border:1px solid #d4e9f0!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-chart-axis{fill:#526274!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-chart-y-label{fill:#172033!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-chart-gridline{stroke:#d8e8ef!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-chart-axis-note,
html:not([data-theme="dark"]) .gx-result-shell .gx-chart-legend{color:#526274!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-chart-legend span:first-child{color:#172033!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-chart-note{background:#f5fbfd!important;color:#526274!important;border-left-color:#38bdf8!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-chart-note strong{color:#172033!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-chart-toggle{background:#ffffff!important;color:#172033!important;border-color:#cfe4ec!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-chart-toggle:hover,
html:not([data-theme="dark"]) .gx-result-shell .gx-chart-toggle:focus-visible{background:#eefaff!important;color:#075985!important;border-color:#60a5fa!important}

html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card{box-shadow:0 5px 14px rgba(24,102,132,.04)!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card span,
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card strong{color:#172033!important;opacity:1!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card em{color:#526274!important;opacity:1!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card small{color:#075985!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card.is-current{background:#e8f6ff!important;border-color:#60a5fa!important;box-shadow:0 0 0 3px rgba(96,165,250,.10)!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-use-scenario{background:#f7fcfe!important;color:#172033!important;border-color:#cfe4ec!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-use-scenario:hover{background:#eefaff!important;color:#075985!important;border-color:#60a5fa!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-compare-table{background:#ffffff!important;border-color:#d4e9f0!important;color:#172033!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-compare-table th,
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-compare-table td{color:#172033!important;opacity:1!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-compare-table th{background:#f5fbfd!important;color:#526274!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-compare-table tbody tr:nth-child(2){background:#e8f6ff!important}

html:not([data-theme="dark"]) .gx-result-shell .gx-related-card{box-shadow:0 6px 16px rgba(24,102,132,.05)!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-related-card strong{color:#172033!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-related-card span{color:#526274!important;opacity:1!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-related-card>b{color:#075985!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-related-card:hover{background:#f8fdff!important;border-color:#60a5fa!important;box-shadow:0 12px 26px rgba(24,102,132,.11)!important}
html:not([data-theme="dark"]) .gx-result-shell .gx-related-card:hover strong{color:#075985!important}

@media(max-width:760px){
  html:not([data-theme="dark"]) .gx-result-shell .gx-result-section{background:linear-gradient(145deg,#f7fcfe 0%,#eef9fc 100%)!important;border-color:#cfe8f0!important;color:#172033!important;box-shadow:0 12px 28px rgba(24,102,132,.07)!important}
  html:not([data-theme="dark"]) .gx-result-shell .gx-result-section h3{color:#172033!important}
  html:not([data-theme="dark"]) .gx-result-shell .gx-result-section p{color:#526274!important}
  html:not([data-theme="dark"]) .gx-result-shell .gx-result-section .gx-kicker{color:#075985!important}
  html:not([data-theme="dark"]) .gx-result-shell .gx-two-col article,
  html:not([data-theme="dark"]) .gx-result-shell .gx-input-item,
  html:not([data-theme="dark"]) .gx-result-shell .gx-quick-grid button,
  html:not([data-theme="dark"]) .gx-result-shell .gx-related-card,
  html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card{background:#ffffff!important;border-color:#d4e9f0!important;color:#172033!important}
  html:not([data-theme="dark"]) .gx-result-shell .gx-two-col article h3,
  html:not([data-theme="dark"]) .gx-result-shell .gx-input-item span,
  html:not([data-theme="dark"]) .gx-result-shell .gx-input-item strong,
  html:not([data-theme="dark"]) .gx-result-shell .gx-related-card strong,
  html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card strong,
  html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card span{color:#172033!important}
  html:not([data-theme="dark"]) .gx-result-shell .gx-two-col article p,
  html:not([data-theme="dark"]) .gx-result-shell .gx-related-card span,
  html:not([data-theme="dark"]) .gx-result-shell .gx-tradeoff-body .gx25-scenario-card em{color:#526274!important}
}


/* ============================================================
   GANITRA CALCULATOR — RESULT EXPERIENCE REGRESSION GUARD
   One responsive rule for primary/metric values. Never split
   normal numeric results character-by-character; long text may
   wrap only at natural boundaries. This is intentionally last so
   historical calculator styles cannot reintroduce vertical digits.
   ============================================================ */
.gx-result-shell .gx-primary-value,
.gx-result-shell .gx-metric-card strong,
.gx-result-shell .gx-history-card>b{
  word-break:normal!important;
  overflow-wrap:normal!important;
  hyphens:none!important;
  white-space:nowrap!important;
  max-width:100%!important;
}
.gx-result-shell .gx-primary-value{
  min-width:0!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scrollbar-width:thin!important;
}
.gx-result-shell .gx-primary-value.gx-primary-long-text{
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  overflow-x:hidden!important;
}
@media(max-width:760px){
  .gx-result-shell .gx-primary-value{font-size:clamp(2.15rem,11vw,3.45rem)!important;letter-spacing:-.045em!important}
  .gx-result-shell .gx-metric-card strong{font-size:clamp(1rem,5vw,1.3rem)!important}
}


/* ============================================================
   GANITRA CALCULATOR — GLOBAL RESULT METRIC + SPACING REPAIR
   Keeps secondary metrics clean, vertical, readable and safe for
   long translations. This override intentionally comes last so it
   wins over older result-experience polish layers.
   ============================================================ */
.gx-primary-card,
.gx-result-section,
.gx-metric-card,
.gx-two-col article{box-sizing:border-box;min-width:0}
.gx-metric-grid{width:100%!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px!important;margin:24px 0 0!important;align-items:stretch!important}
.gx-metric-card{display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:flex-start!important;gap:8px!important;width:100%!important;min-height:0!important;padding:18px 20px!important;border-radius:16px!important;overflow:visible!important}
.gx-metric-card span{display:block!important;width:100%!important;margin:0!important;line-height:1.35!important;white-space:normal!important;overflow-wrap:anywhere!important}
.gx-metric-card strong{display:block!important;width:100%!important;margin:0!important;line-height:1.35!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important}
.gx-result-actions{margin-top:24px!important;padding-top:20px!important;gap:12px!important}
.gx-result-section{margin-top:24px!important;padding:24px!important}
.gx-two-col{gap:20px!important}
.gx-two-col article{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:0!important;padding:20px!important;min-width:0!important}
.gx-two-col article .gx-kicker{margin:0 0 8px!important;line-height:1.35!important}
.gx-two-col article h3{margin:0 0 12px!important;line-height:1.3!important;overflow-wrap:anywhere!important}
.gx-two-col article p{margin:0!important;line-height:1.7!important;overflow-wrap:anywhere!important}
@media(max-width:760px){
  .gx-metric-grid{grid-template-columns:1fr!important;gap:12px!important;margin-top:20px!important}
  .gx-metric-card{padding:16px!important}
  .gx-result-actions{margin-top:20px!important;padding-top:16px!important;gap:10px!important}
  .gx-result-section{margin-top:20px!important;padding:16px!important}
  .gx-two-col{gap:16px!important}
  .gx-two-col article{padding:16px!important}
}
@media(max-width:420px){
  .gx-metric-card strong{font-size:1.08rem!important}
  .gx-two-col article h3{font-size:1rem!important}
}

/* ============================================================
   GANITRA CALCULATOR — CALCULATOR CARD VISUAL REFINEMENT
   Light mode: subtle cool card tint, clearer border and more
   rounded corners for stronger separation on mobile and desktop.
   Dark mode remains on the existing theme tokens.
   ============================================================ */
html:not([data-theme="dark"]) .calc-grid-card {
  background: #F8FAFF;
  border: 1px solid #CBD5E1;
  border-radius: 16px;
}
html:not([data-theme="dark"]) .calc-grid-card:hover,
html:not([data-theme="dark"]) .calc-grid-card:focus {
  border-color: #94A3B8;
}


/* Targeted mobile containment for Recently Used and Favorites.
   Keeps saved-card grids aligned with Popular Calculators without changing
   the global container behavior. */
@media (max-width: 767px) {
    #recently-used-section .container,
    #favorites-section .container {
        width: 100%;
        max-width: var(--gx-content-max);
        margin-inline: auto;
        padding-left: 1rem;
        padding-right: 1rem;
        box-sizing: border-box;
    }

    #recently-used-grid,
    #favorites-grid {
        width: 100%;
        min-width: 0;
        grid-template-columns: minmax(0, 1fr);
        gap: var(--gx-card-gap);
    }

    #recently-used-grid > .calc-grid-card-wrap,
    #favorites-grid > .calc-grid-card-wrap {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    #recently-used-grid .calc-grid-card,
    #favorites-grid .calc-grid-card {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
}

