:root {
    /* ===== Color Palette - Light Mode ===== */
    --color-primary: #2563EB;
    --color-primary-hover: #1D4ED8;
    --color-primary-light: #EFF6FF;
    --color-secondary: #059669;
    --color-secondary-light: #ECFDF5;
    --color-accent: #F59E0B;
    --color-accent-light: #FFFBEB;

    /* Backgrounds */
    --color-bg: #F8FAFC;
    --color-surface: #FFFFFF;
    --color-surface-secondary: #F1F5F9;

    /* Text */
    --color-text: #0F172A;
    --color-text-secondary: #475569;
    --color-text-muted: #94A3B8;
    --color-text-inverse: #FFFFFF;

    /* Borders */
    --color-border: #E2E8F0;
    --color-border-strong: #CBD5E1;

    /* Status */
    --color-success: #059669;
    --color-error: #DC2626;

    /* Chart Colors */
    --chart-1: #3B82F6;
    --chart-2: #10B981;
    --chart-3: #8B5CF6;
    --chart-4: #F59E0B;
    --chart-5: #EF4444;
    --chart-6: #EC4899;

    /* ===== Typography ===== */
    --font-sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Monaco, Consolas, monospace;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;

    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    /* ===== Spacing (8px base) ===== */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* ===== Border Radius ===== */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* ===== Shadows ===== */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

    /* ===== Transitions ===== */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;

    /* ===== Layout ===== */
    --container-max: 1200px;
    --header-height: 60px;
}

/* ===== Dark Mode ===== */
[data-theme="dark"] {
    --color-primary: #60A5FA;
    --color-primary-hover: #93C5FD;
    --color-primary-light: #1E3A5F;
    --color-secondary: #34D399;
    --color-secondary-light: #064E3B;
    --color-accent: #FBBF24;
    --color-accent-light: #451A03;

    --color-bg: #0F172A;
    --color-surface: #1E293B;
    --color-surface-secondary: #334155;

    --color-text: #F1F5F9;
    --color-text-secondary: #CBD5E1;
    --color-text-muted: #64748B;

    --color-border: #334155;
    --color-border-strong: #475569;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ===== CSS Reset ===== */
*,
*::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);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Layout ===== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* ===== Header ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    height: var(--header-height);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    color: var(--color-text);
    font-weight: var(--font-bold);
    font-size: var(--text-lg);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--color-primary), #7C3AED);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: var(--font-bold);
    font-size: var(--text-lg);
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    padding: var(--space-2) 0;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-primary);
    border-radius: var(--radius-full);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.theme-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    background: var(--color-border);
    color: var(--color-text);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
}

@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--color-surface);
        border-bottom: 1px solid var(--color-border);
        padding: var(--space-4) var(--space-6);
        gap: var(--space-4);
    }

    .nav.open {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
    }
}

/* ===== Hero Section ===== */
.hero {
    text-align: center;
    padding: var(--space-12) 0 var(--space-8);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-4);
}

.hero-title {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--color-text);
    margin-bottom: var(--space-4);
    line-height: 1.2;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: var(--text-4xl);
    }
}

.hero-description {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ===== Section ===== */
.section {
    padding: var(--space-12) 0;
}

/* ===== Card ===== */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
}

.card-header {
    margin-bottom: var(--space-6);
}

.card-title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--color-text);
    margin-bottom: var(--space-2);
}

.card-description {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* ===== Calculator Layout ===== */
.calc-layout {
    display: grid;
    gap: var(--space-6);
}

@media (min-width: 1024px) {
    .calc-layout {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===== Mode Tabs ===== */
.mode-tabs {
    display: flex;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-1);
    gap: var(--space-1);
    margin-bottom: var(--space-6);
}

.mode-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.mode-tab:hover {
    color: var(--color-text);
    background: var(--color-surface-secondary);
}

.mode-tab.active {
    background: var(--color-primary);
    color: white;
}

.mode-tab svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.mode-panel {
    display: none;
}

.mode-panel.active {
    display: block;
}

/* ===== Form Elements ===== */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text);
    margin-bottom: var(--space-2);
}

.form-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: var(--color-surface-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: 10px;
    color: var(--color-text-muted);
    cursor: help;
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 0 var(--space-4);
    font-family: var(--font-mono);
    font-size: var(--text-base);
    color: var(--color-text);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    outline: none;
}

.form-input:hover {
    border-color: var(--color-border-strong);
}

.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.form-input::placeholder {
    color: var(--color-text-muted);
}

.form-input-lg {
    height: 56px;
    font-size: var(--text-xl);
    text-align: right;
    padding-right: var(--space-12);
}

/* Input with suffix */
.input-group {
    position: relative;
}

.input-suffix {
    position: absolute;
    right: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-secondary);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    pointer-events: none;
}

/* ===== Quick Buttons ===== */
.quick-btns {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.quick-btn {
    padding: var(--space-2) var(--space-3);
    background: var(--color-surface-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quick-btn:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* ===== Toggle Group ===== */
.toggle-group {
    display: flex;
    background: var(--color-surface-secondary);
    border-radius: var(--radius-md);
    padding: 3px;
}

.toggle-btn {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.toggle-btn.active {
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: var(--shadow-sm);
}

/* ===== Stepper ===== */
.stepper {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    background: var(--color-surface-secondary);
    border-radius: var(--radius-md);
    padding: var(--space-1);
}

.stepper-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.stepper-btn:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.stepper-value {
    min-width: 40px;
    text-align: center;
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    font-family: var(--font-mono);
    color: var(--color-text);
}

.stepper-unit {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-left: var(--space-2);
}

/* ===== Result Card ===== */
.result-card {
    background: linear-gradient(135deg, var(--color-primary) 0%, #7C3AED 100%);
    border: none;
    color: white;
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.result-label {
    font-size: var(--text-sm);
    opacity: 0.9;
    margin-bottom: var(--space-2);
}

.result-amount {
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    font-family: var(--font-mono);
    margin-bottom: var(--space-4);
    position: relative;
}

.result-amount .unit {
    font-size: var(--text-xl);
    font-weight: var(--font-medium);
    margin-left: var(--space-1);
}

.result-sub {
    font-size: var(--text-base);
    opacity: 0.9;
}

.result-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: var(--space-4) 0;
}

.result-annual {
    font-size: var(--text-base);
    opacity: 0.9;
}

.result-annual strong {
    font-family: var(--font-mono);
}

/* ===== Progress Bar ===== */
.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: var(--space-4) 0;
}

.progress-fill {
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

/* ===== Deduction List ===== */
.deduction-card {
    margin-top: var(--space-6);
}

.deduction-chart {
    position: relative;
    height: 200px;
    margin-bottom: var(--space-6);
}

.chart-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.chart-center-value {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    font-family: var(--font-mono);
    color: var(--color-text);
}

.chart-center-label {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: var(--space-1);
}

.deduction-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.deduction-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    background: var(--color-surface-secondary);
    border-radius: var(--radius-md);
}

.deduction-name {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text);
}

.deduction-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.deduction-dot.c1 {
    background: var(--chart-1);
}

.deduction-dot.c2 {
    background: var(--chart-2);
}

.deduction-dot.c3 {
    background: var(--chart-3);
}

.deduction-dot.c4 {
    background: var(--chart-4);
}

.deduction-dot.c5 {
    background: var(--chart-5);
}

.deduction-dot.c6 {
    background: var(--chart-6);
}

.deduction-values {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.deduction-amount {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    font-family: var(--font-mono);
    color: var(--color-text);
    min-width: 80px;
    text-align: right;
}

.deduction-rate {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    min-width: 50px;
    text-align: right;
}

.deduction-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    background: var(--color-error);
    color: white;
    border-radius: var(--radius-md);
    margin-top: var(--space-4);
}

.deduction-total-label {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
}

.deduction-total-value {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    font-family: var(--font-mono);
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
    margin-top: var(--space-6);
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-item {
    background: var(--color-surface-secondary);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    text-align: center;
}

.stat-value {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    font-family: var(--font-mono);
    color: var(--color-primary);
    margin-bottom: var(--space-1);
}

.stat-label {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== Action Buttons ===== */
.action-btns {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-6);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    height: 44px;
    padding: 0 var(--space-5);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
}

.btn-secondary {
    background: var(--color-surface-secondary);
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.btn-secondary:hover {
    background: var(--color-border);
}

.btn svg {
    width: 18px;
    height: 18px;
}

/* ===== Reverse Calculator ===== */
.reverse-result {
    background: linear-gradient(135deg, var(--color-secondary) 0%, #047857 100%);
    color: white;
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    text-align: center;
}

.reverse-result-label {
    font-size: var(--text-base);
    opacity: 0.9;
    margin-bottom: var(--space-2);
}

.reverse-result-amount {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    font-family: var(--font-mono);
    margin-bottom: var(--space-2);
}

.reverse-result-sub {
    font-size: var(--text-sm);
    opacity: 0.8;
}

.reverse-details {
    margin-top: var(--space-6);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-border);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.detail-value {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    font-family: var(--font-mono);
    color: var(--color-text);
}

.detail-value.success {
    color: var(--color-success);
}

.detail-value.error {
    color: var(--color-error);
}

/* ===== Comparison Mode ===== */
.compare-inputs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--space-4);
    align-items: end;
}

@media (max-width: 768px) {
    .compare-inputs {
        grid-template-columns: 1fr;
    }

    .compare-arrow {
        transform: rotate(90deg);
        justify-self: center;
    }
}

.compare-arrow {
    font-size: var(--text-2xl);
    color: var(--color-primary);
    padding-bottom: var(--space-3);
}

.compare-result {
    background: linear-gradient(135deg, var(--color-accent) 0%, #D97706 100%);
    color: white;
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    text-align: center;
    margin-top: var(--space-6);
}

.compare-diff {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    font-family: var(--font-mono);
    margin: var(--space-2) 0;
}

.compare-diff.positive {
    color: #BBF7D0;
}

.compare-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin-top: var(--space-6);
}

.compare-item {
    background: var(--color-surface-secondary);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    text-align: center;
}

.compare-item-label {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-bottom: var(--space-2);
}

.compare-item-value {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    font-family: var(--font-mono);
    color: var(--color-text);
}

/* ===== Table ===== */
.table-container {
    overflow-x: auto;
    margin: var(--space-6) 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: var(--space-3) var(--space-4);
    text-align: right;
    font-size: var(--text-sm);
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.data-table th {
    background: var(--color-surface-secondary);
    font-weight: var(--font-semibold);
    color: var(--color-text);
    position: sticky;
    top: 0;
}

.data-table th:first-child,
.data-table td:first-child {
    text-align: left;
}

.data-table tbody tr:hover {
    background: var(--color-surface-secondary);
}

.data-table .highlight {
    background: var(--color-primary-light);
}

.data-table .amount-primary {
    font-weight: var(--font-bold);
    color: var(--color-primary);
    font-family: var(--font-mono);
}

.data-table .amount-error {
    color: var(--color-error);
    font-family: var(--font-mono);
}

/* ===== Notice ===== */
.notice {
    background: var(--color-surface-secondary);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.notice a {
    color: var(--color-primary);
    text-decoration: none;
}

.notice a:hover {
    text-decoration: underline;
}

/* ===== Footer ===== */
.footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: var(--space-12) 0;
    margin-top: var(--space-16);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-8);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.footer-section h4 {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text);
    margin-bottom: var(--space-4);
}

.footer-section p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-link {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--color-primary);
}

.footer-bottom {
    margin-top: var(--space-8);
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-border);
    text-align: center;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* ===== Utilities ===== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.font-mono {
    font-family: var(--font-mono);
}

.hidden {
    display: none !important;
}

.mt-4 {
    margin-top: var(--space-4);
}

.mt-6 {
    margin-top: var(--space-6);
}

.mt-8 {
    margin-top: var(--space-8);
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-6 {
    margin-bottom: var(--space-6);
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeIn 0.3s ease forwards;
}

/* ===== Dark Mode Text Fixes for Colored Boxes ===== */
/* Ensure text in colored background boxes remains readable in dark mode */
[data-theme="dark"] .tip-box,
[data-theme="dark"] .warning-box,
[data-theme="dark"] .info-box,
[data-theme="dark"] .benefit-box,
[data-theme="dark"] .condition-box,
[data-theme="dark"] .legal-box,
[data-theme="dark"] .illegal-box,
[data-theme="dark"] .myth-box,
[data-theme="dark"] .truth-box,
[data-theme="dark"] .support-box,
[data-theme="dark"] .calc-box,
[data-theme="dark"] .wage-box,
[data-theme="dark"] .special-box,
[data-theme="dark"] .example-box,
[data-theme="dark"] .best-box,
[data-theme="dark"] .checklist {
    color: #0F172A;
}

[data-theme="dark"] .tip-box *,
[data-theme="dark"] .warning-box *,
[data-theme="dark"] .info-box *,
[data-theme="dark"] .benefit-box *,
[data-theme="dark"] .condition-box *,
[data-theme="dark"] .legal-box *,
[data-theme="dark"] .illegal-box *,
[data-theme="dark"] .myth-box *,
[data-theme="dark"] .truth-box *,
[data-theme="dark"] .support-box *,
[data-theme="dark"] .calc-box *,
[data-theme="dark"] .wage-box *,
[data-theme="dark"] .special-box *,
[data-theme="dark"] .example-box *,
[data-theme="dark"] .best-box *,
[data-theme="dark"] .checklist * {
    color: #0F172A;
}

/* Tables with highlight backgrounds */
[data-theme="dark"] table .highlight,
[data-theme="dark"] table .highlight * {
    color: #0F172A;
}

/* Preserve white text in gradient boxes */
[data-theme="dark"] .cta-box,
[data-theme="dark"] .cta-box *,
[data-theme="dark"] .result-card,
[data-theme="dark"] .result-card *,
[data-theme="dark"] .article-hero,
[data-theme="dark"] .article-hero *,
[data-theme="dark"] .coffee-calc,
[data-theme="dark"] .coffee-calc *,
[data-theme="dark"] .income-box,
[data-theme="dark"] .income-box * {
    color: inherit;
}