:root {
    color-scheme: light;
    --primary-color: #0f766e;
    --primary-hover: #115e59;
    --primary-soft: #ecfdf5;
    --secondary-color: #2563eb;
    --bg-color: #f5f7f4;
    --card-bg: #ffffff;
    --surface-muted: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --danger-color: #dc2626;
    --track-color: #e2e8f0;
    --shadow-color: rgba(15, 23, 42, 0.28);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.10), transparent 28%),
        linear-gradient(180deg, #fcfdfb 0%, var(--bg-color) 100%);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

button,
input {
    font: inherit;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
}

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

header h1 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 680px;
    margin: 0 auto;
}

.calculator-card {
    background: var(--card-bg);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 24px 60px -32px var(--shadow-color);
    margin-bottom: 2rem;
    border: 1px solid rgba(15, 118, 110, 0.12);
}

.intro-section {
    background: linear-gradient(135deg, var(--primary-soft) 0%, var(--surface-muted) 100%);
    border: 1px solid rgba(15, 118, 110, 0.20);
    border-radius: 1.25rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.intro-section h2 {
    font-size: 1.5rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.intro-section p {
    color: var(--text-muted);
    max-width: 62ch;
}

.section-badge,
.recommended-label {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.10);
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.section-badge {
    margin-bottom: 1rem;
}

#employee-cost-form {
    max-width: 620px;
    margin: 0 auto;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.input-group label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
}

.currency-field {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    background: var(--card-bg);
    transition: border-color 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.currency-field:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.currency-field.has-error {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.10);
}

.currency-field > span {
    padding-left: 1rem;
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 700;
}

.currency-field input {
    width: 100%;
    min-width: 0;
    padding: 0.9rem 1rem 0.9rem 0.6rem;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-main);
    font-size: 1.25rem;
    font-weight: 700;
}

.currency-field input::placeholder {
    color: #94a3b8;
}

.helper-text,
.error-message {
    font-size: 0.8125rem;
}

.helper-text {
    color: var(--text-muted);
}

.error-message {
    color: var(--danger-color);
    font-weight: 600;
    min-height: 1.2em;
}

.btn-calculate {
    width: 100%;
    padding: 0.9rem 1.25rem;
    border: none;
    border-radius: 0.75rem;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-calculate:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px -18px rgba(15, 118, 110, 0.8);
}

.btn-calculate:focus-visible,
summary:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.45);
    outline-offset: 3px;
}

.results[hidden] {
    display: none;
}

.results.is-visible {
    animation: reveal-results 0.45s ease-out both;
}

hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 2.5rem 0;
}

.section-title {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 1.25rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.result-card {
    position: relative;
    background: linear-gradient(180deg, var(--card-bg) 0%, var(--surface-muted) 100%);
    padding: 1.5rem 1rem;
    border-radius: 1rem;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: 0 12px 30px -28px var(--shadow-color);
    transition: transform 0.2s;
}

.result-card:hover {
    transform: translateY(-2px);
}

.result-card.highlight {
    background: linear-gradient(135deg, var(--primary-soft) 0%, rgba(37, 99, 235, 0.08) 100%);
    border: 2px solid var(--primary-color);
}

.recommended-label {
    position: absolute;
    top: -0.8rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: #ffffff;
    white-space: nowrap;
}

.result-card .label {
    display: block;
    min-height: 2.7em;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
}

.result-card .value {
    display: block;
    color: var(--text-main);
    font-size: clamp(1.25rem, 3vw, 1.8rem);
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.result-card.highlight .value {
    color: var(--primary-color);
}

.result-card small {
    display: block;
    color: var(--text-muted);
    margin-top: 0.65rem;
    font-size: 0.78rem;
}

.comparison-section,
.calculation-details,
.insights-section,
.educational-box {
    margin-top: 2rem;
}

.comparison-list {
    display: grid;
    gap: 1.25rem;
}

.comparison-copy {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.comparison-copy span {
    color: var(--text-muted);
    font-weight: 700;
}

.bar-track {
    width: 100%;
    height: 0.9rem;
    border-radius: 999px;
    background: var(--track-color);
    overflow: hidden;
}

.bar {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.salary-bar {
    background: #94a3b8;
}

.monthly-bar {
    background: var(--secondary-color);
}

.planned-bar {
    background: var(--primary-color);
}

.calculation-details {
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    background: var(--surface-muted);
    overflow: hidden;
}

.calculation-details summary {
    position: relative;
    cursor: pointer;
    list-style: none;
    padding: 1.15rem 3.25rem 1.15rem 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.calculation-details summary::-webkit-details-marker {
    display: none;
}

.calculation-details summary::after {
    content: "+";
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 1.5rem;
}

.calculation-details[open] summary::after {
    content: "−";
}

.detail-list {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
    border-bottom: 0;
}

.detail-row div {
    min-width: 0;
}

.detail-row strong,
.detail-row small {
    display: block;
}

.detail-row small {
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.detail-row > span {
    flex: 0 0 auto;
    font-weight: 800;
}

.total-row {
    background: var(--primary-soft);
    color: var(--primary-color);
}

.insights-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.insights-list li {
    position: relative;
    padding: 1rem 1rem 1rem 2.6rem;
    border: 1px solid var(--border-color);
    border-radius: 0.9rem;
    color: var(--text-muted);
    background: var(--card-bg);
}

.insights-list li::before {
    content: "✓";
    position: absolute;
    left: 1rem;
    top: 1rem;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 800;
    text-align: center;
    line-height: 1.15rem;
}

.educational-box {
    padding: 1.5rem;
    border-radius: 1rem;
    border-left: 4px solid var(--secondary-color);
    background: rgba(37, 99, 235, 0.08);
}

.educational-box h2 {
    font-size: 1.15rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.educational-box p {
    color: var(--text-muted);
}

.disclaimer {
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
}

.ad-container {
    margin: 2rem 0;
    min-height: 100px;
    display: flex;
    justify-content: center;
}

footer .seo-article {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 1.25rem;
    margin-top: 4rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.seo-article h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.seo-article h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin: 2rem 0 1rem;
}

.seo-article p {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.seo-article a {
    color: var(--primary-color);
    font-weight: 600;
}

.copyright {
    text-align: center;
    margin-top: 3rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    padding-bottom: 2rem;
}

@keyframes reveal-results {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

    .calculator-card {
        padding: 1.25rem;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .result-card .label {
        min-height: auto;
    }

    .result-card.highlight {
        margin-top: 0.5rem;
    }

    .insights-list {
        grid-template-columns: 1fr;
    }

    footer .seo-article {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .intro-section {
        padding: 1.25rem;
    }

    .intro-section h2 {
        font-size: 1.3rem;
    }

    .detail-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.55rem;
    }

    .detail-row > span {
        align-self: flex-end;
    }

    .comparison-copy {
        font-size: 0.82rem;
    }
}
